/* ==========================================================================
   Berarti · Halaman Galeri
   Memakai token dan komponen dari style.css. Mobile-first, desktop mulai 1024px.
   ========================================================================== */

/* ---------- Header ---------- */
.gl-hero { background: var(--green) url(../img/hero-bg.svg) no-repeat center bottom -820px / 1600px auto; color: var(--cream); text-align: center; padding: 120px 0 72px; }
.gl-h1 { margin-top: 18px; font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 10.5vw, 44px); line-height: 1.04; letter-spacing: -0.02em; color: #FCFCFC; text-shadow: 0 5px 18px rgba(0, 0, 0, .35); }
.gl-lead { margin: 16px auto 0; max-width: 680px; font-size: 15.5px; line-height: 1.65; color: rgba(247, 243, 232, .8); }

@media (min-width: 1024px) {
  .gl-hero { padding: 160px 0 110px; background-size: 2080px auto; background-position: center bottom -760px; }
  .gl-h1 { margin-top: 22px; font-size: 78px; }
  .gl-lead { margin-top: 22px; font-size: 18px; }
}

/* ---------- Judul section ---------- */
.gl-h2 { margin-top: 16px; font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 8.6vw, 38px); line-height: 1.07; letter-spacing: -0.02em; color: var(--ink); text-shadow: 0 5px 16px rgba(242, 104, 16, .2); }

/* ---------- Grid video ---------- */
.gl-vid { background: var(--body); padding: 56px 0 32px; }
.gl-vgrid { display: grid; gap: 14px; margin-top: 24px; }
.gl-vt { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; padding: 0; border: 0; border-radius: 20px; overflow: hidden; background: var(--green); cursor: pointer; isolation: isolate; }
.gl-vt img, .gl-vt video { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.gl-vt img { transition: scale .6s var(--ease-out); }
.gl-vt:hover img { scale: 1.04; }
.gl-vt::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(15, 30, 10, 0) 45%, rgba(15, 30, 10, .85) 100%); pointer-events: none; }
.gl-pl { position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--orange); color: #fff; box-shadow: 0 0 0 8px rgba(255, 107, 0, .25), 0 10px 30px rgba(0, 0, 0, .4); transition: scale .25s var(--ease-out); }
.gl-vt:hover .gl-pl { scale: 1.08; }
.gl-pl svg { width: 24px; height: 24px; margin-left: 3px; }
.gl-cap { position: absolute; left: 18px; right: 18px; bottom: 16px; font-family: var(--serif); font-size: 18px; color: #fff; text-align: left; }
.gl-vt.is-playing { cursor: default; }
.gl-vt.is-playing::after, .gl-vt.is-playing .gl-pl, .gl-vt.is-playing .gl-cap, .gl-vt.is-playing img { display: none; }
.gl-vt.is-playing video { z-index: 0; object-fit: contain; background: #000; }

@media (min-width: 640px) and (max-width: 1023.98px) { .gl-vgrid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) {
  .gl-h2 { margin-top: 18px; font-size: 48px; line-height: 1.05; }
  .gl-vid { padding: 90px 0 40px; }
  .gl-vgrid { grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 34px; }
  .gl-vt { border-radius: 22px; }
  .gl-pl { width: 68px; height: 68px; }
  .gl-cap { left: 22px; bottom: 18px; font-size: 20px; }
}

/* ---------- Grid foto ---------- */
.gl-foto { background: var(--body); padding: 40px 0 72px; }
.gl-chips { display: flex; gap: 8px; margin: 22px calc(-1 * var(--gutter)) 0; padding: 0 var(--gutter) 2px; overflow-x: auto; scrollbar-width: none; }
.gl-chips::-webkit-scrollbar { display: none; }
.gl-chip { flex: none; display: inline-flex; align-items: center; height: 38px; padding: 0 15px; border-radius: 999px; border: 1.5px solid var(--ink); background: rgba(255, 255, 255, .5); font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink); cursor: pointer; transition: background .2s, color .2s; }
.gl-chip:hover { background: #fff; }
.gl-chip.on { background: var(--green); color: #F0F0F0; }
.gl-grid { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 150px; grid-auto-flow: dense; gap: 10px; margin-top: 22px; }
.gl-ph { display: block; border-radius: 14px; overflow: hidden; background: #DCE8D5; }
.gl-ph[hidden] { display: none; }
.gl-ph img { width: 100%; height: 100%; object-fit: cover; transition: scale .6s var(--ease-out); }
.gl-ph:hover img { scale: 1.05; }
/* Pola per 5 foto: 1 besar (2x2) + 4 kecil = baris selalu penuh. Kelas diatur JS dari foto yang tampil. */
.gl-ph.is-big { grid-column: span 2; grid-row: span 2; }
.gl-more-wrap { display: flex; justify-content: center; margin-top: 32px; }
.gl-more { height: 52px; padding: 0 28px; font-size: 15px; }
.gl-more[hidden] { display: none; }

@media (min-width: 1024px) {
  .gl-foto { padding: 50px 0 110px; }
  .gl-chips { flex-wrap: wrap; margin: 26px 0 0; padding: 0; overflow: visible; }
  .gl-chip { height: 40px; padding: 0 17px; font-size: 14px; }
  .gl-grid { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 260px; gap: 16px; margin-top: 30px; }
  .gl-ph { border-radius: 18px; }
  .gl-ph.is-big.is-right { grid-column: 3 / span 2; }
  .gl-more-wrap { margin-top: 44px; }
}

/* ---------- Lightbox ---------- */
.gl-lb { position: fixed; z-index: 300; inset: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 60px 10px 20px; background: rgba(10, 20, 6, .94); }
.gl-lb[hidden] { display: none; }
.gl-lb-fig { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; min-width: 0; height: 100%; justify-content: center; }
.gl-lb-fig img { max-width: 100%; max-height: calc(100vh - 170px); border-radius: 14px; object-fit: contain; }
.gl-lb-fig figcaption { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; text-align: center; font-size: 14px; color: rgba(247, 243, 232, .85); }
.gl-lb-fig figcaption a { font-weight: 600; color: var(--orange-soft); }
.gl-lb-x { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(247, 243, 232, .12); font-size: 26px; line-height: 1; color: #fff; cursor: pointer; }
.gl-lb-nav { width: 44px; height: 44px; border: 1px solid rgba(247, 243, 232, .3); border-radius: 50%; background: none; font-size: 18px; color: #fff; cursor: pointer; }
.gl-lb-x:hover, .gl-lb-nav:hover { background: rgba(247, 243, 232, .2); }
body.lb-lock { overflow: hidden; }

@media (min-width: 1024px) {
  .gl-lb { gap: 24px; padding: 60px 40px 30px; }
  .gl-lb-nav { width: 54px; height: 54px; font-size: 20px; }
  .gl-lb-x { top: 22px; right: 28px; }
  .gl-lb-fig figcaption { font-size: 15px; }
}

/* ---------- Mobile: header ringkas, video utama + 2 tegak, foto masonry 2 kolom ---------- */
@media (max-width: 1023.98px) {
  .gl-hero { padding: 104px 0 40px; background-image: none; }
  .gl-h1 { margin-top: 14px; font-size: 36px; }
  .gl-lead { margin-top: 10px; font-size: 14.5px; }
  .gl-vgrid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .gl-vt { aspect-ratio: 4 / 5; border-radius: 16px; }
  .gl-vt:first-child { grid-column: span 2; aspect-ratio: 16 / 10; }
  .gl-vt:not(:first-child) .gl-pl { width: 48px; height: 48px; }
  .gl-vt:not(:first-child) .gl-cap { left: 12px; bottom: 12px; font-size: 15px; }
  .gl-grid { display: block; columns: 2; column-gap: 10px; }
  .gl-ph, .gl-ph.is-big { margin-bottom: 10px; break-inside: avoid; }
  .gl-ph img { height: auto; display: block; }
}
