/* ============================================================
   old-event-thumbnail.css — consolidated v16
   Progetto: Video Alexzip / Archivio eventi
   Stato: CSS riordinato dopo patch v4–v16.

   Note operative:
   - Usa class="event-card event-card--poster" per brochure/locandine da mostrare intere.
   - Usa class="event-card event-card--cover" per immagini panoramiche da riempire.
   - Usa class="event-title event-title--concorso" per titoli lunghi dei concorsi.
   - Il modal tablet Android landscape richiede anche old-event-thumbnail.js con --real-vh.
   ============================================================ */

/* ============================================================
   01. Variabili, reset e base documento
   ============================================================ */

:root {
  color-scheme: dark;
  --page-bg: #050509;
  --panel: rgba(255, 255, 255, 0.075);
  --panel-strong: rgba(255, 255, 255, 0.12);
  --stroke: rgba(255, 255, 255, 0.16);
  --stroke-soft: rgba(255, 255, 255, 0.08);
  --text: rgba(255, 255, 255, 0.94);
  --muted: rgba(255, 255, 255, 0.66);
  --soft: rgba(255, 255, 255, 0.48);
  --apple-pink: #fa2d6f;
  --apple-red: #ff375f;
  --spotify-green: #1ed760;
  --brand-cyan: #00868b;
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, "Segoe UI", system-ui, Arial, sans-serif;
  --real-vh: 100vh;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page-bg);
  scroll-behavior: smooth;
}

body.video-archive-page {
  min-height: 100%;
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(circle at 14% 6%, rgba(250, 45, 111, 0.34), transparent 33rem),
    radial-gradient(circle at 84% 10%, rgba(30, 215, 96, 0.18), transparent 31rem),
    radial-gradient(circle at 50% 90%, rgba(116, 52, 255, 0.18), transparent 34rem),
    linear-gradient(135deg, #050509 0%, #0b0b12 46%, #03120d 100%);
  overflow-x: hidden;
}

body.video-archive-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: radial-gradient(circle at top, black, transparent 74%);
  opacity: 0.55;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
video {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 20;
  transform: translateY(-140%);
  padding: 10px 14px;
  border-radius: 999px;
  background: #fff;
  color: #050509;
  font-weight: 800;
  transition: transform 0.18s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.va-page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 42px;
}

/* ============================================================
   02. Header / brand / home button
   ============================================================ */

.va-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 42px;
}

.va-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.va-brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(250, 45, 111, 0.95), rgba(30, 215, 96, 0.85));
  box-shadow: 0 12px 28px rgba(250, 45, 111, 0.22);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.va-brand-text {
  display: grid;
  line-height: 1.08;
}

.va-brand-text strong {
  font-size: 0.96rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.va-brand-text span {
  color: var(--muted);
  font-size: 0.78rem;
}

.va-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: linear-gradient(135deg, #ff2f6d, #ff4b87);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
  font-size: 0.9rem;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.va-home:hover,
.va-home:focus-visible {
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(250, 45, 111, 0.95), rgba(30, 215, 96, 0.85));
  border-color: rgba(255, 255, 255, 0.24);
  outline: none;
}

/* ============================================================
   03. Hero
   ============================================================ */

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 290px);
  align-items: center;
  gap: clamp(22px, 4vw, 52px);
  padding: clamp(26px, 5vw, 58px);
  border: 1px solid var(--stroke-soft);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.045)),
    rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
  backdrop-filter: blur(28px) saturate(1.18);
  -webkit-backdrop-filter: blur(28px) saturate(1.18);
  margin-bottom: 28px;
}

.hero::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -160px;
  top: -170px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(250, 45, 111, 0.38), transparent 70%);
  filter: blur(4px);
  pointer-events: none;
}

.hero-copy,
.hero-logo {
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(0, 0, 0, 0.23);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--spotify-green);
  box-shadow: 0 0 0 6px rgba(30, 215, 96, 0.14);
}

.hero h1 {
  max-width: 820px;
  margin: 0;
  color: #fff;
  font-size: clamp(2.3rem, 7vw, 2.6rem);
  line-height: 0.98;
  letter-spacing: -0.075em;
  text-wrap: balance;
}

.hero h3 {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(1.02rem, 2.2vw, 1.28rem);
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.018em;
}

.hero p {
  max-width: 710px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.9vw, 1.25rem);
  line-height: 1.55;
}

.hero-logo {
  justify-self: center;
  width: clamp(172px, 23vw, 290px);
  aspect-ratio: 1;
  margin: 0;
  display: grid;
  place-items: center;
  border-radius: 999px;
  padding: clamp(18px, 3vw, 30px);
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.35), transparent 36%),
    rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 28px 70px rgba(0, 0, 0, 0.32);
}

.hero-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.26));
}

/* ============================================================
   04. Titolo sezione archivio
   ============================================================ */

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 34px 0 18px;
}

.section-head h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.55rem, 3vw, 2.4rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.section-head p {
  max-width: 560px;
  margin: 0;
  color: var(--soft);
  font-size: 0.95rem;
  line-height: 1.45;
}

.section-kicker {
  margin: 0 0 6px !important;
  color: var(--apple-pink) !important;
  font-size: 0.78rem !important;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ============================================================
   05. Griglia eventi e card
   ============================================================ */

.events-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.event-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--stroke-soft);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.045)),
    rgba(255, 255, 255, 0.055);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(22px) saturate(1.12);
  -webkit-backdrop-filter: blur(22px) saturate(1.12);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.event-card:hover,
.event-card:focus-within {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.06)),
    rgba(255, 255, 255, 0.075);
}

.event-card__media {
  position: relative;
  min-height: 0;
  height: clamp(220px, 18vw, 260px);
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: calc(var(--radius-lg) - 1px) calc(var(--radius-lg) - 1px) 0 0;
  background:
    radial-gradient(circle at 24% 18%, rgba(250, 45, 111, 0.24), transparent 38%),
    radial-gradient(circle at 88% 86%, rgba(30, 215, 96, 0.16), transparent 42%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
    #16191c;
}

.event-card__media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.40;
  background:
    radial-gradient(circle at center, transparent 35%, rgba(0, 0, 0, 0.22) 100%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 38%);
  pointer-events: none;
}

.event-card__media img {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-position: center;
}

.event-card--poster .event-card__media img {
  object-fit: contain;
}

.event-card--cover .event-card__media img {
  object-fit: cover;
}

.event-badge {
  position: absolute;
  z-index: 2;
  top: 1rem;
  left: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.46rem;
  padding: 0.48rem 0.86rem;
  color: #ffffff;
  background: linear-gradient(135deg, #ff2f6d, #ff4b87);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.012em;
  text-transform: none;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 12px 28px rgba(255, 47, 109, 0.30),
    0 8px 22px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.event-badge::before {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12);
}

.event-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 14px;
  padding: 20px;
}

.event-date {
  margin: 0;
  color: var(--apple-pink);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

/* Titoli standard: Trofeo e titoli brevi. */
.event-card h3 {
  margin: 0;
  color: #fff;
  text-wrap: balance;
}

.event-card h3 span {
  display: block;
}

.event-card h3.event-title:not(.event-title--concorso) {
  font-size: clamp(1.02rem, 1.24vw, 1.18rem);
  line-height: 1.12;
  letter-spacing: -0.036em;
  font-weight: 800;
}

/* Compatibilità per vecchie card con class="event-title--long". */
.event-title--long {
  font-size: clamp(1.00rem, 1.10vw, 1.14rem);
  line-height: 1.06;
  letter-spacing: -0.040em;
}

.event-title--long span {
  display: block;
}

.event-title--long span:first-child {
  max-width: none;
}

/* Titoli concorso: più editoriali, meno pesanti, con nomi non spezzati. */
.event-title--concorso {
  font-size: clamp(0.90rem, 0.98vw, 1.04rem) !important;
  line-height: 1.18 !important;
  letter-spacing: -0.024em !important;
  font-weight: 760 !important;
}

.event-title--concorso span {
  display: block;
  max-width: none !important;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.event-title--concorso span:first-child {
  max-width: none !important;
  white-space: nowrap;
}

.event-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.48;
}

.event-place {
  margin-top: auto !important;
  color: rgba(255, 255, 255, 0.74) !important;
  font-weight: 700;
}

.event-collaboration {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.35;
}

.event-collaboration p {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 800;
}

.event-collaboration ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.event-collaboration li {
  margin: 0.16rem 0;
}

.watch-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 4px;
  padding: 0 17px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--apple-pink), var(--apple-red));
  box-shadow: 0 13px 30px rgba(250, 45, 111, 0.2);
  font-size: 0.94rem;
  font-weight: 850;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

.watch-button:hover,
.watch-button:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 16px 36px rgba(250, 45, 111, 0.28);
  outline: none;
}

.watch-button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.82);
  outline-offset: 3px;
}

/* ============================================================
   06. Footer — versione bilanciata v16
   ============================================================ */

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.10fr) minmax(0, 0.95fr);
  align-items: start;
  gap: 18px;
  margin-top: 34px;
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--stroke-soft);
  background: linear-gradient(135deg, rgba(250, 45, 111, 0.95), rgba(30, 215, 96, 0.85));
  color: var(--muted);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.site-footer > div,
.site-footer > address,
.site-footer > .footer-credit {
  min-width: 0;
}

.site-footer strong,
.site-footer span,
.site-footer address,
.site-footer p {
  display: block;
}

.site-footer strong {
  color: #fff;
  margin-bottom: 6px;
}

.site-footer address {
  margin: 0;
  font-style: normal;
  line-height: 1.55;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-credit {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
}

.footer-credit .footer-copyright-main {
  display: block;
  white-space: normal;
}

.footer-credit .text-nowrap {
  white-space: normal;
}

/* ============================================================
   07. Modal player — base + chiusura sicura v7
   ============================================================ */

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.video-modal.is-open {
  display: flex;
}

.modal-panel {
  width: min(1060px, 100%);
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(13, 13, 18, 0.92);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.62);
}

.modal-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 76px 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.modal-head h2 {
  margin: 0;
  color: #fff;
  font-size: 1rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-close {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #ff2f6d, #ff4b87);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  box-shadow:
    0 12px 28px rgba(255, 47, 109, 0.28),
    0 8px 22px rgba(0, 0, 0, 0.32);
}

.modal-close:hover,
.modal-close:focus-visible {
  transform: translateY(-50%) scale(1.04);
}

.modal-close:focus-visible {
  outline: 2px solid rgba(250, 45, 111, 0.85);
  outline-offset: 2px;
}

.video-frame {
  background: #000;
  aspect-ratio: 16 / 9;
}

.video-frame video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-message {
  margin: 0;
  padding: 12px 16px 16px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
  line-height: 1.45;
}

.modal-actions {
  display: flex;
  justify-content: center;
  padding: 14px 16px 18px;
  background: rgba(255, 255, 255, 0.03);
}

.modal-action-close {
  border: 0;
  border-radius: 999px;
  padding: 0.78rem 1.35rem;
  color: #fff;
  background: linear-gradient(135deg, #ff2f6d, #ff4b87);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  box-shadow:
    0 14px 32px rgba(255, 47, 109, 0.25),
    0 8px 24px rgba(0, 0, 0, 0.28);
}

.modal-action-close:hover,
.modal-action-close:focus-visible {
  transform: translateY(-1px);
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: 3px;
}

.video-modal.modal-attention .modal-panel {
  animation: modalAttention 0.24s ease;
}

body.modal-open {
  overflow: hidden;
}

@keyframes modalAttention {
  0%, 100% {
    transform: scale(1);
  }

  45% {
    transform: scale(1.012);
  }
}

/* ============================================================
   08. Responsive layout generale
   ============================================================ */

@media (max-width: 1199.98px) {
  .event-card__media {
    height: clamp(215px, 27vw, 270px);
  }

  .event-card h3.event-title:not(.event-title--concorso) {
    font-size: clamp(1.02rem, 2.7vw, 1.18rem);
    line-height: 1.12;
  }

  .event-title--long {
    font-size: clamp(1.08rem, 3vw, 1.30rem);
    line-height: 1.06;
    letter-spacing: -0.046em;
  }

  .event-title--concorso {
    font-size: clamp(0.94rem, 2.45vw, 1.08rem) !important;
    line-height: 1.18 !important;
    letter-spacing: -0.024em !important;
  }
}

@media (max-width: 1060px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(150px, 220px);
  }

  .events-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .site-footer {
    grid-template-columns: 1fr;
  }

  .footer-credit {
    font-size: 0.92rem;
  }
}

@media (max-width: 720px) {
  .va-page {
    width: min(100% - 22px, 1180px);
    padding-top: 18px;
  }

  .va-header {
    margin-bottom: 20px;
  }

  .va-brand-mark {
    width: 38px;
    height: 38px;
  }

  .va-brand-text strong {
    max-width: 190px;
  }

  .va-home {
    min-height: 38px;
    padding: 0 12px;
    font-size: 0.84rem;
  }

  .hero {
    grid-template-columns: 1fr;
    justify-items: start;
    padding: 26px 22px;
    border-radius: 24px;
  }

  .hero-logo {
    order: -1;
    width: 128px;
    padding: 14px;
    justify-self: center;
  }

  .hero h1 {
    font-size: clamp(2.05rem, 11vw, 2.6rem);
    letter-spacing: -0.07em;
  }

  .section-head {
    display: block;
    margin-top: 26px;
  }

  .section-head > p {
    margin-top: 8px;
  }

  .events-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .event-card__media {
    min-height: 230px;
  }

  .event-card__body {
    padding: 18px;
  }

  .watch-button {
    width: 100%;
  }

  .site-footer {
    padding: 18px;
  }

  .video-modal {
    padding: 10px;
  }

  .modal-panel {
    border-radius: 20px;
  }

  .modal-head h2 {
    font-size: 0.92rem;
  }
}

@media (max-width: 575.98px) {
  .event-card__media {
    height: clamp(210px, 58vw, 280px);
  }

  .event-badge {
    top: 0.85rem;
    left: 0.85rem;
    padding: 0.44rem 0.78rem;
    font-size: 0.70rem;
  }

  .event-card h3.event-title:not(.event-title--concorso) {
    font-size: clamp(1.08rem, 5vw, 1.26rem);
    line-height: 1.10;
  }

  .event-title--long {
    font-size: clamp(1.00rem, 4.65vw, 1.20rem);
    line-height: 1.08;
    letter-spacing: -0.036em;
  }

  .event-title--concorso {
    font-size: clamp(0.94rem, 4.15vw, 1.10rem) !important;
    line-height: 1.20 !important;
    letter-spacing: -0.018em !important;
  }

  .event-title--concorso span:first-child {
    white-space: normal;
  }

  .modal-head {
    padding-right: 66px;
  }

  .modal-close {
    right: 12px;
    width: 40px;
    height: 40px;
  }

  .modal-action-close {
    width: 100%;
    padding-inline: 1rem;
  }
}

@media (max-width: 380px) {
  .va-brand-text strong {
    max-width: 160px;
  }

  .hero h1 {
    font-size: clamp(1.92rem, 10vw, 2.35rem);
  }

  .hero h3 {
    font-size: 1rem;
  }
}

/* ============================================================
   09. Modal responsive landscape — notebook/tablet v8/v9/v10
   ============================================================ */

@media (orientation: landscape) and (min-width: 768px) and (max-height: 840px) {
  .video-modal {
    padding:
      max(10px, env(safe-area-inset-top))
      14px
      max(10px, env(safe-area-inset-bottom));
    align-items: center;
    overflow: hidden;
  }

  .modal-panel {
    width: min(92vw, 980px);
    max-height: calc(100svh - 20px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    overflow: hidden;
    border-radius: 18px;
  }

  .modal-head {
    min-height: 44px;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
  }

  .modal-head h2 {
    font-size: clamp(0.92rem, 1.8vw, 1.08rem);
    line-height: 1.15;
  }

  .video-frame {
    min-height: 0;
    display: grid;
    place-items: center;
    background: #000;
  }

  .video-frame video,
  #eventVideo {
    width: 100%;
    height: auto;
    max-height: calc(100svh - 142px);
    object-fit: contain;
  }

  .player-message {
    margin: 0;
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
    line-height: 1.25;
  }

  .modal-actions {
    flex-shrink: 0;
    padding: 0.55rem 0.8rem 0.7rem;
  }

  .modal-action-close {
    min-height: 38px;
    padding: 0.55rem 1.05rem;
    font-size: 0.86rem;
  }

  .modal-close {
    width: 38px;
    height: 38px;
    right: 12px;
  }
}

@media (orientation: landscape) and (min-width: 1200px) and (max-width: 1439.98px) and (max-height: 820px) {
  .modal-panel {
    width: min(88vw, 860px);
    max-height: calc(100svh - 18px);
  }

  .video-frame video,
  #eventVideo {
    max-height: calc(100svh - 132px);
  }

  .modal-actions {
    padding-top: 0.45rem;
    padding-bottom: 0.55rem;
  }
}

@media (orientation: landscape) and (min-width: 768px) and (max-width: 1199.98px) and (max-height: 820px) {
  .modal-panel {
    width: min(94vw, 840px);
    max-height: calc(100svh - 16px);
  }

  .video-frame video,
  #eventVideo {
    max-height: calc(100svh - 128px);
  }

  .modal-head {
    min-height: 40px;
  }

  .modal-actions {
    padding-top: 0.42rem;
    padding-bottom: 0.52rem;
  }

  .modal-action-close {
    min-height: 36px;
    font-size: 0.82rem;
  }
}

/* Fallback CSS Lenovo / Android landscape, mantenuto come paracadute. */
@media (orientation: landscape) and (hover: none) and (pointer: coarse) and (max-height: 700px) {
  .video-modal {
    padding: 6px 8px !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
  }

  .modal-panel {
    width: min(92vw, 760px) !important;
    max-height: calc(100vh - 12px) !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, auto) auto auto !important;
    overflow: hidden !important;
    border-radius: 16px !important;
  }

  @supports (height: 100dvh) {
    .modal-panel {
      max-height: calc(100dvh - 12px) !important;
    }
  }

  .modal-head {
    min-height: 36px !important;
    padding: 0.35rem 56px 0.35rem 12px !important;
  }

  .modal-head h2 {
    font-size: clamp(0.72rem, 1.65vw, 0.86rem) !important;
    line-height: 1.12 !important;
  }

  .modal-close {
    width: 34px !important;
    height: 34px !important;
    right: 10px !important;
    font-size: 20px !important;
  }

  .video-frame {
    aspect-ratio: auto !important;
    width: 100% !important;
    height: min(44vw, calc(100vh - 112px), 400px) !important;
    min-height: 0 !important;
    display: grid !important;
    place-items: center !important;
    background: #000 !important;
  }

  @supports (height: 100dvh) {
    .video-frame {
      height: min(44vw, calc(100dvh - 112px), 400px) !important;
    }
  }

  .video-frame video,
  #eventVideo {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
  }

  .player-message {
    margin: 0 !important;
    padding: 0.28rem 0.65rem !important;
    font-size: 0.72rem !important;
    line-height: 1.18 !important;
  }

  .modal-actions {
    flex-shrink: 0 !important;
    padding: 0.35rem 0.7rem 0.48rem !important;
  }

  .modal-action-close {
    min-height: 32px !important;
    padding: 0.42rem 0.85rem !important;
    font-size: 0.76rem !important;
    line-height: 1.05 !important;
  }
}

/* Correzione definitiva Android/tablet landscape: usa --real-vh da JS. */
@media (orientation: landscape) and (hover: none) and (pointer: coarse) and (max-height: 760px) {
  .video-modal.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 8px !important;
    overflow: hidden !important;
  }

  .modal-panel {
    width: min(94vw, 820px) !important;
    max-width: 94vw !important;
    height: calc(var(--real-vh) - 12px) !important;
    max-height: calc(var(--real-vh) - 12px) !important;
    display: grid !important;
    grid-template-rows: 38px minmax(0, 1fr) auto auto !important;
    overflow: hidden !important;
    border-radius: 16px !important;
  }

  .modal-head {
    min-height: 38px !important;
    height: 38px !important;
    padding: 0.35rem 3.2rem 0.35rem 0.75rem !important;
  }

  .modal-head h2 {
    font-size: 0.80rem !important;
    line-height: 1.05 !important;
  }

  .modal-close {
    width: 34px !important;
    height: 34px !important;
    right: 8px !important;
    font-size: 21px !important;
  }

  .video-frame {
    aspect-ratio: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    display: grid !important;
    place-items: center !important;
    background: #000 !important;
    overflow: hidden !important;
  }

  .video-frame video,
  #eventVideo {
    width: auto !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: calc(var(--real-vh) - 104px) !important;
    object-fit: contain !important;
    background: #000 !important;
  }

  .player-message {
    margin: 0 !important;
    padding: 0.25rem 0.55rem !important;
    font-size: 0.70rem !important;
    line-height: 1.15 !important;
  }

  .modal-actions {
    display: flex !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    padding: 0.36rem 0.55rem 0.45rem !important;
  }

  .modal-action-close {
    min-height: 32px !important;
    padding: 0.42rem 0.95rem !important;
    font-size: 0.74rem !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }
}

@media (orientation: landscape) and (hover: none) and (pointer: coarse) and (max-height: 620px) {
  .modal-panel {
    width: min(90vw, 760px) !important;
    grid-template-rows: 34px minmax(0, 1fr) auto auto !important;
  }

  .modal-head {
    min-height: 34px !important;
    height: 34px !important;
  }

  .modal-head h2 {
    font-size: 0.72rem !important;
  }

  .modal-close {
    width: 30px !important;
    height: 30px !important;
    font-size: 19px !important;
  }

  .video-frame video,
  #eventVideo {
    max-height: calc(var(--real-vh) - 92px) !important;
  }

  .modal-actions {
    padding: 0.28rem 0.5rem 0.35rem !important;
  }

  .modal-action-close {
    min-height: 29px !important;
    padding: 0.34rem 0.8rem !important;
    font-size: 0.68rem !important;
  }
}

/* ============================================================
   10. Accessibilità / motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* ============================================================
   PATCH v17 — Archive modal player tuning
   Obiettivo:
   - titolo modal lungo leggibile, massimo 2 righe
   - pannello player meno pesante su notebook/tablet landscape
   - riduzione carico grafico su dispositivi datati
   ============================================================ */

.video-modal .modal-panel {
  width: min(940px, calc(100vw - 32px));
}

.video-modal .modal-head {
  align-items: center;
  padding: 12px 66px 11px 18px;
}

.video-modal .modal-head h2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 2.45em;
  font-size: clamp(0.86rem, 1.15vw, 0.98rem);
  line-height: 1.20;
  letter-spacing: -0.012em;
}

@media (orientation: landscape) and (min-width: 768px) and (max-height: 840px) {
  .video-modal {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .video-modal .modal-panel {
    width: min(820px, calc(100vw - 28px));
    box-shadow: 0 18px 58px rgba(0, 0, 0, 0.56);
  }

  .video-modal .modal-head {
    min-height: 42px;
    padding: 0.42rem 3.55rem 0.38rem 0.8rem;
  }

  .video-modal .modal-head h2 {
    font-size: clamp(0.74rem, 1.45vw, 0.88rem);
    line-height: 1.14;
    max-height: 2.35em;
  }

  .video-modal .modal-close {
    width: 34px;
    height: 34px;
    right: 10px;
    font-size: 20px;
  }
}

@media (orientation: landscape) and (min-width: 1200px) and (max-width: 1439.98px) and (max-height: 820px) {
  .video-modal .modal-panel {
    width: min(780px, calc(100vw - 28px));
  }

  .video-modal .modal-head h2 {
    font-size: clamp(0.72rem, 1.15vw, 0.82rem);
    line-height: 1.12;
  }

  .video-frame video,
  #eventVideo {
    max-height: calc(100svh - 124px);
  }
}

@media (orientation: landscape) and (hover: none) and (pointer: coarse) and (max-height: 760px) {
  .video-modal .modal-head h2 {
    font-size: 0.72rem !important;
    line-height: 1.10 !important;
    max-height: 2.25em !important;
  }
}

/* ============================================================
   PATCH v5 — Hero slogan one-line on smartphone
   Obiettivo:
   - mantenere "Un Amico per Tutti, Un Amico per sempre" su una sola riga
   - applicato solo a smartphone
   - piccolo resize controllato del testo
   ============================================================ */

@media (max-width: 680px) {
  .hero h3,
  .hero .hero-subtitle,
  .hero-copy h3,
  .page-event-live .hero h3,
  .page-event-brochure .hero h3,
  .page-event-spot .hero h3,
  .page-live-player-apple2 .hero h3,
  .page-live-player-apple2 .hero--live-player h3 {
    white-space: nowrap !important;
    font-size: clamp(0.72rem, 3.05vw, 0.95rem) !important;
    line-height: 1.25 !important;
    letter-spacing: -0.035em !important;
    max-width: 100% !important;
  }
}

@media (max-width: 390px) {
  .hero h3,
  .hero .hero-subtitle,
  .hero-copy h3,
  .page-event-live .hero h3,
  .page-event-brochure .hero h3,
  .page-event-spot .hero h3,
  .page-live-player-apple2 .hero h3,
  .page-live-player-apple2 .hero--live-player h3 {
    font-size: clamp(0.66rem, 3vw, 0.78rem) !important;
    letter-spacing: -0.045em !important;
  }
}

/* ============================================================
   PATCH v6 — Hero slogan readable one-line on smartphone
   Obiettivo:
   - mantenere lo slogan su una riga
   - recuperare leggibilità dopo PATCH v5
   - usare leggero squeeze orizzontale invece di ridurre troppo il font
   ============================================================ */

@media (max-width: 680px) {
  .hero h3,
  .hero .hero-subtitle,
  .hero-copy h3,
  .page-event-live .hero h3,
  .page-event-brochure .hero h3,
  .page-event-spot .hero h3,
  .page-live-player-apple2 .hero h3,
  .page-live-player-apple2 .hero--live-player h3 {
    white-space: nowrap !important;
    font-size: clamp(0.82rem, 3.75vw, 1.08rem) !important;
    line-height: 1.24 !important;
    letter-spacing: -0.055em !important;
    font-weight: 800 !important;
    transform: scaleX(0.965) !important;
    transform-origin: center center !important;
  }
}

@media (max-width: 390px) {
  .hero h3,
  .hero .hero-subtitle,
  .hero-copy h3,
  .page-event-live .hero h3,
  .page-event-brochure .hero h3,
  .page-event-spot .hero h3,
  .page-live-player-apple2 .hero h3,
  .page-live-player-apple2 .hero--live-player h3 {
    font-size: clamp(0.78rem, 3.65vw, 0.96rem) !important;
    letter-spacing: -0.06em !important;
    transform: scaleX(0.94) !important;
  }
}
