/* ═══ MOBILE HEADER FIX — Hamburger Toggle ═══ */

/* Top row: branding + hamburger side by side */
.nav-top-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
}

/* Hamburger button — hidden on desktop */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 5px;
    z-index: 101;
}

.mobile-nav-toggle .hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Animate to X when open */
.mobile-nav-toggle.is-open .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.mobile-nav-toggle.is-open .hamburger-line:nth-child(2) {
    opacity: 0;
}
.mobile-nav-toggle.is-open .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ═══ MOBILE OVERRIDES ═══ */
@media (max-width: 768px) {
    /* Show the hamburger */
    .mobile-nav-toggle {
        display: flex !important;
    }

    /* Compact the sticky header */
    .site-header {
        padding: 0.6rem 0 !important;
    }

    /* Keep nav row horizontal on mobile */
    .main-navigation {
        flex-direction: column !important;
        gap: 0 !important;
    }

    /* Branding: left-align, smaller */
    .site-branding {
        align-items: flex-start !important;
        text-align: left !important;
    }
    .site-title {
        font-size: 1.2rem !important;
    }
    .site-tagline {
        font-size: 0.75rem !important;
        margin: 0 !important;
    }

    /* Nav menu: hidden by default, slide open */
    .nav-menu {
        display: none !important;
        width: 100%;
        padding-top: 0.75rem;
    }
    .nav-menu.is-open {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.4rem;
    }
    .nav-menu a {
        display: block !important;
        width: 100% !important;
        text-align: center !important;
        padding: 0.4rem 0.5rem !important;
        font-size: 0.85rem !important;
        background: rgba(255, 255, 255, 0.06) !important;
        border: 1px solid rgba(255, 255, 255, 0.18) !important;
        border-radius: 999px !important;
    }

    /* Hide header CTA on mobile (it's in the nav already via Contact link) */
    .header-cta {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 1.1rem !important;
    }
    .site-tagline {
        font-size: 0.7rem !important;
    }
    .nav-menu.is-open {
        grid-template-columns: 1fr !important;
    }
}
