/* Хедер */
.header {
    background: linear-gradient(to bottom, #182082, #9b4351);
    color: white;
    width: 100%;
    font-family: Arial, sans-serif;
    position: relative;
    min-height: 120px;
}

.top-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.logo {
    position: absolute;
    left: 20px;
    top: 100%;
    transform: translateY(-50%);
    z-index: 100;
}

.logo img {
    height: 120px;
    object-fit: contain;
}

.site-title {
    font-size: 1.5rem;
    margin: 0 15px;
    text-align: center;
    flex: 1;
    font-weight: bold;
}

.social-links {
    display: flex;
    gap: 10px;
    position: absolute;
    right: 20px;
    top: 20px;
    z-index: 100;
}

.social-link {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background 0.3s;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Навигация */
.navigation {
    background: transparent;
    width: 100%;
}

.nav-menu {
    display: flex;
    justify-content: center;
    gap: 20px;
    list-style: none;
    padding: 10px 0;
    margin: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    transition: background 0.3s;
    display: block;
    font-size: 0.9rem;
}

.nav-link:hover,
.nav-item.active > .nav-link {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
}

.nav-link.highlight {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
}

/* Выпадающее меню */
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: linear-gradient(to bottom, #9b4351, #182082);
    list-style: none;
    padding: 10px 0;
    margin: 0;
    min-width: 180px;
    display: none;
    flex-direction: column;
    z-index: 1000;
    border-radius: 10px;
    overflow: hidden;
}

.dropdown li a {
    color: white;
    padding: 8px 15px;
    display: block;
    text-decoration: none;
    transition: background 0.3s;
    text-align: center;
}

.dropdown li a:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Показываем подменю при наведении (desktop) */
.nav-item:hover > .dropdown {
    display: flex;
}

/* Кнопка-гамбургер */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 22px;
    cursor: pointer;
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1100;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background: white;
    border-radius: 2px;
    transition: all 0.3s;
}

/* Анимация крестика */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translateY(8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-14px) translateX(5px);
}

/* Стили для мобильного меню с двухуровневым нажатием */
.mobile-arrow {
    display: none;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

/* Мобильная версия */
@media (max-width: 768px) {
    .header {
        min-height: 100px;
    }
    
    .site-title {
        font-size: 1.2rem;
        margin: 0 auto;
        padding-left: 60px;
        padding-right: 60px;
    }

    .logo {
        left: 15px;
    }
    
    .logo img {
        display: none;
    }

    .social-links {
        display: none;
    }

    .hamburger {
        display: flex;
        top: 15px;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        gap: 0;
        width: 100%;
        background: transparent;
    }

    .navigation.active .nav-menu {
        display: flex;
    }

    .nav-item {
        width: 100%;
    }

    .nav-link {
        padding: 12px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        text-align: left;
    }

    .dropdown {
        position: static;
        display: none;
        background: linear-gradient(to bottom, #9b4351, #182082);
        border-radius: 0 0 10px 10px;
    }

    .dropdown li a {
        text-align: left;
        padding-left: 40px;
    }

    /* Стили для двухуровневого меню */
    .mobile-arrow {
        display: block;
    }
    
    .nav-item.active .mobile-arrow {
        transform: translateY(-50%) rotate(90deg);
    }
    
    .nav-item.active > .nav-link {
        background: rgba(255, 255, 255, 0.25);
        border-radius: 5px 5px 0 0;
    }
    
    .nav-item.active > .dropdown {
        display: flex;
        border-radius: 0 0 10px 10px;
    }
    
    /* Прячем стрелки на десктопе */
    @media (min-width: 769px) {
        .mobile-arrow {
            display: none !important;
        }
    }
}

/* Стили для кликабельного заголовка */
.site-title-link {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-title-link:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* Автоматическое скрытие логотипа на маленьких экранах */
@media (max-width: 1100px) {
    .logo {
        opacity: 0;
        visibility: hidden;
    }
}

/* На больших экранах логотип всегда виден */
@media (min-width: 1101px) {
    .logo {
        opacity: 1;
        visibility: visible;
    }
}