:root{
  /* Base */
  --bg:#f9fafb;               /* bianco “soft” */
  --panel: rgba(255,255,255,.86);
  --line: rgba(17,24,39,.12); /* linee su chiaro */
  --text:#111827;             /* quasi nero */
  --muted:#4b5563;

  /* Accenti */
  --accent:#0ea5e9;
  --accent2:#14b8a6;

  /* Ombre e radius */
  --shadow: 0 10px 30px rgba(17,24,39,.10);
  --r:18px;
  --maxw: 980px;
}


*{ box-sizing:border-box; }
html, body {
  height: 100%;
}

body{
  margin:0;
  min-height: 100vh;              /* ← chiave */
  display: flex;                  /* layout verticale */
  flex-direction: column;

  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: var(--bg);          /* sfondo fisso */
  color:var(--text);
  overflow-x:hidden;
}

main{
  flex: 1 0 auto;   /* il main cresce e spinge il footer giù */
}


a{ color:inherit; text-decoration:none; }

.header{
  position:sticky; top:0; z-index:20;
  backdrop-filter: blur(12px);
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.topbar{
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

/* Desktop: topbar centrata */
@media (min-width: 1024px){
  .topbar{
    max-width: var(--maxw);
    margin: 0 auto;
  }
}


.brand{
  border:0;
  background: transparent;
  color: inherit;
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:10px;
  padding:0;
}

.logo{
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
}


.brandText{ display:flex; flex-direction:column; line-height:1.1; text-align:left; }
.brandText b{ font-size:14px; }
.brandText span{ font-size:12px; color:var(--muted); }

.navLinks{ display:flex; gap:10px; align-items:center; }
.navLink{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--muted);
}
.navLink:hover{ border-color: rgba(94,234,212,.35); color: var(--text); }

.container{
  width: 100%;
  margin: 0;
  padding: 14px;              /* mobile/tablet full width con padding */
}





.breadcrumbs{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin: 10px 0 0;
  color: var(--muted);
  font-size:13px;
}

.crumb{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.02);
}
.crumb button{
  background:transparent;
  border:0;
  color:inherit;
  cursor:pointer;
  font:inherit;
}
.crumb button[disabled]{ cursor: default; opacity:.85; }

.view{ display:none; }
.view.active{ display:block; }

/* ===== LANDING HERO ===== */

/* Landing hero: full width su mobile, centrata (max-width) su desktop come il resto */
/* Contenuto interno della landing hero */

.landingHeroBox{
  border: 1px solid var(--line);
  border-radius: calc(var(--r) + 4px);
  background: #ffffff;
  box-shadow: var(--shadow);
  overflow: hidden;
  height: auto;
}



.landingHeroInner{
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 20px;              /* ← fondamentale */
}

/* Desktop: testo + sponsor affiancati, aria più elegante */
@media (min-width: 1024px){
  .landingHeroInner{
    grid-template-columns: 1.2fr .8fr;
    padding: 26px 28px;       /* più “respiro” su desktop */
    align-items: start;
  }
}


.heroBlock h1{
  margin:0 0 6px;
  font-size: 22px;
  letter-spacing: .2px;
}
.heroBlock p{
  margin:0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

.sponsorBox{
  height: fit-content;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #ffffff;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(17,24,39,.08);
}
.sponsorBox b{ color: var(--text); }
.sponsorLogo{ border: 1px solid rgba(17,24,39,.35); }


.sponsorLogo:hover{
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
}

.sponsorLogo img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
}

.sponsorRow{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}


/* ===== LISTA VERTICALE FULL WIDTH ===== */
.list{
  display:flex;
  flex-direction:column;
  gap:14px;
  margin-top:16px;
}

.cardWrap{ cursor:pointer; }

.card{
  width: 100%;
  border:1px solid var(--line);
  border-radius: var(--r);
  overflow:hidden;
  background: #ffffff;
  box-shadow: var(--shadow);
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.card:hover{
  border-color: rgba(14,165,233,.35);
  box-shadow: 0 14px 34px rgba(17,24,39,.14);
}


.card:active{ transform: scale(.995); }


/* Altezza thumbnail più contenuta (stile "prima") */
.thumb{
  height: 170px;              /* desktop default più basso */
  background:#e5e7eb;
  position:relative;
  overflow:hidden;
}

/* Su mobile un po’ più alta, ma non enorme */
@media (max-width: 600px){
  .thumb{
    height: 190px;
  }
}


.thumb::after{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,.08) 0%,
    rgba(0,0,0,.02) 40%,
    rgba(0,0,0,.10) 100%
  );
  pointer-events:none;
}

.thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  opacity:1;
  transform: scale(1.02);
  transition: transform .25s ease, filter .25s ease;
  filter: contrast(1.05) saturate(1.03);
}
.card:hover .thumb img{
  transform: scale(1.06);
  filter: contrast(1.08) saturate(1.06);
}


.body{ padding:14px 14px 16px; display:flex; flex-direction:column; gap:10px; }
.body h3{ margin:0; font-size:16px; }
.body p{
  margin:0;
  color:var(--muted);
  font-size:13px;
  line-height:1.4;
  display:-webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow:hidden;
}
.meta{ color: var(--muted); }
.dot{ background: rgba(20,184,166,.9); }


/* ===== DETTAGLIO POI ===== */
.detail{
  margin-top:16px;
  border-radius: calc(var(--r) + 4px);
  border:1px solid var(--line);
  background: #ffffff;
  box-shadow: var(--shadow);
  overflow:hidden;
}

.hero{ position:relative; background:#000; }

/* Default: mobile / tablet */
.heroInner{
  aspect-ratio: 16 / 9;
  width: 100%;
  max-height: 560px;
  background:#000;
  overflow:hidden;
}

.heroInner img,
.heroInner video{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Desktop: dimensioni REALI (no crop, no stretch) */
@media (min-width: 1024px){
  .heroInner{
    aspect-ratio: auto;
    max-height: none;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .heroInner img,
  .heroInner video{
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
  }
}

/* Se app.js inserisce un wrapper, lo forziamo a riempire */
.heroInner > *{
  width: 100%;
  height: 100%;
}

/* Media veri */
.heroInner img,
.heroInner video,
.heroInner iframe{
  width: 100%;
  height: 100%;
  object-fit: cover;        /* per img/video */
  display:block;
  border:0;                 /* per iframe */
}



.heroTop{
  position:absolute;
  left:12px; right:12px; top:12px;
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
  pointer-events:none;
  flex-wrap:wrap;
}


.audioBtn[disabled]{ opacity:.55; cursor:not-allowed; }

.heroNav{
  position:absolute;
  inset:0;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:0 10px;
  pointer-events:none;
}
.heroBtn{
  pointer-events:auto;
  width:44px; height:44px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(11,18,32,.55);
  color:var(--text);
  display:grid;
  place-items:center;
  backdrop-filter: blur(10px);
  cursor:pointer;
}

.detailBody{
  padding:16px;
  display:grid;
  grid-template-columns: 1fr;
  gap:14px;
}
.detailTitle{ margin:0 0 8px; font-size:20px; }
.detailDesc{ margin:0; color:var(--muted); line-height:1.6; font-size:14px; white-space:pre-line; }

@media (min-width: 900px){
  .detailBody{ grid-template-columns: 1.4fr .6fr; }
  .detailTitle{ font-size:22px; }
}

.sideBox{
  border:1px solid var(--line);
  border-radius: var(--r);
  background: rgba(249,250,251,.9);
  padding:14px;
}

.sideBox b{ display:block; margin-bottom:8px; }
.kv{
  display:flex;
  justify-content:space-between;
  gap:12px;
  font-size:13px;
  color:var(--muted);
  padding:8px 0;
  border-bottom:1px solid var(--line);
}
.kv:last-child{ border-bottom:0; }

/* Raccomandati */
.footerRec{
  border-top:1px solid var(--line);
  padding:16px;
}
.footerRec h3{ margin:0 0 12px; font-size:16px; }

.recGrid{
  display:grid;
  grid-template-columns: 1fr;
  gap:12px;
}
@media (min-width: 700px){ .recGrid{ grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px){ .recGrid{ grid-template-columns: 1fr 1fr 1fr; } }

.mini{
  border-radius: 16px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  overflow:hidden;
  cursor:pointer;
  transition: transform .16s ease, border-color .16s ease;
}
.mini:hover{ transform: translateY(-2px); border-color: rgba(94,234,212,.30); }
.mimg{ height:96px; }
.mimg img{ width:100%; height:100%; object-fit:cover; opacity:.95; display:block; }
.mbody{ padding:10px; }
.mbody b{ display:block; font-size:13px; margin-bottom:4px; }
.mbody span{ font-size:12px; color:var(--muted); }

/* Chi siamo page */
.pageCard{
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: calc(var(--r) + 4px);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  box-shadow: var(--shadow);
  padding: 16px;
}
.pageCard h1{ margin:0 0 10px; font-size:22px; }
.pageCard p{ margin:0 0 10px; color: var(--muted); line-height:1.7; }
.pageCard p:last-child{ margin-bottom:0; }

.siteFooter{
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.70);
  backdrop-filter: blur(10px);
}


.siteFooter .footerInner{
  width: 100%;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 12px;
}

/* Desktop: footer centrato */
@media (min-width: 1024px){
  .siteFooter .footerInner{
    max-width: var(--maxw);
    margin: 0 auto;
  }
}

/* Mobile: tutto centrato */
@media (max-width: 600px){
  .siteFooter .footerInner{
    flex-direction: column;
    text-align: center;
  }
}


.footerSocial{
  display: flex;
  gap: 14px;
}


/* Sezione liste a larghezza piena schermo */
.fullWidthSection{
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-left: 14px;
  padding-right: 14px;
}

/* cards veramente a piena larghezza dentro la sezione full width */
.fullWidthSection .card{
  width: 100%;
}


.heroBlock h1{
  font-size: 24px;
  line-height: 1.25;
  margin-bottom: 10px;
}

.heroBlock p{
  font-size: 15px;
  line-height: 1.65;
  max-width: 90ch;   /* testo più elegante */
}

/* Per sicurezza: evita che qualche regola la faccia enorme */
.landingHero{
  margin-top: 14px;
  margin-bottom: 16px;
}

.fullWidthSection .detail{
  width: 100%;
  margin-top: 16px;
}

/* Riabilita click su tag e pulsante audio (heroTop è pointer-events:none) */
.tagRow,
.tagPill,
.audioBtn{
  pointer-events: auto;
}


/* Pulsante audio ben visibile su sfondo chiaro/scuro */
.audioBtn{
  background: rgba(255,255,255,.92);   /* bianco visibile */
  color: #111827;                       /* testo/icone scure */
  border: 1px solid rgba(17,24,39,.18);
  box-shadow: 0 6px 18px rgba(17,24,39,.18);
  backdrop-filter: blur(6px);

  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 999px;

  display: grid;
  place-items: center;
  font-size: 18px;
  cursor: pointer;
}

/* Hover */
.audioBtn:hover{
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(17,24,39,.22);
}

/* Stato disabilitato */
.audioBtn[disabled]{
  opacity: .45;
  cursor: not-allowed;
  box-shadow: none;
}

/* TAG POI – stile placca dorata */
/* TAG POI – placca dorata (solo testo, senza simboli) */
.tag{
  pointer-events: auto;
  cursor: default;

  padding: 8px 14px;
  border-radius: 999px;

  background: linear-gradient(
    135deg,
    #f8f0c0 0%,
    #e7c96a 25%,
    #d4af37 50%,
    #e7c96a 75%,
    #fff3b0 100%
  );

  border: 1.5px solid #111;

  color: #1f2937;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .5px;
  text-transform: uppercase;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.6),
    0 4px 14px rgba(0,0,0,.25);
}

/* --- Social icons: ripristino visibilità --- */
.socialIcon{
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.85);
  color: var(--muted);
}

.socialIcon svg{
  width: 18px;
  height: 18px;
  fill: currentColor;   /* fondamentale per vedere le icone */
  display: block;
}

.socialIcon:hover{
  color: var(--text);
  background: #ffffff;
  transform: translateY(-2px);
}


/* Contenitore placche tag (in alto sulla hero) */
.tagRow{
  pointer-events: auto;
  display:flex;
  flex-wrap:wrap;
  gap: 8px;
  align-items:center;
}

/* Contenitore tags in hero (in alto a sinistra) */
#detailTags{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

/* Placca oro (senza simboli) */
.tagPill{
  display:inline-flex;
  align-items:center;
  padding:10px 14px;
  border-radius: 999px;                /* roundrect */
  border: 1px solid #111;              /* bordo nero */
  background: linear-gradient(
    180deg,
    #f7e7a6 0%,
    #d4af37 55%,
    #b8870b 100%
  );
  color: #1b1403;                      /* testo leggibile su oro */
  font-weight: 700;
  letter-spacing: .3px;
  font-size: 12px;
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
}


/* Slideshow disattivato: nascondi sempre le frecce */
.heroNav{ display:none !important; }
