/* Galeri album (2026-10-27). One card per activity; inside, a justified grid
   that keeps every photo's real shape, and a full-screen viewer. */
.ga-page { --ga-ink: #1a1a1a; --ga-orange: #FF8218; --ga-orange-text: #9a4700; --ga-muted: #626873; --ga-line: #e6e7ea; --ga-mist: #efede9;
    background: #fff; color: var(--ga-ink); }
.ga-section { padding: 40px 0 56px; }
.ga-page a:focus-visible, .ga-page button:focus-visible { outline: 3px solid var(--ga-orange); outline-offset: 3px; }

/* List */
.ga-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.ga-toolbar h2 { font-size: 1.35rem; font-weight: 700; margin: 0 0 4px; }
.ga-toolbar p { margin: 0; font-size: .9rem; color: var(--ga-muted); }
.ga-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.ga-filter button { min-height: 40px; padding: 8px 16px; border: 1px solid var(--ga-line); border-radius: 999px; background: #fff; color: #3f4550; font-size: .85rem; font-weight: 500; }
.ga-filter button.is-active { background: var(--ga-ink); border-color: var(--ga-ink); color: #fff; }

.ga-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; }
.ga-card { display: flex; flex-direction: column; min-width: 0; color: inherit; text-decoration: none; }
.ga-card[hidden] { display: none; }
.ga-card:hover { color: inherit; }
.ga-cover { display: block; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 14px 14px 0 0; background: var(--ga-mist); }
.ga-card--single .ga-cover { border-radius: 14px; }
.ga-cover img, .ga-strip-cell img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.ga-card:hover .ga-cover img { transform: scale(1.03); }
/* The strip of three under the cover says "this is a set", before the count does */
.ga-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin-top: 3px; }
.ga-strip-cell { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--ga-mist); }
.ga-strip-cell:first-child { border-bottom-left-radius: 14px; }
.ga-strip-cell:last-child { border-bottom-right-radius: 14px; }
.ga-more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(26, 26, 26, .62); color: #fff; font-size: 1.1rem; font-weight: 700; }
.ga-card-body { display: block; padding: 14px 2px 0; }
.ga-card-title { display: block; font-size: 1.02rem; font-weight: 700; line-height: 1.45; overflow-wrap: anywhere; }
.ga-card:hover .ga-card-title { color: var(--ga-orange-text); }
.ga-card-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: .82rem; color: var(--ga-muted); }
.ga-card-meta i { color: var(--ga-orange-text); }

.ga-empty { padding: 64px 20px; text-align: center; background: #fafafa; border-radius: 16px; }
.ga-empty > i { font-size: 2.5rem; color: var(--ga-orange-text); }
.ga-empty h2 { font-size: 1.1rem; margin: 14px 0 6px; }
.ga-empty p { color: var(--ga-muted); margin: 0; }
.ga-contact { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 40px; padding: 18px 20px; border: 1px solid var(--ga-line); border-radius: 12px; }
.ga-contact p { margin: 0; font-size: .86rem; line-height: 1.7; }
.ga-contact > i { color: var(--ga-orange-text); font-size: 1.35rem; }
.ga-contact a { color: var(--ga-orange-text); font-weight: 600; }

/* Album */
.ga-album-head { padding: 24px 0 4px; background: #fff; }
.ga-album-head .ga-album-meta { margin-top: 4px; }
.ga-back { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; color: var(--ga-orange-text); font-size: .88rem; font-weight: 600; text-decoration: none; }
.ga-back:hover { color: var(--ga-ink); }
.ga-album-head h1 { max-width: 30ch; margin: 6px 0 10px; font-size: clamp(1.5rem, 3.2vw, 2.3rem); font-weight: 700; line-height: 1.25; letter-spacing: -.02em; overflow-wrap: anywhere; }
.ga-album-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; font-size: .9rem; color: var(--ga-muted); }
.ga-album-meta i { color: var(--ga-orange-text); }
.ga-album-desc { max-width: 70ch; margin: 14px 0 0; font-size: .92rem; line-height: 1.8; color: #3f4550; }
.ga-section--photos { padding-top: 24px; }

/* Justified rows: each photo grows in proportion to its width/height ratio,
   so rows fill the width without cropping anyone's head off. */
.ga-justified { --ga-row: 210px; display: flex; flex-wrap: wrap; gap: 6px; }
.ga-justified::after { content: ""; flex-grow: 999; }
.ga-photo { position: relative; display: block; flex-grow: calc(var(--r) * 100); flex-basis: calc(var(--r) * var(--ga-row)); overflow: hidden; background: var(--ga-mist); border-radius: 4px; }
.ga-photo::before { content: ""; display: block; padding-bottom: calc(100% / var(--r)); }
.ga-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.ga-photo:hover img { opacity: .88; }
.ga-photo:focus-visible { outline-offset: 2px; }

.ga-others { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--ga-line); }
.ga-others h2 { font-size: 1.15rem; font-weight: 700; margin: 0 0 20px; }

/* Viewer */
.ga-viewer { position: fixed; inset: 0; width: auto; max-width: none; height: auto; max-height: none; margin: 0; padding: 0; border: 0; overflow: hidden; background: #000; color: #fff; }
.ga-viewer[open] { display: grid; grid-template-rows: auto 1fr auto; }
.ga-viewer::backdrop { background: #000; }
.ga-viewer-top { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 10px 20px; font-size: .9rem; color: #d8d8d8; }
.ga-viewer-stage { position: relative; min-height: 0; touch-action: pan-y; }
/* Absolute + margin auto: the only way max-height:100% is sure to hold inside the 1fr row */
.ga-viewer-stage img { position: absolute; inset: 0 68px; margin: auto; max-width: calc(100% - 136px); max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; transition: opacity .15s; }
.ga-viewer-stage img.is-loading { opacity: .35; }
.ga-viewer-btn { display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; font-size: 1.2rem; }
.ga-viewer-btn:hover { background: rgba(255, 255, 255, .24); }
.ga-viewer-btn:focus-visible { outline: 3px solid var(--ga-orange); outline-offset: 2px; }
.ga-viewer-prev, .ga-viewer-next { position: fixed; top: 50%; transform: translateY(-50%); }
.ga-viewer-prev { left: 10px; } .ga-viewer-next { right: 10px; }
.ga-viewer-caption { min-height: 1.5em; margin: 0; padding: 12px 20px 18px; text-align: center; font-size: .92rem; color: #eee; }

@media (min-width: 1400px) { .ga-justified { --ga-row: 260px; } }
@media (max-width: 991.98px) { .ga-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) {
    .ga-section { padding: 24px 0 40px; }
    .ga-page .container { padding-left: 16px; padding-right: 16px; }
    .ga-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    .ga-filter { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 4px; }
    .ga-filter button { flex-shrink: 0; }
    .ga-justified { --ga-row: 88px; gap: 4px; } /* 2 landscape (16:9) or 4 portrait photos a row on a 360-375px phone */
    .ga-album-head { padding-top: 16px; }
    .ga-contact { align-items: flex-start; }
    .ga-viewer-stage img { inset: 0; max-width: 100%; }
    .ga-viewer-prev, .ga-viewer-next { top: auto; bottom: 14px; transform: none; }
    .ga-viewer-caption { padding: 12px 70px 22px; }
}
@media (prefers-reduced-motion: reduce) {
    .ga-cover img, .ga-strip-cell img, .ga-photo img, .ga-viewer-stage img { transition: none; }
    .ga-card:hover .ga-cover img { transform: none; }
}
