@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
    font-family: 'Poppins', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

.gradient-bg {
    background: linear-gradient(135deg, #4c1d95 0%, #701a75 100%);
}

/* Glass Effect */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Gallery Filter Styles */
.gallery-filter {
    background: white;
    color: #4b5563;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-filter:hover {
    border-color: #8b5cf6;
    color: #8b5cf6;
    transform: translateY(-2px);
}

.gallery-filter.active {
    background: linear-gradient(135deg, #8b5cf6 0%, #d946ef 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.3);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    animation: fadeIn 0.5s ease-in;
}

@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 2rem;
    }
}

@media (min-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 1280px) {
    .gallery-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 2rem;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Gallery Item */
.gallery-item {
    animation: fadeIn 0.5s ease-in;
    transition: all 0.3s ease;
    cursor: pointer;
}

.gallery-item.hidden {
    display: none;
}

.gallery-item:hover {
    transform: translateY(-8px);
}

/* Gallery Image Wrapper */
.gallery-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 280px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    cursor: pointer;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.gallery-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover .gallery-image-wrapper img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    border-radius: 1rem;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-content {
    color: white;
    width: 100%;
}

.gallery-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.gallery-content p {
    font-size: 0.875rem;
    margin: 0;
    color: #d1d5db;
}

.gallery-icon {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-icon {
    opacity: 1;
}

/* Stats Section */
.gallery-stats {
    /* Grid layout handled by Tailwind classes in HTML now */
    margin: 0;
}



.stat-label {
    color: #4b5563;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: 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: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 1rem;
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.1);
}

.lightbox-info {
    color: white;
    text-align: center;
    margin-top: 1.5rem;
    padding: 0 1rem;
}

.lightbox-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.lightbox-description {
    font-size: 1rem;
    color: #d1d5db;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1001;
    border: none;
}

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

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

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

.lightbox-nav.prev {
    left: 1.5rem;
}

.lightbox-nav.next {
    right: 1.5rem;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 640px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .gallery-image-wrapper {
        height: 180px;
    }

    .gallery-overlay {
        padding: 1rem;
    }

    .gallery-content h3 {
        font-size: 1rem;
    }

    .gallery-content p {
        font-size: 0.75rem;
    }

    .gallery-stats {
        gap: 1rem;
    }

    .stat-item {
        padding: 1rem;
    }

    .stat-number {
        font-size: 1.875rem;
    }

    .lightbox-image {
        max-height: 70vh;
    }

    .lightbox-info {
        margin-top: 1rem;
    }

    .lightbox-title {
        font-size: 1.25rem;
    }

    .lightbox-description {
        font-size: 0.875rem;
    }

    .lightbox-nav {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.5rem;
    }

    .lightbox-close {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.5rem;
    }
}