/* ══════════════════════════════════════════════════════════════════════════
   Videos (2026-11-04): the college's own YouTube videos in the site's own
   player. Cards (VideoCard.astro), the player dialog (VideoPlayer.astro), the
   /videos page, the "watch" block inside a news story and the rail on /news.

   Same world as the news feed: white posts on the warm canvas, navy ink, the
   crimson action. The poster is the hero; type stays the site's system stack.
   Motion: one ease (0.16, 1, 0.3, 1), transforms only, off under reduced motion.
   ══════════════════════════════════════════════════════════════════════════ */

.vc { --vc-r: 18px; position: relative; min-width: 0; }
.vc__media { position: relative; }
.vc__play {
  position: relative; display: block; overflow: hidden; border-radius: var(--vc-r);
  background: #0E1733; color: #fff; text-decoration: none; isolation: isolate;
  box-shadow: 0 1px 2px rgba(12, 26, 56, 0.08), 0 14px 34px -18px rgba(12, 26, 56, 0.45);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.vc--short .vc__play { aspect-ratio: 9 / 16; }
.vc--film .vc__play { aspect-ratio: 16 / 9; }
.vc__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
.vc__shade {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(8, 14, 34, 0) 52%, rgba(8, 14, 34, 0.62) 100%);
}
.vc__kind, .vc__time {
  position: absolute; z-index: 2; pointer-events: none; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.02em; line-height: 1;
  padding: 6px 9px; border-radius: 999px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.vc__kind { top: 10px; left: 10px; background: rgba(255, 255, 255, 0.86); color: #13234B; }
.vc__time { right: 10px; bottom: 10px; background: rgba(8, 14, 34, 0.66); color: #fff; }
.vc--soon .vc__time { background: #C41E3A; }
.vc__btn {
  position: absolute; z-index: 2; left: 50%; top: 50%; width: 62px; height: 62px; margin: -31px 0 0 -31px;
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(255, 255, 255, 0.24); border: 1px solid rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px) saturate(1.3); -webkit-backdrop-filter: blur(10px) saturate(1.3);
  box-shadow: 0 10px 30px -8px rgba(8, 14, 34, 0.55);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), background 0.25s;
}
.vc__btn svg { width: 26px; height: 26px; fill: #fff; margin-left: 3px; }
.vc--soon .vc__btn { opacity: 0.8; }
.vc__play:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(12, 26, 56, 0.08), 0 24px 44px -20px rgba(12, 26, 56, 0.55); }
.vc__play:hover .vc__poster { transform: scale(1.035); }
.vc__play:hover .vc__btn { transform: scale(1.08); background: #C41E3A; border-color: #C41E3A; }
.vc__media:hover .vc__kind, .vc__media:hover .vc__time { transform: translateY(-4px); }
.vc__kind, .vc__time { transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
.vc__play:focus-visible { outline: 3px solid var(--ice-color-action, #C41E3A); outline-offset: 3px; }
.vc__text { padding: 10px 2px 0; }
.vc__title { margin: 0; font-size: 1rem; font-weight: 800; line-height: 1.35; color: var(--ice-color-text, #17181C); text-wrap: pretty; }
.vc__title[lang="ne"] { font-family: "Noto Sans Devanagari", "Nirmala UI", Mangal, sans-serif !important; font-weight: 700; line-height: 1.4; }
.vc__en { margin: 3px 0 0; font-size: 0.86rem; line-height: 1.4; color: var(--ice-color-text-muted, #5A6478); }
.vc--rail { width: 188px; flex: 0 0 auto; scroll-snap-align: start; }
.vc--rail.vc--film { width: 300px; }
.vc--rail .vc__title { font-size: 0.92rem; }
.vc--feature { --vc-r: 24px; }
.vc--feature .vc__btn { width: 84px; height: 84px; margin: -42px 0 0 -42px; }
.vc--feature .vc__btn svg { width: 34px; height: 34px; }
.vc--feature .vc__text { display: none; }
.vc--inline { --vc-r: 14px; width: 132px; flex: 0 0 auto; }
.vc--inline .vc__text, .vc--inline .vc__kind { display: none; }
.vc--inline .vc__btn { width: 46px; height: 46px; margin: -23px 0 0 -23px; }
.vc--inline .vc__btn svg { width: 20px; height: 20px; }
@media (prefers-reduced-motion: reduce) {
  .vc__play, .vc__poster, .vc__btn, .vc__kind, .vc__time { transition: none; }
  .vc__media:hover .vc__kind, .vc__media:hover .vc__time { transform: none; }
  .vc__play:hover, .vc__play:hover .vc__poster, .vc__play:hover .vc__btn { transform: none; }
}

/* ── The player dialog ──────────────────────────────────────────────────── */
.vp {
  width: min(1080px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px);
  position: fixed; inset: 0; margin: auto; height: fit-content;
  padding: 0; border: 0; border-radius: 26px; overflow: hidden;
  background: var(--ice-color-surface, #fff); color: var(--ice-color-text, #17181C);
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.6);
}
.vp[open] { display: grid; grid-template-columns: minmax(0, 1fr) 360px; animation: vp-in 0.38s cubic-bezier(0.16, 1, 0.3, 1); }
.vp::backdrop { background: rgba(6, 10, 26, 0.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
@keyframes vp-in { from { opacity: 0; transform: translateY(18px) scale(0.98); } to { opacity: 1; transform: none; } }
.vp__frame { position: relative; background: #05080F; display: grid; place-items: center; min-height: 0; }
.vp__screen { position: relative; width: 100%; }
.vp--short .vp__screen { width: auto; height: min(78dvh, 760px); aspect-ratio: 9 / 16; }
.vp--film .vp__screen { aspect-ratio: 16 / 9; }
.vp__screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vp__soon { position: absolute; inset: 0; }
.vp__soon img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.85) brightness(0.7); }
.vp__soonbox {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: max-content; max-width: 88%;
  display: grid; gap: 4px; text-align: center; padding: 18px 22px; border-radius: 18px;
  background: rgba(8, 14, 34, 0.66); color: #fff; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.vp__soonlabel { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #F0A97A; }
.vp__soonwhen { font-size: 1.35rem; font-weight: 850; letter-spacing: -0.01em; }
.vp__soonnote { font-size: 0.8rem; opacity: 0.8; }
.vp__nav {
  position: absolute; top: 50%; width: 44px; height: 44px; margin-top: -22px; border: 0; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; background: rgba(255, 255, 255, 0.14); color: #fff;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: background 0.2s;
}
.vp__nav:hover { background: rgba(255, 255, 255, 0.28); }
.vp__nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.vp__nav[hidden] { display: none; }
.vp__nav--prev { left: 14px; }
.vp__nav--next { right: 14px; }
.vp__side { display: flex; flex-direction: column; gap: 10px; padding: 18px 22px 22px; overflow-y: auto; min-height: 0; }
.vp__top { display: flex; align-items: center; justify-content: space-between; }
.vp__count { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.06em; color: var(--ice-color-text-muted, #5A6478); }
.vp__close {
  width: 38px; height: 38px; border: 0; border-radius: 50%; cursor: pointer; display: grid; place-items: center;
  background: color-mix(in srgb, var(--ice-color-text, #17181C) 8%, transparent); color: var(--ice-color-text, #17181C);
}
.vp__close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.vp__title { margin: 4px 0 0; font-size: 1.35rem; font-weight: 850; line-height: 1.3; letter-spacing: -0.01em; }
.vp__title[lang="ne"] { font-family: "Noto Sans Devanagari", "Nirmala UI", Mangal, sans-serif !important; font-weight: 700; line-height: 1.38; }
.vp__en { margin: 0; font-weight: 650; color: var(--ice-color-text-muted, #5A6478); }
.vp__meta { margin: 0; font-size: 0.82rem; font-weight: 750; color: var(--ice-color-text-action, #C41E3A); }
.vp__dek { margin: 2px 0 4px; font-size: 0.95rem; line-height: 1.6; }
.vp__label { margin: 8px 0 6px; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ice-color-text-muted, #5A6478); }
.vp__news { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.vp__news a, .vwf__read a {
  display: grid; gap: 4px; padding: 10px 12px; border-radius: 14px; text-decoration: none; color: var(--ice-color-text, #17181C);
  background: color-mix(in srgb, var(--ice-color-text, #17181C) 5%, transparent); font-weight: 700; line-height: 1.35; font-size: 0.92rem;
  transition: background 0.2s;
}
.vp__news a:hover, .vwf__read a:hover { background: color-mix(in srgb, var(--vp-field, #2F5BA8) 14%, transparent); }
.vp__sec {
  justify-self: start; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 7px; border-radius: 6px; color: #fff; background: var(--vp-field, #2F5BA8);
}
.vp__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.vp__links a { font-weight: 750; color: var(--ice-color-text-action, #C41E3A); }
.vp__actions { margin-top: auto; padding-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.vp__actions a, .vp__actions button {
  flex: 1 1 auto; text-align: center; padding: 11px 14px; border-radius: 999px; font: inherit; font-weight: 800; font-size: 0.88rem;
  text-decoration: none; cursor: pointer; border: 1.5px solid color-mix(in srgb, var(--ice-color-text, #17181C) 18%, transparent);
  background: transparent; color: var(--ice-color-text, #17181C);
}
.vp__actions .vp__sub { background: #C41E3A; border-color: #C41E3A; color: #fff; }
@media (max-width: 860px) {
  .vp { width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; }
  .vp[open] { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .vp--short .vp__screen { height: min(62dvh, 680px); }
  .vp__nav { width: 38px; height: 38px; margin-top: -19px; }
  .vp__nav--prev { left: 8px; }
  .vp__nav--next { right: 8px; }
}
@media (prefers-reduced-motion: reduce) { .vp[open] { animation: none; } .page-videos .vwf__play { transition: none; } .page-videos .vwf__play:hover { transform: none; } }

/* ── /videos ───────────────────────────────────────────────────────────── */
.page-videos .vw { --vw-max: 1180px; }
.page-videos .vwh, .page-videos .vwf, .page-videos .vws, .page-videos .vwr, .page-videos .vwb {
  max-width: var(--vw-max); margin-left: auto; margin-right: auto; padding-left: 20px; padding-right: 20px;
}
.page-videos .vwh { padding-top: 28px; }
.page-videos .vwh__title {
  margin: 0; font-size: clamp(2.1rem, 5.6vw, 3.6rem); font-weight: 850; letter-spacing: -0.04em; line-height: 1;
  text-wrap: balance; color: var(--ice-color-text);
}
.page-videos .vwh__sub { margin: 14px 0 0; max-width: 62ch; font-size: 1.05rem; line-height: 1.6; color: var(--ice-color-text-muted); }
.page-videos .vwh__row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 18px 0 0; }
.page-videos .vwh__sub-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 999px;
  background: #C41E3A; color: #fff; font-weight: 800; font-size: 0.92rem; text-decoration: none;
  box-shadow: 0 12px 26px -14px rgba(196, 30, 58, 0.8);
}
.page-videos .vwh__sub-btn svg { width: 20px; height: 20px; fill: currentColor; }
.page-videos .vwh__count { font-size: 0.9rem; font-weight: 700; color: var(--ice-color-text-muted); }

.page-videos .vwf {
  display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: clamp(20px, 4vw, 56px); align-items: center;
  margin-top: 30px; padding-top: 28px; padding-bottom: 28px; border-radius: 30px;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(47, 91, 168, 0.12), transparent 60%),
    radial-gradient(90% 80% at 100% 100%, rgba(196, 30, 58, 0.08), transparent 60%),
    var(--ice-color-surface, #fff);
  box-shadow: 0 1px 2px rgba(12, 26, 56, 0.06), 0 30px 60px -40px rgba(12, 26, 56, 0.35);
}
.page-videos .vwf--film { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.page-videos .vwf__kicker { margin: 0 0 8px; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ice-color-text-action, #C41E3A); }
.page-videos .vwf__title { margin: 0; font-size: clamp(1.7rem, 3.6vw, 2.6rem); line-height: 1.25; font-weight: 800; color: var(--ice-color-text); }
.page-videos .vwf__title[lang="ne"] { font-family: "Noto Sans Devanagari", "Nirmala UI", Mangal, sans-serif !important; font-weight: 700; }
.page-videos .vwf__en { margin: 6px 0 0; font-size: 1.08rem; font-weight: 700; color: var(--ice-color-text-muted); }
.page-videos .vwf__dek { margin: 14px 0 0; max-width: 56ch; font-size: 1.02rem; line-height: 1.65; color: var(--ice-color-text); }
.page-videos .vwf__play {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; padding: 13px 22px; border-radius: 999px;
  background: var(--ice-color-text, #13234B); color: var(--ice-color-surface, #fff); font-weight: 800; text-decoration: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.page-videos .vwf__play:hover { transform: translateY(-2px); }
.page-videos .vwf__play svg { width: 20px; height: 20px; fill: currentColor; }
.page-videos .vwf__read { margin-top: 22px; }
.page-videos .vwf__label { margin: 0 0 8px; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ice-color-text-muted); }
.page-videos .vwf__read ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.page-videos .vwf__read .vp__sec { margin-bottom: 2px; }

.page-videos .vws { margin-top: 44px; }
.page-videos .vws__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-bottom: 16px; }
.page-videos .vws__title { margin: 0; font-size: 1.6rem; font-weight: 850; letter-spacing: -0.02em; color: var(--ice-color-text); }
.page-videos .vws__note { margin: 0; font-size: 0.92rem; color: var(--ice-color-text-muted); }
.page-videos .vws__grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px 22px; grid-template-columns: repeat(auto-fill, minmax(220px, 268px)); }
.page-videos .vws__grid--films { grid-template-columns: repeat(auto-fill, minmax(320px, 460px)); }
.page-videos .vws__dek { margin: 8px 2px 0; font-size: 0.88rem; line-height: 1.55; color: var(--ice-color-text-muted); }
.page-videos .vws__story { display: inline-block; margin: 8px 2px 0; font-size: 0.86rem; font-weight: 750; line-height: 1.4; color: var(--ice-color-text-action, #C41E3A); }
.page-videos .vwr { margin-top: 48px; }
.page-videos .vwb { margin-top: 40px; }
@media (max-width: 720px) {
  .page-videos .vwf, .page-videos .vwf--film { grid-template-columns: 1fr; border-radius: 0; margin-top: 22px; }
  .page-videos .vwf__media { max-width: 300px; }
  .page-videos .vwf--film .vwf__media { max-width: none; }
  .page-videos .vws__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; }
  .page-videos .vws__grid--films { grid-template-columns: 1fr; }
  .page-videos .vws__grid:not(.vws__grid--films) .vws__dek { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
}

/* ── Inside a news story: the video that goes with it ──────────────────── */
.page-news .nwv {
  display: flex; gap: 16px; align-items: center; margin: 6px 0 26px; padding: 12px; border-radius: 20px;
  background: color-mix(in srgb, var(--nwc-field, #2F5BA8) 9%, var(--ice-color-surface, #fff));
  border: 1px solid color-mix(in srgb, var(--nwc-field, #2F5BA8) 22%, transparent);
}
.page-news .nwv__label { display: block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ice-color-text-muted); }
.page-news .nwv__title { margin: 4px 0 0; font-size: 1.12rem; font-weight: 700; line-height: 1.4; color: var(--ice-color-text); }
.page-news .nwv__title[lang="ne"] { font-family: "Noto Sans Devanagari", "Nirmala UI", Mangal, sans-serif !important; }
.page-news .nwv__meta { margin: 4px 0 0; font-size: 0.88rem; color: var(--ice-color-text-muted); line-height: 1.45; }
.page-news .nwv__go { display: inline-block; margin-top: 8px; font-weight: 800; font-size: 0.9rem; color: var(--ice-color-text-action, #C41E3A); }

/* ── On /news: the videos rail ─────────────────────────────────────────── */
.page-news .nwvr { max-width: calc(var(--nw-col, 680px) + 40px); margin: 18px auto 4px; padding: 0 20px; }
.page-news .nwvr__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.page-news .nwvr__title { margin: 0; font-size: 1.12rem; font-weight: 800; letter-spacing: -0.01em; color: var(--ice-color-text); }
.page-news .nwvr__more { font-weight: 750; font-size: 0.9rem; color: var(--ice-color-text-action, #C41E3A); white-space: nowrap; }
.page-news .nwvr__list {
  list-style: none; margin: 0; padding: 4px 2px 14px; display: flex; gap: 14px; overflow-x: auto;
  scroll-snap-type: x mandatory; scrollbar-width: thin;
}
.page-news .nwvr__list > li { flex: 0 0 auto; }
