/* gallery.css - modern photo gallery. Mobile-first: 2 columns on phones, touch-sized controls, safe-area aware lightbox. */
.gx-hero { position: relative; color: #fff; text-align: center; padding: 56px 16px 84px; overflow: hidden;
  background: radial-gradient(900px 420px at 15% -10%, #2a6a53 0%, transparent 60%), radial-gradient(800px 380px at 95% 0%, rgba(232,137,28,.28) 0%, transparent 55%), linear-gradient(160deg, var(--green-950), var(--green-800)); }
.gx-hero::before { content: ''; position: absolute; inset: 0; opacity: .22; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='38' height='38'%3E%3Cpath d='M19 15v8M15 19h8' stroke='%23ffffff' stroke-opacity='.35' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E"); }
.gx-hero-in { position: relative; max-width: 760px; margin: 0 auto; }
.gx-chip { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 6px 14px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #ffd28a; background: rgba(232,137,28,.14); border: 1px solid rgba(232,137,28,.45); }
.gx-hero h1 { color: #fff; margin: 0 0 12px; font-size: clamp(30px, 6vw, 52px); line-height: 1.12; letter-spacing: -.01em; }
.gx-hero h1 em { font-style: normal; color: #f6b85a; }
.gx-sub { margin: 0 auto 26px; max-width: 560px; color: #cfe4da; font-size: clamp(14px, 2.4vw, 17px); line-height: 1.6; }
.gx-stats { display: inline-flex; gap: 0; border-radius: 18px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(6px); overflow: hidden; }
.gx-stats > div { padding: 12px 26px; min-width: 92px; } .gx-stats > div + div { border-left: 1px solid rgba(255,255,255,.16); }
.gx-stats b { display: block; font: 700 26px var(--font-head); color: #fff; line-height: 1.1; }
.gx-stats span { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #bcd9cc; font-weight: 600; }
.gx-wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 48px; color: var(--cream); display: block; }

.gx-main { background: var(--cream); padding: 0 0 56px; }
.gx-toolbar { display: grid; grid-template-columns: minmax(180px, 360px) 1fr auto; gap: 12px 18px; align-items: center; padding: 6px 0 14px; }
.gx-search { position: relative; display: block; }
.gx-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.gx-search input { width: 100%; height: 46px; padding: 0 40px 0 42px; border: 1px solid var(--line); border-radius: 14px; background: #fff; font: 500 15px var(--font-body); color: var(--ink); box-shadow: 0 1px 2px rgba(15,42,33,.04); }
.gx-search input:focus { outline: 2px solid var(--amber-500); outline-offset: 1px; border-color: transparent; }
.gx-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border: 0; border-radius: 50%; background: #efece3; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; }
.gx-count { margin: 0; text-align: center; color: var(--muted); font-size: 14px; } .gx-count b { color: var(--green-900); }
.gx-views { display: inline-flex; padding: 4px; gap: 2px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.gx-views button { width: 40px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; }
.gx-views button.is-on { background: var(--green-900); color: #fff; }
.gx-views button:focus-visible, .gx-chips button:focus-visible, .gx-card:focus-visible { outline: 2px solid var(--amber-500); outline-offset: 2px; }

.gx-chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 14px; margin: 0 -2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.gx-chips::-webkit-scrollbar { display: none; }
.gx-chips button { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--green-900); font: 600 14px var(--font-body); cursor: pointer; white-space: nowrap; }
.gx-chips button i { font-style: normal; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: #efece3; color: var(--muted); }
.gx-chips button.is-on { background: var(--green-900); border-color: var(--green-900); color: #fff; }
.gx-chips button.is-on i { background: rgba(255,255,255,.18); color: #fff; }

/* grid */
.gx-grid { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.gx-grid[data-view="lg"] { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 22px; }
.gx-grid[data-view="sm"] { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.gx-item { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; transition-delay: calc(var(--i, 0) * 35ms); }
.gx-item.in { opacity: 1; transform: none; }
.gx-item[hidden] { display: none; }
.gx-card { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 0; border-radius: 18px; overflow: hidden; background: linear-gradient(110deg, #e9e5da 30%, #f4f1e8 50%, #e9e5da 70%); background-size: 200% 100%; animation: gx-sheen 1.4s linear infinite; cursor: zoom-in; box-shadow: 0 2px 4px rgba(15,42,33,.06), 0 10px 24px rgba(15,42,33,.08); transition: box-shadow .25s, transform .25s; -webkit-tap-highlight-color: transparent; }
.gx-grid[data-view="lg"] .gx-card { aspect-ratio: 16 / 11; } .gx-grid[data-view="sm"] .gx-card { aspect-ratio: 1 / 1; border-radius: 14px; }
.gx-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.gx-card:hover { box-shadow: 0 4px 8px rgba(15,42,33,.1), 0 18px 38px rgba(15,42,33,.2); transform: translateY(-3px); }
.gx-card:hover img { transform: scale(1.07); }
.gx-num { position: absolute; left: 12px; top: 12px; padding: 3px 10px; border-radius: 999px; font: 700 12px var(--font-body); color: #fff; background: rgba(12,36,27,.62); backdrop-filter: blur(4px); }
.gx-zoom { position: absolute; right: 12px; top: 12px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: rgba(12,36,27,.55); backdrop-filter: blur(4px); opacity: 0; transform: scale(.8); transition: .25s; }
.gx-card:hover .gx-zoom, .gx-card:focus-visible .gx-zoom { opacity: 1; transform: none; }
.gx-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 36px 14px 12px; text-align: left; color: #fff; background: linear-gradient(to top, rgba(8,24,18,.82), rgba(8,24,18,0)); display: grid; gap: 2px; }
.gx-cap small { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #ffd28a; font-weight: 700; }
.gx-cap b { font: 600 14px var(--font-body); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gx-grid[data-view="sm"] .gx-cap { display: none; }
@keyframes gx-sheen { to { background-position: -200% 0; } }
.gx-card.loaded { animation: none; background: #e9e5da; }
.gx-empty { text-align: center; padding: 56px 16px; display: grid; gap: 8px; justify-items: center; color: var(--muted); }
.gx-empty b { color: var(--green-900); font: 600 22px var(--font-head); }
.gx-empty[hidden] { display: none; }

/* lightbox */
.gx-lb { position: fixed; inset: 0; z-index: 1000; display: grid; grid-template-columns: 72px 1fr 72px; grid-template-rows: auto 1fr; background: rgba(5,16,12,.94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #fff; touch-action: pan-y; }
.gx-lb[hidden] { display: none; }
.gx-lb-top { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left)); }
.gx-lb-title { margin-right: auto; display: grid; line-height: 1.25; min-width: 0; }
.gx-lb-title small { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #ffd28a; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gx-lb-title span { font-size: 13px; color: #bcd9cc; }
.gx-lb-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; cursor: pointer; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.gx-lb-btn:hover, .gx-lb-nav:hover { background: rgba(255,255,255,.2); }
.gx-lb-nav { align-self: center; justify-self: center; width: 50px; height: 50px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.gx-lb-nav:disabled { opacity: .25; cursor: default; }
.gx-lb-stage { position: relative; margin: 0; min-width: 0; display: grid; grid-template-rows: 1fr auto; justify-items: center; align-items: center; padding: 6px 0 max(14px, env(safe-area-inset-bottom)); }
.gx-lb-stage img { max-width: 100%; max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px); object-fit: contain; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.5); opacity: 0; transition: opacity .25s; user-select: none; -webkit-user-drag: none; }
.gx-lb-stage img.ready { opacity: 1; }
.gx-lb-stage figcaption { margin-top: 12px; max-width: 760px; padding: 0 12px; text-align: center; font-size: 15px; line-height: 1.5; color: #e6f2ec; min-height: 22px; }
.gx-spin { position: absolute; top: 45%; left: 50%; width: 38px; height: 38px; margin: -19px; border: 3px solid rgba(255,255,255,.25); border-top-color: #f6b85a; border-radius: 50%; animation: gx-rot .8s linear infinite; }
.gx-spin.off { display: none; }
@keyframes gx-rot { to { transform: rotate(360deg); } }
body.gx-lock { overflow: hidden; }

/* tablets / phones */
@media (max-width: 860px) { .gx-toolbar { grid-template-columns: 1fr auto; } .gx-count { grid-column: 1 / -1; grid-row: 2; text-align: left; } }
@media (max-width: 640px) {
  .gx-hero { padding: 40px 14px 70px; } .gx-stats > div { padding: 10px 18px; min-width: 76px; } .gx-stats b { font-size: 22px; }
  .gx-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .gx-grid[data-view="lg"] { grid-template-columns: 1fr; gap: 14px; } .gx-grid[data-view="sm"] { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .gx-card { border-radius: 14px; } .gx-grid[data-view="md"] .gx-card { aspect-ratio: 1 / 1; }
  .gx-cap { padding: 26px 10px 8px; } .gx-cap b { font-size: 12.5px; -webkit-line-clamp: 1; line-clamp: 1; } .gx-cap small { font-size: 10px; } .gx-num { left: 8px; top: 8px; font-size: 11px; padding: 2px 8px; }
  .gx-zoom { display: none; }
  .gx-lb { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; }
  .gx-lb-nav { position: absolute; bottom: max(16px, env(safe-area-inset-bottom)); width: 54px; height: 54px; background: rgba(255,255,255,.16); z-index: 2; } .gx-lb-nav.prev { left: 16px; } .gx-lb-nav.next { right: 16px; }
  .gx-lb-stage { padding-bottom: 86px; } .gx-lb-stage img { max-height: calc(100vh - 230px); max-height: calc(100dvh - 230px); border-radius: 8px; }
  .gx-lb-stage figcaption { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .gx-item { opacity: 1; transform: none; transition: none; } .gx-card, .gx-card img, .gx-zoom { transition: none; animation: none; } .gx-spin { animation-duration: 2s; } }

/* ---- lightbox: finger / mouse drag, hint, short (landscape) phones ---- */
.gx-lb { touch-action: none; overscroll-behavior: contain; }
.gx-lb-stage { cursor: grab; } .gx-lb-stage.dragging { cursor: grabbing; }
.gx-lb-stage img { will-change: transform, opacity; transition: none; touch-action: none; }
.gx-lb-stage img.ready { opacity: 1; }
.gx-hint { position: absolute; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 4; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; color: #fff; background: rgba(0,0,0,.6); backdrop-filter: blur(6px); pointer-events: none; opacity: 0; transition: opacity .35s; white-space: nowrap; }
.gx-hint.on { opacity: 1; } .gx-hint[hidden] { display: none; }
@media (max-height: 520px) and (orientation: landscape) {
  .gx-lb { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .gx-lb-top { padding-top: max(6px, env(safe-area-inset-top)); padding-bottom: 2px; } .gx-lb-btn { width: 38px; height: 38px; }
  .gx-lb-nav { position: absolute; top: 50%; margin-top: -24px; width: 48px; height: 48px; bottom: auto; z-index: 3; } .gx-lb-nav.prev { left: max(10px, env(safe-area-inset-left)); } .gx-lb-nav.next { right: max(10px, env(safe-area-inset-right)); }
  .gx-lb-stage { padding: 0 0 4px; } .gx-lb-stage img { max-height: calc(100vh - 64px); max-height: calc(100dvh - 64px); }
  .gx-lb-stage figcaption { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 22px 70px 8px; background: linear-gradient(to top, rgba(0,0,0,.65), transparent); font-size: 13px; }
  .gx-hint { bottom: 54px; }
}
@media (max-width: 640px) { .gx-hint { bottom: calc(92px + env(safe-area-inset-bottom)); } }

@media (max-height: 520px) and (orientation: landscape) { .gx-lb-stage figcaption { max-width: none; text-align: center; } }

/* zoom */
.gx-lb-stage.zoomed { cursor: move; } .gx-lb-stage.zoomed figcaption { opacity: .35; }
.gx-lb-btn:disabled { opacity: .3; cursor: default; }
.gx-lb-stage img { transform-origin: 50% 50%; }

/* zoomed photo stays inside its box: it can never cover the close / zoom buttons */
.gx-lb-stage { overflow: hidden; }
.gx-lb-top { position: relative; z-index: 6; background: linear-gradient(to bottom, rgba(5,16,12,.78), rgba(5,16,12,0)); }
.gx-lb-stage figcaption { position: relative; z-index: 2; text-shadow: 0 1px 6px rgba(0,0,0,.8); }
.gx-lb-stage.zoomed figcaption { opacity: 0; pointer-events: none; transition: opacity .2s; }
@media (max-height: 520px) and (orientation: landscape) { .gx-lb-stage figcaption { position: absolute; } }
