/* Spark Systems Brand Colors */
:root {
    --brand-white: #ffffff;
    --brand-black: #000000;
    --brand-navy: #033d4e;
    --brand-aqua: #00dfba;
    --brand-neon: #ccf859;
    --soft-gray: #F5F7FA;
    --text-gray: #4A5568;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', sans-serif;
    color: var(--brand-black);
    overflow-x: hidden;
    background: var(--brand-white);
    line-height: 1.6;
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(3, 61, 78, 0.1);
}

.site-navigation {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    font-family: 'Archivo Black', sans-serif;
    font-size: 1.8rem;
    color: var(--brand-navy);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.site-logo span {
    color: var(--brand-neon);
    background: var(--brand-navy);
    padding: 0 8px;
    border-radius: 4px;
}

.main-navigation {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    align-items: center;
}

.main-navigation a {
    text-decoration: none;
    color: var(--brand-navy);
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.main-navigation a:hover {
    color: var(--brand-aqua);
}

/* Dropdown Navigation */
.main-navigation .menu-item-has-children {
    position: relative;
}

.main-navigation .sub-menu {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    z-index: 9999;
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
    min-width: 200px;
    background: var(--brand-white);
    border-top: 3px solid var(--brand-aqua);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 24px rgba(3, 61, 78, 0.12);
}

.main-navigation .menu-item-has-children:hover .sub-menu {
    display: block;
}

.main-navigation .menu-item-has-children::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 0.75rem;
}
.main-navigation .sub-menu li {
    display: block;
    width: 100%;
}

.main-navigation .sub-menu li a {
    display: block;
    padding: 0.65rem 1.25rem;
    font-size: 0.9rem;
    color: var(--brand-navy);
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
}

.main-navigation .sub-menu li a:hover {
    background: var(--soft-gray);
    color: var(--brand-aqua);
}

/* CTA Button */
.cta-button {
    background: var(--brand-neon);
    color: var(--brand-navy);
    padding: 0.9rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-size: 0.95rem;
}

.cta-button:hover {
    background: var(--brand-aqua);
    color: var(--brand-navy) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 223, 186, 0.3);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: var(--brand-neon);
    color: var(--brand-navy);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
}

/* Main Content */
.site-content {
    margin-top: 90px;
    min-height: 60vh;
}

/* Page/Post Content */
.content-area {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.entry-content {
    max-width: 800px;
    margin: 0 auto;
}

.entry-content h1,
.entry-content h2,
.entry-content h3 {
    font-family: 'Archivo Black', sans-serif;
    color: var(--brand-navy);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.entry-content h1 {
    font-size: 3rem;
    margin-top: 0;
}

.entry-content h2 {
    font-size: 2.5rem;
}

.entry-content h3 {
    font-size: 2rem;
}

.entry-content p {
    margin-bottom: 1.5rem;
    color: var(--text-gray);
}

.entry-content a {
    color: var(--brand-aqua);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.entry-content a:hover {
    border-bottom-color: var(--brand-aqua);
}

/* Footer */
.site-footer {
    background: var(--brand-navy);
    padding: 4rem 2rem 2rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-logo {
    font-family: 'Archivo Black', sans-serif;
    font-size: 1.8rem;
    color: var(--brand-white);
    margin-bottom: 1rem;
}

.footer-logo span {
    color: var(--brand-neon);
}

.footer-content h4 {
    color: var(--brand-white);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.footer-content ul {
    list-style: none;
}

.footer-content li {
    margin-bottom: 0.8rem;
}

.footer-content a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-content a:hover {
    color: var(--brand-aqua);
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.9rem;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: var(--brand-aqua);
}

/* Utility Classes */
.section-tag {
    display: inline-block;
    background: var(--brand-neon);
    color: var(--brand-navy);
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.secondary-button {
    background: transparent;
    color: var(--brand-navy);
    border: 2px solid var(--brand-navy);
    padding: 0.9rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.secondary-button:hover {
    border-color: var(--brand-aqua);
    color: var(--brand-aqua);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .main-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }

    .main-navigation.active {
        display: flex;
    }

    .main-navigation .sub-menu {
        position: static;
        box-shadow: none;
        border-top: none;
        border-left: 3px solid var(--brand-aqua);
        border-radius: 0;
        padding: 0;
        margin: 0.5rem 0 0.5rem 1rem;
        display: block;
    }

    .main-navigation .sub-menu li a {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .entry-content h1 {
        font-size: 2rem;
    }

    .entry-content h2 {
        font-size: 1.8rem;
    }
}

/* WordPress Core Styles */
.alignleft {
    float: left;
    margin: 0 1.5rem 1rem 0;
}

.alignright {
    float: right;
    margin: 0 0 1rem 1.5rem;
}

.aligncenter {
    display: block;
    margin: 0 auto 1rem;
}

img {
    max-width: 100%;
    height: auto;
}

.sticky {
    /* Styles for sticky posts */
}

.bypostauthor {
    /* Styles for post author comments */
}
/* ---- Mobile menu (from header.php) ---- */
/* ============================================
   MOBILE MENU - COMPLETE FIX
   ============================================ */

/* Submenu arrow — mobile only, hidden on desktop */
.submenu-arrow {
    display: none;
}

/* Ensure nav is the containing block for the dropdown */
.site-navigation {
    position: relative;
}

/* Hide toggle on desktop */
.menu-toggle {
    display: none;
}

/* ---- MOBILE ONLY ---- */
@media (max-width: 968px) {

    /* Hamburger button */
    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 26px;
        height: 18px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 10001;
        flex-shrink: 0;
    }

    .menu-toggle span {
        display: block;
        width: 100%;
        height: 2px;
        background: #003145;
        border-radius: 2px;
        transition: all 0.3s ease;
        transform-origin: center;
    }

    /* Animate hamburger → X when open */
    .menu-toggle.is-active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .menu-toggle.is-active span:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }
    .menu-toggle.is-active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Nav: hidden by default, slides down when open */
    .main-navigation {
        display: none;
        position: absolute;
        top: 100%; /* flush below header */
        left: 0;
        right: 0;
        background: #ffffff;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
        z-index: 9998;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        /* Reset any desktop styles */
        width: 100% !important;
        min-width: unset !important;
        max-width: unset !important;
        padding: 0 !important;
        margin: 0 !important;
        list-style: none !important;
        border-radius: 0 !important;
    }

    .main-navigation.is-open {
        display: block;
        animation: menuSlideDown 0.25s ease;
    }

    @keyframes menuSlideDown {
        from { opacity: 0; transform: translateY(-8px); }
        to   { opacity: 1; transform: translateY(0); }
    }

    /* Reset list styles */
    .main-navigation,
    .main-navigation ul,
    .main-navigation li {
        margin: 0 !important;
        list-style: none !important;
    }

    /* Top-level items */
    .main-navigation > li {
        border-bottom: 1px solid #f0f0f0 !important;
        padding: 0 !important;
    }

    .main-navigation > li:last-child {
        border-bottom: none !important;
        padding: 0.75rem 1.25rem !important;
    }

    /* All links */
    .main-navigation li a {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0.9rem 1.25rem !important;
        font-size: 0.95rem !important;
        font-weight: 600 !important;
        line-height: 1.3 !important;
        color: #003145 !important;
        text-decoration: none !important;
        transition: background 0.2s ease, color 0.2s ease !important;
    }

    .main-navigation li a:hover {
        background: #f8f9fa !important;
        color: #00C8C8 !important;
    }

    /* Submenu expand arrow */
    .menu-item-has-children > a .submenu-arrow {
        display: inline-block;
        font-size: 0.7rem;
        color: #00C8C8;
        transition: transform 0.25s ease;
        margin-left: 0.5rem;
        flex-shrink: 0;
    }

    .menu-item-has-children.is-open > a .submenu-arrow {
        transform: rotate(180deg);
    }

    /* Submenus: hidden by default */
    .main-navigation .sub-menu {
        display: none !important;
        background: #f8f9fa !important;
        border-top: 1px solid #e8eaed !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .menu-item-has-children.is-open > .sub-menu {
        display: block !important;
    }

    .main-navigation .sub-menu li {
        border-bottom: 1px solid #e8eaed !important;
        padding: 0 !important;
    }

    .main-navigation .sub-menu li:last-child {
        border-bottom: none !important;
    }

    .main-navigation .sub-menu li a {
        padding: 0.75rem 1.25rem 0.75rem 2.25rem !important;
        font-size: 0.875rem !important;
        font-weight: 500 !important;
        color: #4a5568 !important;
    }

    .main-navigation .sub-menu li a:hover {
        background: #e8eaed !important;
        color: #00C8C8 !important;
    }

    /* CTA button — top-level last item only */
    .main-navigation .cta-button,
    .main-navigation > li:last-child > a {
        display: block !important;
        justify-content: center !important;
        background: #CCF859 !important;
        color: #003145 !important;
        font-weight: 700 !important;
        text-align: center !important;
        border-radius: 50px !important;
        padding: 0.85rem 1.5rem !important;
        font-size: 0.95rem !important;
        border: none !important;
    }

    .main-navigation .cta-button:hover,
    .main-navigation > li:last-child > a:hover {
        background: #00C8C8 !important;
        color: #ffffff !important;
    }
}

/* ---- Contact form validation ---- */
.form-group.has-error input,
.form-group.has-error textarea,
.form-group.has-error select {
    border-color: #e5484d !important;
    background: #fff8f8;
    box-shadow: 0 0 0 3px rgba(229, 72, 77, 0.12);
}

.field-error {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.6rem 0 0 !important;
    color: #b42318 !important;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    animation: fieldErrorIn 0.2s ease;
}

.field-error::before {
    content: '!';
    flex: 0 0 auto;
    width: 1.3rem;
    height: 1.3rem;
    border-radius: 50%;
    background: #e5484d;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fieldErrorIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
