/* gallery.css */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #111827;
    color: #fff;
    min-height: 100vh;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header Styles */
.header {
    background-color: #1f2937;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem 0;
}

.header-title {
    font-size: 2.25rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 0.5rem;
    color: #fff;
}

.header-subtitle {
    text-align: center;
    color: #9ca3af;
    font-size: 1rem;
}

/* Main Content */
.main-content {
    padding: 2rem 0;
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    background-color: #374151;
    color: #d1d5db;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.filter-btn:hover {
    background-color: #4b5563;
}

.filter-btn.active {
    background-color: #2563eb;
    color: #fff;
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

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

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

/* Gallery Item */
.gallery-item {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 0.5rem;
    cursor: pointer;
    background-color: #1f2937;
}

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

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

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

/* Gallery Overlay */
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
}

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

.gallery-info {
    padding: 1rem;
    width: 100%;
}

.gallery-title {
    color: #fff;
    font-weight: 600;
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.gallery-category {
    color: #d1d5db;
    font-size: 0.875rem;
    text-transform: capitalize;
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.lightbox.active {
    display: flex;
}

.lightbox-close {
    position: absolute;
    top: 3rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.lightbox-nav {
    position: absolute;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.5rem;
    z-index: 10;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-nav:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

.lightbox-prev {
    left: 1rem;
}

.lightbox-next {
    right: 1rem;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

#lightboxImage {
    max-width: 100%;
    max-height: 75vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
}

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

.lightbox-title {
    color: #fff;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.lightbox-category {
    color: #d1d5db;
    text-transform: capitalize;
    font-size: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Footer */
.footer {
    background-color: #1f2937;
    margin-top: 4rem;
    padding: 1.5rem 0;
}

.footer p {
    text-align: center;
    color: #9ca3af;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.lightbox.active {
    animation: fadeIn 0.3s ease;
}

/* Mobile Adjustments */
@media (max-width: 640px) {
    .header-title {
        font-size: 1.875rem;
    }

    .lightbox-content {
        max-width: 95%;
    }

    #lightboxImage {
        max-height: 70vh;
    }

    .lightbox-nav {
        width: 48px;
        height: 48px;
    }

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

    .lightbox-prev {
        left: 0.5rem;
    }

    .lightbox-next {
        right: 0.5rem;
    }

    .lightbox-close {
        width: 40px;
        height: 40px;
        top: 1.5rem;
        right: 0.5rem;
    }

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

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

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

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

@media (max-width: 480px) {
    #lightboxImage {
        max-height: 60vh;
    }

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

/* Tablet Adjustments */
@media (min-width: 641px) and (max-width: 1024px) {
    #lightboxImage {
        max-height: 70vh;
    }

    .lightbox-content {
        max-width: 85%;
    }
}