/* Main site header — desktop portal pills + mobile bar / drawer */

@media screen and (min-width: 601px) {
    .header-portal-actions {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        gap: 7px;
        margin-top: 30px;
        flex-wrap: nowrap;
    }

    .header-portal-actions__link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 34px;
        padding: 7px 11px;
        border-radius: 6px;
        font-family: 'Titillium Web', sans-serif;
        font-size: 0.72rem;
        font-weight: 600;
        line-height: 1.2;
        text-decoration: none;
        white-space: nowrap;
        transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    }

    .header-portal-actions__link--signin {
        color: #fff !important;
        border: 1px solid rgba(255, 255, 255, 0.5);
        background: transparent;
    }

    .header-portal-actions__link--signin:hover {
        background: rgba(255, 255, 255, 0.12);
        color: #fff !important;
    }

    .header-portal-actions__link--signup {
        color: #413625 !important;
        background: #f8e6d6;
        border: 1px solid #f8e6d6;
    }

    .header-portal-actions__link--signup:hover {
        background: #fff;
        border-color: #fff;
        color: #2d2018 !important;
    }

    .site-header-mobile-portal {
        display: none !important;
    }

    .mobile-header {
        display: none !important;
    }

    .desktop-header .col-md-7 {
        position: relative;
    }
}

@media screen and (max-width: 600px) {
    .banner-section-outer.has-hero-lcp-bg > header,
    .sub-banner-section > header,
    .banner-section-outer > header {
        position: relative;
        z-index: 30;
    }

    .header-portal-actions {
        display: none !important;
    }

    .mobile-header {
        display: block !important;
    }

    .main_header {
        padding-top: 10px !important;
        padding-bottom: 0 !important;
    }

    .banner-section-outer.has-hero-lcp-bg .main_header,
    .sub-banner-section > header .main_header {
        padding: 10px 0 0 !important;
    }

    .site-header-mobile-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        min-height: 56px;
        width: 100%;
    }

    .site-header-mobile-bar .logo {
        flex: 1 1 auto;
        min-width: 0;
    }

    .site-header-mobile-bar .logo figure {
        margin: 0;
    }

    .site-header-mobile-bar .logo img {
        display: block;
        width: auto;
        max-width: min(150px, calc(100vw - 72px));
        max-height: 44px;
        height: auto;
    }

    .mobile-header-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        flex: 0 0 auto;
    }

    a.menu-bar {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
        color: #fff;
        text-decoration: none;
        border: 0;
        background: transparent;
        padding: 0;
    }

    a.menu-bar svg,
    a.menu-bar i {
        color: #fff;
        font-size: 24px;
        line-height: 1;
    }

    a.menu-bar .fa-bars::before {
        content: "\2630";
        font-family: Arial, sans-serif;
        font-style: normal;
        font-weight: 700;
        font-size: 24px;
        line-height: 1;
    }

    .desktop-header > .row > .col-md-3,
    .desktop-header > .row > .col-md-2 {
        display: none !important;
    }

    .desktop-header > .row > .col-md-7 {
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
        padding: 0;
    }

    .desktop-header {
        display: block;
        position: relative;
        width: 100%;
    }

    /* Critical: hide desktop inline nav until hamburger opens drawer */
    .header-menu {
        display: none !important;
        margin-top: 0;
        background: #829d1b;
        width: 100%;
        max-height: calc(100vh - 56px);
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: max(16px, env(safe-area-inset-bottom));
    }

    body.site-header-nav-open .header-menu {
        display: block !important;
    }

    .header-menu > ul {
        display: block !important;
        margin-top: 0 !important;
        padding-top: 4px;
        padding-bottom: 8px;
        float: none !important;
    }

    .header-menu ul li {
        display: block !important;
        float: none !important;
        position: relative;
    }

    .header-menu ul li a {
        display: block !important;
        margin: 0 !important;
        padding: 12px 16px;
        min-height: 44px;
        border: 0;
        border-bottom: 1px dotted rgba(255, 255, 255, 0.2);
        font-size: 16px;
        line-height: 1.3;
        white-space: normal !important;
    }

    .header-menu ul li ul,
    .header-menu ul li ul li ul,
    .header-menu ul ul {
        display: none;
        position: static !important;
        left: auto !important;
        top: auto !important;
        right: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0;
        border: 0;
        box-shadow: none;
        background: rgba(0, 0, 0, 0.08);
        float: none !important;
    }

    .header-menu li.is-submenu-open > ul,
    .header-menu li.has-submenu.is-submenu-open > ul {
        display: block !important;
    }

    .header-menu ul li ul li a,
    .header-menu ul li ul li ul li a {
        color: #fff !important;
    }

    .header-menu ul li ul li[style*="background-color"] a,
    .header-menu ul li ul li[style*="background-color:#f0fff8"] a {
        color: #380c03 !important;
    }

    .header-menu li.has-submenu > a::after {
        content: "+";
        float: right;
        font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
        font-weight: 700;
        opacity: 0.85;
    }

    .header-menu li.has-submenu.is-submenu-open > a::after {
        content: "\2212";
    }

    .header-menu ul li ul li a {
        padding-left: 24px;
        font-size: 15px;
    }

    .header-menu ul li ul li ul li a {
        padding-left: 36px;
    }

    .site-header-mobile-portal {
        display: block;
        border-top: 1px solid rgba(255, 255, 255, 0.35);
        margin-top: 4px;
        padding-top: 4px;
        background: rgba(0, 0, 0, 0.1);
    }

    .site-header-mobile-portal__label {
        display: block;
        padding: 10px 16px 4px;
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        opacity: 0.85;
        color: #fff;
    }

    .site-header-mobile-portal a {
        display: block;
        padding: 12px 16px;
        min-height: 44px;
        color: #fff !important;
        font-weight: 600;
        text-decoration: none;
        border-bottom: 1px dotted rgba(255, 255, 255, 0.2);
    }

    .site-header-mobile-portal a.site-header-mobile-portal__signup {
        background: rgba(248, 230, 214, 0.15);
    }
}
