/* Gallery Hero */
.gallery-hero {
    padding: 4rem 2rem 3rem;
    text-align: center;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--section-bg) 100%);
    border-bottom: 1px solid var(--card-border);
}

.gallery-kicker {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #0066ff;
    margin-bottom: 0.75rem;
}

.gallery-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.gallery-lead {
    font-size: 1.1rem;
    color: var(--muted-text);
    max-width: 500px;
    margin: 0 auto;
}

/* Gallery Filter */
.gallery-filter {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem;
    flex-wrap: wrap;
    background: var(--bg-color);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--card-border);
}

.filter-btn {
    padding: 0.6rem 1.25rem;
    border: 2px solid var(--card-border);
    background: var(--card-bg);
    color: var(--text-color);
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
}

.filter-btn:hover {
    border-color: #0066ff;
    color: #0066ff;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: #0066ff;
    border-color: #0066ff;
    color: white;
}

/* Gallery Masonry Grid */
.gallery-masonry {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    background: var(--card-bg);
    aspect-ratio: 1;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item.tall {
    grid-row: span 2;
    aspect-ratio: auto;
}

.gallery-item.wide {
    grid-column: span 2;
    aspect-ratio: 2/1;
}

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

.gallery-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

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

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.gallery-tag {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: #0066ff;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 1rem;
    margin-bottom: 0.5rem;
    width: fit-content;
}

.gallery-overlay h3 {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    text-align: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    transition: opacity 0.3s ease;
}

.lightbox-content p {
    color: white;
    margin-top: 1rem;
    font-size: 1.1rem;
    font-weight: 500;
}

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

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

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

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

.lightbox-prev {
    left: 2rem;
}

.lightbox-next {
    right: 2rem;
}

/* Responsive */
@media (max-width: 1200px) {
    .gallery-masonry {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .gallery-masonry {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 1rem;
    }

    .gallery-hero h1 {
        font-size: 2rem;
    }

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

    .lightbox-prev {
        left: 1rem;
    }

    .lightbox-next {
        right: 1rem;
    }
}

@media (max-width: 600px) {
    .gallery-masonry {
        grid-template-columns: 1fr;
    }

    .gallery-item.tall {
        grid-row: span 1;
    }

    .gallery-filter {
        padding: 1rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .gallery-hero {
        padding: 3rem 1.5rem 2rem;
    }

    .gallery-hero h1 {
        font-size: 1.75rem;
    }
}
