.atp-tabs {
    text-align: center;
    margin-bottom:14px;
}
.atp-tab {
    background-color: #ffedd5 !important;
    cursor: pointer;
    transition: 0.3s;
    color: #415581 !important;
    font-family: "Neucha", Sans-serif !important;
    font-size: 1.63rem !important;
    border: none;
    padding: 15px 50px !important;
    margin: 0 5px;
}
.atp-tab.active,
.atp-tab:hover {
    background-color: #fcd29b !important;
}


/* Flex-based responsive grid */
.atp-gallery-grid{
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

@media (max-width: 767px) {
    .atp-gallery-grid {
        min-height: 500px; 
    }
}

/* Gallery item with 16:9 ratio */
.atp-gallery-item{
    flex: 1 1 calc(33.333% - 20px);
    max-width: calc(33.333% - 20px);
    aspect-ratio: 92/65;
    overflow: hidden;
    border: none;
    background-color: #f9f9f9;
    position: relative;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}


.atp-gallery-item:hover {
    transform: scale(1.03);
}

/* Inner image wrapper */
.atp-gallery-img-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Image fills and crops inside the box */
.atp-gallery-img-wrapper img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    display: block;
}

/* Overlay title */
.atp-gallery-title-overlay {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 10px;
    font-size: 16px;
    font-weight: 500;
    text-align: left;
    box-sizing: border-box;
}

/* Tablet: 2 items per row */
@media (max-width: 1024px) {
    .atp-gallery-item{
        flex: 1 1 calc(50% - 20px);
        max-width: calc(50% - 20px);
    }
}

/* Mobile: 1 item per row */
@media (max-width: 767px) {
    .atp-gallery-item{
        flex: 1 1 100%;
        max-width: 100%;
    }
}
/* VIDEO GRID */
.atp-video-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* Video item: 2 columns on desktop/tablet, 1 on mobile */
.atp-video-item {
    flex: 1 1 calc(50% - 20px);
    max-width: calc(50% - 20px);
    height: 327px;
}
.yt-lazy,.yt-thumb{
    height: 327px;
}

/* Responsive: mobile = 1 column */
@media (max-width: 767px) {
    .atp-video-item,.yt-thumb {
        flex: 1 1 100%;
        max-width: 100%;
        min-height: 260px;
        height: 260px;
        max-height: 260px;
    }
    .atp-video-item iframe,
.atp-video-item video {
    width: 100%;
    min-height: 260px;
    height: 260px;
    max-height: 260px;
    aspect-ratio: 16/9;
    display: block;
}
}

/* Video embeds should fill the container */
.atp-video-item iframe,
.atp-video-item video {
    width: 100%;
    height: 327px;
    aspect-ratio: 16/9;
    display: block;
}