/* ─── HOMEPAGE v2 — stile editoriale Bootstrap 5 (basato su /bozza/index.html) ───
   Variabili colore riusano quelle definite in shell.css (:root).
   Caricato SOLO sulla home (vedi Template::header()).
──────────────────────────────────────────────────────────────────────────── */

body.page-index { background: var(--paper); }
body.page-index .bn-main { padding-top: 0; }
.hv2 { --hv2-serif: 'Newsreader', Georgia, serif; }

/* ══════════════════════════════════════════════════
   AD PLACEHOLDER
══════════════════════════════════════════════════ */
.hv2-adzone { margin: 28px 0; text-align: center; }
.hv2-adzone .cap {
  display: block; font-size: 9.5px; letter-spacing: .24em; text-transform: uppercase;
  color: #B8B0B0; margin-bottom: 9px;
}
.hv2-adslot {
  position: relative; display: inline-flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 2px; width: var(--w); height: var(--h); max-width: 100%;
  background:
    linear-gradient(135deg, rgba(200,53,30,.045), rgba(14,12,11,.025)),
    repeating-linear-gradient(45deg, transparent, transparent 11px, rgba(200,53,30,.035) 11px, rgba(200,53,30,.035) 12px);
  border: 1px solid var(--border); border-radius: 8px;
}
.hv2-adslot::before, .hv2-adslot::after {
  content: ''; position: absolute; width: 13px; height: 13px; border: 1.5px solid var(--red); opacity: .55;
}
.hv2-adslot::before { top: 9px; left: 9px; border-right: 0; border-bottom: 0; }
.hv2-adslot::after  { bottom: 9px; right: 9px; border-left: 0; border-top: 0; }
.hv2-adslot .dim { font-family: var(--f-d); font-size: 1.05rem; font-weight: 600; color: var(--ink-soft, var(--ink)); }
.hv2-adslot .fmt { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #A89C9C; }
/* Slot banner reale (showAd): block full-width, l'<ins> AdSense responsive
   ha bisogno di larghezza definita del contenitore (no flex che lo collassa a 0) */
.hv2-adslot-live { width: 100%; text-align: center; }
.hv2-adslot-live ins.adsbygoogle { display: block; width: 100%; }
.hv2-adslot-live img,
.hv2-adslot-live iframe { max-width: 100%; height: auto; }

/* ══════════════════════════════════════════════════
   HERO — stage grande a sinistra + rail miniature a destra
   Le due colonne hanno SEMPRE la stessa altezza (grid stretch).
══════════════════════════════════════════════════ */
.hv2-hero { padding: 28px 0 6px; }
.hv2-herowrap {
  display: grid; grid-template-columns: minmax(0, 2.45fr) minmax(0, 1fr);
  gap: 14px; align-items: stretch;
}
.hv2-herowrap.is-solo { grid-template-columns: 1fr; }

/* --- STAGE (slide grande, fade) --- */
.hv2-stage {
  position: relative; border-radius: 14px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(9,9,11,.14); aspect-ratio: 16/9; background: var(--dark);
}
.hv2-slide {
  position: absolute; inset: 0; display: block; text-decoration: none;
  opacity: 0; visibility: hidden; transition: opacity .8s ease, visibility .8s;
}
.hv2-slide.is-active { opacity: 1; visibility: visible; z-index: 2; }
.hv2-slide img { width: 100%; height: 100%; object-fit: cover; transition: transform 6s ease; }
.hv2-slide.is-active img { transform: scale(1.06); }
.hv2-slide::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.86) 0%, rgba(0,0,0,.35) 42%, rgba(0,0,0,0) 70%);
}
.hv2-slide .body { position: absolute; left: 0; right: 0; bottom: 0; padding: clamp(20px,3.4vw,42px); z-index: 2; color: #fff; }
.hv2-slide h2 {
  font-family: var(--hv2-serif); font-weight: 700; letter-spacing: -.02em; line-height: 1.05;
  font-size: clamp(1.5rem, 3.2vw, 2.9rem); max-width: 20ch; text-shadow: 0 2px 30px rgba(0,0,0,.5);
}
.hv2-chip {
  display: inline-block; font-size: 11px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase;
  color: #fff; background: var(--red); padding: 7px 13px; border-radius: 6px; margin-bottom: 16px;
}
.hv2-slide > .hv2-chip {
  position: absolute; top: 16px; left: 16px; z-index: 3; margin: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,.28);
}

/* --- FRECCE prev/next --- */
.hv2-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 44px; height: 44px; border: 0; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; color: #fff;
  background: rgba(0,0,0,.42); backdrop-filter: blur(4px);
  transition: background .2s, transform .2s; opacity: .85;
}
.hv2-nav:hover { background: var(--red); opacity: 1; transform: translateY(-50%) scale(1.06); }
.hv2-nav.prev { left: 14px; }
.hv2-nav.next { right: 14px; }

/* --- PUNTINI --- */
.hv2-dots {
  position: absolute; left: 0; right: 0; bottom: 14px; z-index: 4;
  display: flex; justify-content: center; gap: 9px;
}
.hv2-dot {
  width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255,255,255,.5); box-shadow: 0 1px 4px rgba(0,0,0,.4);
  transition: background .25s, width .25s, border-radius .25s;
}
.hv2-dot:hover { background: rgba(255,255,255,.85); }
.hv2-dot.is-active { background: #fff; width: 26px; border-radius: 5px; }

/* --- SIDE (box video + gallery impilati, stessa altezza dello stage) --- */
.hv2-heroside { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.hv2-heroside .hv2-mediabox {
  flex: 1 1 0; min-height: 0; display: flex; flex-direction: column;
}
.hv2-heroside .hv2-mediabox .top { padding: 12px 14px 8px; }
.hv2-heroside .hv2-mediabox .frame {
  flex: 1 1 auto; aspect-ratio: auto; min-height: 0; margin: 0 12px 12px;
}

/* --- MOBILE: stage sopra, box media sotto a piena larghezza (come prima) --- */
@media (max-width: 767.98px) {
  .hv2-herowrap { grid-template-columns: 1fr; gap: 12px; }
  .hv2-stage { aspect-ratio: 16/9; }

  /* Frecce: a metà altezza finivano sul titolo, che su schermo stretto
     occupa 3-4 righe. Salgono in alto a destra, sull'immagine libera
     (la chip categoria sta in alto a sinistra). Lo scorrimento
     principale qui è lo swipe: le frecce restano come ripiego. */
  .hv2-nav { top: 12px; transform: none; width: 38px; height: 38px; opacity: .92; }
  .hv2-nav:hover, .hv2-nav:active { transform: none; }
  .hv2-nav.prev { left: auto; right: 56px; }
  .hv2-nav.next { right: 12px; }
  .hv2-nav svg { width: 18px; height: 18px; }

  /* spazio sotto il titolo per i puntini */
  .hv2-slide .body { padding-bottom: 32px; }
  .hv2-heroside { gap: 12px; }
  .hv2-heroside .hv2-mediabox { flex: none; height: auto; }
  .hv2-heroside .hv2-mediabox .top { padding: 18px 18px 12px; }
  .hv2-heroside .hv2-mediabox .frame { aspect-ratio: 16/9; flex: none; margin: 0 14px 14px; }
}

/* ══════════════════════════════════════════════════
   MEDIA BAND — video + gallerie
══════════════════════════════════════════════════ */
.hv2-mediabox {
  display: block; background: var(--white); border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden; box-shadow: 0 1px 2px rgba(9,9,11,.04), 0 8px 24px rgba(9,9,11,.06);
  transition: transform .25s, box-shadow .25s; height: 100%;
}
.hv2-mediabox:hover { transform: translateY(-4px); box-shadow: 0 20px 60px rgba(9,9,11,.14); }
.hv2-mediabox .top { display: flex; align-items: center; gap: 12px; padding: 18px 18px 12px; }
.hv2-mediabox .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: #fff; flex: none; }
.hv2-mediabox.video .ico { background: var(--ink); }
.hv2-mediabox.gall .ico  { background: var(--red); }
.hv2-mediabox h3 { font-size: 14px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; margin: 0; }
.hv2-mediabox .frame { position: relative; margin: 0 14px 14px; border-radius: 10px; overflow: hidden; aspect-ratio: 16/9; background: #000; }
.hv2-mediabox .frame img { width: 100%; height: 100%; object-fit: cover; }
.hv2-play { position: absolute; inset: 0; display: grid; place-items: center; }
.hv2-play span {
  width: 60px; height: 60px; border-radius: 50%; background: rgba(255,255,255,.92);
  display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.hv2-mediabox.gall .frame { background: transparent; }
.hv2-mediabox.gall .gall-grid {
  position: absolute; inset: 0; display: grid;
  grid-template-columns: repeat(3,1fr); grid-template-rows: repeat(2,1fr); gap: 4px;
}
.hv2-mediabox.gall .gall-grid img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }

/* ══════════════════════════════════════════════════
   SECTION HEADER + CARD GRID
══════════════════════════════════════════════════ */
.hv2-sec { margin: 46px 0; }
.hv2-sec-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding-bottom: 16px; margin-bottom: 22px; border-bottom: 2px solid var(--ink);
}
.hv2-sec-head h2 { font-family: var(--hv2-serif); font-size: clamp(1.5rem,3.5vw,2.1rem); font-weight: 700; letter-spacing: -.02em; margin: 0; }
.hv2-sec-head .more {
  font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--red); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; transition: gap .2s;
}
.hv2-sec-head .more:hover { gap: 11px; }
.hv2-sec[data-c="storie"]     .hv2-sec-head { border-color: var(--teal); }
.hv2-sec[data-c="storie"]     .more          { color: var(--teal); }
.hv2-sec[data-c="reportage"]  .hv2-sec-head { border-color: var(--gold); }
.hv2-sec[data-c="reportage"]  .more          { color: var(--gold); }

.hv2-card {
  display: flex; flex-direction: column; height: 100%; background: var(--white); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden; box-shadow: 0 1px 2px rgba(9,9,11,.04), 0 8px 24px rgba(9,9,11,.06);
  transition: transform .25s, box-shadow .25s;
}
.hv2-card:hover { transform: translateY(-5px); box-shadow: 0 20px 60px rgba(9,9,11,.14); }
.hv2-card .ph { overflow: hidden; background: var(--border); }
.hv2-card .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.hv2-card:hover .ph img { transform: scale(1.06); }
.hv2-card .txt { padding: 18px 18px 22px; display: flex; flex-direction: column; flex: 1; }
.hv2-kicker { font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--red); margin-bottom: 10px; }
.hv2-card h3 { font-family: var(--hv2-serif); font-size: 1.18rem; line-height: 1.22; font-weight: 600; letter-spacing: -.01em; margin: 0; }
.hv2-card h3 a { transition: color .2s; color: inherit; text-decoration: none; }
.hv2-card:hover h3 a { color: var(--red); }
.hv2-card .ex {
  margin-top: 10px; color: var(--ink-soft, var(--muted)); font-size: 14.5px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.hv2-card .meta { margin-top: auto; padding-top: 14px; font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.hv2-sec[data-c="storie"] .hv2-kicker          { color: var(--teal); }
.hv2-sec[data-c="storie"] .hv2-card:hover h3 a { color: var(--teal); }
.hv2-sec[data-c="reportage"] .hv2-kicker          { color: var(--gold); }
.hv2-sec[data-c="reportage"] .hv2-card:hover h3 a { color: var(--gold); }

/* ══════════════════════════════════════════════════
   TRIO: sport · artisti · eventi
══════════════════════════════════════════════════ */
.hv2-sport-feat {
  position: relative; display: block; border-radius: 14px; overflow: hidden;
  min-height: 280px; height: 100%; box-shadow: 0 1px 2px rgba(9,9,11,.04), 0 8px 24px rgba(9,9,11,.06);
}
.hv2-sport-feat .carousel-inner, .hv2-sport-feat .carousel-item, .hv2-sport-feat .carousel-item > a { height: 100%; }
.hv2-sport-feat .carousel-item > a { position: relative; display: block; }
.hv2-sport-feat img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s; }
.hv2-sport-feat:hover img { transform: scale(1.05); }
.hv2-sport-feat::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.85), transparent 60%); pointer-events: none; }
.hv2-sport-feat .body { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px; color: #fff; z-index: 2; }
.hv2-sport-feat h3 { font-family: var(--hv2-serif); font-size: clamp(1.15rem,2vw,1.5rem); line-height: 1.15; font-weight: 700; margin: 0; }
.hv2-trio-more {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 12px;
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #fff; opacity: .85;
  transition: gap .2s, opacity .2s;
}
.hv2-sport-feat:hover .hv2-trio-more { gap: 11px; opacity: 1; }

/* ══════════════════════════════════════════════════
   PROGETTO BARINEDITA
══════════════════════════════════════════════════ */
.hv2-progetto { background: #09090B; color: #fff; border-radius: 24px; padding: clamp(28px,5vw,56px) clamp(20px,4vw,48px); margin: 60px 0; }
.hv2-progetto .ptitle { text-align: center; margin-bottom: 36px; }
.hv2-progetto .ptitle span { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: #D62828; font-weight: 700; }
.hv2-progetto .ptitle h2 { font-family: var(--hv2-serif); font-size: clamp(1.8rem,4.5vw,2.8rem); font-weight: 700; margin-top: 8px; letter-spacing: -.02em; }

.hv2-pmap {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end;
  border-radius: 18px; overflow: hidden; min-height: 300px; height: 100%; padding: 28px; background: #27272A;
}
.hv2-pmap img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.hv2-pmap::after { content: ''; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(214,40,40,.55), rgba(9,9,11,.7)); }
.hv2-pmap .pin, .hv2-pmap .pbody { position: relative; z-index: 2; }
.hv2-pmap .pbody h3 { font-family: var(--hv2-serif); font-size: 1.8rem; font-weight: 700; letter-spacing: -.01em; margin: 0; }
.hv2-pmap .pbody p { color: #E4E4E7; font-size: 14.5px; margin: 6px 0 0; max-width: 30ch; }
.hv2-pmap .pin {
  width: 54px; height: 54px; border-radius: 50%; background: #fff; display: grid; place-items: center;
  color: #D62828; margin-bottom: 16px; box-shadow: 0 8px 24px rgba(0,0,0,.4);
}

.hv2-ptiles {
  display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr;
  gap: 1rem; height: 100%;
}
@media (max-width: 575.98px) {
  .hv2-ptiles { grid-template-columns: 1fr; }
}
.hv2-ptile {
  background: #18181B; border: 1px solid #27272A; border-radius: 18px; padding: 20px 22px; height: 100%;
  display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto;
  column-gap: 16px; row-gap: 3px; align-items: center; transition: transform .22s, background .22s, border-color .22s;
}
.hv2-ptile:hover { transform: translateY(-4px); background: #1F1F23; border-color: #D62828; }
.hv2-ptile .hv2-ti { grid-row: 1/3; grid-column: 1; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; flex: none; }
.hv2-ptile .hv2-ti svg { width: 22px; height: 22px; }
.hv2-ptile h3 { grid-column: 2; grid-row: 1; font-size: 14px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; margin: 0; color: #fff; }
.hv2-ptile p { grid-column: 2; grid-row: 2; color: #A1A1AA; font-size: 13.5px; line-height: 1.4; margin: 0; }
.hv2-ptile .arrow { grid-column: 3; grid-row: 1/3; color: #52525B; transition: color .2s, transform .2s; }
.hv2-ptile:hover .arrow { color: #D62828; transform: translateX(3px); }
.hv2-ti.corsi   { background: rgba(21,128,61,.18);  color: #4ADE80; }
.hv2-ti.libri   { background: rgba(202,138,4,.2);   color: #FACC15; }
.hv2-ti.pass    { background: rgba(37,99,235,.2);   color: #60A5FA; }
.hv2-ti.podcast { background: rgba(124,58,237,.22); color: #A78BFA; }

/* bottom strip */
.hv2-scard {
  display: flex; align-items: center; gap: 16px; height: 100%; background: var(--white); border: 1px solid var(--border);
  border-radius: 16px; padding: 20px; box-shadow: 0 1px 2px rgba(9,9,11,.04), 0 8px 24px rgba(9,9,11,.06);
  transition: transform .22s, box-shadow .22s;
}
.hv2-scard:hover { transform: translateY(-4px); box-shadow: 0 20px 60px rgba(9,9,11,.14); }
.hv2-scard .si { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; flex: none; color: #fff; }
.hv2-scard.esperti .si { background: #0EA5E9; }
.hv2-scard.libri2  .si { background: var(--gold); }
.hv2-scard.podcast2 .si { background: #7C3AED; }
.hv2-scard h3 { font-size: 13px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; margin: 0; }
.hv2-scard p { font-size: 13px; color: var(--muted); margin: 3px 0 0; line-height: 1.35; }
.hv2-scard .chev { margin-left: auto; color: var(--border); transition: color .2s, transform .2s; flex: none; }
.hv2-scard:hover .chev { color: var(--ink); transform: translateX(3px); }

/* ══════════════════════════════════════════════════
   NEWSLETTER CTA (riusa stile esistente bn-nl da home.css legacy)
══════════════════════════════════════════════════ */
.hv2-nl { background: var(--ink); padding: 80px 40px; text-align: center; border-radius: 24px; margin: 60px 0; position: relative; overflow: hidden; }
.hv2-nl::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 55% 70% at 50% 50%, rgba(11,189,194,.08) 0%, transparent 70%); }
.hv2-nl__inner { position: relative; z-index: 1; max-width: 520px; margin: 0 auto; }
.hv2-nl__kicker { display: inline-block; font-family: var(--f-d); font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--teal); margin-bottom: 18px; }
.hv2-nl__heading { font-family: var(--f-d); font-size: clamp(1.9rem, 3.8vw, 3.2rem); font-weight: 800; color: #fff; line-height: 1.0; letter-spacing: -.03em; margin-bottom: 14px; }
.hv2-nl__sub { font-family: var(--f-b); font-size: 15px; color: rgba(255,255,255,.5); line-height: 1.5; margin-bottom: 34px; }
.hv2-nl__form { display: flex; gap: 8px; max-width: 400px; margin: 0 auto; }
.hv2-nl__input { flex: 1; font-family: var(--f-b); font-size: 14px; color: #fff; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 100px; padding: 12px 20px; outline: none; }
.hv2-nl__input::placeholder { color: rgba(255,255,255,.4); }
.hv2-nl__submit { font-family: var(--f-d); font-size: 13px; font-weight: 700; color: var(--ink); background: var(--teal); border: none; border-radius: 100px; padding: 12px 22px; cursor: pointer; white-space: nowrap; }

/* ══════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .hv2-progetto, .hv2-nl { border-radius: 14px; margin: 40px 0; }
  .hv2-nl { padding: 56px 24px; }
  .hv2-nl__form { flex-direction: column; }
  .hv2-sec { margin: 34px 0; }
}
@media (max-width: 575.98px) {
  .hv2-slide .body { padding: 16px 18px 22px; }
  .hv2-slide h2 { font-size: 1.2rem; line-height: 1.2; max-width: 100%; }
  .hv2-ptile p { display: none; }
  .hv2-ptile h3 { grid-row: 1/3; align-self: center; }
}
