/* ============================================================
   Gallery page — geolocated photo grid
   ============================================================ */

/* ── Category filter bar ───────────────────────────────────── */
.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 36px;
}

.gf-btn {
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    padding: 7px 18px;
    border: 1px solid var(--line);
    border-radius: 2px;
    background: transparent;
    color: var(--slate-soft);
    cursor: pointer;
    transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}
.gf-btn:hover {
    border-color: var(--line-strong);
    color: var(--paper);
}
.gf-btn.active {
    border-color: var(--paper);
    color: var(--paper);
    background: var(--paper-soft);
}

/* ── Masonry photo grid ────────────────────────────────────────
   True column masonry. Each card keeps its photo's natural aspect
   ratio and cards stack tight against one another, so there are no
   leftover holes the way a fixed row/column grid produces.
   ------------------------------------------------------------- */
.gallery-masonry {
    columns: 3;
    column-gap: 14px;
}

/* ── Photo card ────────────────────────────────────────────── */
.gallery-card {
    display: inline-block;
    width: 100%;
    margin: 0 0 14px;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: border-color 200ms ease, box-shadow 220ms ease, transform 220ms ease;
    cursor: pointer;
    background: var(--newsprint);
}

.gallery-card:hover {
    border-color: var(--line-strong);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(16, 17, 20, 0.10);
}

.gallery-card.highlighted {
    border-color: var(--ink);
    box-shadow: 0 10px 30px rgba(16, 17, 20, 0.16);
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

/* Image */
.gallery-img-wrap {
    overflow: hidden;
    position: relative;
}
.gallery-img-wrap img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 380ms ease;
}
.gallery-card:hover .gallery-img-wrap img {
    transform: scale(1.05);
}

/* Meta footer */
.gallery-meta {
    padding: 12px 14px 14px;
    background: rgba(4, 8, 20, 0.9);
    border-top: 1px solid var(--line);
    flex-shrink: 0;
}
.gallery-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 5px;
}
.gallery-loc,
.gallery-date {
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--slate-soft);
    white-space: nowrap;
}
.gallery-meta h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--paper);
    margin: 0 0 4px;
    letter-spacing: -0.01em;
    line-height: 1.3;
}
.gallery-meta p {
    font-size: 11px;
    color: var(--bone);
    margin: 0 0 9px;
    line-height: 1.45;
}
.gallery-cat {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--slate-soft);
    border: 1px solid var(--line);
    padding: 2px 7px;
    border-radius: 2px;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 960px) {
    .gallery-masonry { columns: 2; }
}

@media (max-width: 580px) {
    .gallery-masonry { columns: 1; }
}
