/* Sorot Gallery - tampilan depan. Mengikuti variabel tema Sorot (termasuk mode gelap) dan punya nilai cadangan. */
.sgal, .sgal-album, .sgal-lb {
	--sg-accent: var(--accent, #0E7C66);
	--sg-on: var(--on-accent, #fff);
	--sg-bg: var(--surface, #fff);
	--sg-ink: var(--ink, #16211F);
	--sg-muted: var(--muted, #586865);
	--sg-line: var(--line, #dce5e2);
}
.sgal { --cols: 4; --cols-t: 3; --cols-m: 2; --gap: 10px; --radius: 4px; --ratio: 1/1; --rh: 220px; margin: 1.5rem 0; font: 400 1rem/1.5 var(--font-body, system-ui, -apple-system, "Segoe UI", sans-serif); color: var(--sg-ink); }
.sgal *, .sgal-album *, .sgal-lb * { box-sizing: border-box; }
.sgal img { max-width: 100%; }
.sgal-note { padding: .75rem 1rem; border-left: 4px solid #FFC93C; background: var(--sg-bg); }

/* Grid dasar */
.sgal__grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: var(--gap); }
@media (max-width: 1024px) { .sgal__grid { grid-template-columns: repeat(var(--cols-t), minmax(0, 1fr)); } }
@media (max-width: 640px) { .sgal__grid { grid-template-columns: repeat(var(--cols-m), minmax(0, 1fr)); } }
.sgal .sgal__item { position: relative; margin: 0; overflow: hidden; border-radius: var(--radius); background: var(--sg-line); }
.sgal__item[hidden] { display: none !important; }
.sgal .sgal__link { display: block; position: relative; height: 100%; color: inherit; text-decoration: none; overflow: hidden; border-radius: inherit; }
.sgal .sgal__link img { display: block; width: 100%; height: 100%; margin: 0; border-radius: 0; object-fit: cover; transition: transform .35s ease, opacity .25s ease; }
.sgal__ph { display: block; width: 100%; height: 100%; min-height: 120px; background: linear-gradient(135deg, var(--sg-line), var(--sg-bg)); }
.sgal--hover-zoom .sgal__link:hover img { transform: scale(1.06); }
.sgal--hover-fade .sgal__link:hover img { opacity: .78; }

/* Layout */
.sgal--grid .sgal__link { aspect-ratio: var(--ratio); }
.sgal--masonry .sgal__grid { display: block; column-count: var(--cols); column-gap: var(--gap); }
.sgal.sgal--masonry .sgal__item { margin: 0 0 var(--gap); break-inside: avoid; }
.sgal--masonry .sgal__link { height: auto; }
.sgal--masonry .sgal__link img { height: auto; }
@media (max-width: 1024px) { .sgal--masonry .sgal__grid { column-count: var(--cols-t); } }
@media (max-width: 640px) { .sgal--masonry .sgal__grid { column-count: var(--cols-m); } }
.sgal--auto .sgal__grid { display: flex; flex-wrap: wrap; gap: var(--gap); }
.sgal--auto .sgal__item { height: var(--rh); flex-grow: calc(var(--r) * 100); flex-basis: calc(var(--r) * var(--rh)); }
.sgal--auto .sgal__grid::after { content: ""; flex-grow: 1000000000; }
@media (max-width: 640px) { .sgal--auto .sgal__item { height: calc(var(--rh) * .6); flex-basis: calc(var(--r) * var(--rh) * .6); } }

/* Teks di atas foto & ikon video */
.sgal__cap { position: absolute; inset: auto 0 0 0; display: block; padding: 2.5rem .85rem .75rem; color: #fff; text-align: left; background: linear-gradient(transparent, rgba(0,0,0,.78)); opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s; pointer-events: none; }
.sgal__cap b { display: block; font-size: .95rem; line-height: 1.3; }
.sgal__cap i { display: block; margin-top: .15rem; font-size: .8125rem; font-style: normal; opacity: .85; }
.sgal__link:hover .sgal__cap, .sgal__link:focus-visible .sgal__cap { opacity: 1; transform: none; }
@media (hover: none) { .sgal__cap { opacity: 1; transform: none; } }
.sgal__play { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; background: rgba(0,0,0,.6); border: 2px solid #fff; pointer-events: none; transition: background .2s, transform .2s; }
.sgal__play::after { content: ""; position: absolute; left: 21px; top: 15px; border-left: 17px solid #fff; border-top: 11px solid transparent; border-bottom: 11px solid transparent; }
.sgal__link:hover .sgal__play { background: var(--sg-accent); transform: scale(1.08); }
.sgal__link:focus-visible, .sgal-album__card:focus-visible { outline: 3px solid var(--sg-accent); outline-offset: 2px; }

/* Filter & pagination */
.sgal__filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.sgal__filters--center { justify-content: center; }
.sgal__filters button, .sgal__pager button { padding: .4rem .95rem; border: 1px solid var(--sg-line); border-radius: 999px; background: var(--sg-bg); color: var(--sg-ink); font: 600 .875rem var(--font-body, system-ui, sans-serif); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.sgal__filters button:hover, .sgal__pager button:hover:not([disabled]) { border-color: var(--sg-accent); color: var(--sg-accent); }
.sgal__filters button.is-active, .sgal__pager button.is-active { background: var(--sg-accent); border-color: var(--sg-accent); color: var(--sg-on); }
.sgal__pager { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin-top: 1.25rem; }
.sgal__pager[hidden] { display: none; }
.sgal__pager button[disabled] { opacity: .45; cursor: default; }
.sgal__pager .sgal__dots { align-self: center; color: var(--sg-muted); }
.sgal__filters button:focus-visible, .sgal__pager button:focus-visible, .sgal__arrow:focus-visible, .sgal__thumbs button:focus-visible { outline: 3px solid var(--sg-accent); outline-offset: 2px; }

/* Slider */
.sgal__stage { position: relative; overflow: hidden; border-radius: var(--radius); background: #000; aspect-ratio: 16 / 9; }
.sgal--slider .sgal__grid { display: block; height: 100%; }
.sgal--slider .sgal__item { display: none; height: 100%; border-radius: 0; background: #000; }
.sgal--slider .sgal__item.is-current, .sgal--slider:not(.is-ready) .sgal__item { display: block; }
.sgal--slider:not(.is-ready) .sgal__stage { aspect-ratio: auto; }
.sgal--slider .sgal__link { height: 100%; }
.sgal--slider .sgal__link img { object-fit: contain; }
.sgal--slider .sgal__cap { opacity: 1; transform: none; }
.sgal__arrow { position: absolute; top: 50%; z-index: 2; width: 44px; height: 44px; margin-top: -22px; border: 0; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 1.75rem; line-height: 1; cursor: pointer; transition: background .15s; }
.sgal__arrow:hover { background: var(--sg-accent); color: var(--sg-on); }
.sgal__arrow--prev { left: .75rem; } .sgal__arrow--next { right: .75rem; }
.sgal:not(.sgal--slider) .sgal__arrow { display: none; }
.sgal__thumbs { display: flex; gap: .5rem; margin-top: .5rem; padding-bottom: .25rem; overflow-x: auto; scrollbar-width: thin; }
.sgal__thumbs button { flex: none; width: 92px; padding: 0; aspect-ratio: 4 / 3; border: 2px solid transparent; border-radius: calc(var(--radius) + 2px); overflow: hidden; background: var(--sg-line); opacity: .6; cursor: pointer; transition: opacity .15s, border-color .15s; }
.sgal__thumbs button:hover { opacity: 1; }
.sgal__thumbs button.is-active { border-color: var(--sg-accent); opacity: 1; }
.sgal__thumbs img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Album */
.sgal-album { --cols: 3; --cols-t: 2; --cols-m: 1; --gap: 16px; --radius: 6px; --ratio: 4/3; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: var(--gap); margin: 1.5rem 0; font: 400 1rem/1.5 var(--font-body, system-ui, sans-serif); }
@media (max-width: 1024px) { .sgal-album { grid-template-columns: repeat(var(--cols-t), minmax(0, 1fr)); } }
@media (max-width: 640px) { .sgal-album { grid-template-columns: repeat(var(--cols-m), minmax(0, 1fr)); } }
.sgal-album .sgal-album__card { display: block; color: var(--sg-ink); text-decoration: none; }
.sgal-album__cover { display: block; position: relative; aspect-ratio: var(--ratio); overflow: hidden; border-radius: var(--radius); background: var(--sg-line); }
.sgal-album__cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s; }
.sgal-album__card:hover .sgal-album__cover img { transform: scale(1.06); }
.sgal-album__meta { display: block; padding: .6rem .15rem 0; }
.sgal-album__meta b { display: block; font-size: 1.0625rem; line-height: 1.3; }
.sgal-album__meta i { display: block; font-style: normal; font-size: .875rem; color: var(--sg-muted); }
.sgal-album__card:hover b { color: var(--sg-accent); }
.sgal-back { display: inline-block; margin-bottom: .5rem; font-weight: 600; color: var(--sg-accent); text-decoration: none; }
.sgal-albumview__title { margin: 0 0 1rem; }

/* Lightbox */
body.sgal-lock { overflow: hidden; }
.sgal-lb { position: fixed; inset: 0; z-index: 100000; display: flex; flex-direction: column; background: rgba(8,12,11,.96); color: #fff; font: 400 1rem/1.5 var(--font-body, system-ui, sans-serif); -webkit-user-select: none; user-select: none; }
.sgal-lb[hidden] { display: none; }
.sgal-lb__top { display: flex; justify-content: space-between; align-items: center; padding: .6rem .9rem; flex: none; }
.sgal-lb__count { font-size: .875rem; opacity: .8; }
.sgal-lb__tools { display: flex; gap: .35rem; }
.sgal-lb button { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; transition: background .15s; }
.sgal-lb button:hover { background: var(--sg-accent); color: var(--sg-on); }
.sgal-lb button:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.sgal-lb__btn { width: 40px; height: 40px; }
.sgal-lb__btn[hidden] { display: none; }
.sgal-lb svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sgal-lb__stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: pan-y; }
.sgal-lb__media { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.sgal-lb__media img { max-width: 94vw; max-height: 100%; object-fit: contain; transform-origin: center; transition: transform .2s ease; cursor: zoom-in; will-change: transform; }
.sgal-lb__media img.is-zoomed { cursor: grab; transition: none; }
.sgal-lb__media img.is-grabbing { cursor: grabbing; }
.sgal-lb__media iframe, .sgal-lb__media video { width: min(94vw, 1100px); aspect-ratio: 16 / 9; max-height: 100%; border: 0; background: #000; border-radius: 6px; }
.sgal-lb__nav { position: absolute; top: 50%; z-index: 2; width: 48px; height: 48px; margin-top: -24px; font-size: 1.9rem; line-height: 1; }
.sgal-lb__nav--prev { left: .75rem; } .sgal-lb__nav--next { right: .75rem; }
.sgal-lb__nav[hidden] { display: none; }
.sgal-lb__info { flex: none; padding: .5rem 1rem .25rem; text-align: center; min-height: 1.5rem; }
.sgal-lb__title { margin: 0; font-weight: 700; }
.sgal-lb__caption { margin: .1rem 0 0; font-size: .9rem; opacity: .8; }
.sgal-lb__thumbs { flex: none; display: flex; gap: .4rem; padding: .5rem .9rem .8rem; overflow-x: auto; justify-content: safe center; scrollbar-width: thin; }
.sgal-lb__thumbs button { flex: none; width: 64px; height: 48px; padding: 0; border-radius: 4px; overflow: hidden; opacity: .5; background: #222; }
.sgal-lb__thumbs button.is-active { opacity: 1; outline: 2px solid var(--sg-accent); }
.sgal-lb__thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sgal-lb__progress { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: transparent; pointer-events: none; }
.sgal-lb__progress span { display: block; height: 100%; width: 0; background: var(--sg-accent); }
@media (max-width: 560px) { .sgal-lb__nav { width: 40px; height: 40px; margin-top: -20px; } .sgal-lb__thumbs button { width: 52px; height: 40px; } }
@media (prefers-reduced-motion: reduce) { .sgal .sgal__link img, .sgal__cap, .sgal__play, .sgal-lb__media img, .sgal-album__cover img { transition: none; } }
