/* Ultra-Modern Gallery Styles */
#gallery {
    background: #ffffff;
}

#gallery .gallery-grid {
    margin-top: 40px;
}

.gallery-item {
    margin-bottom: 30px;
    overflow: hidden;
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

.gallery-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: #000;
    cursor: pointer;
}

.gallery-image-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.4s ease;
    z-index: 1;
    pointer-events: none;
}

.gallery-image-wrapper:hover::after {
    background: rgba(0, 0, 0, 0.3);
}

.gallery-image-wrapper:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.gallery-image-wrapper img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-image-wrapper:hover img {
    transform: scale(1.08);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.gallery-image-wrapper:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    color: #ffffff;
    font-size: 48px;
    transition: all 0.3s ease;
}

.gallery-image-wrapper:hover .gallery-overlay i {
    transform: scale(1.2);
}

/* Lightbox Modal Styles */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

.lightbox-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    animation: zoomIn 0.3s ease;
}

.lightbox-content img {
    width: 100%;
    height: auto;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #fff;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10000;
    line-height: 1;
}

.lightbox-close:hover {
    color: #5DADE2;
    transform: rotate(90deg);
}

/* Fade-in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Fade-in animation on scroll */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered animation delays */
.gallery-item:nth-child(1) {
    animation-delay: 0.1s;
}

.gallery-item:nth-child(2) {
    animation-delay: 0.2s;
}

.gallery-item:nth-child(3) {
    animation-delay: 0.3s;
}

.gallery-item:nth-child(4) {
    animation-delay: 0.4s;
}

.gallery-item:nth-child(5) {
    animation-delay: 0.5s;
}

.gallery-item:nth-child(6) {
    animation-delay: 0.6s;
}

.gallery-item:nth-child(7) {
    animation-delay: 0.7s;
}

.gallery-item:nth-child(8) {
    animation-delay: 0.8s;
}

.gallery-item:nth-child(9) {
    animation-delay: 0.9s;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .gallery-image-wrapper img {
        height: 250px;
    }

    .gallery-overlay i {
        font-size: 36px;
    }

    .lightbox-close {
        top: 10px;
        right: 20px;
        font-size: 40px;
    }
}

@media (max-width: 480px) {
    .gallery-image-wrapper img {
        height: 200px;
    }

    .gallery-overlay i {
        font-size: 32px;
    }

    .lightbox-content {
        max-width: 95%;
        max-height: 95%;
    }
}