/* Photo Gallery Custom Styles */

/* Line clamp utility for text truncation */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Smooth transitions for gallery interactions */
.gallery-transition {
    transition: all 0.3s ease-in-out;
}

/* Custom hover effects for gallery items */
.gallery-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Responsive image loading placeholder */
.image-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Fade in animation for gallery items */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-item {
    animation: fadeInUp 0.6s ease-out;
}

/* Stagger animation for multiple items */
.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; }

/* Lightbox customization */
.lightbox-overlay {
    background-color: rgba(0, 0, 0, 0.9);
}

/* Mobile optimizations */
@media (max-width: 640px) {
    .gallery-grid {
        gap: 0.75rem;
    }
    
    .gallery-item {
        border-radius: 0.5rem;
    }
}

/* Print styles */
@media print {
    .gallery-item {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* Enhanced gallery styling */
.gallery-section {
    position: relative;
    z-index: 1;
}

/* Removed gray background from gallery section */

/* Improved hover effects */
.gallery-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, box-shadow;
}

.gallery-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Better image loading states */
.gallery-image {
    transition: all 0.3s ease;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

.gallery-image.loaded {
    background: none;
    animation: none;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Lightbox improvements */
.lightbox-overlay {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Aspect ratio utilities */
.aspect-square {
    aspect-ratio: 1 / 1;
}

/* Mobile touch improvements */
@media (max-width: 768px) {
    .gallery-card:hover {
        transform: translateY(-4px) scale(1.01);
    }
    
    .gallery-card:active {
        transform: translateY(-2px) scale(0.99);
    }
    
    /* Better mobile grid */
    .gallery-grid-mobile {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* Large screen optimizations */
@media (min-width: 1280px) {
    .gallery-grid-xl {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Ensure images don't overflow */
.gallery-image {
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

/* Better container constraints */
.gallery-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Gallery content container positioning */
#gallery-content-container {
    position: relative;
}

/* Gallery photos positioning */
.gallery-photos {
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: white;
    z-index: 20;
}

.gallery-photos.hidden {
    display: none;
}
