/*
 Theme Name: McReaSoft Custom Theme
 Theme URI: https://mcreasoft.com/mcreasoft-custom-theme
 Author: McReaSoft AI Solutions
 Author URI: https://mcreasoft.com
 Description: A clean, lightweight, highly customizable WordPress theme built for blogs, landing pages, and marketing sites.
 Version: 1.0.7
 License: GNU General Public License v2 or later
 License URI: http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain: mcreasoft-custom
 Tags: one-column, two-columns, right-sidebar, custom-logo, custom-colors, blog, marketing
*/

:root {
    --mc-primary: #2563eb;
    --mc-primary-dark: #1d4ed8;
    --mc-bg: #f3f4f6;
    --mc-surface: #ffffff;
    --mc-text: #111827;
    --mc-muted: #6b7280;
    --mc-border: #e5e7eb;
    --mc-radius: 0.75rem;
    --mc-shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.08);

    /* Customizable header variables */
    --mc-header-bg: #0f172a;
    --mc-header-text: #e5e7eb;
    --mc-header-muted: #9ca3af;

    /* Customizable logo sizing */
    --mc-logo-max-height: 64px;
    --mc-logo-max-width: 220px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--mc-bg);
    color: var(--mc-text);
    line-height: 1.6;
}

a {
    color: var(--mc-primary);
    text-decoration: none;
}

a:hover {
    color: var(--mc-primary-dark);
    text-decoration: underline;
}

.site {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-header {
    background: var(--mc-header-bg);
    color: var(--mc-header-text);
    box-shadow: var(--mc-shadow-soft);
    position: sticky;
    top: 0;
    z-index: 20;
}

.site-header a {
    color: var(--mc-header-text);
}

.site-header a:hover {
    color: #ffffff;
}

.site-header-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.site-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0;
}

.site-description {
    margin: 0;
    font-size: 0.85rem;
    color: var(--mc-header-muted);
}

/* Navigation (supports unlimited parent/child dropdowns) */

.main-navigation {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    color: var(--mc-header-text);
    font-size: 0.95rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.25rem;
}

.main-navigation a:hover {
    color: #ffffff;
    text-decoration: none;
}

/* Dropdown */
.main-navigation ul ul {
    display: none;
    position: absolute;
    top: 100%;
    margin-top: 0;
    left: 0;
    min-width: 220px;
    padding: 0.55rem 0.5rem;
    background: var(--mc-header-bg);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.9rem;
    box-shadow: 0 16px 40px rgba(2, 6, 23, 0.45);
    z-index: 999;
}

.main-navigation ul ul li {
    width: 100%;
}

.main-navigation ul ul a {
    display: block;
    padding: 0.55rem 0.75rem;
    border-radius: 0.65rem;
    white-space: nowrap;
}

.main-navigation ul ul a:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Show submenu on hover/focus */
.main-navigation li:hover > ul,
.main-navigation li:focus-within > ul {
    display: block;
}

/* 3rd level and beyond fly out to the right */
.main-navigation ul ul ul {
    top: 0;
    left: calc(100% + 0.35rem);
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: 1px solid #1f2937;
    border-radius: 999px;
    padding: 0.4rem 0.75rem;
    color: var(--mc-header-text);
    font-size: 0.8rem;
}

.menu-toggle span {
    margin-left: 0.35rem;
}

.site-main-wrapper {
    flex: 1;
}

.site-main {
    max-width: 1120px;
    margin: 1.75rem auto;
    padding: 0 1.25rem;
    display: grid;
    grid-template-columns: minmax(0, 2.5fr) minmax(0, 1fr);
    gap: 2rem;
}

.site-main.full-width {
    grid-template-columns: minmax(0, 1fr);
}

.content-area {
    background: var(--mc-surface);
    border-radius: var(--mc-radius);
    padding: 1.75rem 1.6rem;
    box-shadow: var(--mc-shadow-soft);
}

.widget-area {
    align-self: flex-start;
    position: sticky;
    top: 5.5rem;
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
}

.widget {
    background: #0b1120;
    color: #e5e7eb;
    border-radius: var(--mc-radius);
    padding: 1.25rem 1.1rem;
    box-shadow: var(--mc-shadow-soft);
    margin-bottom: 1.25rem;
}

.widget-title {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.85rem;
    color: #9ca3af;
}

/* Posts */

.post-card {
    padding-bottom: 1.75rem;
    border-bottom: 1px solid var(--mc-border);
    margin-bottom: 1.75rem;
}

.post-card:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.post-card-thumb {
    margin-bottom: 0.9rem;
    overflow: hidden;
    border-radius: 0.9rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
}

.post-card-thumb img {
    display: block;
    width: 100%;
    height: auto;
}

.post-card-title {
    font-size: 1.5rem;
    margin: 0 0 0.3rem;
}

.post-card-meta {
    font-size: 0.85rem;
    color: var(--mc-muted);
    margin-bottom: 0.75rem;
}

.post-card-excerpt {
    margin: 0.75rem 0 1rem;
    color: #374151;
}

.post-card-readmore {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Single post */

.entry-header {
    margin-bottom: 1.25rem;
}

.entry-title {
    font-size: 2rem;
    margin: 0 0 0.5rem;
}

.entry-meta {
    font-size: 0.9rem;
    color: var(--mc-muted);
}

.entry-content {
    font-size: 1rem;
}

.entry-content p {
    margin-bottom: 1rem;
}

.entry-content h2 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.entry-content ul,
.entry-content ol {
    margin-left: 1.25rem;
    margin-bottom: 1rem;
}

/* Buttons */

.button,
.button-primary,
button,
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: none;
    padding: 0.55rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    background: var(--mc-primary);
    color: #ffffff;
    cursor: pointer;
    transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.08s ease;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.35);
}

.button:hover,
.button-primary:hover,
button:hover,
input[type="submit"]:hover {
    background: var(--mc-primary-dark);
    transform: translateY(-1px);
}

/* Pagination */

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 2rem;
    font-size: 0.9rem;
}

.pagination a,
.pagination span {
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--mc-border);
}

.pagination .current {
    background: var(--mc-primary);
    color: #ffffff;
    border-color: var(--mc-primary);
}

/* Forms & inputs */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border-radius: 0.5rem;
    border: 1px solid var(--mc-border);
    background: #f9fafb;
    font-family: inherit;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

textarea {
    min-height: 120px;
}

/* Footer */

.site-footer {
    background: #020617;
    color: #9ca3af;
    margin-top: auto;
}

.site-footer-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 1.25rem 1.25rem 1.75rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.9rem;
}

/* Mobile */

@media (max-width: 768px) {
    .site-main {
        grid-template-columns: minmax(0, 1fr);
    }

    .widget-area {
        position: static;
        max-height: none;
    }

    .site-header-inner {
        flex-wrap: wrap;
    }

    .main-navigation {
        width: 100%;
        justify-content: flex-start;
        display: none;
    }

    .main-navigation.toggled {
        display: block;
    }

    .main-navigation ul {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.75rem 0;
        gap: 0.15rem;
    }

    .main-navigation a {
        padding: 0.6rem 0.2rem;
    }

    /* On mobile, show submenus as indented lists */
    .main-navigation ul ul {
        display: block;
        position: static;
        min-width: 0;
        border: none;
        box-shadow: none;
        padding: 0 0 0.5rem 1rem;
        margin: 0;
    }

    .main-navigation ul ul ul {
        padding-left: 1rem;
    }

    .menu-toggle {
        display: inline-flex;
        margin-left: auto;
    }
}


.main-navigation li.menu-item-has-children {
    padding-bottom: 0.35rem;
}


/* Touch support: keep submenu open when toggled */
.main-navigation li.submenu-open > ul { display: block; }

.main-navigation ul ul { pointer-events: auto; }


/* Custom logo sizing */
.custom-logo-link img {
    max-height: var(--mc-logo-max-height);
    max-width: var(--mc-logo-max-width);
    height: auto;
    width: auto;
    display: block;
}
