/**
 * ════════════════════════════════════════════════════════════════════════════════════════════════
 * HEADER v5.0 - Modern, Soft, Responsive CSS
 * ════════════════════════════════════════════════════════════════════════════════════════════════
 */

/* ─────────────────────────────────────────────────────────────────────────────────────────────── */
/* ROOT VARIABLES & RESET */
/* ─────────────────────────────────────────────────────────────────────────────────────────────── */
:root {
    /* Colors - from theme config */
    --h-primary: #667eea;
    --h-secondary: #764ba2;
    --h-bg: #ffffff;
    --h-text: #1a1a2e;
    --h-link: #1a1a2e;
    --h-link-hover: #667eea;
    --h-menu-underline: var(--h-link-hover);
    --h-border: rgba(0,0,0,0.06);
    --h-title: #1a1a2e;
    --h-social: #6b7280;
    --h-social-hover: #667eea;
    --h-shadow: 0 2px 12px rgba(0,0,0,0.08);
    --h-pad-y: 8px;
    --h-font: 'Inter', system-ui, -apple-system, sans-serif;
    --h-title-font: var(--h-font);
    --h-title-size: 20px;
    --h-menu-font-size: 13px;

    /* Sizing */
    --h-logo-height: 44px;
    --h-top-height: 72px;
    --h-nav-height: 56px;
    --h-search-height: 40px;

    /* Transitions */
    --h-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --h-transition-fast: all 0.15s ease;

    /* Shadows */
    --h-shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --h-shadow-md: 0 4px 12px rgba(0,0,0,0.08);
}

/* ─────────────────────────────────────────────────────────────────────────────────────────────── */
/* HEADER MAIN CONTAINER */
/* ─────────────────────────────────────────────────────────────────────────────────────────────── */
.header {
    background: var(--h-bg);
    color: var(--h-text);
    font-family: var(--h-font);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--h-shadow);
    border-bottom: 1px solid var(--h-border);
}

.header__container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ─────────────────────────────────────────────────────────────────────────────────────────────── */
/* TOP SECTION: Logo, Social, Search */
/* ─────────────────────────────────────────────────────────────────────────────────────────────── */
.header__top {
    display: flex;
    align-items: center;
    height: var(--h-top-height);
    padding: var(--h-pad-y) 0;
    border-bottom: 1px solid var(--h-border);
}

.header__top .header__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}

/* Left: Logo */
.header__left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
    margin-right: auto;
}

.header__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    transition: var(--h-transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.header__brand:hover {
    opacity: 0.8;
}

.header__logo {
    height: var(--h-logo-height);
    width: auto;
    object-fit: contain;
    display: block;
}

.header__brand-text {
    font-family: var(--h-title-font);
    font-size: var(--h-title-size);
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--h-title);
    text-transform: uppercase;
    white-space: nowrap;
}

/* Desktop Social Icons */
.header__socials--desktop {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    order: 3;
}

.header__social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    flex-shrink: 0;
    color: #666;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 0;
}

/* Instagram */
.header__social-link--instagram {
    color: #E4405F;
}

.header__social-link--instagram:hover {
    background: rgba(228, 64, 95, 0.1);
    border-color: #E4405F;
    color: #E4405F;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(228, 64, 95, 0.2);
}

/* Facebook */
.header__social-link--facebook {
    color: #1877F2;
}

.header__social-link--facebook:hover {
    background: rgba(24, 119, 242, 0.1);
    border-color: #1877F2;
    color: #1877F2;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(24, 119, 242, 0.2);
}

/* Twitter */
.header__social-link--twitter {
    color: #1DA1F2;
}

.header__social-link--twitter:hover {
    background: rgba(29, 161, 242, 0.1);
    border-color: #1DA1F2;
    color: #1DA1F2;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(29, 161, 242, 0.2);
}

/* LinkedIn */
.header__social-link--linkedin {
    color: #0A66C2;
}

.header__social-link--linkedin:hover {
    background: rgba(10, 102, 194, 0.1);
    border-color: #0A66C2;
    color: #0A66C2;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(10, 102, 194, 0.2);
}

/* YouTube */
.header__social-link--youtube {
    color: #FF0000;
}

.header__social-link--youtube:hover {
    background: rgba(255, 0, 0, 0.1);
    border-color: #FF0000;
    color: #FF0000;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 0, 0, 0.2);
}

/* Pinterest */
.header__social-link--pinterest {
    color: #E60023;
}

.header__social-link--pinterest:hover {
    background: rgba(230, 0, 35, 0.1);
    border-color: #E60023;
    color: #E60023;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(230, 0, 35, 0.2);
}

.header__social-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Center: Search (Desktop) */
.header__center {
    flex: 0 1 auto;
    display: flex;
    justify-content: center;
    order: 2;
    gap: 16px;
    align-items: center;
}

.header__search-form {
    width: 100%;
}

.header__search-wrapper {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--h-border);
    border-radius: 8px;
    padding: 4px 8px;
    transition: var(--h-transition);
}

.header__search-wrapper:focus-within {
    background: var(--h-bg);
    border-color: var(--h-link-hover);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.header__search-input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--h-text);
    font-size: 13px;
    font-weight: 500;
    outline: none;
    padding: 6px 8px;
    font-family: inherit;
}

.header__search-input::placeholder {
    color: var(--h-social);
    font-weight: 400;
}

.header__search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--h-social);
    transition: var(--h-transition);
    border-radius: 4px;
    flex-shrink: 0;
}

.header__search-btn:hover {
    color: var(--h-link-hover);
    background: rgba(102, 126, 234, 0.1);
}

/* Right: Actions (Social + Search & Menu Toggle) */
.header__right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    order: 4;
}

.header__search-icon-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--h-text);
    transition: var(--h-transition);
    border-radius: 6px;
    padding: 0;
    flex-shrink: 0;
}

.header__search-icon-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--h-link-hover);
}

.header__menu-toggle {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    cursor: pointer;
    gap: 5px;
    padding: 0;
    color: var(--h-text);
    transition: var(--h-transition);
}

.header__menu-toggle span {
    width: 24px;
    height: 2.5px;
    background: currentColor;
    border-radius: 1px;
    transition: var(--h-transition);
}

.header__menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translateY(10px);
}

.header__menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.header__menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-10px);
}

.header__icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.header__social-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ─────────────────────────────────────────────────────────────────────────────────────────────── */
/* NAVIGATION MENU */
/* ─────────────────────────────────────────────────────────────────────────────────────────────── */
.header__nav {
    background: var(--h-bg);
    border-top: 1px solid var(--h-border);
    overflow: hidden;
}

.header__menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    justify-content: center;
    gap: 0;
    height: var(--h-nav-height);
    flex-wrap: wrap;
}

.header__menu-item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.header__menu-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 14px 20px;
    font-size: var(--h-menu-font-size);
    font-weight: 600;
    color: var(--h-link);
    text-decoration: none;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    transition: var(--h-transition);
    position: relative;
    white-space: nowrap;
    height: 100%;
}

.header__menu-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--h-menu-underline);
    transform: scaleX(0);
    transition: var(--h-transition);
}

.header__menu-link:hover {
    color: var(--h-link-hover);
    text-decoration: none;
}

.header__menu-link:hover::after {
    transform: scaleX(1);
}

.header__menu-item--active .header__menu-link {
    color: var(--h-link-hover);
    font-weight: 700;
}

.header__menu-item--active .header__menu-link::after {
    transform: scaleX(1);
}

.header__menu-arrow {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    transition: var(--h-transition);
}

.header__menu-item:hover .header__menu-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.header__dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--h-bg);
    border: 1px solid var(--h-border);
    border-top: 3px solid var(--h-menu-underline);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 8px 0;
    list-style: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: var(--h-transition);
    z-index: 100;
}

.header__menu-item:hover .header__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header__dropdown-link {
    display: block;
    padding: 12px 20px;
    font-size: 12px;
    color: var(--h-text);
    text-decoration: none;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    transition: var(--h-transition);
    border-left: 3px solid transparent;
    font-weight: 500;
}

.header__dropdown-link:hover {
    background: rgba(0, 0, 0, 0.03);
    color: var(--h-link-hover);
    border-left-color: var(--h-link-hover);
    padding-left: 24px;
    text-decoration: none;
}

/* ─────────────────────────────────────────────────────────────────────────────────────────────── */
/* MOBILE DRAWER OVERLAY & DRAWER */
/* ─────────────────────────────────────────────────────────────────────────────────────────────── */
.header__drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 997;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--h-transition);
}

.header__drawer-overlay--open {
    opacity: 1;
    pointer-events: auto;
}

/* JS compatibility: header.js toggles this class name */
.header__overlay--open {
    opacity: 1;
    pointer-events: auto;
}

.header__drawer {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    background: var(--h-bg);
    color: var(--h-text);
    font-family: var(--h-font);
    box-shadow: -2px 0 12px rgba(0, 0, 0, 0.15);
    z-index: 998;
    transform: translateX(100%);
    transition: transform var(--h-transition);
    flex-direction: column;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.header__drawer--open {
    transform: translateX(0);
}

/* Drawer Header */
.header__drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--h-border);
    gap: 12px;
    flex-shrink: 0;
}

.header__drawer-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--h-title);
    font-family: var(--h-title-font);
    letter-spacing: -0.5px;
    margin: 0;
    text-transform: uppercase;
}

.header__drawer-close {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--h-text);
    font-family: var(--h-font);
    transition: var(--h-transition);
    padding: 0;
    border-radius: 6px;
    flex-shrink: 0;
}

.header__drawer-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--h-link-hover);
}

.header__drawer-close svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

/* Drawer Navigation */
.header__drawer-nav {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    min-height: 0;
    overscroll-behavior: contain;
}

.header__drawer-menu {
    display: flex;
    flex-direction: column;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4px;
}

.header__drawer-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    font-size: var(--h-menu-font-size);
    font-weight: 600;
    color: var(--h-text);
    font-family: var(--h-font);
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    text-decoration: none;
    transition: var(--h-transition);
    width: 100%;
    text-align: left;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}

.header__drawer-link:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--h-link-hover);
    padding-left: 20px;
    text-decoration: none;
}

.header__drawer-link--active {
    background: var(--h-link-hover);
    color: #ffffff;
    font-weight: 700;
}

.header__drawer-arrow {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    transition: var(--h-transition);
    flex-shrink: 0;
}

/* Drawer Submenu */
.header__drawer-submenu {
    display: flex;
    flex-direction: column;
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--h-transition);
    gap: 0;
}

.header__drawer-submenu--open {
    max-height: 600px;
}

.header__drawer-sub-link {
    display: block;
    padding: 10px 16px 10px 32px;
    font-size: 12px;
    color: var(--h-social);
    font-family: var(--h-font);
    text-decoration: none;
    border-radius: 4px;
    transition: var(--h-transition);
    border-left: 2px solid transparent;
    text-transform: uppercase;
    font-weight: 500;
}

.header__drawer-sub-link:hover {
    color: var(--h-link-hover);
    background: rgba(0, 0, 0, 0.03);
    border-left-color: var(--h-link-hover);
    padding-left: 36px;
    text-decoration: none;
}

/* Drawer Footer */
.header__drawer-footer {
    padding: 20px;
    border-top: 1px solid var(--h-border);
    flex-shrink: 0;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
}

.header__drawer-socials {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
}

.header__drawer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 0;
}

/* Instagram */
.header__drawer-social-link--instagram {
    color: #E4405F;
}

.header__drawer-social-link--instagram:hover {
    background: rgba(228, 64, 95, 0.1);
    border-color: #E4405F;
    color: #E4405F;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(228, 64, 95, 0.2);
}

/* Facebook */
.header__drawer-social-link--facebook {
    color: #1877F2;
}

.header__drawer-social-link--facebook:hover {
    background: rgba(24, 119, 242, 0.1);
    border-color: #1877F2;
    color: #1877F2;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(24, 119, 242, 0.2);
}

/* Twitter */
.header__drawer-social-link--twitter {
    color: #1DA1F2;
}

.header__drawer-social-link--twitter:hover {
    background: rgba(29, 161, 242, 0.1);
    border-color: #1DA1F2;
    color: #1DA1F2;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(29, 161, 242, 0.2);
}

/* LinkedIn */
.header__drawer-social-link--linkedin {
    color: #0A66C2;
}

.header__drawer-social-link--linkedin:hover {
    background: rgba(10, 102, 194, 0.1);
    border-color: #0A66C2;
    color: #0A66C2;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(10, 102, 194, 0.2);
}

/* YouTube */
.header__drawer-social-link--youtube {
    color: #FF0000;
}

.header__drawer-social-link--youtube:hover {
    background: rgba(255, 0, 0, 0.1);
    border-color: #FF0000;
    color: #FF0000;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 0, 0, 0.2);
}

/* Pinterest */
.header__drawer-social-link--pinterest {
    color: #E60023;
}

.header__drawer-social-link--pinterest:hover {
    background: rgba(230, 0, 35, 0.1);
    border-color: #E60023;
    color: #E60023;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(230, 0, 35, 0.2);
}

/* ─────────────────────────────────────────────────────────────────────────────────────────────── */
/* MOBILE SEARCH EXPANSION */
/* ─────────────────────────────────────────────────────────────────────────────────────────────── */
.header__search-expanded {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: var(--h-bg);
    padding: 0;
    z-index: 1002;
    box-shadow: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--h-transition);
}

.header__search-expanded--open {
    display: flex !important;
    opacity: 1;
    pointer-events: auto;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
}

.header__search-expanded .header__search-form {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: none;
}

/* Hide other elements when search is expanded */
.header__search-expanded--open ~ .header__left,
.header__search-expanded--open ~ .header__center,
.header__search-expanded--open ~ .header__right {
    display: none;
}

.header__search-expanded-input {
    flex: 1;
    padding: 12px 16px;
    border: 1.5px solid var(--h-border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--h-text);
    background: rgba(0, 0, 0, 0.02);
    font-family: inherit;
    font-weight: 500;
    transition: var(--h-transition);
    outline: none;
    min-width: 0;
}

.header__search-expanded-input:focus {
    border-color: var(--h-link-hover);
    background: var(--h-bg);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.header__search-expanded-input::placeholder {
    color: var(--h-social);
    font-weight: 400;
}

.header__search-expanded-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    background: var(--h-link-hover);
    color: #ffffff;
    cursor: pointer;
    transition: var(--h-transition);
    padding: 0;
    flex-shrink: 0;
}

.header__search-expanded-btn:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.header__search-expanded-btn:active {
    transform: scale(0.95);
}

.header__search-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--h-text);
    transition: var(--h-transition);
    border-radius: 6px;
    padding: 0;
    flex-shrink: 0;
    font-size: 24px;
}

.header__search-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--h-link-hover);
}

.header__search-close svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
}

/* ─────────────────────────────────────────────────────────────────────────────────────────────── */
/* RESPONSIVE DESIGN */
/* ─────────────────────────────────────────────────────────────────────────────────────────────── */

/* Tablet: 1024px and below */
@media (max-width: 1024px) {
    .header__container {
        padding: 0 20px;
    }

    .header__top .header__container {
        gap: 24px;
    }

    .header__logo {
        height: 40px;
    }

    .header__brand-text {
        font-size: 18px;
    }

    .header__search-form {
        max-width: 280px;
    }

    .header__search-expanded .header__search-form {
        max-width: none;
        flex: 1;
    }

    .header__search-input {
        font-size: 13px;
    }

    .header__menu-link {
        padding: 12px 16px;
        font-size: 12px;
    }

    .header__socials--desktop {
        gap: 8px;
    }

    .header__social-link {
        width: 32px;
        height: 32px;
    }

    .header__social-icon {
        width: 16px;
        height: 16px;
    }
}

/* Mobile: 768px and below */
@media (max-width: 768px) {
    :root {
        --h-top-height: 52px;
        --h-nav-height: 0;
        --h-logo-height: 32px;
    }

    .header__top {
        height: var(--h-top-height);
        padding: 2px 0;
    }

    .header__top .header__container {
        gap: 12px;
    }

    .header__container {
        padding: 0 16px;
    }

    /* Left */
    .header__left {
        gap: 12px;
        flex: 1;
        min-width: 0;
    }

    .header__brand-text,
    .header__brand {
        font-weight: 400 !important;
    }

    .header__socials--desktop {
        display: none !important;
    }

    /* Center: Hide search on mobile */
    .header__center {
        display: none;
    }

    /* Right */
    .header__right {
        gap: 4px;
    }

    .header__search-icon-btn,
    .header__menu-toggle {
        width: 40px;
        height: 40px;
    }

    .header__search-icon-btn {
        display: flex;
    }

    /* Menu Toggle */
    .header__menu-toggle {
        display: flex;
    }

    .header__menu-toggle span {
        width: 20px;
        height: 2px;
    }

    /* Navigation: Hide on mobile */
    .header__nav {
        display: none;
    }

    /* Drawer: Show on mobile */
    .header__drawer {
        display: flex;
    }

    .header__drawer-overlay {
        display: block;
    }

    /* Search Expanded */
    .header__search-expanded {
        display: none;
        top: var(--h-top-height);
        width: 100%;
    }

    /* Mobile drawer: bottom-sheet (soft, full-width, always fits screen) */
    .header__drawer {
        /* Theme-driven gradient background */
        background: linear-gradient(135deg, var(--h-primary) 0%, var(--h-secondary) 100%);
        left: 0;
        right: 0;
        top: auto;
        bottom: 0;
        width: 100%;
        max-width: 100%;
        height: 100vh;
        height: 100dvh;
        border-radius: 18px 18px 0 0;
        box-shadow: var(--h-shadow-md);
        transform: translateY(100%);
        will-change: transform;
    }

    /* Softer, more premium gradient when supported */
    @supports (background: color-mix(in srgb, black 50%, white)) {
        .header__drawer {
            background:
                radial-gradient(900px 520px at 18% 0%, color-mix(in srgb, var(--h-primary) 28%, transparent), transparent 65%),
                radial-gradient(900px 520px at 82% 18%, color-mix(in srgb, var(--h-secondary) 22%, transparent), transparent 62%),
                linear-gradient(
                    135deg,
                    color-mix(in srgb, var(--h-primary) 52%, var(--h-bg)) 0%,
                    color-mix(in srgb, var(--h-secondary) 52%, var(--h-bg)) 100%
                );
        }
    }

    .header__drawer--open {
        transform: translateY(0);
    }

    /* Overlay: a bit softer on mobile */
    .header__drawer-overlay {
        background: rgba(0, 0, 0, 0.45);
    }

    /* Remove the top title text on mobile (requested) */
    .header__drawer-title {
        display: none;
    }

    /* Drawer sections spacing tuned for mobile */
    .header__drawer-header {
        padding: 16px 16px;
        /* Soft panel on top of gradient */
        background: rgba(255, 255, 255, 0.86);
        -webkit-backdrop-filter: blur(16px);
        backdrop-filter: blur(16px);
    }

    .header__drawer-nav {
        padding: 12px 12px 10px 12px;
        background: rgba(255, 255, 255, 0.86);
        -webkit-backdrop-filter: blur(16px);
        backdrop-filter: blur(16px);
    }

    .header__drawer-footer {
        padding: 14px 16px;
        padding-bottom: calc(14px + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, 0.86);
        -webkit-backdrop-filter: blur(16px);
        backdrop-filter: blur(16px);
    }

    @supports (background: color-mix(in srgb, white 50%, transparent)) {
        .header__drawer-header,
        .header__drawer-nav,
        .header__drawer-footer {
            background: color-mix(in srgb, var(--h-bg) 88%, transparent);
        }
    }

    /* Ensure links follow header color settings */
    .header__drawer-link {
        color: var(--h-link);
        font-size: var(--h-menu-font-size);
    }
    .header__drawer-link:hover {
        color: var(--h-link-hover);
    }
    .header__drawer-sub-link {
        color: var(--h-social);
    }
    .header__drawer-sub-link:hover {
        color: var(--h-link-hover);
    }

    /* Socials: responsive grid so icons never overflow */
    .header__drawer-socials {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(34px, 1fr));
        gap: 10px;
        justify-items: center;
        align-items: center;
    }

    .header__drawer-social-link {
        width: 34px;
        height: 34px;
    }

    .header__search-expanded-input {
        padding: 8px 10px;
        font-size: 12px;
        min-height: 40px;
    }

    .header__search-expanded-btn {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }

    .header__search-close {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }

    @media (max-width: 480px) {
        .header__drawer {
            border-radius: 16px 16px 0 0;
        }

        .header__logo {
            height: 32px;
        }

        .header__brand-text {
            font-size: 14px;
            max-width: 120px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .header__drawer-title {
            font-size: 16px;
        }

        .header__search-icon-btn,
        .header__menu-toggle {
            width: 36px;
            height: 36px;
        }

        .header__search-expanded-input {
            padding: 8px 10px;
            font-size: 11px;
        }

        .header__search-expanded-btn {
            width: 36px;
            height: 36px;
        }

        .header__search-close {
            width: 36px;
            height: 36px;
        }
    }
}

/* ─────────────────────────────────────────────────────────────────────────────────────────────── */
/* PRINT STYLES */
/* ─────────────────────────────────────────────────────────────────────────────────────────────── */
@media print {
    .header {
        display: none !important;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────────────────────── */
/* ACCESSIBILITY & ANIMATIONS */
/* ─────────────────────────────────────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible for keyboard navigation */
.header a:focus-visible,
.header button:focus-visible {
    outline: 2px solid var(--h-link-hover);
    outline-offset: 2px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .header__search-wrapper {
        background: rgba(255, 255, 255, 0.05);
    }

    .header__search-input::placeholder {
        color: rgba(255, 255, 255, 0.5);
    }

    .header__dropdown {
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(10px);
    }

    .header__drawer {
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(20px);
    }

    .header__drawer-link:hover {
        background: rgba(255, 255, 255, 0.05);
    }
}
