/*
Theme Name: HITERS
File: Modern Header Design
Version: 1.0.0
Description: Красная, черная, белая цветовая палитра
*/

/* ==========================================
   HEADER - Фиксированная шапка
   ========================================== */
.site-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 99999 !important;
    background: rgba(26, 26, 26, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border-bottom: 1px solid rgba(180, 180, 180, 0.4);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.3s ease, min-height 0.3s ease, box-shadow 0.3s ease;
    margin: 0 !important;
    padding: 0 !important;
}

/* Эффект при скролле - добавляем тень и уменьшаем высоту */
.site-header.header-scrolled,
.site-header.scrolled {
    background: rgba(26, 26, 26, 0.98) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5) !important;
    border-bottom: 1px solid rgba(180, 180, 180, 0.4);
}

.site-header.header-scrolled .header-inner,
.site-header.scrolled .header-inner {
    min-height: 55px;
    transition: min-height 0.3s ease;
}

.site-header.header-scrolled .logo-image,
.site-header.scrolled .logo-image {
    height: 45px;
    transition: height 0.3s ease;
}

.site-header .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.header-inner {
    display: flex;
    justify-content: space-between !important;
    align-items: center;
    gap: 40px;
    min-height: 60px;
    padding: 0 !important;
    margin: 0 !important;
    position: relative;
}

/* ==========================================
   LOGO - Слева с анимацией
   ========================================== */
.site-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
    position: relative;
    left: 0;
    transform: translateX(0);
    margin-right: 40px !important;
}

/* Анимация при скролле - логотип уезжает в центр */
.site-header.scrolled .site-logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.site-logo:hover {
    transform: translateX(0) scale(1.05);
}

.site-header.scrolled .site-logo:hover {
    transform: translateX(-50%) scale(1.05);
}

.logo-image {
    height: 50px;
    width: auto;
    object-fit: contain;
    filter: brightness(1.1) contrast(1.1);
    transition: filter 0.3s ease;
}

.site-logo:hover .logo-image {
    filter: brightness(1.3) drop-shadow(0 0 10px rgba(227, 30, 36, 0.5));
}

.logo-dot {
    color: var(--primary-red);
    font-size: 40px;
    line-height: 0;
    margin-left: 2px;
}

/* ==========================================
   NAVIGATION - Справа от логотипа
   ========================================== */
.main-nav {
    display: flex !important;
    justify-content: center !important;
    flex: 1 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    align-items: center !important;
}

/* Скрыть мобильную кнопку на десктопе */
.mobile-sidebar-toggle {
    display: none;
}

.nav-menu,
.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4px;
}

.nav-menu a,
.main-nav ul a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--primary-white);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-menu a::before,
.main-nav ul a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(227, 30, 36, 0.2), transparent);
    transition: left 0.5s ease;
}

.nav-menu a:hover::before,
.main-nav ul a:hover::before {
    left: 100%;
}

.nav-menu a:hover,
.nav-menu a.active,
.main-nav ul a:hover,
.main-nav ul a.active {
    background: var(--primary-red);
    color: var(--primary-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(227, 30, 36, 0.4);
}

/* ==========================================
   CTA BUTTON - Справа (скрывается при скролле)
   ========================================== */
.header-cta {
    background: var(--primary-red);
    color: var(--primary-white) !important;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(227, 30, 36, 0.3);
    flex-shrink: 0;
}

.header-cta:hover {
    background: #c71e24;
    color: var(--primary-white) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(227, 30, 36, 0.5);
}

/* Скрываем CTA кнопку при скролле */
.site-header.scrolled .header-cta {
    display: none;
}

/* ==========================================
   MOBILE TOGGLE
   ========================================== */
.mobile-sidebar-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: 2px solid var(--primary-red);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-sidebar-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--primary-white);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-sidebar-toggle:hover {
    background: var(--primary-red);
}

.mobile-sidebar-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translateY(8px);
}

.mobile-sidebar-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-sidebar-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-8px);
}

/* ==========================================
   SOCIAL BUTTONS - Фиксированные слева
   ========================================== */
.social-buttons-fixed-left {
    position: fixed;
    left: 30px;
    bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 999;
}

.social-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.social-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.social-btn:hover::before {
    width: 100%;
    height: 100%;
}

.social-btn svg {
    width: 24px;
    height: 24px;
    fill: white;
    z-index: 1;
    position: relative;
}

.social-btn-telegram {
    background: linear-gradient(135deg, #0088cc, #00a0dc);
}

.social-btn-telegram:hover {
    transform: translateX(-5px) scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 136, 204, 0.5);
}

.social-btn-whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
}

.social-btn-whatsapp:hover {
    transform: translateX(-5px) scale(1.1);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
}

/* ==========================================
   MOBILE RESPONSIVE
   ========================================== */
@media (max-width: 1024px) {
    /* Усиленная фиксация шапки для мобильных */
    .site-header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
        z-index: 99999 !important;
        transform: none !important;
        -webkit-transform: none !important;
        will-change: auto !important;
        backface-visibility: hidden !important;
        -webkit-backface-visibility: hidden !important;
        margin: 0 !important;
        margin-top: 0 !important;
    }

    /* Эффект при скролле на мобильных */
    .site-header.header-scrolled,
    .site-header.scrolled {
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.4) !important;
    }

    .site-header.header-scrolled .header-inner,
    .site-header.scrolled .header-inner {
        min-height: 50px;
    }

    .site-header.header-scrolled .logo-image,
    .site-header.scrolled .logo-image {
        height: 38px;
    }

    .site-header .container {
        padding: 0 20px;
    }

    .header-inner {
        display: flex;
        justify-content: space-between;
        gap: 20px;
        min-height: 60px;
    }

    .site-logo {
        position: relative;
        left: 0;
        transform: none;
        z-index: 1;
    }

    .site-header.scrolled .site-logo {
        position: relative;
        left: 0;
        transform: none;
    }

    .main-nav {
        display: none !important;
    }

    .mobile-sidebar-toggle {
        display: flex !important;
        position: relative;
        z-index: 1;
    }

    /* Мобильная боковая панель под шапкой с фиксацией */
    .mobile-sidebar {
        position: fixed !important;
        top: 60px !important; /* Под шапкой */
        right: 0 !important;
        bottom: 0 !important;
        z-index: 9998 !important; /* Ниже шапки */
    }

    .mobile-sidebar-overlay {
        position: fixed !important;
        top: 60px !important; /* Под шапкой */
        z-index: 9997 !important;
    }

    /* Кнопки остаются зафиксированными слева на всех устройствах */
    .social-buttons-fixed-left {
        position: fixed !important;
        left: 15px !important;
        bottom: 15px !important;
        gap: 12px;
        z-index: 9999 !important;
    }

    .social-btn {
        width: 48px;
        height: 48px;
    }

    .social-btn svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 768px) {
    /* Дополнительная фиксация для планшетов */
    .site-header {
        position: fixed !important;
        top: 0 !important;
        z-index: 99999 !important;
    }

    .site-header .container {
        padding: 0 20px;
    }

    .header-inner {
        min-height: 60px;
    }

    .logo-image {
        height: 40px;
    }

    .header-cta {
        padding: 12px 24px;
        font-size: 14px;
    }

    /* Мобильная боковая панель под шапкой */
    .mobile-sidebar {
        top: 60px !important;
        z-index: 9998 !important;
    }

    .mobile-sidebar-overlay {
        top: 60px !important;
        z-index: 9997 !important;
    }

    /* Кнопки остаются зафиксированными слева */
    .social-buttons-fixed-left {
        position: fixed !important;
        left: 12px !important;
        bottom: 12px !important;
        z-index: 9999 !important;
    }

    .social-btn {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 640px) {
    /* Усиленная фиксация для малых экранов */
    .site-header {
        position: fixed !important;
        top: 0 !important;
        z-index: 99999 !important;
    }

    .header-cta {
        display: none;
    }

    /* Мобильная боковая панель под шапкой */
    .mobile-sidebar {
        top: 60px !important;
        z-index: 9998 !important;
    }

    .mobile-sidebar-overlay {
        top: 60px !important;
        z-index: 9997 !important;
    }

    /* Кнопки остаются зафиксированными слева на малых экранах */
    .social-buttons-fixed-left {
        position: fixed !important;
        left: 10px !important;
        bottom: 10px !important;
        z-index: 9999 !important;
    }
}

@media (max-width: 480px) {
    /* Максимальная фиксация для самых малых экранов */
    .site-header {
        position: fixed !important;
        top: 0 !important;
        z-index: 99999 !important;
    }

    /* Мобильная боковая панель под шапкой */
    .mobile-sidebar {
        top: 60px !important;
        z-index: 9998 !important;
    }

    .mobile-sidebar-overlay {
        top: 60px !important;
        z-index: 9997 !important;
    }

    /* Кнопки остаются зафиксированными слева на самых малых экранах */
    .social-buttons-fixed-left {
        position: fixed !important;
        left: 8px !important;
        bottom: 8px !important;
        gap: 10px;
        z-index: 9999 !important;
    }

    .social-btn {
        width: 40px;
        height: 40px;
    }

    .social-btn svg {
        width: 18px;
        height: 18px;
    }

    .social-btn img {
        width: 18px;
        height: 18px;
    }
}

/* Компенсация высоты фиксированного header */
/* Для десктопа отступ не нужен, т.к. hero-секция занимает всю высоту */
body {
    padding-top: 0 !important;
}

/* Для мобильных устройств padding-top устанавливается в style.css */
@media (max-width: 1024px) {
    body {
        padding-top: 60px !important;
    }
}
