/* Сброс базовых отступов */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Фоновое видео, фиксированное на весь экран */
.background-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

/* Затемнение для лучшей читаемости контента */
.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

body {
    font-family:Comfortaa, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* Основной контейнер с формой */
.brief-container {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    background: rgba(255, 255, 255, 1);
    border-radius: 20px;
    padding: 30px 25px 35px 25px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(0px);
}

h1 {
    text-align: center;
    color: #008fcd;
    margin-bottom: 25px;
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    font-family: Comfortaa, sans-serif;
}

/* Контейнер для iframe */
.iframe-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: transparent;
}

.iframe-container iframe {
    width: 100%;
    height: auto;
    min-height: 600px;
    border: none;
    display: block;
    max-width: 720px;
    position: relative;
    margin: 0 auto;
}

/* ========== Адаптивные стили для контейнера ========== */

/* Планшеты и небольшие ноутбуки */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .brief-container {
        padding: 20px 15px 25px 15px;
        border-radius: 16px;
    }

    h1 {
        font-size: 1.4rem;
        margin-bottom: 20px;
    }

    .iframe-container iframe {
        min-height: 550px;
    }
}

/* Мобильные устройства */
@media (max-width: 480px) {
    body {
        padding: 0;
    }

    .brief-container {
        padding: 15px 12px 20px 12px;
        border-radius: 0;
    }

    h1 {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }

    .iframe-container iframe {
        min-height: 500px;
    }
}

/* Большие экраны (контейнер не растягивается бесконечно) */
@media (min-width: 1200px) {
    .brief-container {
        max-width: 800px;
    }
}

/* Альбомная ориентация на мобильных */
@media (max-width: 768px) and (orientation: landscape) {
    .brief-container {
        padding: 12px 15px 15px 15px;
    }

    h1 {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }

    .iframe-container iframe {
        min-height: 380px;
    }
}

/* ========== Адаптивная навигация с выпадающими подменю ========== */

.navigation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    background: transparent;
    transition: all 0.3s ease;
    mix-blend-mode: normal;
}

/* Эффект при скролле на десктопе - синий фон как у h1 */
.navigation.scrolled {
background: rgba(0, 143, 205, 0.75);
  backdrop-filter: blur(20px);
  padding: 15px 0;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  mix-blend-mode: normal;
  z-index: 199999;
}

/* Альтернативные варианты mix-blend-mode для синего фона */
/* Вариант 1: multiply - затемняет фон */
/*
.navigation.scrolled {
    background: rgba(0, 143, 205, 0.7);
    mix-blend-mode: multiply;
    backdrop-filter: blur(10px);
}
*/

/* Вариант 2: screen - осветляет фон */
/*
.navigation.scrolled {
    background: rgba(0, 143, 205, 0.4);
    mix-blend-mode: screen;
    backdrop-filter: blur(10px);
}
*/

/* Вариант 3: soft-light - мягкое наложение */
/*
.navigation.scrolled {
    background: rgba(0, 143, 205, 0.6);
    mix-blend-mode: soft-light;
    backdrop-filter: blur(12px);
}
*/

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

/* Логотип и брендинг */
.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.logo-link {
    display: inline-flex;
    align-items: center;
    transition: opacity 0.3s ease;
}

.logo-link:hover {
    opacity: 0.8;
}

.logo-img {
    width: auto;
    height: 40px;
    display: block;
    transition: all 0.3s ease;
}

/* Уменьшаем логотип при скролле */
.navigation.scrolled .logo-img {
    height: 35px;
}

.logo-separator {
    color: rgba(255, 255, 255, 0.6);
    font-size: 20px;
    font-weight: 300;
    margin: 0 5px;
}

.business-link {
    color: white;
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    transition: opacity 0.3s ease;
    white-space: nowrap;
    font-family: 'Comfortaa';
}

.business-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Основное меню */
.main-menu-wrapper {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.main-menu {
    display: flex;
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-menu li {
    position: relative;
}

.main-menu a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 0;
    white-space: nowrap;
    font-size: 12px;
    text-transform: uppercase;
}

.main-menu a:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

/* Стрелка для выпадающего меню */
.arrow-down {
    font-size: 14px;
    transition: transform 0.3s ease;
    display: inline-block;
}

.has-sub-nav.active .arrow-down {
    transform: rotate(180deg);
}

/* Выпадающее подменю */
.sub-nav {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: rgba(0, 143, 205, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 10px 0;
    list-style: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Эффект для подменю при скролле */
.navigation.scrolled .sub-nav {
    background: rgba(0, 143, 205, 0.98);
    backdrop-filter: blur(20px);
    border-color: rgba(255, 255, 255, 0.3);
}

.has-sub-nav.active .sub-nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-nav-item {
    margin: 0;
}

.sub-nav-item a {
    color: white;
    padding: 8px 20px;
    display: block;
    white-space: nowrap;
    font-size: 14px;
    transition: all 0.3s ease;
}

.sub-nav-item a:hover {
    background: rgba(255, 255, 255, 0.2);
    opacity: 1;
    transform: translateX(5px);
}

/* Бургер-меню (скрыто на десктопе) */
.burger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1002;
    position: relative;
    width: 44px;
    height: 44px;
}

.burger-line {
    display: block;
    width: 25px;
    height: 2px;
    background: white;
    margin: 5px auto;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

/* Анимация превращения бургера в крестик */
.burger-menu[aria-expanded="true"] .burger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.burger-menu[aria-expanded="true"] .burger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.burger-menu[aria-expanded="true"] .burger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ========== Адаптивные стили для навигации ========== */

/* Планшеты и мобильные устройства */
@media (max-width: 1024px) {
    .main-menu {
        gap: 15px;
    }
    
    .main-menu a {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .navigation {
        padding: 15px 0;
        background: rgba(0, 143, 205, 0.3);
        backdrop-filter: blur(10px);
    }
    
    /* На мобильных при скролле фон становится более плотным */
    .navigation.scrolled {
        background: rgba(0, 143, 205, 0.95);
        backdrop-filter: blur(20px);
        mix-blend-mode: normal;
        padding: 12px 0;
    }
    
    .nav-container {
        padding: 0 20px;
    }
    
    .business-link {
        font-size: 14px;
    }
    
    .logo-img {
        height: 32px;
    }
    
    .navigation.scrolled .logo-img {
        height: 28px;
    }
    
    /* Показываем бургер-меню */
    .burger-menu {
        display: block;
    }
    
    /* Мобильное меню */
    .main-menu-wrapper {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 350px;
        height: 100vh;
        background: rgba(0, 143, 205, 0.98);
        backdrop-filter: blur(20px);
        transition: right 0.3s ease;
        z-index: 1001;
        padding: 80px 20px 40px;
        overflow-y: auto;
    }
    
    .main-menu-wrapper.active {
        right: 0;
    }
    
    .main-menu {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }
    
    .main-menu li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    }
    
    .main-menu li:last-child {
        border-bottom: none;
    }
    
    .main-menu a {
        padding: 15px 0;
        width: 100%;
        justify-content: space-between;
        font-size: 16px;
        white-space: normal;
    }
    
    /* Исправленное выпадающее подменю на мобильных */
    .has-sub-nav {
        position: relative;
    }
    
    .has-sub-nav > a {
        cursor: pointer;
        pointer-events: auto !important;
    }
    
    .sub-nav {
        position: static;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: none;
        box-shadow: none;
        border: none;
        border-radius: 8px;
        padding: 0;
        margin-top: 0;
        margin-bottom: 0;
        max-height: 0;
        overflow: hidden;
        transform: none;
        transition: max-height 0.4s ease, padding 0.3s ease;
        opacity: 1;
        visibility: visible;
        width: 100%;
    }
    
    .has-sub-nav.active .sub-nav {
        max-height: 500px;
        padding: 10px 0;
        margin-bottom: 10px;
    }
    
    .sub-nav-item {
        width: 100%;
    }
    
    .sub-nav-item a {
        padding: 10px 0 10px 20px;
        font-size: 14px;
        white-space: normal;
        display: block;
    }
    
    .sub-nav-item a:hover {
        background: rgba(255, 255, 255, 0.15);
        transform: translateX(5px);
    }
    
    /* Убираем границу у последнего элемента подменю */
    .sub-nav-item:last-child {
        border-bottom: none;
    }
    
    /* Блокировка скролла при открытом меню */
    body.menu-open {
        overflow: hidden;
    }
}

/* Мобильные устройства */
@media (max-width: 480px) {
    .navigation {
        padding: 12px 0;
    }
    
    .nav-container {
        padding: 0 15px;
        gap: 15px;
    }
    
    .logo {
        gap: 8px;
    }
    
    .logo-separator {
        font-size: 16px;
    }
    
    .business-link {
        font-size: 12px;
        white-space: normal;
        line-height: 1.3;
    }
    
    .logo-img {
        height: 28px;
    }
    
    .navigation.scrolled .logo-img {
        height: 24px;
    }
    
    .main-menu-wrapper {
        width: 100%;
        max-width: none;
        padding: 70px 15px 30px;
    }
    
    .main-menu a {
        font-size: 15px;
        padding: 12px 0;
    }
    
    .burger-menu {
        padding: 8px;
        width: 40px;
        height: 40px;
    }
    
    .burger-line {
        width: 22px;
        margin: 4px auto;
    }
    
    /* Адаптация крестика для маленьких экранов */
    .burger-menu[aria-expanded="true"] .burger-line:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }
    
    .burger-menu[aria-expanded="true"] .burger-line:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }
    
    .sub-nav-item a {
        padding: 10px 0 10px 15px;
        font-size: 13px;
    }
    
    .has-sub-nav.active .sub-nav {
        max-height: 450px;
    }
}

/* Очень маленькие экраны */
@media (max-width: 380px) {
    .business-link {
        font-size: 11px;
    }
    
    .logo-img {
        height: 24px;
    }
    
    .navigation.scrolled .logo-img {
        height: 20px;
    }
    
    .logo-separator {
        font-size: 14px;
        margin: 0 3px;
    }
}

/* Альбомная ориентация на мобильных */
@media (max-width: 768px) and (orientation: landscape) {
    .main-menu-wrapper {
        padding: 60px 20px 20px;
    }
    
    .main-menu a {
        padding: 10px 0;
    }
    
    .has-sub-nav.active .sub-nav {
        max-height: 300px;
    }
    
    .sub-nav-item a {
        padding: 8px 0 8px 15px;
    }
}

/* Ховер эффекты для устройств с мышью */
@media (hover: hover) {
    .main-menu > li > a:hover {
        opacity: 0.8;
    }
    
    .has-sub-nav > a:hover .arrow-down {
        transform: translateY(2px);
    }
}

/* Адаптация под контейнер (для iframe) */
.brief-container {
    margin-top: 80px;
}

@media (max-width: 768px) {
    .brief-container {
        margin-top: 70px;
    }
}

@media (max-width: 480px) {
    .brief-container {
        margin-top: 60px;
    }
}

/* Анимация появления подменю для десктопа */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.has-sub-nav.active .sub-nav {
    animation: fadeInDown 0.3s ease;
}

/* Анимация появления фона при скролле */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navigation.scrolled {
    animation: fadeInUp 0.4s ease;
}