/* ==========================================================================
   EQUIDEM DESIGN SYSTEM - VIDEO (components/video.css)
   ========================================================================== */

/* ---- Thumbnail with play affordance (home + /video index) ---- */
.video-thumbnail {
  position: relative;
  padding-top: 56.25%;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--color-text-heading);
}

.video-thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-thumbnail::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 48px;
  background: rgba(255, 0, 0, 0.9);
  border-radius: var(--radius-lg);
  opacity: 0.9;
  transition: opacity var(--transition-fast);
}

.video-thumbnail::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-40%, -50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 12px 0 12px 20px;
  border-color: transparent transparent transparent #fff;
  z-index: var(--z-base);
}

.video-thumbnail:hover::after,
.video-thumbnail:focus-visible::after {
  background: rgba(255, 0, 0, 1);
}

.video-embed-container {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  overflow: hidden;
  background: #000;
}

.video-embed-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 3em;
}

.video-date {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.video-description {
  line-height: var(--line-height-snug);
  min-height: 2.8em;
}

/* ---- Pagina indice /video: titolo + CTA iscrizione sulla stessa riga ---- */
.video-index__header {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-6);
  text-align: left;
}

/* Il blocco titolo deve poter restringersi: con la larghezza "max-content"
   dell'h1 (font Alfa Slab One) la CTA verrebbe spinta a capo. */
.video-index__heading {
  flex: 1 1 auto;
  min-width: 0;
}

.video-index__header .header {
  color: var(--color-text-heading);
}

/* Variante compatta del callout "Iscriviti al Canale" (c-hero--accent). */
.video-index__subscribe {
  flex: 0 0 auto;
  width: 300px;
  max-width: 100%;
  padding: var(--space-4) var(--space-5);
  text-align: left;
}

@media (max-width: 767.98px) {
  .video-index__header {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-4);
  }

  .video-index__subscribe {
    width: 100%;
  }
}

/* ---- Pagina dettaglio /video/<slug> ---- */

.video-detail__header {
  margin-bottom: var(--space-6);
}

.video-detail__title {
  margin-bottom: var(--space-2);
  color: var(--color-text-heading);
}

.video-detail__player {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.video-detail__description {
  padding: var(--space-6);
  color: var(--color-text-body);
}

.video-detail__prose {
  line-height: var(--line-height-relaxed);
}

.video-detail__prose p:last-child {
  margin-bottom: 0;
}

.video-detail__notice {
  padding: var(--space-4) var(--space-5);
  border-left: 4px solid var(--color-warning);
  border-radius: var(--radius-md);
  background: var(--color-warning-light);
  color: var(--color-text-body);
}

.video-detail__unavailable {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-detail__unavailable img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
  filter: grayscale(1);
}

.video-detail__unavailable-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  text-align: center;
  color: var(--color-text-inverse);
}

/* ---- Striscia video in homepage (Livello 2) ----------------------------
   High-contrast band: the audiovisual register enters right after the
   editorial opening, on the institutional navy rather than a card. */
.c-video-strip {
  padding: var(--space-6);
  border-top: 3px solid var(--color-civic-crimson);
  border-radius: var(--radius-lg);
  background-color: var(--color-primary-dark);
  color: var(--color-text-inverse);
}

.c-video-strip__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.c-video-strip__intro {
  flex: 1 1 22rem;
  min-width: 0;
}

.c-video-strip__eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0 0 var(--space-2);
  font-family: var(--font-subheader);
  font-size: 0.66rem;
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--tracking-caps-wide);
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.c-video-strip__title {
  margin: 0 0 var(--space-2);
  font-size: var(--font-size-xl);
  line-height: var(--line-height-tight);
  color: var(--color-text-inverse);
}

.c-video-strip__lead {
  margin: 0;
  font-size: var(--font-size-sm);
  line-height: var(--line-height-base);
  color: rgba(255, 255, 255, 0.78);
}

.c-video-spotlight {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* The thumbnail keeps its built-in 16:9 ratio box and play badge; here we only
   add the zoom affordance, so the strip reuses one video pattern everywhere. */
.c-video-spotlight .video-thumbnail img {
  transition: transform var(--transition-normal);
}

.c-video-spotlight:hover .video-thumbnail img,
.c-video-spotlight:focus-within .video-thumbnail img {
  transform: scale(1.03);
}

.c-video-spotlight__title {
  margin: 0;
  font-family: var(--font-subheader);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-snug);
}

.c-video-spotlight__title a {
  color: var(--color-text-inverse);
  text-decoration: none;
}

.c-video-spotlight__title a:hover,
.c-video-spotlight__title a:focus {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.c-video-spotlight__meta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  font-size: var(--font-size-xs);
  color: rgba(255, 255, 255, 0.62);
}

.c-video-strip__foot {
  display: flex;
  justify-content: flex-end;
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.c-video-strip__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-subheader);
  font-size: 0.72rem;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
}

.c-video-strip__link:hover,
.c-video-strip__link:focus {
  color: var(--color-text-inverse);
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 576px) {
  .c-video-strip {
    padding: var(--space-4);
  }

  .c-video-strip__title {
    font-size: var(--font-size-lg);
  }

  .c-video-strip__foot {
    justify-content: center;
  }
}

