/* ==========================================================================
   SunTeam v2 — Sun Media (video archive, photo gallery, podcasts)
   builds on unit.css
   ========================================================================== */
.md { overflow-x: clip; }

/* ---------- hero: dark cinema stage ---------- */
.md-hero { position: relative; padding: 18px 0 56px; color: #fff; background: #0E1014; overflow: hidden; isolation: isolate; }
.md-hero .crumbs-row, .md-hero .crumbs-row a { color: rgba(255,255,255,.6); }
.md-hero .crumbs-row span { color: #fff; }
.md-hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.md-hero-bg i { position: absolute; border-radius: 50%; filter: blur(110px); }
.md-hero-bg i:nth-child(1) { width: 560px; height: 560px; background: rgba(79,195,247,.35); top: -200px; left: -160px; animation: md-drift 16s ease-in-out infinite; }
.md-hero-bg i:nth-child(2) { width: 460px; height: 460px; background: rgba(255,212,0,.28); bottom: -220px; right: 6%; animation: md-drift 20s ease-in-out infinite reverse; }
.md-hero-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 44px; align-items: center; margin-top: 20px; }
.md-copy { display: flex; flex-direction: column; gap: 16px; }
.md-copy .eyebrow { background: rgba(255,255,255,.1); color: var(--sun-300, #FFE45C); }
.md-tagline { font-size: var(--fs-lg); font-weight: 800; line-height: 1.8; margin: -4px 0 0; }
.md-copy .lead { color: rgba(255,255,255,.7); margin: 0; }
.md-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.md-stats div { padding: 10px 18px; border-radius: 18px; background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.md-stats b { display: block; font-size: var(--fs-xl); font-weight: 900; color: var(--sun-400); line-height: 1.3; }
.md-stats span { font-size: var(--fs-xs); color: rgba(255,255,255,.65); }
.md-copy .hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

.md-stage { position: relative; }
.md-feature { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; border: 0; padding: 0; border-radius: 28px; overflow: hidden; background: #000; cursor: pointer; box-shadow: 0 50px 100px -40px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.08); }
.md-feature img, .md-feature video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.md-feature:hover img, .md-feature:hover video { transform: scale(1.04); }
.md-feature-shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,0) 55%); }
.md-feature-meta { position: absolute; inset-inline: 22px; bottom: 20px; display: flex; flex-direction: column; gap: 6px; text-align: start; color: #fff; }
.md-feature-meta b { font-size: var(--fs-xl); font-weight: 900; }
.md-feature-meta small { color: rgba(255,255,255,.7); }
.md-chip { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--sun-400); color: #111318; font-size: var(--fs-xs); font-weight: 800; }
.md-film { position: absolute; inset-inline: 18px; top: -12px; display: flex; justify-content: space-between; pointer-events: none; }
.md-film i { width: 22px; height: 8px; border-radius: 3px; background: rgba(255,255,255,.18); }

/* play button */
.md-play { position: absolute; top: 50%; left: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; display: grid; place-items: center; color: #111318; background: rgba(255,255,255,.85); backdrop-filter: blur(8px); box-shadow: 0 14px 30px -10px rgba(0,0,0,.6); transition: transform .35s var(--ease), background .35s; z-index: 2; }
.md-play .ic { width: 22px; height: 22px; fill: currentColor; margin-inline-start: 3px; }
.md-play.lg { width: 88px; height: 88px; margin: -44px 0 0 -44px; background: var(--sun-400); }
.md-play.lg .ic { width: 32px; height: 32px; }
.md-play.lg::before, .md-play.lg::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 2px solid rgba(255,212,0,.7); animation: md-ripple 2.6s ease-out infinite; }
.md-play.lg::after { animation-delay: 1.3s; }
.md-feature:hover .md-play, .md-vcard:hover .md-play { transform: scale(1.12); background: var(--sun-400); }

/* ---------- tabs ---------- */
.md-tabs-wrap { position: sticky; top: 86px; z-index: 20; margin-top: -26px; }
.md-tabs { display: flex; gap: 6px; width: fit-content; max-width: 100%; margin-inline: auto; padding: 6px; border-radius: 999px; background: var(--surface); box-shadow: var(--sh-3, 0 20px 40px -20px rgba(17,19,24,.35)), inset 0 0 0 1px var(--line); overflow-x: auto; scrollbar-width: none; }
.md-tabs button { display: inline-flex; align-items: center; gap: 6px; height: 42px; padding-inline: 16px; border: 0; border-radius: 999px; background: none; font: inherit; font-weight: 700; font-size: var(--fs-sm); color: var(--text-3); cursor: pointer; white-space: nowrap; transition: background .2s, color .2s; }
.md-tabs button .num { padding: 1px 8px; border-radius: 999px; background: var(--surface-sunk); font-size: var(--fs-xs); }
.md-tabs button.is-active { background: #111318; color: #fff; }
.md-tabs button.is-active .num { background: var(--sun-400); color: #111318; }
.md-block { scroll-margin-top: 160px; }
.md-block[hidden] { display: none !important; }

/* ---------- video archive ---------- */
.md-videos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.md-vcard { display: flex; flex-direction: column; gap: 10px; padding: 0; border: 0; background: none; font: inherit; text-align: start; cursor: pointer; color: inherit; }
.md-vcard.is-big { grid-column: span 2; grid-row: span 2; }
.md-thumb { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 20px; overflow: hidden; background: #111318; box-shadow: var(--sh-2); }
.md-vcard.is-big .md-thumb { aspect-ratio: auto; flex: 1; min-height: 0; }
.md-thumb img, .md-thumb video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease), filter .4s; }
.md-vcard:hover .md-thumb img, .md-vcard:hover .md-thumb video { transform: scale(1.05); }
.md-thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.55), transparent 50%); pointer-events: none; transition: opacity .3s; }
.md-vcard.is-playing .md-thumb::after, .md-vcard.is-playing .md-play { opacity: 0; }
.md-cat { position: absolute; top: 12px; inset-inline-start: 12px; z-index: 2; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.88); color: #111318; font-size: var(--fs-xs); font-weight: 800; }
.md-dur { position: absolute; bottom: 10px; inset-inline-end: 10px; z-index: 2; padding: 2px 8px; border-radius: 8px; background: rgba(0,0,0,.65); color: #fff; font-size: var(--fs-xs); font-weight: 700; }
.md-dur:empty { display: none; }
.md-vmeta { display: flex; flex-direction: column; gap: 4px; padding-inline: 4px; }
.md-vmeta b { font-weight: 800; line-height: 1.7; }
.md-vcard.is-big .md-vmeta b { font-size: var(--fs-lg); }
.md-vmeta small { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); font-size: var(--fs-xs); }

/* ---------- gallery: masonry ---------- */
.md-masonry { columns: 3 280px; column-gap: 16px; }
.md-photo { position: relative; display: block; width: 100%; margin: 0 0 16px; padding: 0; border: 0; border-radius: 20px; overflow: hidden; break-inside: avoid; cursor: zoom-in; background: var(--surface-sunk); box-shadow: var(--sh-1); }
.md-photo img { display: block; width: 100%; height: auto; transition: transform .8s var(--ease); }
.md-photo:hover img { transform: scale(1.05); }
.md-photo-cap { position: absolute; inset: auto 0 0 0; display: flex; flex-direction: column; gap: 2px; padding: 40px 16px 14px; text-align: start; color: #fff; background: linear-gradient(to top, rgba(0,0,0,.75), transparent); opacity: 0; transform: translateY(10px); transition: all .35s var(--ease); }
.md-photo-cap small { color: rgba(255,255,255,.7); font-size: var(--fs-xs); }
.md-photo:hover .md-photo-cap, .md-photo:focus-visible .md-photo-cap { opacity: 1; transform: none; }
.md-zoom { position: absolute; top: 12px; inset-inline-end: 12px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.9); color: #111318; opacity: 0; transform: scale(.8); transition: all .3s var(--ease); }
.md-photo:hover .md-zoom { opacity: 1; transform: none; }

/* lightbox */
.md-lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(8,9,12,.94); display: none; align-items: center; justify-content: center; }
.md-lightbox[open] { display: flex; }
.md-lightbox::backdrop { background: transparent; }
.md-lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 88vw; }
.md-lightbox img { max-width: 88vw; max-height: 80vh; border-radius: 16px; object-fit: contain; box-shadow: 0 40px 100px -30px rgba(0,0,0,.8); }
.md-lightbox img.in { animation: md-lb-in .45s var(--ease); }
.md-lightbox figcaption { display: flex; gap: 14px; align-items: center; color: #fff; }
.md-lightbox figcaption span { color: rgba(255,255,255,.55); font-size: var(--fs-sm); }
.lb-btn { position: absolute; width: 50px; height: 50px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; transition: background .2s; }
.lb-btn:hover { background: var(--sun-400); color: #111318; }
.lb-x { top: 20px; inset-inline-end: 20px; }
.lb-prev { inset-inline-start: 20px; top: 50%; margin-top: -25px; }
.lb-next { inset-inline-end: 20px; top: 50%; margin-top: -25px; }

/* ---------- podcasts ---------- */
.md-pods { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.md-pod { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 22px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.md-pod-cover { width: 84px; height: 84px; flex: none; border-radius: 18px; overflow: hidden; display: grid; place-items: center; background: var(--amber-soft); color: var(--accent-ink); }
.md-pod-cover img { width: 100%; height: 100%; object-fit: cover; }
.md-pod-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.md-pod-body small { color: var(--text-3); font-size: var(--fs-xs); }
.md-pod audio { width: 100%; height: 36px; margin-top: 4px; }

/* about features */
.md-feat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.md .bn { padding: 16px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.md .bn .u-ico { width: 40px; height: 40px; border-radius: 13px; }
.md .bn b { display: block; margin: 10px 0 4px; font-weight: 800; }
.md .bn p { font-size: var(--fs-sm); color: var(--text-2); line-height: 1.8; }
.md .unit-about { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

@keyframes md-drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(70px, 40px); } }
@keyframes md-ripple { 0% { transform: scale(.85); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes md-lb-in { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .md-hero-bg i, .md-play.lg::before, .md-play.lg::after { animation: none; } }

@media (max-width: 1100px) { .md-videos { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 960px) {
  .md-hero-grid, .md .unit-about { grid-template-columns: 1fr; }
  .md-videos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md-vcard.is-big .md-thumb { min-height: 240px; }
  .md-tabs-wrap { top: 76px; }
}
@media (max-width: 560px) {
  .md-videos { grid-template-columns: 1fr; }
  .md-vcard.is-big { grid-column: auto; grid-row: auto; }
  .md-vcard.is-big .md-thumb { min-height: 0; aspect-ratio: 16 / 10; }
  .md-feat-grid { grid-template-columns: 1fr; }
  .md-play.lg { width: 66px; height: 66px; margin: -33px 0 0 -33px; }
  .lb-prev, .lb-next { top: auto; bottom: 24px; margin: 0; }
  .md-copy .hero-cta .btn { flex: 1; }
}
