/* ── Gallery Page ── */
.gallery-page body { background: var(--bg); }

.gallery-header {
    padding: 3rem 0 1.5rem;
}

/* Filter Tabs */
.gallery-filter-bar {
    padding: 0 0 1.5rem;
    position: sticky;
    top: var(--header-h);
    z-index: 50;
    background: rgba(242, 244, 247, 0.92);
    backdrop-filter: blur(10px);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

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

.filter-tab {
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    border: 1px solid rgba(16, 31, 52, 0.15);
    background: rgba(255,255,255,0.7);
    color: #475569;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.filter-tab:hover {
    background: rgba(16,31,52,0.08);
    color: var(--primary);
}
.filter-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Photo Grid — CSS Grid */
.gallery-grid-section { padding: 0 0 3rem; }

.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 240px;
    gap: 0.75rem;
}

.photo-item {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    cursor: zoom-in;
    background: #e2e8f0;
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 2rem;
}
.photo-placeholder::after {
    content: '🖼';
    opacity: 0.5;
}

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

.photo-item--tall {
    grid-row: span 2;
}

.photo-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.photo-item:hover img {
    transform: scale(1.04);
}

.photo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(7,18,29,0.65) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 1rem;
}
.photo-overlay span {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}
.photo-item:hover .photo-overlay { opacity: 1; }

/* Hidden filter state */
.photo-item.is-hidden {
    display: none;
}

/* Lightbox */
.gl-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(7, 10, 18, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.gl-lightbox.is-open {
    opacity: 1;
    pointer-events: all;
}
.gl-lightbox__img {
    max-width: min(96vw, 1100px);
    max-height: 92svh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0.75rem;
    box-shadow: 0 40px 80px rgba(0,0,0,0.5);
}
.gl-lightbox__close {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    font-size: 2rem;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    line-height: 1;
}
.gl-lightbox__close:hover { background: rgba(255,255,255,0.22); }
.gl-lightbox__nav {
    position: fixed;
    top: calc(50% - 26px);
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    font-size: 2rem;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    line-height: 1;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
.gl-lightbox__nav:hover,
.gl-lightbox__nav:active { background: rgba(255,255,255,0.22); }
.gl-lightbox__nav--prev { left: 1.5rem; }
.gl-lightbox__nav--next { right: 1.5rem; }

/* Footer */
.site-footer {
    background: var(--primary);
    color: rgba(255,255,255,0.75);
    padding: 3rem 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand .brand { color: #fff; }
.footer-tagline {
    color: rgba(255,255,255,0.55);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-top: 0.65rem;
}
.footer-col {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.footer-col-title {
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}
.footer-col a, .footer-col span {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
    padding: 1.25rem 0;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.35);
}

/* Mobile */
@media (max-width: 768px) {
    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 180px;
    }
    .photo-item--wide { grid-column: span 2; }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
    .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 140px;
        gap: 0.5rem;
    }
    .photo-item--tall { grid-row: span 1; }
    .photo-item { border-radius: 0.65rem; }
    .filter-tab { font-size: 0.8rem; padding: 0.4rem 0.85rem; }
    .footer-grid { grid-template-columns: 1fr; }
}
