/* =============================================================
   יום־יומי · vod.css — VOD streaming layout for the video page
   Adapted to our brand: dark surfaces + warm gold accent (no pink).
   Hero banner · horizontal carousels · fixed rabbi sidebar.
   ============================================================= */
:root {
  --vod-accent: #d4a843;
  --vod-accent-2: #f0c668;
  --vod-bg: #08080f;
  --vod-card: #14141f;
}

/* The hub wraps everything in .page (max-width:1080px). The VOD page must
   span the FULL screen width, so lift that cap on this page only. The nav
   keeps its own centered inner width, so only the content area widens. */
body[data-page="video"] .page {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}
/* clip decorative background orbs / nav bleed so the wide layout has no
   stray horizontal scrollbar (carousels keep their own internal scroll) */
html:has(body[data-page="video"]) { overflow-x: clip; }
body[data-page="video"] { overflow-x: clip; }

.vod {
  display: grid;
  grid-template-columns: 312px minmax(0, 1fr); /* sidebar (right in RTL) + main */
  gap: clamp(1rem, 1.8vw, 1.8rem);
  max-width: none;
  width: 100%;
  margin: 0 auto;
  padding: 0 clamp(1rem, 2.5vw, 2.6rem) 4rem;
  box-sizing: border-box;
  align-items: start;
}
@media (max-width: 1024px) { .vod { grid-template-columns: 1fr; } }

/* ---------- HERO ---------- */
.vod-main { min-width: 0; }
.vod-hero {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  min-height: clamp(280px, 26vw, 420px);
  display: flex; align-items: center; justify-content: flex-start;
  margin-bottom: 2rem;
  border: 1px solid rgba(255,255,255,0.07);
}
.vod-hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  animation: vod-kb 24s ease-in-out infinite alternate;
}
@keyframes vod-kb { from { transform: scale(1.05); } to { transform: scale(1.16); } }
.vod-hero-veil {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(to left, rgba(8,8,15,0.45) 0%, rgba(8,8,15,0.82) 52%, rgba(8,8,15,0.97) 100%),
    linear-gradient(to top, rgba(8,8,15,0.9), transparent 55%);
}
.vod-hero-in {
  position: relative; z-index: 2;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  max-width: 560px;
  text-align: right;
}
.vod-crumb { font-size: 0.85rem; color: var(--vod-accent-2); font-weight: 600; margin-bottom: 1rem; }
.vod-crumb b { color: #fff; }
.vod-hero-title {
  font-size: clamp(2rem, 4vw, 3.4rem); font-weight: 900; line-height: 1;
  letter-spacing: -0.02em; color: #fff; margin: 0 0 0.8rem;
}
.vod-hero-sub {
  font-size: clamp(0.95rem, 1.6vw, 1.15rem); color: rgba(255,255,255,0.85);
  line-height: 1.6; margin: 0 0 1.6rem; text-wrap: pretty;
}
.vod-cta {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: linear-gradient(135deg, var(--vod-accent), #b8862a);
  color: #1a1206; font-weight: 800; font-size: 1.02rem;
  padding: 0.85rem 2rem; border-radius: 999px; text-decoration: none;
  box-shadow: 0 10px 30px -8px rgba(212,168,67,0.6);
  transition: transform 0.2s, box-shadow 0.2s;
}
.vod-cta:hover { transform: translateY(-3px); box-shadow: 0 16px 40px -8px rgba(212,168,67,0.7); }

/* ---------- ROW / CAROUSEL ---------- */
.vod-row { margin-bottom: clamp(1.8rem, 3.5vw, 2.8rem); position: relative; }
.vod-row-head {
  display: flex; align-items: center; gap: 0.8rem;
  margin-bottom: 1rem;
}
.vod-row-title {
  font-size: clamp(1.2rem, 2.2vw, 1.7rem); font-weight: 900; color: #fff;
  letter-spacing: -0.01em; position: relative; padding-bottom: 0.4rem;
}
.vod-row-title::after {
  content: ''; position: absolute; bottom: 0; right: 0;
  width: 46px; height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--vod-accent), var(--vod-accent-2));
}
.vod-row-more {
  margin-inline-start: auto; font-size: 0.8rem; font-weight: 700;
  color: var(--vod-accent-2); text-decoration: none;
  border: 1px solid rgba(212,168,67,0.3); padding: 0.35rem 0.9rem; border-radius: 999px;
  transition: background 0.2s;
}
.vod-row-more:hover { background: rgba(212,168,67,0.1); }
.vod-arrows { display: flex; gap: 0.4rem; }
.vod-arrow {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  color: #fff; font-size: 1.1rem; cursor: pointer;
  display: grid; place-items: center; transition: background 0.2s, transform 0.2s;
}
.vod-arrow:hover { background: var(--vod-accent); color: #1a1206; transform: scale(1.08); }

.vod-track {
  display: flex; gap: clamp(0.7rem, 1.4vw, 1.1rem);
  overflow-x: auto; scroll-behavior: smooth;
  padding-bottom: 0.6rem;
  scrollbar-width: thin; scrollbar-color: rgba(212,168,67,0.3) transparent;
  scroll-snap-type: x proximity;
}
.vod-track::-webkit-scrollbar { height: 5px; }
.vod-track::-webkit-scrollbar-thumb { background: rgba(212,168,67,0.3); border-radius: 3px; }

/* ---------- CARD ---------- */
.vod-card {
  flex: 0 0 clamp(150px, 12vw, 196px);
  scroll-snap-align: start;
  background: var(--vod-card);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px; overflow: hidden;
  cursor: pointer; text-align: right;
  padding: 0; font: inherit;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.vod-card:hover {
  transform: translateY(-5px) scale(1.015);
  border-color: rgba(212,168,67,0.45);
  box-shadow: 0 20px 44px rgba(0,0,0,0.55);
}
.vod-thumb {
  position: relative; aspect-ratio: 16/9; background: #0a0a14; overflow: hidden;
}
.vod-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s; }
.vod-card:hover .vod-thumb img { transform: scale(1.06); }
.vod-views {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  background: rgba(0,0,0,0.72); color: #fff; font-size: 0.72rem; font-weight: 700;
  padding: 0.12rem 0.5rem; border-radius: 6px; backdrop-filter: blur(4px);
}
.vod-dur {
  position: absolute; bottom: 8px; left: 8px; z-index: 2;
  background: rgba(212,168,67,0.95); color: #1a1206; font-size: 0.72rem; font-weight: 800;
  padding: 0.1rem 0.45rem; border-radius: 5px;
}
.vod-play {
  position: absolute; inset: 0; display: grid; place-items: center; z-index: 1;
  background: rgba(0,0,0,0.18); opacity: 0; transition: opacity 0.25s;
}
.vod-card:hover .vod-play { opacity: 1; }
.vod-play span {
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(212,168,67,0.95); color: #1a1206;
  display: grid; place-items: center; font-size: 1.2rem; padding-right: 3px;
}
.vod-card-body { padding: 0.7rem 0.85rem 0.9rem; }
.vod-card-title {
  font-size: 0.9rem; font-weight: 600; color: #fff; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.vod-card-date { font-size: 0.74rem; color: #86868b; margin-top: 0.4rem; }

/* ranked row — big number behind/beside card */
.vod-track.ranked { padding-bottom: 1rem; }
.vod-ranked-item { position: relative; display: flex; align-items: flex-end; flex: 0 0 auto; }
.vod-rank-num {
  font-size: clamp(3.5rem, 7vw, 6rem); font-weight: 900; line-height: 0.7;
  color: transparent; -webkit-text-stroke: 2px var(--vod-accent);
  margin-inline-start: -0.3em; align-self: flex-end; padding-bottom: 0.5rem;
  position: relative; z-index: 0; user-select: none;
}
.vod-ranked-item .vod-card { position: relative; z-index: 1; }

/* skeleton */
.vod-skel { background: linear-gradient(110deg, rgba(255,255,255,0.04), rgba(255,255,255,0.08), rgba(255,255,255,0.04)); }
.vod-skel .vod-card-title { opacity: 0.4; }

/* ---------- SIDEBAR ---------- */
.vod-side {
  position: sticky; top: 70px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px; padding: 1rem;
  max-height: calc(100vh - 90px);
  display: flex; flex-direction: column;
}
@media (max-width: 1024px) { .vod-side { position: static; max-height: none; margin-bottom: 2rem; } }
.vod-side-tabs {
  display: flex; gap: 0.3rem; margin-bottom: 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.08); padding-bottom: 0.2rem;
}
.vod-side-tab {
  flex: 1; background: none; border: none; cursor: pointer; font: inherit;
  color: #86868b; font-size: 0.85rem; font-weight: 700; padding: 0.5rem 0.3rem;
  position: relative; transition: color 0.2s;
}
.vod-side-tab.active { color: var(--vod-accent-2); }
.vod-side-tab.active::after {
  content: ''; position: absolute; bottom: -3px; right: 50%; transform: translateX(50%);
  width: 60%; height: 3px; border-radius: 2px; background: var(--vod-accent);
}
.vod-side-search { position: relative; margin-bottom: 0.9rem; }
.vod-side-search input {
  width: 100%; box-sizing: border-box; padding: 0.6rem 2.2rem 0.6rem 0.9rem;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px; color: #f5f5f7; font-family: inherit; font-size: 0.9rem;
}
.vod-side-search input:focus { outline: none; border-color: var(--vod-accent); }
.vod-side-search .ico { position: absolute; top: 50%; right: 0.8rem; transform: translateY(-50%); color: var(--vod-accent); }
.vod-rabbis {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem;
  overflow-y: auto; padding-left: 0.2rem;
  scrollbar-width: thin; scrollbar-color: rgba(212,168,67,0.3) transparent;
}
.vod-rabbis::-webkit-scrollbar { width: 5px; }
.vod-rabbis::-webkit-scrollbar-thumb { background: rgba(212,168,67,0.3); border-radius: 3px; }
.vod-rabbi {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  text-decoration: none; cursor: pointer; padding: 0.5rem 0.2rem; border-radius: 12px;
  transition: background 0.2s;
}
.vod-rabbi:hover { background: rgba(212,168,67,0.07); }
.vod-rabbi-ava {
  width: 60px; height: 60px; border-radius: 50%; overflow: hidden;
  background: linear-gradient(135deg, var(--vod-accent), #a67c20);
  display: grid; place-items: center; font-size: 1.4rem; font-weight: 800; color: #1a1206;
  border: 2px solid rgba(212,168,67,0.4); margin-bottom: 0.45rem;
  transition: transform 0.2s, border-color 0.2s;
}
.vod-rabbi-ava img { width: 100%; height: 100%; object-fit: cover; }
.vod-rabbi:hover .vod-rabbi-ava { transform: scale(1.06); border-color: var(--vod-accent-2); }
.vod-rabbi-name { font-size: 0.78rem; font-weight: 700; color: #f5f5f7; line-height: 1.25; }
.vod-rabbi-count { font-size: 0.68rem; color: #86868b; margin-top: 0.15rem; }

/* search empty / status */
.vod-side-empty { grid-column: 1/-1; text-align: center; color: #86868b; font-size: 0.82rem; padding: 1.5rem 0.5rem; }

@media (prefers-reduced-motion: reduce) {
  .vod-hero-bg { animation: none; }
}
