/* ===================================
   Gallery Images Styles
   Replicates legacy Fancybox gallery layout
   =================================== */

/* Gallery Item Container */
.gallery-item {
    position: relative;
    margin-bottom: 30px;
}

/* Gallery Image Wrapper */
.gallery-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.gallery-image-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Gallery Image */
.gallery-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-image-wrapper:hover .gallery-image {
    transform: scale(1.05);
}

/* Gallery Overlay */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-image-wrapper:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    color: white;
    font-size: 48px;
}

/* Gallery Link */
.gallery-link {
    text-decoration: none;
    display: block;
}

/* Gallery Title */
.gallery-title {
    font-size: 18px;
    font-weight: 500;
    color: #333;
    margin-top: 15px;
    text-align: center;
    line-height: 1.4;
}

/* ===================================
   Lightbox Modal Styles
   =================================== */

/* Lightbox Overlay */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Lightbox Container */
.lightbox-container {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Lightbox Content */
.lightbox-content {
    position: relative;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Lightbox Image */
.lightbox-image {
    max-width: 90vw;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* Lightbox Title */
.lightbox-title {
    color: white;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 10px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 4px;
    display: block;
    width: fit-content;
    order: -1;
}

/* Lightbox Counter */
.lightbox-counter {
    color: white;
    font-size: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 5px 15px;
    border-radius: 20px;
    margin-top: 10px;
}

/* Lightbox Close Button */
.lightbox-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Lightbox Navigation Buttons */
.lightbox-nav {
    top: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-nav-prev {
    left: 20px;
}

.lightbox-nav-next {
    right: 20px;
}

/* ===================================
   Responsive Styles
   =================================== */

@media (max-width: 768px) {
    .gallery-title {
        font-size: 16px;
        margin-top: 10px;
    }

    .gallery-overlay i {
        font-size: 36px;
    }

    .lightbox-image {
        max-width: 95vw;
        max-height: 80vh;
    }

    .lightbox-title {
        font-size: 16px;
        padding: 8px 15px;
    }

    .lightbox-close,
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .lightbox-nav-prev {
        left: 10px;
    }

    .lightbox-nav-next {
        right: 10px;
    }

    .lightbox-counter {
        font-size: 12px;
        padding: 4px 12px;
    }
}

@media (max-width: 576px) {
    .gallery-item {
        margin-bottom: 20px;
    }

    .gallery-title {
        font-size: 14px;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
    }
}
