/* Harong Gallery — dedicated thumbnail-first media library */
.gallery-page-body { background: #120b07; }
.gallery-page-body.modal-open { overflow: hidden; }
.gallery-page-main { min-height: 100vh; }
.gallery-page-hero {
  padding: 170px 0 76px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 78% 20%, rgba(226,173,97,.13), transparent 30%),
    linear-gradient(135deg, #21140d 0%, #120b07 68%);
}
.gallery-page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 0 65%, rgba(255,255,255,.018));
}
.gallery-page-hero-inner { position: relative; z-index: 1; max-width: 850px; }
.gallery-page-hero h1 { margin: 0; font: 700 clamp(48px, 6vw, 86px)/.98 var(--serif); letter-spacing: -.04em; }
.gallery-page-hero p:not(.eyebrow) { max-width: 720px; color: var(--muted); font-size: 17px; line-height: 1.75; margin: 26px 0 0; }
.gallery-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 30px; }
.gallery-meta span { border: 1px solid var(--line); background: rgba(255,255,255,.025); padding: 9px 13px; border-radius: 999px; color: rgba(255,255,255,.64); font-size: 11px; letter-spacing: .05em; }

.gallery-subnav-wrap { position: sticky; top: 74px; z-index: 40; background: rgba(13,8,5,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); }
.gallery-subnav { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.gallery-subnav-copy { color: var(--muted); font-size: 12px; letter-spacing: .04em; }
.gallery-tabs { display: inline-flex; gap: 6px; padding: 5px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.02); }
.gallery-tab { border: 0; border-radius: 999px; padding: 10px 20px; background: transparent; color: var(--muted); cursor: pointer; font-weight: 800; font-size: 12px; letter-spacing: .07em; transition: .25s ease; }
.gallery-tab:hover { color: var(--cream); }
.gallery-tab.is-active { color: var(--ink); background: var(--gold); box-shadow: 0 8px 22px rgba(184,121,50,.18); }

.gallery-library { padding: 72px 0 110px; }
.gallery-panel[hidden] { display: none !important; }
.gallery-panel-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 32px; }
.gallery-panel-head h2 { font-size: clamp(34px, 4vw, 54px); }
.gallery-panel-head p { max-width: 560px; margin: 0; color: var(--muted); line-height: 1.7; }

.photo-library-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.gallery-photo-card { position: relative; border: 1px solid var(--line); background: #0c0806; padding: 0; cursor: zoom-in; overflow: hidden; aspect-ratio: 4/5; box-shadow: 0 18px 38px rgba(0,0,0,.18); }
.gallery-photo-card:nth-child(3n+2) { aspect-ratio: 1/1; }
.gallery-photo-card:nth-child(5n) { aspect-ratio: 5/6; }
.gallery-photo-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .65s ease, filter .35s ease; }
.gallery-photo-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 48%, rgba(10,6,3,.84)); pointer-events: none; }
.gallery-photo-card span { position: absolute; z-index: 2; left: 16px; right: 16px; bottom: 15px; text-align: left; font: 700 17px/1.15 var(--serif); color: var(--cream); }
.gallery-photo-card:hover img { transform: scale(1.035); filter: saturate(1.04); }
.gallery-photo-card:hover { border-color: rgba(226,173,97,.58); }

.video-library-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; }
.gallery-video-card { position: relative; min-width: 0; border: 1px solid var(--line); background: #0c0806; padding: 0; cursor: pointer; overflow: hidden; aspect-ratio: 4/5; box-shadow: 0 22px 50px rgba(0,0,0,.22); text-align: left; }
.gallery-video-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease, filter .35s ease; }
.gallery-video-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,6,3,.03) 30%, rgba(10,6,3,.88) 100%); pointer-events: none; }
.video-play-badge { position: absolute; z-index: 3; inset: 50% auto auto 50%; transform: translate(-50%,-50%); width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255,255,255,.5); background: rgba(18,11,7,.66); backdrop-filter: blur(8px); box-shadow: 0 12px 35px rgba(0,0,0,.32); transition: .25s ease; }
.video-play-badge svg { width: 20px; height: 20px; margin-left: 3px; fill: var(--cream); }
.video-card-copy { position: absolute; z-index: 3; left: 20px; right: 20px; bottom: 18px; display: grid; gap: 5px; }
.video-card-copy small { color: var(--gold); font-size: 9px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.video-card-copy strong { font: 700 22px/1.05 var(--serif); color: var(--cream); }
.gallery-video-card:hover img { transform: scale(1.035); filter: saturate(1.06); }
.gallery-video-card:hover { border-color: rgba(226,173,97,.62); }
.gallery-video-card:hover .video-play-badge { transform: translate(-50%,-50%) scale(1.08); background: rgba(226,173,97,.88); }
.gallery-video-card:hover .video-play-badge svg { fill: var(--ink); }

.gallery-modal { position: fixed; inset: 0; z-index: 600; display: none; align-items: center; justify-content: center; padding: 34px; background: rgba(6,4,3,.94); backdrop-filter: blur(16px); }
.gallery-modal.is-open { display: flex; }
.gallery-modal-stage { position: relative; width: min(1100px, 92vw); max-height: 88vh; display: grid; place-items: center; }
.gallery-photo-modal img { display: block; max-width: 100%; max-height: 84vh; width: auto; height: auto; object-fit: contain; box-shadow: 0 28px 90px rgba(0,0,0,.55); }
.gallery-video-modal .gallery-modal-stage { width: min(760px, 92vw); }
.gallery-video-modal video { display: block; width: 100%; max-height: 84vh; background: #000; box-shadow: 0 28px 90px rgba(0,0,0,.55); }
.gallery-modal-close, .gallery-modal-nav { position: fixed; z-index: 602; display: grid; place-items: center; border: 1px solid rgba(226,173,97,.38); background: rgba(18,11,7,.82); color: var(--cream); cursor: pointer; backdrop-filter: blur(8px); transition: .2s ease; }
.gallery-modal-close { top: 22px; right: 22px; width: 48px; height: 48px; border-radius: 50%; font-size: 28px; line-height: 1; }
.gallery-modal-nav { top: 50%; width: 52px; height: 70px; transform: translateY(-50%); border-radius: 999px; font-size: 34px; font-family: var(--serif); }
.gallery-modal-prev { left: 22px; }
.gallery-modal-next { right: 22px; }
.gallery-modal-close:hover, .gallery-modal-nav:hover { background: var(--gold); color: var(--ink); }
.gallery-modal-caption { margin-top: 12px; color: var(--muted); font-size: 12px; text-align: center; }

@media (max-width: 1080px) {
  .photo-library-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .video-library-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .gallery-page-hero { padding: 132px 0 58px; }
  .gallery-subnav-wrap { top: 74px; }
  .gallery-subnav { min-height: 76px; align-items: stretch; justify-content: center; flex-direction: column; padding-block: 10px; gap: 7px; }
  .gallery-subnav-copy { display: none; }
  .gallery-tabs { width: 100%; }
  .gallery-tab { flex: 1; }
  .gallery-library { padding: 58px 0 84px; }
  .gallery-panel-head { display: grid; gap: 12px; margin-bottom: 24px; }
  .photo-library-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .gallery-photo-card, .gallery-photo-card:nth-child(3n+2), .gallery-photo-card:nth-child(5n) { aspect-ratio: 4/5; }
  .video-library-grid { grid-template-columns: 1fr; gap: 14px; }
  .gallery-video-card { aspect-ratio: 4/5; max-height: 680px; }
  .gallery-modal { padding: 16px; }
  .gallery-modal-close { top: 14px; right: 14px; width: 44px; height: 44px; }
  .gallery-modal-nav { width: 44px; height: 58px; font-size: 28px; }
  .gallery-modal-prev { left: 8px; }
  .gallery-modal-next { right: 8px; }
}
@media (max-width: 430px) {
  .photo-library-grid { grid-template-columns: 1fr 1fr; }
  .gallery-photo-card span { font-size: 14px; left: 12px; bottom: 11px; }
  .gallery-video-card { aspect-ratio: 4/5; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-photo-card img, .gallery-video-card img, .video-play-badge { transition: none !important; }
}
