﻿@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

* {
    transition: all 0.2s ease;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: #f8fafc;
}

.header {
    background: linear-gradient(90deg, #003087 0%, #00255e 100%);
}

/* Горизонтальное меню на ul */
.nav-horizontal {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 96px;
    z-index: 45;
}

.nav-ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

    .nav-ul li {
        position: relative;
        font-size: 1.2rem;
    }

        .nav-ul li > a, .nav-ul li > span {
            display: inline-block;
            padding: 1rem 1.25rem;
            font-weight: 500;
            color: #1e293b;
            cursor: pointer;
            border-bottom: 3px solid transparent;
            transition: 0.2s;
        }

            .nav-ul li > a:hover, .nav-ul li > span:hover,
            .nav-ul li.active > a, .nav-ul li.active > span {
                color: #003087;
                border-bottom-color: #003087;
                background: #f8fafc;
            }
/* Выпадающий список 2 уровня */
.dropdown-ul {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 260px;
    box-shadow: 0 20px 35px -10px rgba(0,0,0,0.15);
    border-radius: 1rem;
    padding: 0.5rem 0;
    visibility: hidden;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.2s;
    z-index: 50;
    border: 1px solid #eef2ff;
    list-style: none;
}

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

.dropdown-ul li a, .dropdown-ul li span {
    display: block;
    padding: 0.7rem 1.5rem;
    color: #334155;
    font-size: 1rem;
    white-space: nowrap;
}

    .dropdown-ul li a:hover, .dropdown-ul li span:hover {
        background: #f1f5f9;
        color: #003087;
    }

.submenu-parent-3 {
    position: relative;
}

.dropdown-3 {
    position: absolute;
    left: 100%;
    top: 0;
    background: white;
    min-width: 260px;
    box-shadow: 0 20px 35px -10px rgba(0,0,0,0.15);
    border-radius: 1rem;
    padding: 0.5rem 0;
    visibility: hidden;
    opacity: 0;
    transition: all 0.2s;
    list-style: none;
}

.submenu-parent-3:hover .dropdown-3 {
    visibility: visible;
    opacity: 1;
}


/* Мобильное меню */
.mobile-nav-panel {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 85%;
    max-width: 320px;
    background: white;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    padding: 1.5rem;
    box-shadow: 2px 0 20px rgba(0,0,0,0.2);
}

    .mobile-nav-panel.open {
        transform: translateX(0);
    }

.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
}

    .mobile-overlay.open {
        display: block;
    }

.mobile-nav-item {
    padding: 1rem 0;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.mobile-submenu-wrapper {
    padding-left: 1rem;
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
}

    .mobile-submenu-wrapper a {
        display: block;
        padding: 0.6rem 0;
        color: #4b5563;
        font-size: 0.9rem;
        border-bottom: 1px dashed #e5e7eb;
    }

@media (max-width: 1023px) {
    .nav-horizontal .nav-ul {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }
}

@media (min-width: 1024px) {
    .mobile-menu-btn {
        display: none;
    }
}

/* Остальные стили */
.card-hover:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 50px -12px rgb(0 48 135 / 0.15);
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-swiper .swiper-slide {
    background-size: cover;
    background-position: center 30%;
}

.hero-swiper .swiper-pagination-bullet-active {
    background-color: #ffffff;
}

.hero-swiper .swiper-button-next,
.hero-swiper .swiper-button-prev {
    color: white;
    background: rgba(0,0,0,0.3);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    backdrop-filter: blur(4px);
}
/* Дополнительный отступ для текста от стрелок навигации */
.hero-text-container {
    padding-right: 4rem;
}

@media (max-width: 768px) {
    .hero-text-container {
        padding-right: 2rem;
    }
}

.carousel-wrapper {
    overflow-x: clip !important;
    width: 100%;
}
/* полная ширина для всех основных секций */
.full-width-section {
    width: 100%;
}

.video-slide {
    position: relative;
    overflow: hidden;
}

    .video-slide video {
        position: absolute;
        top: 50%;
        left: 50%;
        min-width: 100%;
        min-height: 100%;
        width: auto;
        height: auto;
        transform: translate(-50%, -50%);
        object-fit: cover;
        z-index: 0;
    }

.video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.55), rgba(0,48,135,0.45));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Выравнивание высоты слайдов и карточек */
.links-swiper .swiper-wrapper {
    align-items: stretch; /* растягиваем слайды по высоте */
}

.links-swiper .swiper-slide {
    height: auto !important; /* отключаем фиксированную высоту Swiper */
}

    .links-swiper .swiper-slide a {
        display: flex;
        flex-direction: column;
        justify-content: center; /* центрируем содержимое по вертикали */
        height: 100%; /* занимаем всю высоту слайда */
    }
/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.6s ease;
}

    #preloader.hidden {
        opacity: 0;
        pointer-events: none; /* чтобы не мешать кликам */
    }

.preloader-content {
    text-align: center;
}

.preloader-logo {
    width: 100px;
    height: auto;
    display: block;
    margin: 0 auto 20px;
    animation: pulse 1.5s ease-in-out infinite;
}

.preloader-spinner {
    font-size: 2.5rem;
    color: #003087;
    display: block;
    margin: 0 auto 15px;
}

.preloader-text {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    color: #4b5563;
    letter-spacing: 1px;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.08);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0.8;
    }
}

@media (max-width: 768px) {
    #map {
        height: 300px;
    }

    .contacts-block {
        position: relative !important;
        transform: none !important;
        top: auto !important;
        left: auto !important;
        margin: 1rem auto;
        max-width: 90%;
    }
}

/* Адаптация для мобильных: панель контактов уходит под карту */
@media (max-width: 768px) {
    #map-wrapper {
        height: auto !important;
        min-height: 300px;
    }

        #map-wrapper iframe {
            height: 300px !important;
            width: 100% !important;
            display: block;
        }

    #contacts-panel {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        margin: -60px auto 20px;
        max-width: 92% !important;
        width: 92% !important;
        border-radius: 2rem;
    }
}
