/* s-media.css — media family home sections: stories circles, video hero, gallery, ggallery, instagram, stagger, feature tabs.
   Shared players (reels, video modal, stories viewer) live in media.css. */

/* ---------- stories (circles) ---------- */
.st { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--c-border) transparent; }
.st > :first-child { margin-inline-start: auto; }
.st > :last-child { margin-inline-end: auto; }
.hide-scrollbar .st { scrollbar-width: none; }
.hide-scrollbar .st::-webkit-scrollbar { display: none; }
.st__item { flex: none; display: grid; justify-items: center; align-content: start; gap: 8px; width: calc(var(--st-size, 76px) + 14px); scroll-snap-align: start; text-align: center; }
.st__ring { display: block; padding: 3px; border-radius: 50%; background: linear-gradient(45deg, var(--st-ring1, #f59e0b), var(--st-ring2, var(--c-primary))); transition: transform .25s var(--ease); }
.st__item:hover .st__ring { transform: scale(1.05); }
.st__item.is-seen .st__ring { background: var(--c-border); }
.st__img { display: grid; place-items: center; width: var(--st-size, 76px); height: var(--st-size, 76px); overflow: hidden; border: 3px solid var(--c-bg); border-radius: 50%; background: var(--c-surface); color: var(--c-muted); }
.st__img img { width: 100%; height: 100%; object-fit: cover; }
.st__label { max-width: 100%; overflow: hidden; color: var(--st-label, var(--c-text)); font-size: .8125rem; font-weight: 600; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.st__item.is-seen .st__label { opacity: .7; }

/* ---------- video hero ---------- */
/* height follows the recommended video sizes (768×566 mobile, 1669×771 desktop); min-height so the copy can grow */
.vh { position: relative; isolation: isolate; display: grid; align-items: center; min-height: max(340px, calc(100vw * 566 / 768)); overflow: hidden; background: #0f1115; color: #fff; }
@media (min-width: 768px) { .vh { min-height: min(calc(100vw * 771 / 1669), 88vh); } }
.vh__video { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.vh--shade::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgb(0 0 0 / 62%), rgb(0 0 0 / 22%)); }
.vh__copy { display: grid; justify-items: center; gap: 16px; padding-block: 40px; text-align: center; }
.vh__title { max-width: 920px; color: var(--vh-title, #fff); font-size: clamp(1.6rem, 1rem + 3vw, 3.25rem); line-height: 1.3; }
.vh__words { color: var(--vh-word, color-mix(in srgb, var(--c-primary) 30%, #fff)); }
.vh__words.is-typing::after { content: ""; display: inline-block; width: 3px; height: .85em; margin-inline-start: 4px; border-radius: 2px; background: currentColor; vertical-align: -.06em; animation: vh-caret 1s steps(1) infinite; }
@keyframes vh-caret { 50% { opacity: 0; } }
.vh__sub { max-width: 640px; color: var(--vh-sub, rgb(255 255 255 / 88%)); font-size: clamp(.9375rem, .85rem + .4vw, 1.125rem); white-space: pre-line; }
.vh__btn { --btn-bg: #fff; --btn-fg: #111827; }
.vh__hint { padding: 8px 16px; border: 1px dashed rgb(255 255 255 / 50%); border-radius: var(--radius-sm); font-size: .875rem; }
.vh__toggle { position: absolute; z-index: 2; inset-block-end: 14px; inset-inline-end: 14px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgb(0 0 0 / 35%); color: #fff; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.vh__toggle .ic { width: 18px; height: 18px; }

/* ---------- gallery (photo collection) ---------- */
.gl__item { position: relative; display: block; }
.gl__media { display: block; aspect-ratio: 400 / 533; overflow: hidden; border-radius: var(--radius); background: var(--c-surface); }
.gl__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
a.gl__item:hover .gl__media img { transform: scale(1.05); }
.gl__cap { display: grid; gap: 2px; padding-block-start: 10px; text-align: var(--gl-align, center); }
.gl__title { color: var(--gl-title, var(--c-text)); font-size: .9375rem; font-weight: 700; line-height: 1.35; }
.gl__sub { color: var(--gl-sub, var(--c-muted)); font-size: .8125rem; }
.gl--overlay .gl__item { overflow: hidden; border-radius: var(--radius); }
.gl--overlay .gl__cap { position: absolute; z-index: 1; inset-inline: 0; inset-block-end: 0; padding: 44px 14px 14px; }
.gl--overlay:not(.gl--no-shade) .gl__cap { background: linear-gradient(0deg, rgb(0 0 0 / 62%), transparent); }
.gl--overlay .gl__title { color: var(--gl-title, #fff); }
.gl--overlay .gl__sub { color: var(--gl-sub, rgb(255 255 255 / 86%)); }
.s--gallery.gl-merge:not(.s--first) { z-index: 5; margin-block-start: calc(-1 * clamp(40px, 6vw, 96px)); }

/* ---------- ggallery ---------- */
.gg__item { display: flex; flex-direction: column; gap: 12px; color: var(--gg-fg, var(--c-text)); }
.gg__media { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius); background: var(--c-surface); }
.gg__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .5s ease, transform .8s var(--ease); }
.gg__img--alt { opacity: 0; }
@media (hover: hover) {
  .gg__media.has-alt:hover .gg__img--alt { opacity: 1; }
  .gg__media:hover .gg__img { transform: scale(1.03); }
}
.gg__body { display: grid; justify-items: start; gap: 4px; }
.gg__subtitle { font-size: .8125rem; font-weight: 600; opacity: .7; }
.gg__title { font-size: 1rem; line-height: 1.4; }
.gg__des { font-size: .875rem; opacity: .85; white-space: pre-line; }
.gg__btn { margin-block-start: 6px; padding-block-end: 2px; border-bottom: 2px solid currentColor; color: var(--gg-btn, var(--c-text)); font-size: .875rem; font-weight: 700; transition: background .2s, color .2s; }
.gg__btn--full { padding: .5em 1.3em; border: 1.5px solid currentColor; border-radius: var(--pill); }
.gg__btn--full:hover { background: var(--gg-btn, var(--c-text)); color: #fff; }

/* ---------- instagram gallery ---------- */
.ig__acc { display: flex; align-items: center; gap: 8px; width: fit-content; margin: -8px auto 20px; font-weight: 700; transition: color .2s; }
.ig__acc:hover { color: var(--c-primary); }
.ig__grid { display: grid; grid-template-columns: repeat(var(--ig-xs, 3), minmax(0, 1fr)); gap: 6px; }
@media (min-width: 768px) { .ig__grid { grid-template-columns: repeat(var(--ig-md, 4), minmax(0, 1fr)); gap: 10px; } }
@media (min-width: 1200px) { .ig__grid { grid-template-columns: repeat(var(--ig-xl, 6), minmax(0, 1fr)); } }
.ig__item { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: var(--radius-sm); background: var(--c-surface); }
.ig__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.ig__icon { position: absolute; inset: 0; display: grid; place-items: center; background: rgb(0 0 0 / 35%); color: #fff; opacity: 0; transition: opacity .25s; }
.ig__icon .ic { width: 28px; height: 28px; }
a.ig__item:hover .ig__icon, a.ig__item:focus-visible .ig__icon { opacity: 1; }
a.ig__item:hover img { transform: scale(1.06); }

/* ---------- stagger showcase ---------- */
.stg { --stg-off: clamp(28px, 5vw, 72px); }
.stg__col { display: grid; align-content: start; gap: var(--gap); }
.stg .cr__track > :nth-child(even) { padding-block-start: var(--stg-off); }
.stg__media { display: block; aspect-ratio: 400 / 520; overflow: hidden; border-radius: var(--radius); background: var(--c-surface); }
.stg__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
a.stg__media:hover img { transform: scale(1.04); }
.stg__card { display: grid; gap: 8px; padding: clamp(16px, 2vw, 24px); border-radius: var(--radius); background: var(--stg-bg, var(--c-surface)); }
.stg__title { color: var(--stg-title, var(--c-text)); font-size: 1.0625rem; }
.stg__desc { color: var(--stg-desc, var(--c-muted)); font-size: .875rem; white-space: pre-line; }

/* ---------- feature image tabs ---------- */
.fit { display: grid; gap: clamp(18px, 3vw, 44px); align-items: center; }
.fit__media { position: relative; height: var(--fit-h-m, 280px); overflow: hidden; border-radius: var(--radius); background: var(--c-surface); }
.fit--m-bottom .fit__media { order: 2; }
.fit__img { position: absolute; inset: 0; opacity: 0; transform: scale(1.04); transition: opacity .6s ease, transform 1.2s var(--ease); }
.fit__img.is-active { opacity: 1; transform: none; }
.fit__img img { width: 100%; height: 100%; object-fit: cover; }
.fit__list { display: grid; gap: 10px; }
.fit__item { border: 1px solid var(--fit-bd, var(--c-border)); border-radius: var(--radius-sm); background: var(--fit-bg, transparent); color: var(--fit-fg, var(--c-text)); transition: background .25s, border-color .25s, color .25s; }
.fit__item.is-active { border-color: var(--fit-a-bd, var(--c-primary)); background: var(--fit-a-bg, var(--c-primary-soft)); color: var(--fit-a-fg, var(--c-text)); }
.fit__q { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 16px 18px; font-size: 1rem; font-weight: 700; text-align: start; }
.fit__chev { width: 18px; height: 18px; transition: transform .25s; }
.is-active .fit__chev { transform: rotate(180deg); }
.fit__a { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows .35s var(--ease), visibility .35s; }
.is-active > .fit__a { grid-template-rows: 1fr; visibility: visible; }
.fit__a > div { overflow: hidden; }
.fit__a p { padding: 0 18px 16px; font-size: .9rem; opacity: .85; white-space: pre-line; }
@media (min-width: 992px) {
  .fit { grid-template-columns: 1fr 1fr; grid-template-areas: "media list"; }
  .fit__media { grid-area: media; order: 0; height: var(--fit-h, 520px); }
  .fit__list { grid-area: list; }
  /* media_position_desktop is physical (left/right of the items) */
  [dir="rtl"] .fit--d-left .fit, [dir="ltr"] .fit--d-right .fit { grid-template-areas: "list media"; }
}
