/* ========== ОСНОВНОЕ МЕНЮ САЙТА ========== */
:root {
    --site-primary: #103c6b;
    --site-secondary: #2b8e61;
    --site-accent: #a4ccb8;
    --site-dark: #1a1a2e;
    --site-gray: #6c757d;
    --site-light: #f8f9fa;
    --site-border: #e9ecef;
    --site-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    --site-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
}

/* ===== ОСНОВНОЙ HEADER ===== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: transparent;
    z-index: 1000;
}

/* Верхняя строка с логотипом и телефонами */
.site-top-bar {
    background: white;
    border-bottom: 1px solid var(--site-border);
    transition: all 0.3s ease;
}

.site-top-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 80px;
}

/* Логотип в верхней панели */
.site-top-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.site-top-logo:hover {
    transform: translateY(-2px);
}

.site-top-logo img {
    height: 40px;
    width: auto;
}

.site-top-logo span {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--site-primary);
    letter-spacing: 1px;
}

/* Блок телефонов - одна общая иконка + список номеров */
.site-phones {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

/* Общая пульсирующая иконка */
.site-phones-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--site-secondary) 0%, var(--site-secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(45, 142, 97, 0.3);
    position: relative;
}

.site-phones-icon i {
    color: white;
    font-size: 1.2rem;
    animation: sitePhonePulse 2s ease-in-out infinite;
}

@keyframes sitePhonePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Пульсирующее кольцо вокруг иконки */
.site-phones-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(45, 142, 97, 0.4);
    animation: sitePhoneRing 2s ease-out infinite;
    pointer-events: none;
}

@keyframes sitePhoneRing {
    0% {
        width: 48px;
        height: 48px;
        opacity: 0.5;
    }
    100% {
        width: 72px;
        height: 72px;
        opacity: 0;
    }
}

/* Список номеров телефонов (вертикально) */
.site-phones-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.site-phone-number {
    font-size: 1rem;
    font-weight: 500;
    color: var(--site-primary);
    text-decoration: none;
    transition: color 0.3s ease;
    line-height: 1.4;
}

.site-phone-number:hover {
    color: var(--site-secondary);
}

/* ===== ОСНОВНАЯ СТРОКА МЕНЮ ===== */
.site-nav-bar {
    background: var(--site-primary);
    position: relative;
    transition: all 0.3s ease;
}

.site-nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 65px;
    position: relative;
}

/* Логотип в основной строке (появляется при скролле) */
.site-nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: none; /* Полностью скрыт, не занимает место */
    flex-shrink: 0;
}

.site-nav-logo.visible {
    display: flex; /* Появляется при скролле */
    margin-right: 60px;
}

.site-nav-logo:hover {
    transform: translateY(-2px);
}

.site-nav-logo img {
    height: 35px;
    width: auto;
}

.site-nav-logo span {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    letter-spacing: 1px;
}

/* Навигация - будет справа от логотипа когда он появится */
.site-nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.site-nav-item {
    position: static;
}

.site-nav-link {
    display: inline-block;
    padding: 1rem 1.5rem;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.site-nav-link:hover,
.site-nav-link.active {
    background: rgba(255, 255, 255, 0.1);
}

/* ===== ВЫПАДАЮЩЕЕ МЕНЮ ===== */
.site-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    box-shadow: var(--site-shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.site-nav-item:hover .site-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.site-dropdown-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    gap: 2rem;
}

/* Левая колонка - категории */
.site-dropdown-categories {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.site-category-item {
    border-bottom: 1px solid var(--site-border);
}

.site-category-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    color: var(--site-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.site-category-link i {
    font-size: 0.8rem;
    color: var(--site-gray);
    transition: transform 0.3s ease;
}

.site-category-link:hover {
    color: var(--site-secondary);
}

.site-category-link:hover i {
    color: var(--site-secondary);
    transform: translateX(3px);
}

/* Правая колонка - подкатегории */
.site-dropdown-subcategories {
    flex: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    border-left: 1px solid var(--site-border);
    padding-left: 2rem;
}

.site-subcategory-group {
    flex: 1;
    min-width: 180px;
}

.site-subcategory-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-subcategory-list li {
    margin-bottom: 0.5rem;
}

.site-subcategory-list a {
    color: var(--site-gray);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.site-subcategory-list a:hover {
    color: var(--site-secondary);
    padding-left: 5px;
}

/* ===== СОСТОЯНИЕ ПРИ СКРОЛЛЕ ===== */
.site-header.scrolled {
    background: white;
    box-shadow: var(--site-shadow);
}

.site-header.scrolled .site-top-bar {
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    position: absolute;
    width: 100%;
}

.site-header.scrolled .site-nav-bar {
    background: var(--site-primary);
}

/* ===== КОМПЕНСАЦИЯ ОТСТУПА ДЛЯ ФИКСИРОВАННОГО МЕНЮ ===== */
main {
    margin-top: 0px;
    transition: margin-top 0.3s ease;
}

.site-header.scrolled ~ main {
    margin-top: 60px;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 1200px) {
    .site-top-container,
    .site-nav-container {
        padding: 0 1rem;
    }
    
    .site-nav-link {
        padding: 1rem 1rem;
        font-size: 0.75rem;
    }
    
    .site-nav-logo.visible {
        margin-right: 40px;
    }
    
    .site-nav-logo span {
        font-size: 0.9rem;
    }
    
    .site-nav-logo img {
        height: 30px;
    }
}

@media (max-width: 991px) {
    .site-top-container {
        padding: 0.5rem 1rem;
    }
    
    .site-top-logo img {
        height: 32px;
    }
    
    .site-top-logo span {
        font-size: 0.9rem;
    }
    
    .site-phones-icon {
        width: 40px;
        height: 40px;
    }
    
    .site-phones-icon i {
        font-size: 1rem;
    }
    
    .site-phone-number {
        font-size: 0.85rem;
    }
    
    .site-nav-link {
        padding: 0.8rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .site-nav-logo.visible {
        margin-right: 30px;
    }
    
    .site-nav-logo span {
        font-size: 0.8rem;
    }
    
    .site-nav-logo img {
        height: 28px;
    }
    
    .site-dropdown-container {
        flex-direction: column;
        padding: 1.5rem;
    }
    
    .site-dropdown-subcategories {
        border-left: none;
        padding-left: 0;
    }
    
    main {
        margin-top: 100px;
    }
    
    .site-header.scrolled ~ main {
        margin-top: 50px;
    }
}

/* ===== Мобильное меню ===== */
@media (max-width: 768px) {
    .site-header {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex !important;
    }
    
    .mobile-header-phone {
        display: flex !important;
    }
    
    .tech-header {
        display: flex !important;
    }
    
    main {
        margin-top: 70px;
    }
}

@media (min-width: 769px) {
    .tech-header {
        display: none;
    }
    
    .mobile-menu-toggle,
    .mobile-header-phone {
        display: none !important;
    }
}