/* RC88 · Copertina fissa della diretta TV nella Home.
   Immagine statica e calma: nessuna animazione. Al clic il riquadro scompare
   e video e audio partono insieme. */

/* Box informativo sotto il player: discreto, con filetto color ambra. */
.home-live-ai-note.home-live-ai-note {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-sizing: border-box;
  width: 100%;
  margin: 52px 0 0;
  padding: 14px 18px;
  align-items: center;
  border: 1px solid rgba(83, 61, 32, .14);
  border-radius: 16px;
  background: #fffaf0;
  color: #322a22;
  box-shadow: 0 8px 22px rgba(51, 35, 17, .08);
}

.home-live-ai-note-mark {
  flex: 0 0 auto;
  width: 4px;
  align-self: stretch;
  min-height: 42px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f6bf4d, #d88422);
}

.home-live-ai-note h3 {
  margin: 0 0 6px;
  color: #3f270c;
  font: 900 .98rem/1.25 Georgia, serif;
}

.home-live-ai-note p {
  margin: 0;
  color: #746658;
  font-size: .84rem;
  line-height: 1.5;
}

#homePlayerLive {
  position: relative;
}

/* Player HLS interno della diretta: riempie lo stesso riquadro dell'iframe. */
.home-hls-host {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  background: #000;
}

.home-hls-host .video-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
}

#homePlayerLive iframe[hidden] {
  display: none !important;
}

/* Rinforzo: il video HLS deve stare sempre sopra l'area nera del riquadro,
   anche quando altre regole globali di .video-frame o dell'iframe
   interferiscono. L'audio arriva, quindi il problema è solo di visualizzazione. */
#homePlayerLive .home-hls-host {
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 5 !important;
  isolation: isolate;
  overflow: hidden;
  background: #000 !important;
}

#homePlayerLive .home-hls-host .video-frame,
#homePlayerLive .home-hls-host .hls-video-frame {
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  aspect-ratio: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden;
  background: #000 !important;
}

#homePlayerLive .home-hls-host video#hlsVideo {
  display: block !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  z-index: 0;
  width: 100% !important;
  height: 100% !important;
  opacity: 1 !important;
  visibility: visible !important;
  filter: none !important;
  transform: none !important;
  object-fit: contain;
  background: #000;
}

#homePlayerLive .home-hls-host .player-status,
#homePlayerLive .home-hls-host .sound-control,
#homePlayerLive .home-hls-host .fullscreen-control,
#homePlayerLive .home-hls-host .player-fallback-link {
  z-index: 3;
}

.home-hls-host video,
.home-hls-host video#hlsVideo {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  opacity: 1;
  visibility: visible;
  object-fit: contain;
  background: #000;
}

.home-hls-host .player-status {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(20, 12, 4, .75);
  color: #fffaf0;
  font-size: .86rem;
  font-weight: 700;
}

.home-hls-host .sound-control,
.home-hls-host .fullscreen-control {
  position: absolute;
  bottom: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 999px;
  background: rgba(20, 12, 4, .72);
  color: #fffaf0;
  font: 800 .8rem/1 system-ui, sans-serif;
  cursor: pointer;
}

.home-hls-host .sound-control { left: 12px; }
.home-hls-host .fullscreen-control { right: 12px; }

.home-hls-host .player-fallback-link {
  position: absolute;
  bottom: 64px;
  left: 50%;
  transform: translateX(-50%);
  color: #ffe19a;
  font-size: .82rem;
  font-weight: 800;
}

.home-live-poster {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  height: 100%;
  padding: clamp(18px, 4vw, 36px);
  border: 0;
  border-radius: inherit;
  overflow: hidden;
  background: #0c0805;
  color: #fffaf0;
  text-align: center;
  cursor: pointer;
  font-family: inherit;
  transition: filter .2s ease;
}

.home-live-poster[hidden] {
  display: none !important;
}

/* Primo frame del flusso, muto e fermo, a tutto riquadro. */
.home-live-preview {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0c0805;
  pointer-events: none;
}

/* Il fotogramma compare con dolcezza solo quando è pronto: prima resta il fondo scuro. */
.home-live-preview {
  opacity: 0;
  transition: opacity .4s ease;
}

.home-live-preview.is-ready {
  opacity: 1;
}

/* Sfumatura leggera solo per rendere leggibili titolo e pulsante. */
.home-live-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(20, 12, 4, .25) 0%, rgba(20, 12, 4, .7) 100%);
  pointer-events: none;
}

.home-live-poster > span {
  position: relative;
  z-index: 2;
}

.home-live-poster:hover {
  filter: brightness(1.05);
}

.home-live-poster:focus-visible {
  outline: 3px solid #f6bf4d;
  outline-offset: -6px;
}

/* Televisore fermo: schermo caldo con cornice sottile. */
.home-live-poster-screen {
  position: relative;
  display: grid;
  place-items: center;
  width: min(340px, 72%);
  aspect-ratio: 16 / 9;
  border: 4px solid #d9a441;
  border-radius: 16px;
  background: radial-gradient(circle at 50% 40%, #6b4a2b 0%, #3a2818 70%, #2a1d12 100%);
  box-shadow: 0 16px 36px rgba(20, 12, 4, .45);
}

.home-live-poster-screen::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -26px;
  width: 42%;
  height: 6px;
  border-radius: 0 0 6px 6px;
  background: #d9a441;
  transform: translateX(-50%);
}

.home-live-poster-badge {
  display: none !important;
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(20, 12, 4, .7);
  color: #fffaf0;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.home-live-poster-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e0523f;
}

.home-live-poster-play {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #fffaf0;
  color: #7a421e;
  box-shadow: 0 8px 20px rgba(20, 12, 4, .35);
  transition: transform .18s ease;
}

.home-live-poster-play svg {
  margin-left: 4px;
}

.home-live-poster:hover .home-live-poster-play,
.home-live-poster:focus-visible .home-live-poster-play {
  transform: scale(1.06);
}

.home-live-poster-title {
  max-width: 18ch;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.5rem, 4.2vw, 2.2rem);
  font-weight: 800;
  line-height: 1.08;
}

.home-live-poster-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  background: #f6bf4d;
  color: #2a1d12;
  font-size: 1rem;
  font-weight: 850;
  letter-spacing: .02em;
}

@media (max-width: 560px) {
  .home-live-poster-screen {
    width: 84%;
  }

  .home-live-poster-cta {
    min-height: 46px;
    font-size: .92rem;
  }
}
