/* Ciao Pais – sezione "Live": webcam e meteo (non c'è nella vista 1931) */
.live {
  padding: clamp(80px, 12vh, 140px) var(--pad);
  background: var(--dark); color: var(--on-dark);
}
html[data-era="1931"] #live,
html[data-era="1931"] .hd-nav a[href="#live"] { display: none; }

.live-head {
  display: grid; grid-template-columns: 1fr minmax(0, 44ch); gap: 16px 48px; align-items: end;
  margin-bottom: clamp(28px, 4vw, 44px);
}
.live-head h2 { font-size: calc(clamp(calc(2.6rem / var(--st, 1)), 6vw, calc(5.5rem / var(--st, 1))) * var(--sh, 1)); color: var(--on-dark); }
.live-head p { margin: 0; color: color-mix(in srgb, var(--on-dark) 74%, transparent); }

.live-grid {
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr);
  gap: clamp(16px, 2.4vw, 28px); align-items: start;
}

/* Webcam */
.live-cam { margin: 0; }
.live-cam-link {
  position: relative; display: block; overflow: hidden; aspect-ratio: 5 / 4;
  border-radius: var(--radius); background: #0B1410;
}
.live-img { display: block; width: 100%; height: 100%; object-fit: cover; transition: opacity .5s var(--ease); }
.live-img:not([src]) { opacity: 0; }
.live-cam-link:focus-visible { outline: 3px solid var(--season-accent, var(--accent)); outline-offset: 3px; }
.live-cam figcaption {
  display: flex; align-items: center; gap: 10px; margin-top: 14px; min-height: 1.5em;
  font-family: var(--f-label); font-stretch: var(--label-stretch); font-weight: 600;
}
.live-dot {
  flex: none; width: 10px; height: 10px; border-radius: 50%;
  background: #48C774; box-shadow: 0 0 0 0 rgba(72, 199, 116, .55);
  animation: live-battito 2.4s ease-out infinite;
}
@keyframes live-battito { 70%, 100% { box-shadow: 0 0 0 10px rgba(72, 199, 116, 0); } }
.live-ferma .live-dot { background: #E3A72F; animation: none; }
.live-errore .live-dot { background: var(--logo-red); animation: none; }
.live-errore .live-cam-link { pointer-events: none; }
/* Diretta YouTube (23/11): pulsante sulla foto e player al posto della foto, stesso riquadro 5:4 */
.live-in-diretta .live-dot { background: var(--logo-red); animation-name: live-battito-rosso; }
@keyframes live-battito-rosso { 0% { box-shadow: 0 0 0 0 rgba(172, 32, 44, .6); } 70%, 100% { box-shadow: 0 0 0 10px rgba(172, 32, 44, 0); } }
.live-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px 12px 16px;
  border-radius: 999px; background: var(--logo-red); color: #fff; white-space: nowrap;
  font-family: var(--f-label); font-stretch: var(--label-stretch); font-weight: 700; font-size: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35); transition: transform .2s var(--ease);
}
.live-play::before { content: ''; width: 0; height: 0; border-style: solid; border-width: 7px 0 7px 12px; border-color: transparent transparent transparent #fff; }
.live-cam-link:hover .live-play { transform: translate(-50%, -50%) scale(1.04); }
.live-cam-link[hidden] { display: none; }   /* con il player aperto la foto si nasconde (display:block vincerebbe su hidden) */
.live-player { aspect-ratio: 5 / 4; border-radius: var(--radius); overflow: hidden; background: #000; }
.live-player iframe { display: block; width: 100%; height: 100%; border: 0; }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

/* Meteo */
.live-meteo h3, .live-giorni h3 {
  margin: 0 0 12px; font-family: var(--f-label); font-stretch: var(--label-stretch);
  font-size: 1.05rem; font-weight: 700; letter-spacing: 0;
}
.live-meteo iframe, .live-giorni iframe { display: block; width: 100%; border: 0; border-radius: calc(var(--radius) - 6px); }
.live-3h { height: 597px; background: #1E2C36; }
.live-fonte { display: inline-block; margin-top: 8px; font-size: .82rem; color: inherit; opacity: .75; }
.live-fonte:hover { opacity: 1; }

.live-giorni {
  margin-top: clamp(24px, 3.4vw, 40px); padding: clamp(16px, 2vw, 24px);
  background: var(--bg); color: var(--ink); border-radius: var(--radius);
}
.live-7g { height: 410px; }

@media (max-width: 960px) {
  .live-head, .live-grid { grid-template-columns: 1fr; }
}
