/* ============================================ */
/* ВИДЕО В HERO-СЕКЦИИ */
/* ============================================ */

.hero-video-wrapper {
    height: 90vh;
    position: relative;
    overflow: hidden;
    box-shadow: -40px 0 120px rgba(0, 0, 0, 0.15);
}

.hero-video-preview {
    width: 100%;
    height: 100%;
    position: relative;
    cursor: pointer;
    transition: all 0.4s ease;
}

.hero-video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.3) 50%,
        rgba(0, 0, 0, 0.5) 100%
    );
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
}

.hero-video-play-btn {
    margin-bottom: 24px;
    transition: transform 0.3s ease;
}

.hero-video-play-btn svg {
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.3));
}

.hero-video-preview:hover .hero-video-play-btn {
    transform: scale(1.1);
}

.hero-video-preview:hover .hero-video-overlay {
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.6) 100%
    );
}

.hero-video-text {
    text-align: center;
    color: #FFFFFF;
}

.hero-video-label {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #92C820;
    margin-bottom: 8px;
}

.hero-video-title {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
    color: #FFFFFF;
}

/* ============================================ */
/* ВИДЕО-ГАЛЕРЕЯ (ТОЧНО КАК PROJECTS-SECTION НА INDEX.HTML) */
/* ============================================ */

.video-gallery-section {
    padding: 80px 0 100px 0;
    background: #FFFFFF;
}

.video-gallery-section .container {
    max-width: 1600px;
    padding: 0 40px;
}

/* ТОЧНО КАК PROJECTS-GRID */
.video-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.video-gallery-item {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 12px;
    height: 380px; /* ТОЧНО КАК PROJECTS-ITEM */
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    cursor: pointer;
    text-decoration: none;
}

.video-gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    text-decoration: none;
}

.video-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease, filter 0.4s ease;
}

.video-gallery-item:hover img {
    transform: scale(1.08);
    filter: brightness(1.1);
}

/* Оверлей с градиентом (ВСЕГДА ВИДИМ, как на главной) */
.video-gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to top, 
        rgba(0,0,0,0.85) 0%, 
        rgba(0,0,0,0.3) 50%, 
        transparent 100%
    );
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    z-index: 2;
}

/* Play-кнопка */
.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.3s ease;
    z-index: 3;
}

.video-gallery-item:hover .video-play-btn {
    transform: translate(-50%, -50%) scale(1.15);
}

.video-play-btn svg {
    filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.5));
}

/* Длительность видео */
.video-duration {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.85);
    color: #FFFFFF;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    z-index: 3;
}

/* Заголовок */
.video-gallery-item-title {
    font-size: 20px;
    font-weight: 600;
    color: #FFFFFF;
    margin: 0 0 8px 0;
    line-height: 1.3;
    position: relative;
    z-index: 3;
}

/* Описание */
.video-gallery-item-description {
    font-size: 14px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    position: relative;
    z-index: 3;
}

/* ============================================ */
/* АДАПТИВ ДЛЯ ПЛАНШЕТОВ */
/* ============================================ */

@media (max-width: 991px) {
    .hero-video-wrapper {
        height: 70vh;
    }
    
    .video-gallery-section {
        padding: 60px 0 70px 0;
    }
    
    .video-gallery-header {
        margin-bottom: 40px;
    }
    
    .video-gallery-title {
        font-size: 38px;
    }
    
    .video-gallery-subtitle {
        font-size: 16px;
    }
    
    .video-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .hero-video-title {
        font-size: 20px;
    }
    
    .hero-video-play-btn svg {
        width: 64px;
        height: 64px;
    }
    
    .video-gallery-item-title {
        font-size: 18px;
    }
    
    .video-gallery-item-description {
        font-size: 13px;
    }
}

/* ============================================ */
/* АДАПТИВ ДЛЯ МОБИЛЬНЫХ */
/* ============================================ */

@media (max-width: 767px) {
    .hero-video-wrapper {
        height: 50vh;
    }
    
    .video-gallery-section {
        padding: 50px 0 60px 0;
    }
    
    .video-gallery-header {
        margin-bottom: 32px;
    }
    
    .video-gallery-title {
        font-size: 32px;
        margin-bottom: 10px;
    }
    
    .video-gallery-subtitle {
        font-size: 15px;
    }
    
    .video-gallery-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .hero-video-title {
        font-size: 18px;
    }
    
    .hero-video-label {
        font-size: 12px;
    }
    
    .hero-video-play-btn svg {
        width: 56px;
        height: 56px;
    }
    
    .video-play-btn svg {
        width: 52px;
        height: 52px;
    }
    
    .video-gallery-item-title {
        font-size: 17px;
    }
    
    .video-gallery-item-description {
        font-size: 13px;
    }
    
    .video-duration {
        font-size: 12px;
        padding: 4px 8px;
    }
    
    .video-gallery-overlay {
        padding: 70px 20px 20px 20px;
    }
}

/* ============================================ */
/* EMBED ВИДЕО (для CMS модуля) */
/* ============================================ */

.video-embed-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
}

.video-embed-container iframe,
.video-embed-container object,
.video-embed-container embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Для вставки через CMS */
.cms-video-wrapper {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.cms-video-wrapper .video-embed-container {
    border-radius: 12px;
}
