/**
 * Header CSS
 * @package SportBreak
 */

/* ========================================
   HEADER
   ======================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--dark);
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: background 0.3s ease, box-shadow 0.3s ease, height 0.3s ease;
}

/* Admin bar support */
.admin-bar .site-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .site-header {
        top: 46px;
    }

    /* When admin bar scrolls away on mobile, reset header to top */
    .admin-bar.admin-bar-scrolled .site-header {
        top: 0;
    }
}

.site-header--scrolled {
    background: rgba(33, 33, 33, 0.97);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    height: 64px;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Logo */
.site-header__logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.site-header__logo img {
    height: 40px;
    width: auto;
}

/* Navigation */
.site-header__nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.site-header__nav li {
    position: relative;
}

.site-header__nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.site-header__nav a:hover {
    color: var(--yellow);
}

.site-header__nav li.is-active > a {
    color: var(--yellow);
}

/* Desktop Dropdown */
.site-header__nav .dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: var(--white);
    min-width: 200px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 15px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 10;
}

.site-header__nav li:hover > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.site-header__nav .dropdown-menu a {
    color: var(--dark) !important;
    padding: 10px 20px;
    display: block;
    text-transform: none;
    font-size: 15px;
}

.site-header__nav .dropdown-menu a:hover,
.site-header__nav .dropdown-menu a.is-active {
    background-color: rgba(243, 194, 31, 0.1);
    color: var(--purple) !important;
}

/* Header Actions */
.site-header__actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

/* Réserver button - always visible */
.btn-reserve {
    padding: 10px 22px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    white-space: nowrap;
}

/* Hamburger - Custom animated lines */
.hamburger {
    display: none;
    cursor: pointer;
    color: var(--white);
    background: none;
    border: none;
    padding: 8px;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1001;
}

.hamburger__lines {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 24px;
    height: 18px;
    position: relative;
}

.hamburger__lines span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.68, -0.6, 0.32, 1.6);
    position: absolute;
    left: 0;
}

.hamburger__lines span:nth-child(1) {
    top: 0;
}

.hamburger__lines span:nth-child(2) {
    top: 8px;
}

.hamburger__lines span:nth-child(3) {
    top: 16px;
}

/* Hamburger open state - X animation */
.hamburger.is-open .hamburger__lines span:nth-child(1) {
    top: 8px;
    transform: rotate(45deg);
}

.hamburger.is-open .hamburger__lines span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.is-open .hamburger__lines span:nth-child(3) {
    top: 8px;
    transform: rotate(-45deg);
}

/* ========================================
   MOBILE NAVIGATION - Full Screen Overlay
   ======================================== */

.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.mobile-nav.is-open {
    opacity: 1;
    visibility: visible;
}

.mobile-nav__inner {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding-top: var(--header-height);
    padding-bottom: 40px;
}

/* Admin bar support for mobile nav */
.admin-bar .mobile-nav__inner {
    padding-top: calc(var(--header-height) + 32px);
}

@media screen and (max-width: 782px) {
    .admin-bar .mobile-nav__inner {
        padding-top: calc(var(--header-height) + 46px);
    }

    .admin-bar.admin-bar-scrolled .mobile-nav__inner {
        padding-top: var(--header-height);
    }
}

/* Menu */
.mobile-nav__menu {
    padding: 20px 25px 0;
}

.mobile-nav__menu ul {
    list-style: none;
}

.mobile-nav__menu > ul > li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-nav__menu > ul > li:first-child {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Direct links */
.mobile-nav__menu > ul > li > a {
    color: var(--white);
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    display: block;
    padding: 16px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s;
}

.mobile-nav__menu > ul > li > a:hover,
.mobile-nav__menu > ul > li.is-active > a {
    color: var(--yellow);
}

/* Dropdown Toggle - link + chevron button */
.mobile-nav .dropdown-toggle {
    display: flex;
    align-items: center;
}

.mobile-nav .dropdown-toggle__link {
    flex: 1;
    color: var(--white);
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    padding: 16px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s;
}

.mobile-nav .dropdown-toggle__link:hover,
.mobile-nav li.is-active > .dropdown-toggle .dropdown-toggle__link {
    color: var(--yellow);
}

.mobile-nav .dropdown-toggle__btn {
    background: none;
    border: none;
    color: var(--yellow);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.mobile-nav .dropdown-toggle__btn.is-open {
    transform: rotate(180deg);
}

.mobile-nav .dropdown-toggle__btn i {
    font-size: 14px;
}

/* Dropdown Menu */
.mobile-nav .dropdown-menu {
    position: static;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    padding: 0;
    display: none;
    border-radius: 0;
    min-width: 0;
}

.mobile-nav .dropdown-menu.is-open {
    display: block;
}

.mobile-nav .dropdown-menu a {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 16px;
    font-weight: 500;
    padding: 12px 0 12px 20px;
    display: block;
    text-decoration: none;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    margin-left: 8px;
    transition: all 0.3s;
}

.mobile-nav .dropdown-menu a:hover,
.mobile-nav .dropdown-menu a.is-active {
    color: var(--yellow) !important;
    background: transparent;
    border-left-color: var(--yellow);
}

/* CTA Button */
.mobile-nav__cta {
    padding: 25px 25px 0;
}

.mobile-nav__cta .btn {
    width: 100%;
    text-align: center;
    font-size: 16px;
    padding: 16px 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Contact Info */
.mobile-nav__contact {
    padding: 25px 25px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-nav__contact-item {
    display: flex;
    align-items: center;
    gap: 14px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s;
}

.mobile-nav__contact-item:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.05);
}

.mobile-nav__contact-item i {
    color: var(--yellow);
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.mobile-nav__contact-item span {
    line-height: 1.4;
}

/* Social Links */
.mobile-nav__social {
    padding: 25px 25px 0;
    display: flex;
    justify-content: center;
    gap: 12px;
}

.mobile-nav__social a {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s;
    text-decoration: none;
}

.mobile-nav__social a:hover {
    background: var(--yellow);
    color: var(--dark);
    transform: translateY(-2px);
}

/* ========================================
   RESPONSIVE - TABLET (max-width: 992px)
   ======================================== */

@media (max-width: 992px) {
    .site-header__nav {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .btn-reserve {
        padding: 8px 18px !important;
        font-size: 13px !important;
    }
}

/* ========================================
   RESPONSIVE - MOBILE (max-width: 768px)
   ======================================== */

@media (max-width: 768px) {
    .site-header {
        height: var(--header-height-mobile);
    }

    .site-header--scrolled {
        height: 56px;
    }

    .site-header__logo img {
        height: 32px;
    }

    .btn-reserve {
        padding: 7px 14px !important;
        font-size: 12px !important;
    }

    .mobile-nav__inner {
        padding-top: var(--header-height-mobile);
    }

    .admin-bar .mobile-nav__inner {
        padding-top: calc(var(--header-height-mobile) + 32px);
    }
}

@media screen and (max-width: 782px) and (max-width: 768px) {
    .admin-bar .mobile-nav__inner {
        padding-top: calc(var(--header-height-mobile) + 46px);
    }

    .admin-bar.admin-bar-scrolled .mobile-nav__inner {
        padding-top: var(--header-height-mobile);
    }
}

/* ========================================
   RESPONSIVE - SMALL MOBILE (max-width: 480px)
   ======================================== */

@media (max-width: 480px) {
    .btn-reserve {
        padding: 6px 12px !important;
        font-size: 11px !important;
    }

    .site-header__actions {
        gap: 10px;
    }

    .mobile-nav__menu > ul > li > a,
    .mobile-nav .dropdown-toggle__link {
        font-size: 16px;
    }
}

/* ========================================
   BODY STATES
   ======================================== */

body.nav-open {
    overflow: hidden;
}
