﻿
/* =========================================================
   FEATURED VIDEOS SECTION
   ========================================================= */

.featured-videos-section {
    background: #eef7f8;
    border-top: 4px solid #68b7c2;
    box-sizing: border-box;
    width: 100%;
    max-width: 1170px;
    margin: 24px auto 48px;
    padding: 32px 30px 30px;
}

    .featured-videos-section > .title {
        display: none;
    }


/* =========================================================
   MP3 POPUP
   ========================================================= */

/* Center only the generated MP3 player wrapper inside the Magnific Popup inline view. */
.mfp-inline-holder .mfp-content > div[style*="max-width:640px"] {
    position: relative;
    margin-left: auto;
    margin-right: auto;
}

    /* Position the close button above the right edge of the MP3 player. */
    .mfp-inline-holder .mfp-content > div[style*="max-width:640px"] .mfp-close {
        position: absolute;
        top: -35px;
        right: 0;
    }


/* =========================================================
   FEATURED VIDEOS HEADING
   ========================================================= */

.featured-videos-heading {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 22px;
}

.featured-eyebrow {
    color: #4b9eaa;
    display: block;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.featured-videos-heading h2 {
    color: #263d4d;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}


/* =========================================================
   CAROUSEL CONTROLS
   ========================================================= */

.featured-video-controls .owl-nav {
    display: flex;
    gap: 10px;
}

.featured-video-controls-mobile,
.featured-videos-section .featured-videos-carousel-mobile {
    display: none !important;
}

.featured-video-controls .owl-nav button {
    align-items: center;
    background: #fff;
    border: 2px solid #d4e6e9;
    border-radius: 50%;
    color: #378b98;
    cursor: pointer;
    display: flex;
    font-size: 24px;
    height: 44px;
    justify-content: center;
    line-height: 1;
    padding: 0 0 3px;
    width: 44px;
}

    .featured-video-controls .owl-nav button:hover,
    .featured-video-controls .owl-nav button:focus {
        background: #378b98;
        color: #fff;
    }


/* =========================================================
   FEATURED VIDEOS SLIDE
   ========================================================= */

.featured-videos-slide {
    align-items: stretch;
    display: grid;
    gap: 24px;
    grid-template-columns: 2.35fr 1fr;
    min-width: 0;
    width: 100%;
}

.featured-videos-carousel-desktop .owl-item,
.featured-videos-carousel-mobile .owl-item {
    min-width: 0;
}

.featured-video-side-list {
    display: grid;
    gap: 16px;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    min-width: 0;
}


/* =========================================================
   VIDEO CARDS
   ========================================================= */

.featured-video-card {
    background: #fff;
    border-radius: 9px;
    min-width: 0;
    overflow: hidden;
}

.featured-video-main {
    display: flex;
    flex-direction: column;
}

.featured-video-card .featured-video-link {
    color: inherit;
    display: flex;
    height: 100%;
    text-decoration: none;
}

.featured-video-main .featured-video-link {
    flex-direction: column;
}


/* =========================================================
   VIDEO IMAGES
   ========================================================= */

.featured-video-image {
    align-items: center;
    background-color: #dce8e9;
    background-position: center;
    background-size: cover;
    display: flex;
    flex: 0 0 auto;
    justify-content: center;
    min-height: 0;
    position: relative;
}

.featured-video-main .featured-video-image {
    aspect-ratio: 16 / 9;
    flex: 0 0 auto;
    width: 100%;
}

.featured-video-side .featured-video-image {
    aspect-ratio: 16 / 9;
    flex: 0 0 auto;
    width: 100%;
}

.featured-video-side .featured-video-link {
    align-items: stretch;
    flex-direction: column;
}


/* =========================================================
   VIDEO PLAY BUTTON
   ========================================================= */

.featured-video-play {
    align-items: center;
    background: rgba(0, 0, 0, .25);
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    display: flex;
    font-size: 21px;
    height: 56px;
    justify-content: center;
    padding-left: 4px;
    width: 56px;
}

.featured-video-side .featured-video-play {
    font-size: 12px;
    height: 36px;
    width: 36px;
}


/* =========================================================
   VIDEO DURATION
   ========================================================= */

.featured-video-duration {
    background: rgba(0, 0, 0, .72);
    border-radius: 4px;
    bottom: 10px;
    color: #fff;
    font-size: 13px;
    line-height: 1;
    padding: 7px 8px;
    position: absolute;
    right: 10px;
}


/* =========================================================
   VIDEO CAPTIONS
   ========================================================= */

.featured-video-caption {
    box-sizing: border-box;
    padding: 16px 18px 18px;
}

.featured-video-main .featured-video-caption {
    flex: 0 0 116px;
    overflow: hidden;
    padding: 12px 18px;
}

.featured-video-side .featured-video-caption {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;
    max-height: 100%;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
    padding: 8px 12px;
}

.featured-video-side .featured-video-caption h3 {
    font-size: 14px;
    margin-bottom: 4px;
}

.featured-video-side .featured-video-caption p {
    font-size: 12px;
    -webkit-line-clamp: 1;
}

.featured-video-caption h3 {
    color: #263d4d;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 6px;
    overflow: hidden;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.featured-video-caption p {
    color: #8a969c;
    font-size: 13px;
    line-height: 1.4;
    margin: 0;
    overflow: hidden;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}


/* =========================================================
   EMPTY STATE
   ========================================================= */

.featured-videos-empty {
    background: #fff;
    border-radius: 8px;
    color: #66777c;
    margin: 0;
    padding: 24px;
}


/* =========================================================
   DESKTOP: FIXED SLIDE HEIGHT
   ========================================================= */

@media (min-width: 768px) {

    .featured-videos-carousel-desktop .featured-videos-slide {
        height: auto;
        min-height: 424px;
        box-sizing: border-box;
    }

    /* Main video card */
    .featured-videos-carousel-desktop .featured-video-main {
        height: 100%;
        min-height: 0;
    }

        .featured-videos-carousel-desktop .featured-video-main .featured-video-link {
            height: 100%;
            min-height: 0;
        }

        .featured-videos-carousel-desktop .featured-video-main .featured-video-caption {
            flex: 0 0 116px;
            box-sizing: border-box;
        }

    /* Two side video cards */
    .featured-videos-carousel-desktop .featured-video-side-list {
        height: 100%;
        min-height: 0;
        grid-template-rows: repeat(2, minmax(0, 1fr));
    }

    .featured-videos-carousel-desktop .featured-video-side {
        height: 100%;
        min-height: 0;
    }

        .featured-videos-carousel-desktop .featured-video-side .featured-video-link {
            height: 100%;
            min-height: 0;
        }

        .featured-videos-carousel-desktop .featured-video-side .featured-video-caption {
            min-width: 0;
            min-height: 0;
            overflow: hidden;
        }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

    /* Section width and spacing */
    .featured-videos-section {
        box-sizing: border-box;
        width: calc(100% - 30px);
        max-width: none;
        margin: 20px auto 32px;
        padding: 22px 16px 18px;
    }

    .featured-videos-heading {
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 18px;
    }

        .featured-videos-heading h2 {
            font-size: 23px;
        }

    /* Switch desktop carousel to mobile carousel */
    .featured-video-controls-desktop,
    .featured-videos-section .featured-videos-carousel-desktop {
        display: none !important;
    }

    .featured-video-controls-mobile,
    .featured-videos-section .featured-videos-carousel-mobile {
        display: block !important;
    }

        .featured-video-controls-mobile .owl-nav {
            gap: 6px;
        }

            .featured-video-controls-mobile .owl-nav button {
                height: 36px;
                width: 36px;
            }

    /* Fixed mobile slide and card height */
    /* Mobile carousel must occupy the full available width */
    .featured-videos-carousel-mobile {
        display: block;
        width: 100% !important;
        min-width: 0;
        box-sizing: border-box;
    }

        .featured-videos-carousel-mobile .owl-stage-outer {
            width: 100%;
            box-sizing: border-box;
        }

        .featured-videos-carousel-mobile .item {
            width: 100%;
            height: 340px;
            min-height: 340px;
            box-sizing: border-box;
        }

    .featured-video-mobile-card {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: 340px;
        min-height: 340px;
        box-sizing: border-box;
    }

        /* Make the card content fill the entire slide */
        .featured-video-mobile-card .featured-video-link {
            display: flex;
            flex: 1 1 auto;
            flex-direction: column;
            width: 100%;
            height: 100%;
            min-height: 0;
            box-sizing: border-box;
        }

        /* Preserve existing mobile image proportions */
        .featured-video-mobile-card .featured-video-image {
            aspect-ratio: 16 / 9;
            flex: 0 0 auto;
            width: 100%;
        }

        /* Caption fills remaining card height */
        .featured-video-mobile-card .featured-video-caption {
            flex: 1 1 auto;
            min-height: 0;
            max-height: none;
            overflow: hidden;
            box-sizing: border-box;
            padding: 12px 14px;
        }

            .featured-video-mobile-card .featured-video-caption h3 {
                font-size: 16px;
            }
}


/* =========================================================
   LATEST VIDEOS ALIGNMENT (DESKTOP)
   ========================================================= */

@media (min-width: 992px) {
    .video-gallery-main-wrapper .lastest-article-wrapper .lastest-each-video-wrapper {
        width: calc(25% - 7.5px);
    }
}
