/* =========================================================================
   UUSI VIDEOSIVU (testi) — /videosivu-uusi/
   Pohjana vanhan arkiston video-browse.css (hero, karusellit, vb-card).
   Tässä vain uudet elementit samalla visuaalisella kielellä.
   ========================================================================= */

.vs-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
}

/* =========================================================================
   HERO — maistiaissoitin + toissijainen nappi
   ========================================================================= */
.vs-hero__media iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.vb-hero.is-playing {
  min-height: 0;
  aspect-ratio: 16 / 9;
  max-height: 80vh;
}

.vb-hero.is-playing .vb-hero__overlay,
.vb-hero.is-playing .vb-hero__vignette,
.vb-hero.is-playing .vb-hero__content {
  display: none;
}

.vs-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.vs-hero__ghost {
  display: inline-flex;
  align-items: center;
  padding: 13px 26px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-pill);
  color: #fff;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.vs-hero__ghost:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.vs-hero__ghost:focus-visible {
  outline: 2px solid var(--color-orange);
  outline-offset: 3px;
}

/* =========================================================================
   INTRO — laskuri, tilausnosto, teemat (nousee heron päälle)
   ========================================================================= */
.vs-intro {
  position: relative;
  z-index: 3;
  margin-top: -32px;
  padding-bottom: 8px;
}

.vs-rows.vb-rows {
  margin-top: 0;
  padding-top: 24px;
}

/* ---- Laskuri ---- */
.vs-counter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px clamp(20px, 4vw, 48px);
  padding: 28px 0 22px;
}

.vs-counter a {
  display: grid;
  text-decoration: none;
  color: var(--dark-text);
  transition: color 0.2s ease;
}

.vs-counter b {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.vs-counter span {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--dark-text-muted);
}

.vs-counter a:hover b { color: var(--color-orange); }

.vs-counter a:focus-visible {
  outline: 2px solid var(--color-orange);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ---- Tilausnosto / tilaajan vahvistus ---- */
.vs-access {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  padding: 18px 22px;
  margin: 0 0 20px;
  background: linear-gradient(135deg, rgba(247, 148, 29, 0.12), rgba(241, 90, 36, 0.05));
  border: 1px solid rgba(247, 148, 29, 0.28);
  border-radius: 12px;
}

.vs-access p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--dark-text);
}

.vs-access strong { font-weight: 600; }

.vs-access__cta.vb-hero__cta {
  padding: 11px 28px;
  font-size: 0.95rem;
}

.vs-access--pro {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
  padding: 12px 18px;
  background: rgba(127, 212, 193, 0.07);
  border-color: rgba(127, 212, 193, 0.25);
  font-size: 0.9rem;
  color: var(--dark-text-muted);
}

.vs-access--pro svg { color: #7fd4c1; flex: 0 0 auto; }

/* ---- Teemachipit ---- */
.vs-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  scroll-margin-top: calc(var(--header-height) + 16px);
}

.vs-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  background: var(--dark-surface);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-pill);
  color: var(--dark-text);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.vs-chip:hover {
  background: var(--dark-surface-hover);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
  color: var(--dark-text);
}

.vs-chip:focus-visible {
  outline: 2px solid var(--color-orange);
  outline-offset: 2px;
}

.vs-chip i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.vs-chip small {
  color: var(--dark-text-muted);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

/* =========================================================================
   HYLLYN OTSIKKORIVI — määrä + "Näytä kaikki"
   ========================================================================= */
.vs-row__header {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.vs-row__count {
  font-size: 0.8rem;
  color: var(--dark-text-muted);
  font-variant-numeric: tabular-nums;
}

.vs-row__more {
  margin-left: auto;
  flex: 0 0 auto;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-orange);
  text-decoration: none;
  white-space: nowrap;
}

.vs-row__more span { display: inline-block; transition: transform 0.2s ease; }
.vs-row__more:hover { color: var(--color-orange); }
.vs-row__more:hover span { transform: translateX(3px); }

.vs-row__more:focus-visible {
  outline: 2px solid var(--color-orange);
  outline-offset: 3px;
  border-radius: 3px;
}

/* =========================================================================
   KORTTIEN LISÄT
   ========================================================================= */

/* Pystyjuliste (dokumentit ja elokuvat) */
.vb-card.vs-card--tall { width: 180px; }
.vs-card--tall .vb-card__image { aspect-ratio: 2 / 3; }

@media (max-width: 480px) {
  .vb-card.vs-card--tall { width: 150px; }
}

/* Jaksomäärä (sarjakortti) */
.vs-card__ep {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 4px;
}

/* Badge-variantit */
.vb-card__badge.vs-badge--nosto {
  background: #7fd4c1;
  color: #06231d;
}

.vb-card__badge.vs-badge--rental {
  background: rgba(255, 255, 255, 0.92);
  color: #111;
}

/* =========================================================================
   LÄHETYSARKISTO
   ========================================================================= */
.vs-archive {
  display: grid;
  gap: 14px;
  margin: 8px 0 64px;
  padding: clamp(20px, 3vw, 28px);
  background: var(--dark-surface);
  border: 1px solid var(--dark-border);
  border-radius: 14px;
}

.vs-archive h2 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--dark-text);
}

.vs-archive p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--dark-text-muted);
}

.vs-archive__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}

.vs-archive__grid a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 16px;
  background: var(--dark-bg);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-sm);
  color: var(--dark-text);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.vs-archive__grid a:hover {
  border-color: rgba(247, 148, 29, 0.5);
  background: var(--dark-surface-hover);
  color: var(--dark-text);
}

.vs-archive__grid a:focus-visible {
  outline: 2px solid var(--color-orange);
  outline-offset: 2px;
}

.vs-archive__grid span {
  color: var(--dark-text-muted);
  font-variant-numeric: tabular-nums;
}

/* =========================================================================
   LISTANÄKYMÄ (teema, sarja, arkisto, "Näytä kaikki")
   ========================================================================= */
.vs-list { padding-top: 28px; padding-bottom: 64px; }

.vs-back {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--dark-text-muted);
  text-decoration: none;
}

.vs-back:hover { color: var(--dark-text); }

.vs-list__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  margin: 14px 0 24px;
}

.vs-list__head h1 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  font-weight: 700;
  color: var(--dark-text);
}

.vs-list__head span {
  font-size: 0.85rem;
  color: var(--dark-text-muted);
}

.vs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 28px 16px;
}

.vs-grid .vb-card,
.vs-grid .vb-card.vs-card--tall { width: auto; }

.vs-grid--tall { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

@media (max-width: 480px) {
  .vs-grid { grid-template-columns: 1fr; }
  .vs-grid--tall { grid-template-columns: repeat(2, 1fr); }
}

.vs-empty {
  padding: 32px 0;
  color: var(--dark-text-muted);
}

/* ---- Sivutus (archive-styles.css .nav-links -tyyli, tumma) ---- */
.vs-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 40px 0 0;
}

.vs-pager a,
.vs-pager span {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
}

.vs-pager a {
  background: var(--dark-surface);
  color: var(--dark-text);
  text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.vs-pager a:hover {
  background: var(--color-orange);
  color: #fff;
}

.vs-pager a:focus-visible {
  outline: 2px solid var(--color-orange);
  outline-offset: 2px;
}

.vs-pager span {
  color: var(--dark-text-muted);
  font-variant-numeric: tabular-nums;
}

/* =========================================================================
   MOBIILI + REDUCED MOTION
   ========================================================================= */
@media (max-width: 480px) {
  .vs-intro { margin-top: -16px; }
  .vs-row__count { display: none; }
  .vs-access { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .vs-chip,
  .vs-row__more span,
  .vs-hero__ghost {
    transition: none;
  }
}
