/**
 * Header Component Styles
 * Smithsonian Magazine Style - Black/White/Yellow Theme
 */

/* ===== HEADER CONTAINER ===== */
html, body {
    overflow-x: clip;
}

#header-placeholder {
    display: contents;
}

.site-header {
    display: contents;
}

/* ===== SLOGAN STRIP ===== */
.header-slogan {
    background-color: #ffffff;
    padding: 18px 0;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
    width: 100%;
}

.header-slogan .container {
    max-width: none;
    padding: 0 20px;
}

.header-slogan__text {
    display: block;
    width: 100%;
    color: #333333;
    font-size: 1.3rem;
    font-weight: 700;
    font-style: italic;
    letter-spacing: 0.02em;
    font-family: var(--font-family-heading, Georgia, serif);
    line-height: 1.4;
}

.header-slogan__separator {
    color: var(--color-accent, #f4c542);
    margin: 0 4px;
    font-style: normal;
}

@media (max-width: 768px) {
    .header-slogan__text {
        font-size: 1.05rem;
    }
}

@media (max-width: 576px) {
    .header-slogan {
        padding: 12px 0;
    }

    .header-slogan__text {
        font-size: 0.85rem;
        letter-spacing: 0.01em;
    }
}

/* ===== TOP BLACK BAR (STICKY) ===== */
.header-top {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: #000000;
    padding: 12px 0;
    box-shadow: none;
    transition: box-shadow 0.3s ease;
    width: 100%;
}

.header-top.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.header-top__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

/* ===== LOGO ===== */
.site-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
    transition: opacity 0.2s ease;
}

.site-logo:hover {
    opacity: 0.85;
    text-decoration: none;
}

.site-logo__image {
    height: 40px;
    width: auto;
    max-width: 40px;
    object-fit: contain;
    border-radius: 4px;
    flex-shrink: 0;
}

.site-logo__text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    font-family: var(--font-family-heading, Georgia, serif);
    letter-spacing: -0.01em;
}

/* ===== HEADER ACTIONS ===== */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-link {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.header-link:hover {
    color: var(--color-accent, #f4c542);
    text-decoration: none;
}

.header-link--icon {
    width: 24px;
    height: 24px;
}

.header-link--icon svg {
    width: 20px;
    height: 20px;
}

/* Subscribe Button - Yellow */
.btn-subscribe {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    background-color: var(--color-accent, #f4c542);
    color: #000000;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 2px;
    transition: all 0.2s ease;
}

.btn-subscribe:hover {
    background-color: var(--color-accent-dark, #d4a72c);
    color: #000000;
    text-decoration: none;
    transform: translateY(-1px);
}

/* ===== MAIN NAVIGATION - IN TOP BAR ===== */
.main-nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

/* ===== HEADER TOOLBAR (Google Translate and Search) ===== */
.header-toolbar {
    position: relative;
    background-color: #f8f8f8;
    border-bottom: 1px solid #e5e5e5;
    padding: 10px 0 6px;
    min-height: 45px;
    z-index: 999;
    transition: box-shadow 0.3s ease;
}

/* Sticky state - toggled via JS pin button */
.header-toolbar--sticky {
    position: -webkit-sticky;
    position: sticky;
    top: var(--header-top-height, 64px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-toolbar__content {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
}

/* Left column: Translate */
.header-toolbar__left {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

/* Breadcrumb row — sits below the translate/search row, full width */
#header-breadcrumb-slot:empty {
    display: none;
}

#header-breadcrumb-slot {
    border-top: 1px solid #e5e5e5;
    padding: 6px 0 0;
    margin-top: 4px;
}

#header-breadcrumb-slot .breadcrumb {
    font-size: 0.8125rem;
}

#header-breadcrumb-slot .breadcrumb__list {
    flex-wrap: nowrap;
}

/* ===== TOOLBAR STICKY TOGGLE (Pin Button) ===== */
.toolbar-sticky-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.toolbar-sticky-toggle input {
    display: none;
}

.toolbar-sticky-toggle__pin {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: #999;
    background: transparent;
    border: 1px solid #ddd;
    transition: all 0.2s ease;
    transform: rotate(30deg);
    opacity: 0.4;
}

.toolbar-sticky-toggle__pin:hover {
    opacity: 0.7;
    border-color: #bbb;
    background: #f0f0f0;
}

/* Active/pinned state */
.toolbar-sticky-toggle input:checked + .toolbar-sticky-toggle__pin {
    color: #ffffff;
    background: #000000;
    border-color: #000000;
    transform: rotate(0deg);
    opacity: 1;
}

@media (max-width: 768px) {
    .toolbar-sticky-toggle {
        display: none;
    }
}

#google_translate_element {
    display: block;
}

/* Style Google Translate dropdown - Horizontal Layout */
.goog-te-gadget {
    font-family: Arial, sans-serif !important;
    font-size: 0.65rem !important;
    color: #999 !important;
    display: block !important;
}

.goog-te-gadget-simple {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
}

.goog-te-gadget .goog-te-combo {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.875rem;
    display: block !important;
    width: 100%;
    margin-bottom: 4px;
    box-sizing: border-box;
}

/* "Powered by" text goes below the combo, sized to match search links */
.goog-te-gadget span {
    display: inline !important;
    white-space: nowrap !important;
    font-size: 0.65rem !important;
    color: #999 !important;
}

.goog-te-gadget a {
    display: inline !important;
    white-space: nowrap !important;
    font-size: 0.65rem !important;
    color: #999 !important;
    text-decoration: none !important;
}

.goog-te-gadget a:hover {
    color: #666 !important;
    text-decoration: underline !important;
}

.goog-te-gadget a img {
    display: inline !important;
    vertical-align: middle !important;
}

.goog-te-gadget a br {
    display: none !important;
}

/* Force horizontal layout for Google Translate elements */
.goog-te-banner-frame,
.goog-te-menu-frame {
    display: none !important;
}

/* Make sure the select dropdown and text are on same line */
.goog-te-gadget-simple .goog-te-combo,
.goog-te-gadget-simple span {
    display: inline-block !important;
    vertical-align: middle !important;
}

/* Additional rules for the simple layout */
#google_translate_element .goog-te-gadget-simple {
    white-space: nowrap !important;
}

@media (max-width: 768px) {
    .header-toolbar {
        padding: 8px 0;
    }

    .header-toolbar__content {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .header-search-wrapper {
        align-items: stretch;
    }

    .header-search-form {
        width: 100%;
    }

    .header-search-links {
        justify-content: flex-start;
    }

    /* Translate combo: slightly smaller for tablet */
    .goog-te-gadget .goog-te-combo {
        padding: 6px 10px;
        font-size: 0.8125rem;
    }

    /* Breadcrumb: allow wrapping on smaller screens */
    #header-breadcrumb-slot .breadcrumb__list {
        flex-wrap: wrap;
    }
}

@media (max-width: 991px) {
    .site-logo__text {
        font-size: 1.2rem;
    }

    .header-search-form {
        max-width: 100%;
    }

    .header-search-input {
        min-width: 0;
    }
}

.main-nav .container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.nav-item {
    margin: 0;
}

.nav-link {
    display: block;
    padding: 10px 16px;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: all 0.2s ease;
    position: relative;
    white-space: nowrap;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 2px;
    background-color: var(--color-accent, #f4c542);
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.nav-link:hover {
    color: var(--color-accent, #f4c542);
    text-decoration: none;
}

.nav-link:hover::after {
    transform: scaleX(1);
}

/* ===== ACTIVE NAV LINK ===== */
.nav-link--active {
    color: var(--color-accent, #f4c542) !important;
}

.nav-link--active::after {
    transform: scaleX(1) !important;
}

.nav-dropdown__link--active {
    font-weight: 700;
    color: var(--color-accent-dark, #b8922a) !important;
}

.nav-subdropdown__link--active {
    font-weight: 700;
    color: var(--color-accent-dark, #b8922a) !important;
}

/* ===== NAV SEARCH BOX ===== */
.nav-item--search {
    margin-left: 8px;
}

.nav-search-form {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    padding: 0;
    overflow: hidden;
    transition: all 0.2s ease;
}

.nav-search-form:focus-within {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: var(--color-accent, #f4c542);
}

.nav-search-input {
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 0.78rem;
    padding: 7px 10px;
    width: 140px;
    transition: width 0.3s ease;
}

.nav-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.nav-search-input:focus {
    width: 180px;
}

.nav-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 7px 10px;
    transition: color 0.2s ease;
}

.nav-search-btn:hover {
    color: var(--color-accent, #f4c542);
}

/* ===== DROPDOWN MENUS ===== */
.nav-item {
    position: relative;
}

.nav-item.has-dropdown > .nav-link::before {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 6px;
    vertical-align: middle;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #ffffff;
    transition: border-top-color 0.2s ease;
}

.nav-item.has-dropdown:hover > .nav-link::before {
    border-top-color: var(--color-accent, #f4c542);
}

.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background-color: #ffffff;
    border: 1px solid #e5e5e5;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    list-style: none;
    margin: 0;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.nav-item.has-dropdown:hover > .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown li {
    margin: 0;
}

.nav-dropdown__link {
    display: block;
    padding: 10px 20px;
    color: #333333;
    font-size: 0.85rem;
    font-weight: 400;
    text-decoration: none;
    text-transform: none;
    letter-spacing: normal;
    transition: all 0.15s ease;
}

.nav-dropdown__link:hover {
    background-color: #f5f5f5;
    color: #000000;
    text-decoration: none;
    padding-left: 24px;
}

/* ===== NESTED SUB-DROPDOWN (Flyout) ===== */
.has-subdropdown {
    position: relative;
}

.has-subdropdown > .nav-dropdown__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.has-subdropdown > .nav-dropdown__link::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 8px;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 4px solid #999;
    transition: border-left-color 0.2s ease;
    flex-shrink: 0;
}

.has-subdropdown:hover > .nav-dropdown__link::after {
    border-left-color: #000000;
}

.nav-subdropdown {
    position: absolute;
    left: 100%;
    top: 0;
    min-width: 180px;
    background-color: #ffffff;
    border: 1px solid #e5e5e5;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    list-style: none;
    margin: 0;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all 0.2s ease;
    z-index: 1001;
}

.has-subdropdown:hover > .nav-subdropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.nav-subdropdown__link {
    display: block;
    padding: 8px 20px;
    color: #333333;
    font-size: 0.85rem;
    font-weight: 400;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.nav-subdropdown__link:hover {
    background-color: #f5f5f5;
    color: #000000;
    text-decoration: none;
    padding-left: 24px;
}

/* ===== RIGHT-SIDE DROPDOWN OVERFLOW FIX ===== */
/* Flip dropdown alignment for last 2 nav items so they don't overflow viewport */
@media (min-width: 992px) {
    .nav-item:nth-last-child(-n+2) > .nav-dropdown {
        left: auto;
        right: 0;
    }

    /* Flip subdropdowns to open left for last 3 nav items */
    .nav-item:nth-last-child(-n+3) .nav-subdropdown {
        left: auto;
        right: 100%;
        transform: translateX(10px);
    }

    .nav-item:nth-last-child(-n+3) .has-subdropdown:hover > .nav-subdropdown {
        transform: translateX(0);
    }

    /* Flip the arrow indicator to point left and move to the left side */
    .nav-item:nth-last-child(-n+3) .has-subdropdown > .nav-dropdown__link {
        justify-content: flex-start;
    }

    .nav-item:nth-last-child(-n+3) .has-subdropdown > .nav-dropdown__link::after {
        border-left: none;
        border-right: 4px solid #999;
        order: -1;
        margin-left: 0;
        margin-right: 8px;
    }

    .nav-item:nth-last-child(-n+3) .has-subdropdown:hover > .nav-dropdown__link::after {
        border-right-color: #000000;
    }
}

/* ===== HEADER SEARCH WRAPPER ===== */
.header-search-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex: 1;
}

.header-search-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 4px;
    width: 100%;
    flex-wrap: nowrap;
}

.header-search-links__item {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.7rem;
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease;
}

.header-search-links__item:hover {
    color: #000000;
    text-decoration: underline;
}

.header-search-credit {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.65rem;
    color: #999;
    white-space: nowrap;
}

.header-search-credit a {
    color: #999;
    text-decoration: none;
}

.header-search-credit a:hover {
    color: #666;
    text-decoration: underline;
}

/* ===== HEADER SEARCH FORM ===== */
.header-search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px 12px;
    flex: 1;
    width: 100%;
    box-sizing: border-box;
}

.header-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.875rem;
    padding: 0;
    min-width: 400px;
}

.header-search-input::placeholder {
    color: #999;
}

.header-search-button {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #666;
    transition: color 0.2s ease;
}

.header-search-button:hover {
    color: var(--color-accent, #f4c542);
}

.header-search-button svg {
    width: 18px;
    height: 18px;
}

/* ===== SEARCH OVERLAY ===== */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.search-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.search-overlay-content {
    width: 100%;
    max-width: 600px;
    padding: 0 20px;
}

.search-overlay-input {
    width: 100%;
    padding: 20px 0;
    background: transparent;
    border: none;
    border-bottom: 2px solid #ffffff;
    font-size: 1.5rem;
    color: #ffffff;
    outline: none;
    font-family: inherit;
}

.search-overlay-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-overlay-input:focus {
    border-bottom-color: var(--color-accent, #f4c542);
}

.search-overlay-close {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 2.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-overlay-close:hover {
    color: var(--color-accent, #f4c542);
    transform: rotate(90deg);
}

/* ===== MOBILE DROPDOWN TOGGLE BUTTONS (hidden on desktop) ===== */
.nav-dropdown-toggle,
.nav-subdropdown-toggle {
    display: none;
}

/* ===== MOBILE MENU TOGGLE ===== */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle__bar {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Close Button - Hidden by default */
.main-nav__close {
    display: none;
}

/* ===== CONTAINER ===== */
.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== MOBILE STYLES ===== */
@media (max-width: 991px) {
    .header-top__content {
        gap: 12px;
    }

    .menu-toggle {
        display: flex;
    }

    .header-link:not(.header-link--icon) {
        display: none;
    }

    .btn-subscribe {
        display: none;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        max-width: 320px;
        height: 100vh;
        background-color: #000000;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
        padding: 80px 24px 24px;
        overflow-y: auto;
        transition: right 0.3s ease;
        z-index: 2000;
    }

    .main-nav.is-open {
        right: 0;
    }

    /* Mobile Close Button */
    .main-nav__close {
        position: absolute;
        top: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 4px;
        color: #ffffff;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .main-nav__close:hover {
        background: var(--color-accent, #f4c542);
        border-color: var(--color-accent, #f4c542);
        color: #000000;
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .nav-link {
        padding: 16px 0;
        color: #ffffff;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        text-align: left;
    }

    .nav-link::after {
        display: none;
    }

    .nav-link:hover {
        color: var(--color-accent, #f4c542);
    }

    /* Mobile Dropdown Styles */

    /* Make dropdown items flex containers: link + toggle button side by side */
    .nav-item.has-dropdown {
        display: flex;
        flex-wrap: wrap;
    }

    .nav-item.has-dropdown > .nav-link {
        flex: 1;
        min-width: 0;
    }

    /* Hide the CSS-generated arrow — replaced by toggle button */
    .nav-item.has-dropdown > .nav-link::before {
        display: none !important;
    }

    /* Dropdown toggle button */
    .nav-dropdown-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        align-self: stretch;
        background: none;
        border: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        color: rgba(255, 255, 255, 0.5);
        cursor: pointer;
        padding: 0;
        transition: color 0.2s ease;
    }

    .nav-dropdown-toggle:hover {
        color: var(--color-accent, #f4c542);
    }

    .nav-dropdown-toggle svg {
        transition: transform 0.2s ease;
    }

    .nav-item.has-dropdown.is-open > .nav-dropdown-toggle svg {
        transform: rotate(180deg);
    }

    .nav-item.has-dropdown.is-open > .nav-dropdown-toggle {
        color: var(--color-accent, #f4c542);
    }

    .nav-dropdown {
        position: static;
        flex-basis: 100%;
        min-width: 100%;
        background-color: rgba(255, 255, 255, 0.05);
        border: none;
        box-shadow: none;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: max-height 0.3s ease;
    }

    .nav-item.has-dropdown.is-open > .nav-dropdown {
        max-height: 500px;
        padding: 8px 0;
    }

    .nav-dropdown__link {
        color: rgba(255, 255, 255, 0.8);
        padding: 10px 0 10px 20px;
        font-size: 0.8rem;
    }

    .nav-dropdown__link:hover {
        background-color: transparent;
        color: var(--color-accent, #f4c542);
        padding-left: 24px;
    }

    .nav-dropdown__link--active {
        background-color: transparent !important;
        color: var(--color-accent, #f4c542) !important;
    }

    .nav-subdropdown__link--active {
        background-color: transparent !important;
        color: var(--color-accent, #f4c542) !important;
    }

    /* Mobile nested sub-dropdown */
    .has-subdropdown {
        display: flex;
        flex-wrap: wrap;
    }

    .has-subdropdown > .nav-dropdown__link {
        flex: 1;
        min-width: 0;
    }

    /* Hide the CSS-generated arrow — replaced by toggle button */
    .has-subdropdown > .nav-dropdown__link::after {
        display: none !important;
    }

    /* Sub-dropdown toggle button */
    .nav-subdropdown-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        align-self: stretch;
        background: none;
        border: none;
        color: rgba(255, 255, 255, 0.4);
        cursor: pointer;
        padding: 0;
        transition: color 0.2s ease;
    }

    .nav-subdropdown-toggle:hover {
        color: var(--color-accent, #f4c542);
    }

    .nav-subdropdown-toggle svg {
        transition: transform 0.2s ease;
    }

    .has-subdropdown.is-open > .nav-subdropdown-toggle svg {
        transform: rotate(180deg);
    }

    .has-subdropdown.is-open > .nav-subdropdown-toggle {
        color: var(--color-accent, #f4c542);
    }

    .nav-subdropdown {
        position: static;
        flex-basis: 100%;
        min-width: 100%;
        background-color: rgba(255, 255, 255, 0.03);
        border: none;
        box-shadow: none;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: max-height 0.3s ease;
    }

    .has-subdropdown.is-open > .nav-subdropdown {
        max-height: 500px;
        padding: 4px 0;
    }

    .nav-subdropdown__link {
        color: rgba(255, 255, 255, 0.7);
        padding: 8px 0 8px 36px;
        font-size: 0.75rem;
    }

    .nav-subdropdown__link:hover {
        background-color: transparent;
        color: var(--color-accent, #f4c542);
        padding-left: 40px;
    }

    /* Mobile nav search */
    .nav-item--search {
        margin-left: 0;
        padding: 16px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-search-form {
        width: 100%;
        background-color: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
    }

    .nav-search-input {
        width: 100%;
        padding: 10px 12px;
    }

    .nav-search-input:focus {
        width: 100%;
    }

    .nav-search-btn {
        padding: 10px 12px;
    }

    /* Mobile menu overlay */
    .main-nav::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.6);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: -1;
    }

    .main-nav.is-open::before {
        opacity: 1;
        visibility: visible;
    }
}

@media (max-width: 576px) {
    .site-logo__image {
        height: 32px;
    }

    .site-logo__text {
        font-size: 1.25rem;
    }

    .header-actions {
        gap: 12px;
    }

    .search-overlay-input {
        font-size: 1.25rem;
    }

    /* Compact toolbar spacing on mobile */
    .header-toolbar {
        padding: 6px 0;
    }

    .header-toolbar__content {
        gap: 8px;
    }

    /* Translate combo: full width on mobile for easy touch */
    .goog-te-gadget .goog-te-combo {
        padding: 6px 8px;
        font-size: 0.75rem;
        width: 100%;
    }

    /* Smaller breadcrumb on mobile */
    #header-breadcrumb-slot .breadcrumb__list {
        font-size: 0.6875rem;
    }

    /* Center search links on mobile, allow wrapping */
    .header-search-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* ===== BODY STATE WHEN MENU OPEN ===== */
body.menu-open {
    overflow: hidden;
}

/* ===== SKIP LINK ===== */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    background-color: var(--color-accent, #f4c542);
    color: #000000;
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
    z-index: 9999;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 16px;
}

/* ===== PRINT STYLES ===== */
@media print {
    .site-header {
        position: static;
        background-color: #ffffff;
        box-shadow: none;
        border-bottom: 1px solid #e5e5e5;
    }

    .header-top {
        background-color: #ffffff;
    }

    .site-logo__text {
        color: #000000;
    }

    .header-actions,
    .menu-toggle {
        display: none;
    }

    .main-nav {
        display: block;
    }

    .nav-link {
        color: #000000;
    }
}
