/* ============================================
   GALLERY ARCHIVE - PREMIUM STYLE
   Masonry Grid with Lightbox
   ============================================ */

/* ============================================
   GALLERY HERO
   ============================================ */
.gallery-hero-premium {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* ============================================
   FILTER BAR
   ============================================ */
.gallery-filter-bar {
    position: sticky;
    top: 80px;
    z-index: 90;
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 1.5rem 0;
    margin-bottom: 3rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.gallery-filter-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.category-filter-pill {
    padding: 0.625rem 1.5rem;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
}

.category-filter-pill:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.category-filter-pill.active {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-color: #3b82f6;
    color: white;
}

/* ============================================
   GALLERY MASONRY GRID
   ============================================ */
.gallery-masonry {
    column-count: 4;
    column-gap: 1.5rem;
}

.gallery-item-card {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Gallery Image */
.gallery-item-image {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: #f1f5f9;
}

.gallery-item-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item-card:hover .gallery-item-image img {
    transform: scale(1.1);
}

/* Overlay */
.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 50%);
    opacity: 0;
    transition: opacity 0.4s;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
}

.gallery-item-card:hover .gallery-item-overlay {
    opacity: 1;
}

/* Category Badge */
.gallery-category-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 8px;
    letter-spacing: 0.5px;
    z-index: 2;
}

/* Title */
.gallery-item-title {
    color: white;
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.gallery-item-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    margin: 0;
    line-height: 1.5;
}

/* Zoom Icon */
.gallery-zoom-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3;
}

.gallery-item-card:hover .gallery-zoom-icon {
    transform: translate(-50%, -50%) scale(1);
}

.gallery-zoom-icon svg {
    width: 28px;
    height: 28px;
    color: #3b82f6;
}

/* ============================================
   LIGHTBOX MODAL
   ============================================ */
.gallery-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.gallery-lightbox.active {
    display: flex;
}

.gallery-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.gallery-lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
}

.gallery-lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 40px;
    height: 40px;
    background: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.gallery-lightbox-close:hover {
    background: #ef4444;
    color: white;
    transform: rotate(90deg);
}

.gallery-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.gallery-lightbox-nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.gallery-lightbox-prev {
    left: -70px;
}

.gallery-lightbox-next {
    right: -70px;
}

.gallery-lightbox-info {
    position: absolute;
    bottom: -60px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
}

.gallery-lightbox-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.gallery-lightbox-description {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1200px) {
    .gallery-masonry {
        column-count: 3;
    }
}

@media (max-width: 768px) {
    .gallery-filter-bar {
        top: 60px;
        padding: 1rem 0;
    }

    .gallery-masonry {
        column-count: 2;
        column-gap: 1rem;
    }

    .gallery-item-card {
        margin-bottom: 1rem;
    }

    .gallery-lightbox {
        padding: 1rem;
    }

    .gallery-lightbox-nav {
        width: 40px;
        height: 40px;
    }

    .gallery-lightbox-prev {
        left: 10px;
    }

    .gallery-lightbox-next {
        right: 10px;
    }
}

@media (max-width: 640px) {
    .gallery-filter-content {
        overflow-x: auto;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .gallery-filter-content::-webkit-scrollbar {
        display: none;
    }

    .category-filter-pill {
        flex-shrink: 0;
    }

    .gallery-masonry {
        column-count: 1;
    }

    .gallery-lightbox-close {
        top: 10px;
        right: 10px;
    }

    .gallery-lightbox-info {
        position: static;
        margin-top: 1rem;
    }
}