/* Video Reviews Slider */
.video-reviews-section {
    padding: 80px 0;
    background-color: var(--color-white);
    position: relative;
    overflow: hidden;
}

.video-reviews-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.video-reviews-heading {
    text-align: center;
    margin-bottom: 50px;
}

.video-reviews-title {
    font-size: var(--font-size-xxl);
    color: var(--color-black);
    font-weight: var(--font-weight-medium);
    margin: 0;
    padding-bottom: 20px;
    position: relative;
    display: inline-block;
}

.video-reviews-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--gradient-eco-horizontal);
    border-radius: 2px;
}

/* Grid layout for desktop (when less than 3 items) */
.video-reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Swiper for desktop (when 3 or more items) */
.video-reviews-swiper-pc {
    width: 100%;
    padding: 20px 0 40px;
}

.video-reviews-swiper-mob {
    display: none;
}

/* Video preview item styles */
.video-preview-item {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    cursor: pointer;
    position: relative;
}

.video-preview-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.video-preview-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.video-preview-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-preview-item:hover .video-preview-image {
    transform: scale(1.05);
}

/* Play button overlay */
.video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.video-preview-item:hover .video-play-overlay {
    background: rgba(0, 0, 0, 0.4);
}

.video-play-button {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    transform: scale(0.9);
}

.video-preview-item:hover .video-play-button {
    background: var(--color-white);
    transform: scale(1);
}

.video-play-button svg {
    width: 30px;
    height: 30px;
    fill: var(--color-eco-green);
    margin-left: 5px;
}

/* Navigation buttons */
.video-prev-pc,
.video-next-pc {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    transition: all var(--transition-fast);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: -24px;
}

.video-prev-pc:hover,
.video-next-pc:hover {
    background: var(--color-white);
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.video-prev-pc:after,
.video-next-pc:after {
    font-size: 20px;
    color: var(--color-text);
    font-weight: bold;
}

.video-prev-pc {
    left: 20px;
}

.video-next-pc {
    right: 20px;
}

/* Pagination */
.video-pagination-pc {
    position: absolute;
    bottom: 0 !important;
    left: 0;
    width: 100%;
    text-align: center;
}

.video-pagination-pc .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: rgba(0, 0, 0, 0.2);
    opacity: 1;
    transition: all var(--transition-fast);
}

.video-pagination-pc .swiper-pagination-bullet-active {
    background: var(--color-eco-green);
    transform: scale(1.2);
}

/* Video Popup Styles */
.video-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-popup-overlay.active {
    opacity: 1;
    display: flex;
}

.video-popup-container {
    width: 90%;
    max-width: 900px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.video-popup-overlay.active .video-popup-container {
    transform: translateY(0);
}

.video-popup-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
    z-index: 10;
}

.video-popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.video-popup-close svg {
    width: 16px;
    height: 16px;
    fill: var(--color-white);
}

.video-popup-content {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    background: #000;
}

.video-popup-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-popup-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--color-white);
    font-size: 16px;
}

/* Mobile version */
@media (max-width: 768px) {
    .video-reviews-section {
        padding: 60px 0;
    }
    
    .video-reviews-title {
        font-size: var(--font-size-xl);
    }
    
    .video-reviews-grid {
        display: none;
    }
    
    .video-reviews-swiper-pc {
        display: none;
    }
    
    .video-reviews-swiper-mob {
        display: block;
        width: 100%;
        padding: 20px 0 40px;
    }
    
    .video-play-button {
        width: 60px;
        height: 60px;
    }
    
    .video-play-button svg {
        width: 24px;
        height: 24px;
    }
    
    /* Mobile navigation */
    .video-prev-mob,
    .video-next-mob {
        width: 40px;
        height: 40px;
        margin-top: -20px;
    }
    
    .video-prev-mob:after,
    .video-next-mob:after {
        font-size: 16px;
    }
    
    .video-prev-mob {
        left: 10px;
    }
    
    .video-next-mob {
        right: 10px;
    }
    
    /* Mobile pagination */
    .video-pagination-mob {
        position: absolute;
        bottom: 0 !important;
        left: 0;
        width: 100%;
        text-align: center;
    }
    
    .video-pagination-mob .swiper-pagination-bullet {
        width: 8px;
        height: 8px;
        background: rgba(0, 0, 0, 0.2);
    }
    
    .video-pagination-mob .swiper-pagination-bullet-active {
        background: var(--color-eco-green);
    }
    
    .video-preview-item {
        margin: 0 10px;
    }
    
    /* Mobile popup */
    .video-popup-container {
        width: 95%;
    }
}

/* Tablet adaptation */
@media (min-width: 769px) and (max-width: 1024px) {
    .video-reviews-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .video-prev-pc,
    .video-next-pc {
        width: 44px;
        height: 44px;
        margin-top: -22px;
    }
    
    .video-prev-pc:after,
    .video-next-pc:after {
        font-size: 18px;
    }
    
    .video-prev-pc {
        left: 10px;
    }
    
    .video-next-pc {
        right: 10px;
    }
}
