/**
 * Video Carousel Component Styles
 * 
 * This file contains styles for the video carousel including 
 * responsive behavior and modal popup player
 */

/* Base carousel container */
.video-carousel-section {
    margin: 40px 0 60px;
    position: relative;
    background-color: var(--color-background-primary, #ffffff);
}

.video-carousel-wrapper {
    position: relative;
    margin-top: 30px;
    padding: 0 40px;
}

.video-carousel-container {
    overflow: hidden;
    position: relative;
}

.video-carousel {
    display: flex;
    gap: 24px;
    transition: transform 0.5s ease;
    padding: 10px 0 20px;
    align-items: stretch;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

/* Active dragging state */
.video-carousel.dragging {
    cursor: grabbing;
    transition: none;
}

/* Video Card Styles */
.video-card {
    flex: 0 0 auto;
    width: calc(25% - 18px);
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-color: var(--color-background-primary, #ffffff);
}

/* Remove focus outline */
.video-card:focus,
.video-title-link:focus,
.play-button-overlay:focus {
    outline: none;
}

.video-thumbnail-wrapper {
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 6px;
    overflow: hidden;
}

.video-card:hover .video-thumbnail-wrapper {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    border-radius: 6px;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.05);
}

/* Video duration label */
.video-duration {
    position: absolute;
    right: 10px;
    bottom: 10px;
    background-color: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
}

/* Play button overlay */
.play-button-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 5;
    transition: transform 0.2s ease-out;
}

.play-button-overlay:hover,
.play-button-overlay:focus {
    transform: translate(-50%, -50%) scale(1.1);
}

.play-button-overlay:active {
    transform: translate(-50%, -50%) scale(0.95);
}

/* Video content area */
.video-card-content {
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    border-radius: 6px;
}

/* Video title */
.video-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    padding: 8px 10px;
    color: var(--color-text-primary, #222);
    transition: color 0.2s ease;
    min-height: 60px;
    display: flex;
    align-items: center;
    text-decoration: none !important;
}

/* Comprehensive link styling - remove ALL text decoration */
.video-title-link,
.video-title-link:link,
.video-title-link:visited,
.video-title-link:hover,
.video-title-link:active,
.video-title-link:focus {
    color: inherit;
    text-decoration: none !important;
    display: block;
    border-bottom: none !important;
}

/* Modified hover effect to match other site elements */
.video-card:hover .video-title {
    color: var(--color-brand-primary, #0066cc);
    text-decoration: none !important;
}

/* Remove underline and focus effects, keep only color change */
.video-title-link:hover .video-title {
    color: var(--color-brand-primary, #0066cc);
    text-decoration: none !important;
    border-bottom: none !important;
}

/* Remove focus effect completely */
.video-title-link:focus .video-title {
    color: inherit;
    text-decoration: none !important;
    border-bottom: none !important;
}

/* Navigation Buttons */
.video-nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--color-background-secondary, #f5f5f5);
    border: 1px solid var(--color-border-primary, #ddd);
    color: var(--color-text-primary, #222);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.video-nav-button:hover {
    background-color: var(--color-brand-primary, #0066cc);
    color: var(--color-text-inverse, #fff);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Remove outline focus effect from buttons */
.video-nav-button:focus {
    outline: none;
}

.prev-button {
    left: 0;
}

.next-button {
    right: 0;
}

.video-nav-button svg {
    width: 24px;
    height: 24px;
}

/* Modal video player */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.video-modal.active {
    display: flex;
}

.video-modal-content {
    position: relative;
    width: 100%;
    max-width: 900px;
}

.video-modal iframe,
.video-modal video {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.video-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid white;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
}

/* Remove focus outline from close button */
.video-modal-close:focus {
    outline: none;
}

.video-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Screen reader only class */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .video-card {
        width: calc(33.333% - 16px);
    }
}

@media (max-width: 992px) {
    .video-card {
        width: calc(50% - 12px);
    }
    
    .video-carousel {
        gap: 20px;
    }
    
    .video-title {
        font-size: 15px;
        min-height: 54px;
    }
}

@media (max-width: 768px) {
    .video-carousel-wrapper {
        padding: 0 30px;
        margin-top: 24px;
    }
    
    .video-nav-button {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 576px) {
    .video-card {
        width: calc(100% - 10px);
    }
    
    .video-carousel-wrapper {
        padding: 0 25px;
    }
    
    .video-title {
        min-height: auto;
    }
    
    .video-modal-content {
        max-width: 100%;
    }
} 