/* Rupantaram — gallery page. Builds on reg.css tokens and team.css layout. */
.g-jump { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 22px 0 0; }
.g-jump a { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 24px; border-radius: var(--r-pill); border: 2px solid rgba(255,255,255,.55); color: #fff; font: 800 15px/1 var(--font-head); text-decoration: none; transition: background .25s var(--ease), border-color .25s var(--ease); }
.g-jump a:hover, .g-jump a:focus-visible { background: #f68a4a; border-color: #f68a4a; }

.g-section { margin-top: 44px; scroll-margin-top: 170px; }
.g-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; }
.g-grid.g-videos { grid-template-columns: repeat(3, 1fr); }

.g-tile { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: var(--r-lg); overflow: hidden; background: #0d2b22; cursor: pointer; box-shadow: var(--shadow-card); aspect-ratio: 4 / 3; }
.g-videos .g-tile { aspect-ratio: 16 / 9; }
.g-videos .g-tile.is-short { aspect-ratio: 9 / 16; }
/* A Short's own thumbnail already carries the speaker's nameplate at the bottom. */
.g-tile.is-short .g-cap { display: none; }
/* Only Shorts in the row: tall cards, kept narrow and centred. */
.g-grid.g-shorts { max-width: 780px; margin: 0 auto; }
.g-grid.g-two { grid-template-columns: repeat(2, 1fr); }
.g-section[hidden], .g-jump a[hidden] { display: none; }
.g-tile img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.g-tile:hover img, .g-tile:focus-visible img { transform: scale(1.05); }
.g-tile:focus-visible { outline: 3px solid #f68a4a; outline-offset: 3px; }
.g-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 12px; text-align: left; color: #fff; font: 700 14.5px/1.35 var(--font-head); background: linear-gradient(180deg, transparent, rgba(0,0,0,.78)); }
.g-play { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: #f68a4a; box-shadow: 0 6px 22px rgba(0,0,0,.45); display: grid; place-items: center; transition: transform .25s var(--ease); }
.g-play::before { content: ""; margin-left: 5px; border-style: solid; border-width: 12px 0 12px 20px; border-color: transparent transparent transparent #fff; }
.g-tile:hover .g-play, .g-tile:focus-visible .g-play { transform: scale(1.1); }

.g-empty { margin: 0; padding: 30px 20px; text-align: center; border-radius: var(--r-lg); border: 1px dashed rgba(255,255,255,.35); color: rgba(251,246,234,.85); font-size: 16px; }

/* Popup: a tap anywhere outside the video (or anywhere at all, for a photo) closes it. */
.g-pop { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 56px 14px 20px; background: rgba(4, 16, 12, .92); cursor: pointer; animation: g-in .2s ease both; }
.g-pop-frame { position: relative; width: min(100%, 1040px); max-height: 100%; }
.g-pop-frame.is-video { aspect-ratio: 16 / 9; max-width: min(1040px, calc((100vh - 96px) * 16 / 9)); }
.g-pop-frame.is-short { aspect-ratio: 9 / 16; width: min(100%, 440px, calc((100vh - 110px) * 9 / 16)); }
.g-pop-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 12px; background: #000; }
.g-pop-frame img { display: block; max-width: 100%; max-height: calc(100vh - 110px); margin: 0 auto; border-radius: 12px; }
.g-pop-title { margin: 10px 0 0; text-align: center; color: #fff; font: 600 15px/1.4 var(--font); }
.g-pop-close { position: fixed; top: 12px; right: 14px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.16); color: #fff; font: 400 28px/1 var(--font); cursor: pointer; }
.g-pop-close:hover, .g-pop-close:focus-visible { background: #f68a4a; }
.g-pop-hint { position: fixed; left: 0; right: 0; bottom: 10px; margin: 0; text-align: center; color: rgba(255,255,255,.6); font-size: 13px; pointer-events: none; }
body.g-lock { overflow: hidden; }
@keyframes g-in { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 860px) { .g-grid, .g-grid.g-videos { grid-template-columns: repeat(2, 1fr); } .g-grid.g-shorts { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) {
  .g-grid.g-videos { grid-template-columns: 1fr; }
  .g-grid.g-shorts { grid-template-columns: repeat(2, 1fr); }
  .g-grid { gap: 10px; }
  .g-cap { font-size: 13px; padding: 20px 10px 9px; }
  .g-section { scroll-margin-top: 130px; }
}
@media (prefers-reduced-motion: reduce) { .g-tile img, .g-play, .g-jump a { transition: none; } .g-pop { animation: none; } }
