/* ============================================
   HEADER SECTION
   Шапка сайта с навигацией и контактами
   ============================================ */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: transparent;
    padding: var(--spacing-md) 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

/* Header при скролле */
.header.scrolled {
    background: linear-gradient(135deg, rgba(45, 42, 40, 0.95) 0%, rgba(26, 24, 24, 0.95) 100%);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
}

.header__inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: var(--spacing-xl);
}

/* Логотип */
.header__logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header__logo-icon {
    width: 32px;
    height: 32px;
}

.header__logo-icon path {
    transition: all 0.3s ease;
}

.header__logo-icon circle {
    transition: all 0.3s ease;
}

.header__logo-text {
    font-size: 20px;
    font-weight: var(--weight-semibold);
    color: white;
    transition: all 0.3s ease;
}

.header.scrolled .header__logo-text {
    color: white;
}

/* Навигация */
.header__nav {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
}

.header__nav-link {
    font-size: var(--font-nav);
    font-weight: var(--weight-medium);
    color: white;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: all 0.3s ease;
    position: relative;
}

.header.scrolled .header__nav-link {
    color: white;
}

.header__nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-accent);
    transition: var(--transition);
}

.header__nav-link:hover {
    color: var(--color-accent) !important;
}

.header__nav-link:hover::after {
    width: 100%;
}

/* Контакты */
.header__contacts {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.header__phone-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.header__phone {
    font-size: var(--font-nav);
    font-weight: var(--weight-bold);
    font-family: 'Courier New', monospace;
    color: white;
    transition: all 0.3s ease;
}

.header.scrolled .header__phone {
    color: white;
}

.header__phone:hover {
    color: var(--color-accent) !important;
}

.header__schedule {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}

.header.scrolled .header__schedule {
    color: rgba(255, 255, 255, 0.7);
}

/* Социальные сети */
.header__social {
    display: flex;
    gap: 12px;
}

.header__social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: white;
    color: #2D2A28;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header.scrolled .header__social-link {
    background: white;
    color: #2D2A28;
}

.header__social-link:hover {
    background: #C99A7B !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 154, 123, 0.4);
}

/* Бургер меню (скрыт на десктопе) */
.header__burger {
    display: none;
    flex-direction: column;
    gap: 6px;
    width: 32px;
    height: 32px;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002;
    position: relative;
}

.header__burger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: white;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.header.scrolled .header__burger span {
    background-color: white;
}

/* Анимация бургера при открытии */
.header__burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.header__burger.active span:nth-child(2) {
    opacity: 0;
}

.header__burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* Мобильное меню */
@media (max-width: 768px) {
    .header {
        background: linear-gradient(135deg, rgba(45, 42, 40, 0.95) 0%, rgba(26, 24, 24, 0.95) 100%);
    }
    
    .header__burger {
        display: flex !important;
    }
    
    .header__nav {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        width: 280px !important;
        height: 100vh !important;
        height: 100dvh !important;
        background: linear-gradient(135deg, rgba(45, 42, 40, 0.98) 0%, rgba(26, 24, 24, 0.98) 100%) !important;
        backdrop-filter: blur(20px) !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        align-items: flex-start !important;
        padding: 80px 32px 32px !important;
        gap: 24px !important;
        transition: right 0.4s ease !important;
        box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3) !important;
        z-index: 1001 !important;
        overflow-y: auto !important;
    }
    
    .header__nav.active {
        right: 0 !important;
    }
    
    .header__nav-link {
        font-size: 18px !important;
        width: 100% !important;
        padding: 12px 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        color: white !important;
        display: block !important;
    }
    
    .header__nav-link::after {
        display: none !important;
    }
    
    /* Overlay при открытом меню */
    .header__nav.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 280px;
        bottom: 0;
        background: rgba(0, 0, 0, 0.7);
        z-index: -1;
    }
    
    .header__contacts {
        display: none !important;
    }
}
