/**
 * Mostbet Header & Navigation Styles
 * Отдельный файл стилей для шапки
 */

/* ===================================
   CSS Variables for Header
   =================================== */
:root {
    --header-height: 70px;
    --header-height-mobile: 110px;
    --header-bg: rgba(8, 48, 92, 0.95);
    --header-bg-scrolled: rgba(10, 58, 106, 0.98);
    --header-border: rgba(47, 126, 199, 0.2);
    --nav-link-color: #E6EDF5;
    --nav-link-hover: #FF7A00;
    --nav-link-active: #FF7A00;
    --logo-star: #FF7A00;
    --btn-primary-bg: linear-gradient(135deg, #FF7A00 0%, #FF8C1A 100%);
    --btn-primary-shadow: 0 4px 15px rgba(255, 122, 0, 0.4);
    --btn-outline-border: rgba(255, 255, 255, 0.3);
    --mobile-menu-bg: linear-gradient(180deg, #08305C 0%, #0A3A6A 100%);
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Button Float Animation */
@keyframes buttonFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

/* ===================================
   Header Base
   =================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100000;
    height: var(--header-height);
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--header-border);
    transition: all 0.4s var(--transition-smooth);
    overflow: visible;
}

.site-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        #FF7A00 20%, 
        #FF8C1A 50%, 
        #FF7A00 80%, 
        transparent 100%
    );
    opacity: 0.8;
}

.site-header.scrolled {
    background: var(--header-bg-scrolled);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.site-header .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
}

/* ===================================
   Desktop Header
   =================================== */
.header-desktop {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: 40px;
}

.header-mobile {
    display: none;
}

/* ===================================
   Logo
   =================================== */
.site-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    position: relative;
    transition: all 0.3s var(--transition-smooth);
    flex-shrink: 0;
}

.site-logo .logo-img {
    height: 40px;
    width: auto;
    transition: all 0.3s var(--transition-smooth);
}

.site-logo:hover .logo-img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.site-header.scrolled .site-logo .logo-img {
    height: 34px;
}

/* ===================================
   Desktop Navigation
   =================================== */
.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-nav a {
    position: relative;
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: var(--nav-link-color);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 8px;
    transition: all 0.4s var(--transition-smooth);
    overflow: hidden;
    text-transform: uppercase;
    font-family: 'Montserrat', sans-serif;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Menu item glow effect */
.main-nav a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #FF7A00, #FF8C1A, #FF7A00);
    transition: all 0.4s var(--transition-bounce);
    transform: translateX(-50%);
    border-radius: 3px;
    box-shadow: 0 0 10px rgba(255, 122, 0, 0.5);
}

/* Menu item background glow */
.main-nav a::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(255, 122, 0, 0.15) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s var(--transition-smooth);
    border-radius: 8px;
}

.main-nav a:hover {
    color: #FFFFFF;
    transform: translateY(-3px) scale(1.05);
    text-shadow: 0 0 15px rgba(255, 122, 0, 0.5);
}

.main-nav a:hover::before {
    width: 80%;
    animation: menuGlow 1.5s ease-in-out infinite;
}

.main-nav a:hover::after {
    opacity: 1;
}

@keyframes menuGlow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 122, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 122, 0, 0.8), 0 0 30px rgba(255, 122, 0, 0.4);
    }
}

.main-nav a.active {
    color: var(--nav-link-active);
    background: rgba(255, 122, 0, 0.15);
    text-shadow: 0 0 10px rgba(255, 122, 0, 0.3);
}

.main-nav a.active::before {
    width: 90%;
    height: 3px;
}

/* ===================================
   Header Buttons (Desktop)
   =================================== */
.header-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Primary CTA Button */
.header-buttons .btn-orange {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    background: var(--btn-primary-bg);
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: 10px;
    text-decoration: none;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s var(--transition-smooth);
    box-shadow: var(--btn-primary-shadow);
    animation: buttonFloat 2s ease-in-out infinite !important;
}

.header-buttons .btn-orange:hover {
    animation-play-state: paused;
}

.header-buttons .btn-orange::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s var(--transition-smooth);
}

.header-buttons .btn-orange:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 122, 0, 0.5);
}

.header-buttons .btn-orange:hover::before {
    left: 100%;
}

/* Outline Button */
.header-buttons .btn-outline {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 24px;
    background: transparent;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: 2px solid var(--btn-outline-border);
    border-radius: 10px;
    text-decoration: none;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s var(--transition-smooth);
    animation: buttonFloat 2s ease-in-out infinite 0.3s !important;
}

.header-buttons .btn-outline:hover {
    animation-play-state: paused;
}

.header-buttons .btn-outline:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* ===================================
   Mobile Header Structure
   =================================== */
.mobile-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 50px;
}

.mobile-buttons-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 8px 0 12px;
}

.mobile-buttons-row .btn {
    flex: 1;
    max-width: 180px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s var(--transition-smooth);
}

.mobile-buttons-row .btn-orange {
    background: var(--btn-primary-bg);
    color: #FFFFFF;
    border: none;
    box-shadow: 0 4px 12px rgba(255, 122, 0, 0.3);
    animation: buttonFloat 2s ease-in-out infinite !important;
}

.mobile-buttons-row .btn-orange:hover,
.mobile-buttons-row .btn-orange:active {
    box-shadow: 0 6px 20px rgba(255, 122, 0, 0.4);
    transform: scale(1.02);
}

.mobile-buttons-row .btn-outline-blue {
    background: linear-gradient(135deg, #2F7EC7 0%, #0D4F8B 100%);
    color: #FFFFFF;
    border: none;
    box-shadow: 0 4px 12px rgba(47, 126, 199, 0.3);
    animation: buttonFloat 2s ease-in-out infinite 0.3s !important;
}

.mobile-buttons-row .btn-outline-blue:hover,
.mobile-buttons-row .btn-outline-blue:active {
    box-shadow: 0 6px 20px rgba(47, 126, 199, 0.4);
    transform: scale(1.02);
}

/* ===================================
   Mobile Menu Button
   =================================== */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 46px;
    height: 46px;
    padding: 0;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(47, 126, 199, 0.55);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s var(--transition-smooth);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(47, 126, 199, 0.6);
    transform: translateY(-1px);
}

.mobile-menu-btn:active {
    transform: translateY(0);
}

.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    width: 28px;
    height: 20px;
    position: relative;
}

.hamburger span {
    position: absolute;
    width: 100%;
    height: 2px;
    background: #FFFFFF;
    border-radius: 2px;
    transition: all 0.4s var(--transition-smooth);
    right: 0;
}

.hamburger span:nth-child(1) {
    top: 0;
    width: 100%;
}

.hamburger span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
    width: 70%;
}

.hamburger span:nth-child(3) {
    bottom: 0;
    width: 85%;
}

/* Hamburger Animation */
.mobile-menu-btn.active .hamburger span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    background: #FF7A00;
}

.mobile-menu-btn.active .hamburger span:nth-child(2) {
    opacity: 0;
    width: 0;
}

.mobile-menu-btn.active .hamburger span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
    width: 100%;
    background: #FF7A00;
}

/* ===================================
   Mobile Menu
   =================================== */
/* ===================================
   Mobile Menu - Transparent with buttons only
   =================================== */
.mobile-menu {
    position: fixed;
    top: var(--header-height-mobile, 100px);
    right: 0;
    width: auto;
    max-width: 90vw;
    height: auto;
    max-height: calc(100vh - var(--header-height-mobile, 100px) - 20px);
    background: transparent;
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s var(--transition-smooth);
    overflow-y: auto;
    z-index: 99999;
    padding: 10px;
}

body.menu-open {
    /* Don't lock scroll for transparent menu */
}

.mobile-menu.active {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

/* Menu Navigation - Button style items */
.mobile-menu-nav {
    display: flex;
    flex-direction: column;
    padding: 0;
    gap: 8px;
}

.mobile-menu-nav a {
    display: block;
    padding: 14px 24px;
    color: #FFFFFF;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 10px;
    background: #0A3A6A;
    border: 1px solid rgba(47, 126, 199, 0.5);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: all 0.25s var(--transition-smooth);
    white-space: nowrap;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.mobile-menu-nav a:hover {
    background: linear-gradient(135deg, rgba(255, 122, 0, 0.15) 0%, rgba(255, 122, 0, 0.1) 100%);
    border-color: rgba(255, 122, 0, 0.4);
    color: #FFFFFF;
    transform: translateX(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.mobile-menu-nav a.active {
    background: linear-gradient(135deg, rgba(255, 122, 0, 0.2) 0%, rgba(255, 122, 0, 0.1) 100%);
    border-color: rgba(255, 122, 0, 0.5);
    color: #5BC0EB;
    text-shadow: 0 0 8px rgba(91, 192, 235, 0.4);
}

/* ===================================
   Responsive Styles
   =================================== */
@media (max-width: 1200px) {
    .main-nav a {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .header-desktop {
        gap: 24px;
    }
}

@media (max-width: 992px) {
    :root {
        --header-height: var(--header-height-mobile);
    }
    
    .header-desktop {
        display: none;
    }
    
    .header-mobile {
        display: flex;
        flex-direction: column;
        justify-content: center;
        height: 100%;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .site-logo .logo-img {
        height: 32px;
    }
}

@media (max-width: 576px) {
    :root {
        --header-height-mobile: 100px;
    }
    
    .site-header .container {
        padding: 0 12px;
    }
    
    .site-logo .logo-img {
        height: 28px;
    }
    
    .mobile-menu-btn {
        width: 40px;
        height: 40px;
    }
    
    .hamburger {
        width: 24px;
    }
    
    .mobile-buttons-row {
        gap: 10px;
    }
    
    .mobile-buttons-row .btn {
        padding: 10px 16px;
        font-size: 13px;
        max-width: 150px;
    }
    
    .mobile-menu {
        width: 100%;
        max-width: 100%;
    }
    
    .mobile-menu-buttons {
        padding: 16px;
    }
    
    .mobile-menu-buttons .btn {
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* ===================================
   Body Offset for Fixed Header
   =================================== */
body {
    padding-top: var(--header-height);
}

@media (max-width: 992px) {
    body {
        padding-top: var(--header-height-mobile);
    }
}

/* ===================================
   Header Scroll Effect
   =================================== */
.site-header.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ===================================
   Accessibility
   =================================== */
.site-header *:focus-visible {
    outline: 2px solid #FF7A00;
    outline-offset: 2px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .site-header,
    .site-header *,
    .mobile-menu,
    .mobile-menu * {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}
