/* =========================================================
   S9 VIDEO GALLERY
   ========================================================= */

.s9-video-gallery {
    position: relative;
    padding: 95px 0 100px;
    background: #f3f5f1;
    overflow: hidden;
}


/* Heading */

.s9-video-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 50px;
    margin-bottom: 45px;
}

.s9-video-heading-left {
    position: relative;
}

.s9-section-label {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;

    color: #94671d;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
}

.s9-section-label::before {
    content: "";
    width: 27px;
    height: 2px;
    background: #94671d;
    display: inline-block;
}

.s9-video-heading h2 {
    margin: 0;

    color: #202421;
    font-size: 48px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -1px;
}

.s9-video-heading-right {
    max-width: 390px;
    padding-bottom: 5px;
}

.s9-video-heading-right p {
    margin: 0;

    color: #626862;
    font-size: 15px;
    line-height: 1.8;
}


/* Video Grid */

.s9-video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 42px 30px;
}


/* Video Card */

.s9-video-card {
    position: relative;
    min-width: 0;
}

.s9-video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;

    overflow: hidden;
    background: #222;

    border-radius: 2px;
}


/* Video */

.s9-video {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform 0.7s ease,
        filter 0.7s ease;
}


/* Slight zoom on hover */

.s9-video-card:hover .s9-video {
    transform: scale(1.04);
}


/* Dark overlay */

.s9-video-wrapper::after {
    content: "";

    position: absolute;
    inset: 0;

    background: rgba(0, 0, 0, 0.08);

    pointer-events: none;

    transition: background 0.4s ease;
}

.s9-video-card:hover .s9-video-wrapper::after {
    background: rgba(0, 0, 0, 0.18);
}


/* Play Button */

.s9-video-play {
    position: absolute;

    top: 50%;
    left: 50%;

    width: 68px;
    height: 68px;

    transform: translate(-50%, -50%);

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 50%;

    background: rgba(35, 35, 35, 0.42);

    color: #ffffff;

    cursor: pointer;

    z-index: 3;

    backdrop-filter: blur(5px);

    transition:
        background 0.3s ease,
        transform 0.3s ease,
        border-color 0.3s ease;
}

.s9-video-play i {
    font-size: 18px;
    margin-left: 3px;
}

.s9-video-play:hover {
    background: #94671d;
    border-color: #94671d;

    transform: translate(-50%, -50%) scale(1.08);
}


/* Video Title */

.s9-video-title {
    display: flex;
    align-items: center;

    gap: 12px;

    padding-top: 18px;
}

.s9-video-title span {
    width: 28px;
    height: 2px;

    flex-shrink: 0;

    background: #94671d;
}

.s9-video-title h3 {
    margin: 0;

    color: #242624;

    font-size: 17px;
    font-weight: 600;

    line-height: 1.4;
}


/* Card hover */

.s9-video-card {
    transition: transform 0.35s ease;
}

.s9-video-card:hover {
    transform: translateY(-5px);
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 991px) {

    .s9-video-gallery {
        padding: 75px 0 80px;
    }

    .s9-video-heading {
        align-items: flex-start;
        flex-direction: column;

        gap: 18px;
        margin-bottom: 35px;
    }

    .s9-video-heading h2 {
        font-size: 40px;
    }

    .s9-video-heading-right {
        max-width: 550px;
    }

    .s9-video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 35px 22px;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 575px) {

    .s9-video-gallery {
        padding: 60px 0 65px;
    }

    .s9-video-heading {
        margin-bottom: 30px;
    }

    .s9-video-heading h2 {
        font-size: 34px;
    }

    .s9-video-heading-right p {
        font-size: 14px;
    }

    .s9-video-grid {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .s9-video-wrapper {
        aspect-ratio: 16 / 10;
    }

    .s9-video-play {
        width: 58px;
        height: 58px;
    }

    .s9-video-title h3 {
        font-size: 16px;
    }
}


/* =========================================
   VIDEO POPUP
========================================= */

.s9-video-modal {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.88);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 40px;
}

.s9-video-modal.active {
    display: flex;
}

.s9-video-modal-overlay {
    position: absolute;
    inset: 0;
}

.s9-video-modal-content {
    position: relative;
    width: min(1100px, 90vw);
    max-height: 85vh;
    z-index: 2;
}

.s9-video-modal-content video {
    width: 100%;
    max-height: 80vh;
    display: block;
    background: #000;
    border-radius: 6px;
}


/* CLOSE BUTTON */

.s9-video-close {
    position: absolute;
    top: -45px;
    right: 0;

    width: 38px;
    height: 38px;

    border: none;
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.15);
    color: #fff;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    z-index: 5;

    font-size: 18px;
}

.s9-video-close:hover {
    background: #94671D;
}


/* MOBILE */

@media (max-width: 767px) {

    .s9-video-modal {
        padding: 20px;
    }

    .s9-video-modal-content {
        width: 95vw;
    }

    .s9-video-close {
        top: -45px;
        right: 0;
    }

}

.s9-popup-youtube {
    width: 100%;
    height: 80vh;
}