/* GRID */
/* .ytg-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
} */

.ytg-grid {
    display: grid;
    grid-template-columns: repeat(var(--ytg-cols, 3), 1fr);
    gap: 20px;
}

.ytg-item {
    position: relative;
    cursor: pointer;
}

.ytg-item img {
    width: 100%;
    display: block;
    border-radius: 6px;
}


.ytg-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.ytg-play img {
    width: 70px;
    height: 70px;
    opacity: 0.9;
}

.ytg-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px;
    background: rgba(0,0,0,.7);
    color: #fff;
    font-size: 14px;
}

/* MODAL */
.ytg-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.85);
    z-index: 9999;
}

.ytg-frame-wrap {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    max-width: 900px;
    aspect-ratio: 16/9;
    transform: translate(-50%, -50%);
}

.ytg-frame-wrap iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.ytg-close {
    position: absolute;
    top: 110px;
    right: 30px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
}

.ytg-pagination {
    text-align: center;
    margin-top: 20px;
}

.ytg-pagination button {
    padding: 8px 20px;
    margin: 0 5px;
    cursor: pointer;
}

/* PAGINATION */
.ytg-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 25px;
}

.ytg-pagination button {
    padding: 6px 14px;
    cursor: pointer;
}

.ytg-pages {
    display: flex;
    gap: 6px;
}

.ytg-page {
    padding: 6px 12px;
    border: 1px solid #ccc;
    cursor: pointer;
    font-size: 14px;
}

.ytg-page.active {
    background: #000;
    color: #fff;
    border-color: #000;
}

.iframe-popup-yt{
        width: 48% !important;
        margin-left: 500px !important;
        margin-top: 250px !important;
        height: 57% !important;

}
/* TABLET */
@media (max-width: 1024px) {
    .ytg-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .ytg-play img {
        width: 60px;
        height: 60px;
    }
    .iframe-popup-yt{
        width: 70% !important;
        margin-left: 150px !important;
        margin-top: 250px !important;
        height: 40% !important;

    }
    .ytg-close {
        top: 150px;
    }
}

@media (min-width: 1025px) and (max-width: 1300px) {
    .iframe-popup-yt{
        width: 75% !important;
        margin-left: 120px !important;
        margin-top: 200px !important;
        height: 57% !important;

    }
}

@media (min-width: 1301px) and (max-width: 1440px) {
    .iframe-popup-yt{
        width: 48% !important;
        margin-left: 350px !important;
        margin-top: 250px !important;
        height: 57% !important;

    }
}

/* MOBILE */
@media (max-width: 767px) {
    .ytg-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .ytg-play img {
        width: 55px;
        height: 55px;
    }

    .ytg-title {
        font-size: 14px;
    }

    /* Pagination stack */
    .ytg-pagination {
        flex-wrap: wrap;
        gap: 10px;
    }

    .ytg-page,
    .ytg-pagination button {
        padding: 6px 10px;
        font-size: 13px;
    }
}

/* popup responsiveness*/
@media (max-width: 767px) {
    .ytg-modal-inner {
        width: 95%;
        aspect-ratio: 16 / 9;
    }

    .ytg-close {
        
        font-size: 28px;
    }
    .iframe-popup-yt{
        width: 97% !important;
        margin-left: 10px !important;
        margin-top: 230px !important;
        height: 50% !important;

    }
}