/* ===== GALLERY PAGE ===== */
.gallery-hero {
    padding: 3rem 0 2rem;
    background: #110d0a;
    border-bottom: 1px solid rgba(212, 197, 181, 0.05);
}

.page-title {
    font-size: 3.2rem;
    font-weight: 700;
    color: #f0e6dc;
    margin-bottom: 0.25rem;
}

.gallery-desc {
    color: #8a7a6a;
    font-size: 1.1rem;
    max-width: 600px;
}

/* ===== FILTERS ===== */
.gallery-filters {
    padding: 1.5rem 0;
    background: #0d0a08;
    border-bottom: 1px solid rgba(212, 197, 181, 0.05);
    position: sticky;
    top: 68px;
    z-index: 50;
    backdrop-filter: blur(8px);
}

.filter-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #8a7a6a;
    background: rgba(212, 197, 181, 0.05);
    transition: all 0.25s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.filter-tab:hover {
    color: #d4c5b5;
    background: rgba(212, 197, 181, 0.08);
}

.filter-tab.active {
    color: #f0e6dc;
    background: rgba(201, 122, 94, 0.15);
    border-color: rgba(201, 122, 94, 0.3);
}

/* ===== MASONRY GRID ===== */
.gallery-grid-section {
    padding: 2rem 0 4rem;
    background: #0d0a08;
}

.gallery-masonry {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    grid-auto-rows: 280px;
    gap: 1.25rem;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: #1a1410;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

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

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

.gallery-item .gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 1.25rem 1.25rem;
    background: linear-gradient(to top, rgba(13, 10, 8, 0.9), transparent);
    transform: translateY(100%);
    transition: transform 0.35s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-item .gallery-overlay h4 {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #f0e6dc;
    margin-bottom: 0.1rem;
}

.gallery-item .gallery-overlay span {
    font-size: 0.75rem;
    color: #c97a5e;
}

.gallery-item .gallery-category {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: rgba(13, 10, 8, 0.7);
    backdrop-filter: blur(4px);
    border-radius: 50px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #c97a5e;
    border: 1px solid rgba(201, 122, 94, 0.2);
}

/* Masonry sizes */
.gallery-item.tall {
    grid-row: span 2;
}

.gallery-item.wide {
    grid-column: span 2;
}

.gallery-item.featured {
    grid-row: span 2;
    grid-column: span 2;
}

/* ===== LOAD MORE ===== */
.gallery-load-more {
    text-align: center;
    margin-top: 2.5rem;
}

/* ===== LIGHTBOX ===== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 10, 8, 0.95);
    backdrop-filter: blur(16px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    padding: 2rem;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    max-width: 80vw;
    max-height: 80vh;
    position: relative;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.lightbox-caption {
    position: absolute;
    bottom: -3rem;
    left: 0;
    right: 0;
    text-align: center;
}

.lightbox-caption .lightbox-title {
    display: block;
    color: #f0e6dc;
    font-size: 1.1rem;
    font-weight: 500;
}

.lightbox-caption .lightbox-category {
    display: block;
    color: #c97a5e;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    color: #d4c5b5;
    transition: color 0.25s ease, transform 0.2s ease;
    z-index: 10;
}

.lightbox-close:hover {
    color: #f0e6dc;
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: #d4c5b5;
    padding: 1rem;
    transition: color 0.25s ease, transform 0.2s ease;
    z-index: 10;
}

.lightbox-nav:hover {
    color: #f0e6dc;
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 0.5rem;
}

.lightbox-next {
    right: 0.5rem;
}

.lightbox-counter {
    position: absolute;
    bottom: -4.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: #8a7a6a;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .gallery-masonry {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        grid-auto-rows: 220px;
        gap: 1rem;
    }

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

@media (max-width: 768px) {
    .page-title {
        font-size: 2.4rem;
    }

    .gallery-desc {
        font-size: 1rem;
    }

    .gallery-masonry {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        grid-auto-rows: 160px;
        gap: 0.75rem;
    }

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

    .gallery-item.wide {
        grid-column: span 1;
    }

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

    .filter-tabs {
        gap: 0.35rem;
    }

    .filter-tab {
        padding: 0.35rem 0.85rem;
        font-size: 0.75rem;
    }

    .lightbox-content {
        max-width: 95vw;
        max-height: 70vh;
    }

    .lightbox-nav {
        font-size: 1.25rem;
        padding: 0.5rem;
    }

    .lightbox-caption {
        bottom: -2.5rem;
    }

    .lightbox-caption .lightbox-title {
        font-size: 0.95rem;
    }

    .gallery-filters {
        top: 58px;
    }
}

@media (max-width: 480px) {
    .gallery-masonry {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 140px;
        gap: 0.5rem;
    }

    .filter-tabs {
        justify-content: center;
    }

    .filter-tab {
        font-size: 0.7rem;
        padding: 0.3rem 0.65rem;
    }

    .gallery-item .gallery-overlay h4 {
        font-size: 0.8rem;
    }

    .gallery-item .gallery-overlay span {
        font-size: 0.65rem;
    }

    .lightbox-content {
        max-width: 98vw;
        max-height: 60vh;
    }
}