/**
 * Header Component Styles
 * BEM Methodology
 * Mobile-first responsive design
 */

/* ==========================================================================
   Header Block
   ========================================================================== */

.site-header {
    background-color: var(--color-grey-10);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   Header Banner Element
   ========================================================================== */

.site-header__banner {
    background-color: var(--color-grey-10);
    padding: 24px var(--mobile-container-padding) 16px;
    position: relative;
    overflow: hidden;
    height: 78px;
    display: flex;
    align-items: center;
}

.site-header__banner-content {
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 2;
}

.site-header__banner-text {
    font-family: var(--font-primary);
    font-weight: var(--font-weight-medium);
    font-size: 12px;
    line-height: 1.5;
    color: var(--color-white);
    text-align: center;
    white-space: nowrap;
}

.site-header__banner-link {
    font-family: var(--font-primary);
    font-weight: var(--font-weight-medium);
    font-size: 12px;
    line-height: 1.5;
    color: var(--color-white);
    text-align: center;
    text-decoration: underline;
    text-underline-offset: from-font;
    text-decoration-skip-ink: none;
    white-space: nowrap;
}

.site-header__banner-close {
    position: absolute;
    right: var(--mobile-container-padding);
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 75px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    cursor: pointer;
}

.site-header__banner-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.site-header__banner-close-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.site-header__banner-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1566px;
    height: 1046px;
    z-index: 1;
    pointer-events: none;
}

.site-header__banner-bg-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: color-dodge;
}

/* ==========================================================================
   Header Navigation Element
   ========================================================================== */

.site-header__navigation {
    background-color: var(--color-grey-10);
    border-bottom: 1px solid var(--color-grey-08);
    padding: 20px var(--mobile-container-padding);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 68px;
}

/* ==========================================================================
   Desktop Navigation
   ========================================================================== */

.desktop-nav {
    display: none; /* Hidden by default, shown on larger screens */
}

.desktop-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 32px; /* Spacing between menu items */
}

.desktop-nav__item {
    margin: 0;
}

.desktop-nav__link {
    font-family: var(--font-primary);
    font-weight: var(--font-weight-medium);
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-white);
    text-decoration: none;
    padding: 8px 0;
    display: block;
    transition: color 0.2s ease;
    position: relative;
}

.desktop-nav__link:hover {
    color: var(--color-purple-75);
}

.desktop-nav__link:focus {
    outline: 2px solid var(--color-purple-60);
    outline-offset: 2px;
    border-radius: 4px;
}

.desktop-nav__link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-purple-75);
    transition: width 0.2s ease;
}

.desktop-nav__link:hover::after {
    width: 100%;
}

/* ==========================================================================
   Header Actions (Search + CTA)
   ========================================================================== */

.header-actions {
    display: none; /* Hidden by default, shown on larger screens */
    align-items: center;
    gap: 24px; /* Spacing between search and CTA */
}

.search-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.search-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.search-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.header-cta {
    background-color: var(--color-purple-60);
    color: var(--color-white);
    font-family: var(--font-primary);
    font-weight: var(--font-weight-medium);
    font-size: 14px;
    line-height: 1.5;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
    display: inline-block;
}

.header-cta:hover {
    background-color: var(--color-purple-75);
}

.header-cta:focus {
    outline: 2px solid var(--color-white);
    outline-offset: 2px;
}

/* ==========================================================================
   Header Logo Block
   ========================================================================== */

.site-header__logo {
    display: flex;
    align-items: center;
    height: 28px;
    width: 93.33px;
}

.site-header__logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ==========================================================================
   Header Menu Toggle Element
   ========================================================================== */

.site-header__menu-toggle {
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-header__menu-toggle:hover {
    opacity: 0.8;
}

.site-header__menu-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

/* ==========================================================================
   Mobile Menu Overlay Block
   ========================================================================== */

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(20, 20, 20, 0.95);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu--active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu__container {
    background-color: var(--color-grey-10);
    border-radius: var(--card-border-radius);
    padding: var(--spacing-xl);
    max-width: 90%;
    width: 358px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.mobile-menu__close {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu__close:hover {
    opacity: 0.8;
}

.mobile-menu__close-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.mobile-menu__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu__item {
    margin-bottom: var(--spacing-md);
}

.mobile-menu__item:last-child {
    margin-bottom: 0;
}

.mobile-menu__link {
    font-family: var(--font-primary);
    font-weight: var(--font-weight-medium);
    font-size: 16px;
    line-height: 1.5;
    color: var(--color-white);
    text-decoration: none;
    padding: var(--spacing-sm) 0;
    display: block;
    transition: color 0.2s ease;
}

.mobile-menu__link:hover {
    color: var(--color-purple-75);
}

.mobile-menu__link:focus {
    outline: 2px solid var(--color-purple-60);
    outline-offset: 2px;
}

/* ==========================================================================
   Header Responsive Design
   ========================================================================== */

/* Tablet and up */
@media (min-width: 768px) {
    .site-header__banner {
        padding: 30px var(--tablet-container-padding) 20px;
        height: auto;
        min-height: 78px;
    }

    .site-header__navigation {
        padding: 20px var(--tablet-container-padding);
        height: 80px;
    }

    .site-header__logo {
        width: 120px;
        height: 36px;
    }

    .site-header__menu-toggle {
        width: 36px;
        height: 36px;
    }

    .site-header__menu-icon {
        width: 36px;
        height: 36px;
    }

    .mobile-menu__container {
        width: 400px;
        padding: var(--spacing-2xl);
    }
}

/* Laptop and up (1440px) */
@media (min-width: 1440px) {
    .site-header__banner {
        padding: 30px 80px 20px;
        height: auto;
        min-height: 78px;
    }

    .site-header__navigation {
        padding: 20px 80px;
        height: 80px;
        justify-content: space-between;
        align-items: center;
    }

    .site-header__logo {
        width: 140px;
        height: 42px;
        order: 1; /* Logo on the left */
    }

    .desktop-nav {
        display: block; /* Show desktop navigation */
        order: 2; /* Navigation in the center */
    }

    .desktop-nav__list {
        gap: 32px;
    }

    .desktop-nav__link {
        font-size: 16px; /* Typography scaling: 14px → 16px */
    }

    .header-actions {
        display: flex; /* Show header actions */
        order: 3; /* Actions on the right */
    }

    .search-icon {
        width: 24px;
        height: 24px;
    }

    .header-cta {
        font-size: 16px;
        padding: 14px 28px;
    }

    .site-header__menu-toggle {
        display: none; /* Hide mobile menu toggle */
    }

    .mobile-menu__container {
        width: 450px;
        padding: var(--spacing-2xl);
    }
}

/* Desktop and up (1920px) */
@media (min-width: 1920px) {
    .site-header__banner {
        padding: 18px 162px 22px;
        height: auto;
        min-height: 63px;
    }

    .site-header__navigation {
        padding: 25.5px 162px;
        height: 99px;
        justify-content: space-between;
        align-items: center;
    }

    .site-header__logo {
        width: 160px;
        height: 48px;
        order: 1; /* Logo on the left */
    }

    .desktop-nav {
        display: block; /* Show desktop navigation */
        order: 2; /* Navigation in the center */
    }

    .desktop-nav__list {
        gap: 40px; /* More spacing on larger screens */
    }

    .desktop-nav__link {
        font-size: 18px; /* Typography scaling: 16px → 18px */
    }

    .header-actions {
        display: flex; /* Show header actions */
        order: 3; /* Actions on the right */
        gap: 32px; /* More spacing on larger screens */
    }

    .search-icon {
        width: 28px;
        height: 28px;
    }

    .header-cta {
        font-size: 18px;
        padding: 16px 32px;
    }

    .site-header__menu-toggle {
        display: none; /* Hide mobile menu toggle */
    }

    .mobile-menu__container {
        width: 500px;
        padding: var(--spacing-3xl);
    }
}