/* Simple Album Gallery Styles */

.sag-album-gallery {
    display: grid;
    gap: 20px;
    margin: 20px 0;
}

/* Responsive grid layout */
.sag-album-gallery[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.sag-album-gallery[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.sag-album-gallery[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .sag-album-gallery {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .sag-album-gallery {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
}

.sag-album-bg-image-container{
    padding: 10px 30px;
    /* border: 1px solid #000; */
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 6/4;
    display: flex;
    align-items: center;
    justify-content: center;
    /* transition: padding 0.3s ease; */
}
.sag-album-bg-image{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
/* .sag-album-item:hover .sag-album-bg-image-container{
    padding: 0px;
} */

/* Album item styling */
.sag-album-item {
    /* background: #fff; */
    border-radius: 8px;
    overflow: hidden;
    /* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.sag-album-item:hover {
    transform: translateY(-5px);
    /* box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15); */
}

/* Album cover styling */
.sag-album-cover {
    position: relative;
    /* width: 100%; */
    height: 100%;
    overflow: hidden;
    border-radius: 2px;
    aspect-ratio: 1/1;
}

.sag-album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* .sag-album-item:hover .sag-album-cover img {
    transform: scale(1.05);
} */

/* Album overlay */
.sag-album-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sag-album-item:hover .sag-album-overlay {
    opacity: 1;
}

.sag-view-album {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 20px;
    border: 2px solid #fff;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

/* Album title */
.sag-album-title {
    margin: 0;
    padding: 15px;
    font-size: 16px !important;
    font-weight: 600;
    color: #333;
    text-align: center;
    line-height: 1.4;
    font-family: 'Poppins', sans-serif !important;
}

/* Loading state */
.sag-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #666;
}

.sag-loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* GLightbox customizations */
.glightbox-container {
    z-index: 999999;
}

.glightbox-clean .gslide-description {
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 15px;
    border-radius: 5px;
    margin: 10px;
}

.glightbox-clean .gslide-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.glightbox-clean .gslide-desc {
    font-size: 14px;
    opacity: 0.9;
}

/* Navigation arrows */
.glightbox-clean .gnext,
.glightbox-clean .gprev {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.glightbox-clean .gnext:hover,
.glightbox-clean .gprev:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Close button */
.glightbox-clean .gclose {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.glightbox-clean .gclose:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Counter */
.glightbox-clean .gcounter {
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

/* Responsive adjustments for lightbox */
@media (max-width: 768px) {
    .glightbox-clean .gnext,
    .glightbox-clean .gprev {
        width: 40px;
        height: 40px;
    }
   
    .glightbox-clean .gclose {
        width: 35px;
        height: 35px;
    }
   
    .glightbox-clean .gslide-description {
        margin: 5px;
        padding: 10px;
    }
}

/* Elementor compatibility */
.elementor .sag-album-gallery {
    width: 100%;
}

.elementor-widget-container .sag-album-gallery {
    margin: 0;
}

/* Beaver Builder compatibility */
.fl-builder-content .sag-album-gallery {
    width: 100%;
}

/* Divi compatibility */
.et_pb_module .sag-album-gallery {
    width: 100%;
}

/* WPBakery compatibility */
.vc_row .sag-album-gallery {
    width: 100%;
}

.frame {
    background-color: #ddc;
    border: solid 3.4vmin #eee;
    border-bottom-color: #fff;
    border-left-color: #eee;
    border-radius: 2px;
    border-right-color: #eee;
    border-top-color: #ddd;
    /* box-shadow: 0 0 5px 0 rgba(0, 0, 0, .25) inset, 0 5px 10px 5px rgba(0, 0, 0, .25); */
    box-sizing: border-box;
    display: flex;
    height: 100%;
    position: relative;
    text-align: center;
}
.frame {
    &:before {
        border-radius: 2px;
        bottom: -2vmin;
        box-shadow: 0 2px 5px 0 rgba(0, 0, 0, .25) inset;
        content: "";
        left: -2vmin;
        position: absolute;
        right: -2vmin;
        top: -2vmin;
    }
}
.frame {
    &:after {
        border-radius: 2px;
        bottom: -2.5vmin;
        box-shadow: 0 2px 5px 0 rgba(0, 0, 0, .25);
        content: "";
        left: -2.5vmin;
        position: absolute;
        right: -2.5vmin;
        top: -2.5vmin;
    }
}
.gslide-video {
    max-width: 900px;
    width: 100%;
}

.plyr--video {
    background: #000;
}

.gslide-media video {
    max-height: 80vh;
    width: auto;
    max-width: 100%;
}