/* gallery.css */

/* ====== Lightbox Overlay ====== */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
    overflow: hidden;
}

/* Lightbox content container */
.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Lightbox image with fade animation */
.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 10px;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.lightbox-content img.show {
    opacity: 1;
}

/* Lightbox caption */
.lightbox-caption {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 18px;
    text-align: center;
    background: rgba(0,0,0,0.5);
    padding: 8px 15px;
    border-radius: 6px;
    max-width: 90%;
    word-wrap: break-word;
}

/* Close button */
.lightbox-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 28px;
    color: #fff;
    cursor: pointer;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    text-align: center;
    line-height: 38px;
    z-index: 110;
    transition: 0.3s;
}

.lightbox-close:hover {
    background: rgba(230, 180, 34, 0.8);
    color: #1F4D40;
}

/* Navigation buttons */
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    color: #fff;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    text-align: center;
    line-height: 48px;
    cursor: pointer;
    z-index: 110;
    user-select: none;
    transition: 0.3s;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(230, 180, 34, 0.8);
    color: #1F4D40;
}

.lightbox-prev {
    left: 10px;
}

.lightbox-next {
    right: 10px;
}

/* Fade-in animation for overlay */
.lightbox-overlay.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ====== Gallery Image Hover Effect ====== */
#gallery .gallery-grid img {
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

#gallery .gallery-grid img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}
