/* Modern Gallery Styles */

.modern-gallery-container {
    width: 100%;
    position: relative;
}

.gallery-grid {
    position: relative;
    width: 100%;
    min-height: 200px;
}

/* Gallery Item Styles */
.gallery-item {
    position: absolute;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
    opacity: 0;
    transform: translateY(20px);
    will-change: transform, opacity;
}

.gallery-item-inner {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 12px;
}

/* Overlay Styles */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 12px;
}

.gallery-zoom-icon {
    width: 50px;
    height: 50px;
    color: white;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.gallery-zoom-icon svg {
    width: 24px;
    height: 24px;
}

/* Hover Effects */
.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover .gallery-zoom-icon {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Zoom Effect */
.modern-gallery-container[data-hover-effect="zoom"] .gallery-item:hover img {
    transform: scale(1.05);
}

/* Fade Effect */
.modern-gallery-container[data-hover-effect="fade"] .gallery-item:hover img {
    opacity: 0.8;
}

/* Slide Effect */
.modern-gallery-container[data-hover-effect="slide"] .gallery-item:hover img {
    transform: translateY(-5px);
}

/* Lightbox Styles */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    text-align: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-info {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
    width: 100%;
}

.lightbox-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 5px 0;
    color: white;
}

.lightbox-description {
    font-size: 14px;
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
}

/* Lightbox Controls */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 10001;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.lightbox-close svg {
    width: 20px;
    height: 20px;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 10001;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav svg {
    width: 24px;
    height: 24px;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 15px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .lightbox-nav {
        width: 45px;
        height: 45px;
    }
    
    .lightbox-close {
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 768px) {
    .lightbox-container {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .lightbox-image {
        max-height: 70vh;
    }
    
    .lightbox-nav {
        width: 40px;
        height: 40px;
    }
    
    .lightbox-close {
        width: 30px;
        height: 30px;
        top: 15px;
        right: 15px;
    }
    
    .lightbox-prev {
        left: 15px;
    }
    
    .lightbox-next {
        right: 15px;
    }
}

@media (max-width: 480px) {
    .gallery-zoom-icon {
        width: 40px;
        height: 40px;
    }
    
    .gallery-zoom-icon svg {
        width: 20px;
        height: 20px;
    }
}

/* Loading Animation */
.gallery-item img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.gallery-item img.loaded {
    opacity: 1;
}

/* Smooth Animations */
.gallery-item {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered Animation */
.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; }

/* Custom Scrollbar for Lightbox */
.lightbox-overlay::-webkit-scrollbar {
    width: 8px;
}

.lightbox-overlay::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.lightbox-overlay::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.lightbox-overlay::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
} 