/* Gallery Lightbox Custom Styles */

/* Enhance the lightbox appearance */
.glightbox-container {
    --lightbox-bg: rgba(0, 0, 0, 0.9);
    --lightbox-text: #ffffff;
    --lightbox-button: rgba(255, 255, 255, 0.8);
    --lightbox-button-hover: #ffffff;
}

.glightbox-container .goverlay {
    background: var(--lightbox-bg);
}

.glightbox-container .gclose,
.glightbox-container .gnext,
.glightbox-container .gprev {
    background-color: transparent;
    border: 2px solid var(--lightbox-button);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    transition: all 0.3s ease;
}

.glightbox-container .gclose:hover,
.glightbox-container .gnext:hover,
.glightbox-container .gprev:hover {
    background-color: var(--lightbox-button-hover);
    transform: scale(1.1);
}

.glightbox-container .gclose svg,
.glightbox-container .gnext svg,
.glightbox-container .gprev svg {
    fill: var(--lightbox-text);
}

.glightbox-container .gslide-description {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.5), transparent);
    padding: 20px;
}

.glightbox-container .gslide-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--lightbox-text);
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

.glightbox-container h3.gslide-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--lightbox-text);
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

.glightbox-container .gslide-desc {
    font-size: 1rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

/* Hide empty description containers */
.glightbox-container .gslide-description:empty {
    display: none;
}

/* Hide filename-like titles */
.glightbox-container .gslide-title:empty {
    display: none;
}

/* Hide description container when it has no visible content */
.glightbox-container .gslide-description:not(:has(*:not(:empty))) {
    display: none !important;
}

/* Simple gallery styles */
.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.gallery-thumb-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-thumb-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.gallery-thumb-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-thumb-container:hover img {
    transform: scale(1.05);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .gallery-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }

    .gallery-thumb-container {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .gallery-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }

    .gallery-thumb-container {
        height: 150px;
    }
}

/* Loading animation */
.glightbox-container .gloader {
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top: 3px solid #ffffff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: gloader-spin 1s linear infinite;
}

@keyframes gloader-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Counter styles */
.glightbox-container .gslide-media-counter {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border-radius: 20px;
    padding: 5px 10px;
    font-size: 12px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .glightbox-container .gclose,
    .glightbox-container .gnext,
    .glightbox-container .gprev {
        width: 35px;
        height: 35px;
    }
    
    .glightbox-container .gslide-title {
        font-size: 1rem;
    }
    
    .glightbox-container .gslide-desc {
        font-size: 0.8rem;
    }
}