/* ============================================================
   FEATURED VIDEOS SECTION – FIXED VERSION
   ============================================================ */

   .featured-videos-section {
    padding: 80px 40px;
    background: #fff;
    width: 100%;
}

.featured-videos-container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* ============================================================
   GRID LAYOUT
   ============================================================ */

.featured-videos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 48px;
    margin-bottom: 48px;
    transition: opacity .5s ease, transform .5s ease;
}

.featured-videos-grid.is-fading {
    opacity: 0;
    transform: translateY(-15px);
}

/* ============================================================
   VIDEO CARD – LARGE (FIRST ITEM)
   ============================================================ */

.video-card-large {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: row;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp .6s ease .1s forwards;
}

.video-card-large .video-card-media {
    width: 660px;
    height: 336px;
    min-width: 660px;
    min-height: 336px;
    max-width: 660px;
    max-height: 336px;
    flex-shrink: 0;
    background: #000;
    position: relative;
    overflow: hidden;
}

.video-card-large .video-card-content {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    background: #E8EDEE;
}

/* ============================================================
   VIDEO CARD – REGULAR
   ============================================================ */

.video-card {
    display: flex;
    flex-direction: row;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp .6s ease forwards;
}

.video-card:nth-child(2) { animation-delay: .2s }
.video-card:nth-child(3) { animation-delay: .3s }
.video-card:nth-child(4) { animation-delay: .4s }
.video-card:nth-child(5) { animation-delay: .5s }
.video-card:nth-child(6) { animation-delay: .6s }
.video-card:nth-child(7) { animation-delay: .7s }

.video-card:not(.video-card-large) .video-card-media {
    width: 318px;
    height: 336px;
    min-width: 318px;
    min-height: 336px;
    max-width: 318px;
    max-height: 336px;
    flex-shrink: 0;
    background: #000;
    position: relative;
    overflow: hidden;
}

.video-card:not(.video-card-large) .video-card-content {
    flex: 1;
    padding: 24px;
    background: #E8EDEE;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Shared content class */
.video-card-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

/* ============================================================
   MEDIA ELEMENTS
   ============================================================ */

.video-card-media {
    position: relative;
    overflow: hidden;
    background: #000;
}

/* Ensure no extra spacing around images */
.video-card-media * {
    margin: 0;
    padding: 0;
    line-height: 0;
}

/* IMAGE FIT OPTIONS:
   - object-fit: cover;  ← CURRENT: Fills container, crops excess (best for any image size)
   - object-fit: contain; ← Shows full image, may have black bars
   - object-fit: fill;    ← Stretches image (may distort)
   
   object-position: center; ← Centers the image in the crop area
*/

.video-card-media img,
.video-card-media video {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    margin: 0;
    padding: 0;
    border: none;
}

/* ============================================================
   PLAY BUTTON
   ============================================================ */

.video-popup-trigger {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 54px;
    height: 54px;
    cursor: pointer;
    z-index: 10;
    transition: transform .3s ease;
    text-decoration: none;
}

.video-popup-trigger:hover {
    transform: translate(-50%, -50%) scale(1.15);
}

.video-popup-trigger svg circle { 
    fill: rgba(0,0,0,.5); 
}

.video-popup-trigger svg path { 
    fill: #fff;
}

/* ============================================================
   POPUP MODAL
   ============================================================ */

.video-popup-modal {
    position: fixed;
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    animation: fadeIn .3s forwards;
}

.video-popup-overlay {
    position: absolute;
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    background: rgba(0,0,0,.9);
}

.video-popup-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    animation: scaleIn .3s ease;
}

.video-popup-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    transition: opacity .3s ease;
}

.video-popup-close:hover {
    opacity: 0.7;
}

.video-popup-content {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #000;
}

.video-popup-content iframe,
.video-popup-content video {
    position: absolute;
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

.video-card-title {
    font-family: 'Proxima Nova', Arial, sans-serif !important;
    color: #1D4954 !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    line-height: 150% !important;
    margin: 0 !important;
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
}

.video-card-description {
    font-family: 'Proxima Nova', Arial, sans-serif !important;
    color: #1D4954 !important;
    font-size: 18px !important;
    line-height: 1.5 !important;
    margin: 0 !important;
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
}

/* ============================================================
   PAGINATION DOTS
   ============================================================ */

.featured-videos-pagination {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 48px;
}

.pagination-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #E8E5DF;
    cursor: pointer;
    transition: all .4s;
}

.pagination-dot.active {
    background: #1D4954;
    transform: scale(1.5);
}

/* Disable during fade */
.featured-videos-grid.is-fading ~ .featured-videos-pagination .pagination-dot {
    pointer-events: none;
    opacity: .5;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet landscape and below - start stacking at 1200px */
@media (max-width: 1199px) {
    .video-card-large .video-card-media { 
        width: 500px; 
        min-width: 500px;
        max-width: 500px;
    }
    
    .video-card:not(.video-card-large) .video-card-media { 
        width: 280px; 
        min-width: 280px;
        max-width: 280px;
    }
}

/* Tablet portrait - stack cards but keep horizontal layout */
@media (max-width: 1023px) {
    .featured-videos-grid { 
        grid-template-columns: 1fr; 
        gap: 32px;
    }

    /* Keep horizontal but make it tighter */
    .video-card-large .video-card-media { 
        width: 400px;
        min-width: 400px;
        max-width: 400px;
        height: 280px;
        min-height: 280px;
        max-height: 280px;
    }
    
    .video-card:not(.video-card-large) .video-card-media { 
        width: 280px;
        min-width: 280px;
        max-width: 280px;
        height: 240px;
        min-height: 240px;
        max-height: 240px;
    }

    .video-card-content {
        padding: 20px;
    }

    .video-card-title { 
        font-size: 20px !important; 
    }
    
    .video-card-description { 
        font-size: 16px !important; 
    }
}

/* Mobile landscape - SWITCH TO VERTICAL STACK */
@media (max-width: 767px) {
    .featured-videos-section {
        padding: 60px 20px;
    }

    .featured-videos-grid {
        gap: 24px;
    }

    /* VERTICAL STACK - Image on top, content below */
    .video-card-large,
    .video-card { 
        flex-direction: column !important; 
    }

    .video-card-media,
    .video-card-large .video-card-media,
    .video-card:not(.video-card-large) .video-card-media { 
        width: 100% !important; 
        min-width: 100% !important;
        max-width: 100% !important;
        height: 280px !important; 
        min-height: 280px !important;
        max-height: 280px !important;
    }
    
    .video-card-content { 
        padding: 20px;
        width: 100%;
    }

    .video-card-title {
        font-size: 18px !important;
    }

    .video-card-description {
        font-size: 15px !important;
    }
}

/* Mobile portrait - Smaller images */
@media (max-width: 480px) {
    .featured-videos-section {
        padding: 40px 15px;
    }

    .video-card-media,
    .video-card-large .video-card-media,
    .video-card:not(.video-card-large) .video-card-media { 
        height: 220px !important; 
        min-height: 220px !important;
        max-height: 220px !important;
    }
    
    .video-card-content {
        padding: 16px;
    }

    .video-card-title {
        font-size: 16px !important;
    }

    .video-card-description {
        font-size: 14px !important;
    }

    .video-popup-trigger { 
        width: 48px; 
        height: 48px; 
    }

    .video-popup-trigger svg {
        width: 48px;
        height: 48px;
    }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */

@keyframes fadeInUp {
    from { 
        opacity: 0; 
        transform: translateY(30px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes fadeIn {
    to { 
        opacity: 1; 
    }
}

@keyframes scaleIn {
    from { 
        transform: scale(.9); 
        opacity: 0; 
    }
    to { 
        transform: scale(1); 
        opacity: 1; 
    }
}