
/* =========================================
   FOUNDATION EQUIPMENT SERVICES
   VIDEO GALLERY - CARD DESIGN
========================================= */

.fes-youtube-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

.fes-youtube-card {
    min-width: 0;
    padding: 14px;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 14px;

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}

/* Card Hover */

.fes-youtube-card:hover {
    transform: translateY(-5px);
    border-color: #d8d8d8;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}


/* =========================================
   THUMBNAIL
========================================= */

.fes-youtube-thumbnail {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;

    aspect-ratio: 16 / 9;

    border: 0;
    border-radius: 9px;
    background: #111;

    cursor: pointer;
}

.fes-youtube-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;

    transition:
        transform 0.45s ease,
        filter 0.35s ease;
}

.fes-youtube-card:hover .fes-youtube-thumbnail img {
    transform: scale(1.04);
    filter: brightness(0.85);
}


/* =========================================
   SMALLER PLAY BUTTON
========================================= */

.fes-youtube-play {
    position: absolute;
    top: 50%;
    left: 50%;

    width: 48px;
    height: 48px;

    transform: translate(-50%, -50%);

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
    background: #ff5b00;

    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);

    transition:
        transform 0.3s ease,
        background 0.3s ease;
}

.fes-youtube-play svg {
    width: 19px;
    height: 19px;

    fill: #ffffff;
    margin-left: 3px;
}

.fes-youtube-card:hover .fes-youtube-play {
    transform: translate(-50%, -50%) scale(1.08);
    background: #e94f00;
}


/* =========================================
   VIDEO TITLE
========================================= */

.fes-youtube-title {
    margin: 14px 0 2px;
    padding: 0;

    font-size: 17px;
    line-height: 1.5;
    font-weight: 600;
    color: #171717;
}


/* =========================================
   VIDEO MODAL
========================================= */

.fes-video-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 30px;

    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(8px);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}

.fes-video-modal.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


/* Modal Inner */

.fes-video-modal-inner {
    position: relative;
    width: 100%;
    max-width: 1100px;

    transform: translateY(25px);
    transition: transform 0.35s ease;
}

.fes-video-modal.is-active .fes-video-modal-inner {
    transform: translateY(0);
}


/* Close Button */

.fes-video-modal-close {
    position: absolute;
    top: -52px;
    right: 0;

    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;

    font-size: 28px;
    line-height: 1;

    cursor: pointer;

    transition:
        background 0.25s ease,
        transform 0.25s ease;
}

.fes-video-modal-close:hover {
    background: #ff5b00;
    transform: rotate(90deg);
}


/* Player */

.fes-video-modal-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;

    overflow: hidden;

    background: #000;
    border-radius: 12px;

    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
}

.fes-video-modal-player iframe {
    position: absolute;
    inset: 0;

    display: block;
    width: 100%;
    height: 100%;

    border: 0;
}


/* =========================================
   BODY SCROLL LOCK
========================================= */

body.fes-video-modal-open {
    overflow: hidden;
}


/* =========================================
   TABLET
========================================= */

@media (max-width: 1024px) {

    .fes-youtube-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px;
    }

}


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

@media (max-width: 767px) {

    .fes-youtube-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .fes-youtube-card {
        padding: 10px;
        border-radius: 11px;
    }

    .fes-youtube-title {
        font-size: 14px;
        line-height: 1.45;
        margin-top: 11px;
    }

    .fes-youtube-play {
        width: 40px;
        height: 40px;
    }

    .fes-youtube-play svg {
        width: 16px;
        height: 16px;
    }

    .fes-video-modal {
        padding: 15px;
    }

    .fes-video-modal-close {
        top: -46px;
        width: 38px;
        height: 38px;
    }

}


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

@media (max-width: 480px) {

    .fes-youtube-gallery {
        gap: 12px;
    }

    .fes-youtube-card {
        padding: 8px;
    }

    .fes-youtube-thumbnail {
        border-radius: 7px;
    }

    .fes-youtube-title {
        font-size: 13px;
        line-height: 1.4;
        margin-top: 9px;
    }

    .fes-youtube-play {
        width: 36px;
        height: 36px;
    }

    .fes-youtube-play svg {
        width: 14px;
        height: 14px;
    }

}

/* =========================================
   TABLET
========================================= */

@media (max-width: 1024px) {
    .fes-youtube-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px;
    }
}


/* =========================================
   MOBILE - 1 COLUMN
========================================= */

@media (max-width: 767px) {

    .fes-youtube-gallery {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .fes-youtube-card {
        padding: 12px;
        border-radius: 12px;
    }

    .fes-youtube-title {
        font-size: 16px;
        line-height: 1.5;
        margin-top: 12px;
    }

    .fes-youtube-play {
        width: 46px;
        height: 46px;
    }

    .fes-youtube-play svg {
        width: 18px;
        height: 18px;
    }

    .fes-video-modal {
        padding: 15px;
    }

    .fes-video-modal-close {
        top: -46px;
        width: 38px;
        height: 38px;
    }
}


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

@media (max-width: 480px) {

    .fes-youtube-gallery {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .fes-youtube-card {
        padding: 10px;
    }

    .fes-youtube-thumbnail {
        border-radius: 8px;
    }

    .fes-youtube-title {
        font-size: 15px;
        line-height: 1.45;
    }

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

.fes-youtube-empty {
    text-align: center;
    padding: 30px 0;
}
