/* ===== hero-video.css - Секция с видео на всю оставшуюся высоту ===== */

.hero-video-section {
    position: relative;
    width: 100%;
    height: calc(100vh - 80px); /* Вычитаем высоту шапки (подберите точное значение) */
    min-height: 600px; /* Минимальная высота для больших экранов */
    max-height: 1080px; /* Максимальная высота */
    overflow: hidden;
    font-family: var(--font-primary);
    background: #1a1a2e; /* Фон на случай если видео не загрузилось */
}

.video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Видео */
.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: cover; /* Видео покрывает всю область */
    z-index: 1;
}

/* Затемнение для лучшей читаемости текста */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--video-overlay);
    z-index: 2;
    pointer-events: none;
}

/* Контент поверх видео */
.video-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    text-align: center;
    color: var(--video-text);
    width: 90%;
    max-width: 900px;
    padding: 0 20px;
}

/* Заголовки */
.video-title {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1.1;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease;
    color:white;
}

.video-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    font-weight: 400;
    margin: 1rem 0 2rem;
    opacity: 0.95;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease 0.2s both;
}

/* Кнопки */
.video-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 0.4s both;
}

.btn {
    display: inline-block;
    padding: 0.9rem 2.2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.4);
}

.btn-outline {
    background: transparent;
    color: white;
    border-color: var(--btn-outline-border);
    backdrop-filter: blur(5px);
}

.btn-outline:hover {
    background: var(--btn-outline-hover);
    border-color: white;
    transform: translateY(-2px);
}

/* Индикатор без звука */
.video-muted-indicator {
    position: absolute;
    bottom: 30px;
    left: 30px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 0.85rem;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    padding: 8px 15px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    pointer-events: none;
}

.video-muted-indicator svg {
    opacity: 0.9;
}

/* Подпись как в вашем примере */
.video-caption {
    position: absolute;
    bottom: 30px;
    right: 30px; /* Справа, чтобы не пересекаться с индикатором */
    z-index: 3;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    padding: 8px 20px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    pointer-events: none;
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивность под разные размеры шапки */
@media (max-width: 1378px) {
    .hero-video-section {
        height: calc(100vh - 120px); /* Если шапка стала выше из-за переносов */
    }
}

@media (max-width: 1024px) {
    .hero-video-section {
        height: calc(100vh - 70px); /* Высота мобильной шапки */
    }
    
    .video-title {
        font-size: clamp(2.5rem, 7vw, 4rem);
    }
    
    .video-subtitle {
        font-size: clamp(0.9rem, 2vw, 1.2rem);
    }
    
    .btn {
        padding: 0.8rem 1.8rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    .hero-video-section {
        height: calc(100vh - 60px); /* Высота мобильной шапки */
        min-height: 500px;
    }
    
    .video-muted-indicator {
        bottom: 20px;
        left: 20px;
        padding: 6px 12px;
        font-size: 0.75rem;
    }
    
    .video-caption {
        bottom: 20px;
        right: 20px;
        font-size: 0.7rem;
        padding: 6px 15px;
        max-width: 250px;
        text-align: center;
    }
    
    .video-buttons {
        flex-direction: column;
        gap: 0.8rem;
        max-width: 280px;
        margin: 0 auto;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-video-section {
        height: calc(100vh - 55px); /* Минимальная высота шапки */
        min-height: 450px;
    }
    
    .video-title {
        font-size: clamp(2rem, 6vw, 2.5rem);
    }
    
    .video-muted-indicator {
        display: none; /* Прячем на очень маленьких экранах */
    }
    
    .video-caption {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: 90%;
        max-width: none;
        font-size: 0.65rem;
    }
}

/* Для устройств с преференсом уменьшения анимации */
@media (prefers-reduced-motion: reduce) {
    .hero-video,
    .video-title,
    .video-subtitle,
    .video-buttons,
    .btn {
        animation: none;
        transition: none;
    }
}

/* Оптимизация для Safari и iOS */
@supports (-webkit-touch-callout: none) {
    .hero-video-section {
        height: -webkit-fill-available;
    }
}