/* =====================================================================
   FAIND — home2.css: la home a icone (versione di prova, vedi home2.js)
   Tutto vale solo con la classe .home2 sulla pagina: la home di sempre non cambia.
   ===================================================================== */
.home2 .intro { margin-bottom: 10px; }
.home2 .intro__title { max-width: 62ch; font-weight: 600; color: var(--muted); }
.home2 .intro__actions { display: none; }

/* ------------------------------ Fila di icone ------------------------------ */
.h2apps { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 14px; margin: 4px 0 22px; }
.h2app {
  appearance: none; -webkit-appearance: none; background: none; border: 0; padding: 0; margin: 0; font: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; color: var(--ink);
  -webkit-tap-highlight-color: transparent; min-width: 0;
}
/* Bottoni definitivi forniti da Paolo (12 ottobre 2026): riquadro, costa, riflessi e prospettiva sono già nell'immagine,
   quindi qui niente sfondo, bordo o trasformazioni aggiuntive. L'etichetta resta dritta sotto il bottone. */
a.h2app { text-decoration: none; }
.h2app__sub { margin-top: -5px; font-size: 10px; font-weight: 800; letter-spacing: .08em; line-height: 1; text-align: center; white-space: nowrap; color: var(--link); text-transform: uppercase; }
.h2app__tile {
  position: relative; display: block; width: 100%; max-width: 112px; aspect-ratio: 1; border-radius: 20%;
  transition: transform .18s ease;
}
.h2app__tile img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 6px 7px rgba(8, 14, 30, .22)); pointer-events: none; user-select: none; -webkit-user-drag: none; }
.h2app__lbl { font-size: 14px; font-weight: 600; line-height: 1.2; text-align: center; white-space: nowrap; color: var(--ink); }
@media (hover: hover) { .h2app:hover .h2app__tile { transform: translateY(-2px); } }
.h2app:active .h2app__tile { transform: scale(.96); }
.h2app:focus, .h2app:focus-visible { outline: none; }
.h2app:focus:not(:focus-visible) .h2app__tile { outline: none; }
.h2app:focus-visible .h2app__tile { outline: 3px solid var(--focus); outline-offset: 1px; }
/* selezione: contorno ciano sottile attorno alla faccia del bottone. Il bottone è in prospettiva e il contorno no:
   dalla metà del lato superiore e del lato destro il contorno sfuma nello sfondo (idea di Paolo, 12 ottobre 2026) */
.h2app[aria-pressed="true"] .h2app__tile::after {
  content: ""; position: absolute; left: 8%; top: 4%; right: 2%; bottom: 4%; border-radius: 13%;
  border: 2px solid #3FB8E6; pointer-events: none;
  -webkit-mask-image: linear-gradient(to top right, #000 75%, transparent 100%);
  mask-image: linear-gradient(to top right, #000 75%, transparent 100%);
}
.h2app[aria-pressed="true"] .h2app__lbl { color: var(--link); font-weight: 700; }

/* Fila in loop (home2.js → roll): la fila resta ferma e gira solo quando la si rolla, senza inizio né fine */
.h2apps.h2apps--loop {
  display: block; overflow: hidden; position: relative; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none;
  padding: 4px 0 6px; margin-top: 0;
}
.h2apps--loop.is-rolling { cursor: grabbing; }
.h2apps__track { display: flex; gap: 14px; width: max-content; will-change: transform; }
.h2apps--loop .h2app { flex: 0 0 var(--h2w, 104px); width: var(--h2w, 104px); }
.h2apps--loop.is-rolling .h2app__tile { transform: none; transition: none; }
.h2buzz { position: fixed; left: -200px; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; overflow: hidden; }

/* ------------------------------ Spazio che cambia ------------------------------ */
.h2news[hidden], .h2panel[hidden] { display: none; }
.h2all { display: flex; margin: 22px auto 0; }
.h2news #results:not([hidden]) ~ .h2all { display: none; }
#h2store { display: none !important; }

.h2panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-l); box-shadow: var(--shadow); }
.h2panel__head {
  position: sticky; top: var(--header-h); z-index: 6; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px 14px 22px; background: var(--surface); border-bottom: 1px solid var(--rule); border-radius: var(--radius-l) var(--radius-l) 0 0;
}
.h2panel__title { font-size: 23px; font-weight: 800; font-stretch: 84%; letter-spacing: -.01em; outline: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h2panel__change {
  display: none; flex-shrink: 0; margin-left: auto; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; cursor: pointer; font: inherit;
  font-size: 14px; font-weight: 650; border: 1px solid var(--rule); background: var(--bg); color: var(--ink); white-space: nowrap;
}
.h2panel__change svg { flex-shrink: 0; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.h2panel__change:hover { border-color: var(--link); color: var(--link); }
.h2panel.h2-apps-away .h2panel__change { display: inline-flex; }
.h2panel__x {
  flex-shrink: 0; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--rule); background: var(--bg); color: var(--ink);
}
.h2panel__x svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.h2panel__x:hover { border-color: var(--muted); }
.h2panel__x:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.h2panel__body { padding: 4px 22px 26px; }
.h2panel__body > .block { margin-top: 26px; }
.h2panel__body > .panel { background: none; border: 0; border-radius: 0; padding: 22px 0 0; box-shadow: none; }
.h2panel__body > * + .panel { margin-top: 26px; border-top: 1px solid var(--rule); }
.h2panel__body .tgbox__img, .h2panel__body .smv__img { display: block; max-width: 380px; }
.h2panel__body .tgbox__btn { max-width: 380px; }
.h2panel__body #strano-ma-vero .btn, .h2panel__body #prezzi .btn { display: inline-flex; }
/* Curiosità sul telefono: il blocco di Strano ma vero apre la scheda e la lista segue subito; il pulsante è già in fondo alla lista */
.h2panel--curiosita .h2panel__body > #strano-ma-vero { padding-top: 14px; }
.h2panel--curiosita .h2panel__body > #strano-ma-vero .btn { display: none; }
.h2panel--curiosita .h2panel__body > #strano-ma-vero + .h2smv { margin-top: 6px; border-top: 1px solid var(--rule); }
.h2smv-lede { display: none; }
.h2panel--curiosita #strano-ma-vero > p:not(.h2smv-lede) { display: none; }
.h2panel--curiosita #strano-ma-vero > .h2smv-lede {
  display: flex; flex-direction: column; gap: 6px; margin: 14px 0 4px; padding: 0; text-align: left;
  font-size: 14px; line-height: 1.35; font-weight: 750; color: var(--ink);
}
.h2empty { color: var(--muted); padding-top: 22px; }
/* sottotitoli delle schede più leggibili */
.h2panel .block__hint, .h2panel .jobs__sub { font-size: 16.5px; line-height: 1.45; }
.h2panel .secq, .h2panel .panel > .secq, .h2panel .wire__head .secq { font-size: 16px !important; }

.h2-in { animation: h2in .32s cubic-bezier(.2, .7, .2, 1); }
@keyframes h2in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ------------------------------ Anteprime sempre presenti ------------------------------ */
.h2more > .block:first-child, .h2more > .panel:first-child { margin-top: 48px; }
.h2more > .panel { margin-top: 44px; }
.h2more #approfondimenti .deep__card:nth-child(n+4) { display: none; }
.h2more #approfondimenti .deep { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#approfondimenti .block__head .deep__all:not(.h2gloss) { margin-left: auto; }
.h2gloss { margin-left: 18px; }

/* Presentazione breve */
.home2 .about.h2short [data-about] > :not(.about__title):not(.about__founder):not(.about__lede):not(.h2links) { display: none; }
.home2 .about.h2short .share { display: none; }
.h2links { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 4px; }
.h2link {
  appearance: none; font: inherit; cursor: pointer; display: inline-flex; align-items: center; padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--rule); background: var(--bg); color: var(--ink); font-size: 15px; font-weight: 650; text-decoration: none;
}
.h2link:hover { border-color: var(--link); color: var(--link); }
.h2link--more { color: var(--link); border-color: color-mix(in srgb, var(--link) 40%, transparent); background: var(--surface); }

/* ------------------------------ Tablet e telefono ------------------------------ */
@media (max-width: 1120px) {
  .h2apps { gap: 10px; }
  .h2apps__track { gap: 10px; }
  .h2app__lbl { font-size: 13px; }
}
@media (max-width: 900px) {
  .home2 .h2news #wire .wire__item:nth-child(n+6) { display: none; }      /* sul telefono una prima selezione, non l'intero archivio */
  .h2more #approfondimenti .deep { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h2more #approfondimenti .deep__card:nth-child(n+3) { display: none; }
}
@media (max-width: 720px) {
  .home2 .intro__title { font-size: 15.5px; line-height: 1.4; }
  .home2 .layout { padding-top: 14px; }
  /* una sola fila che scorre col dito; si intravede l'icona successiva */
  .h2apps {
    display: flex; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none;
    margin: 2px calc(var(--gutter) * -1) 14px; padding: 4px var(--gutter) 6px; scroll-padding-inline: var(--gutter);
    -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y;
  }
  .h2apps::-webkit-scrollbar { display: none; }
  .h2app { flex: 0 0 72px; scroll-snap-align: start; }
  /* in loop: la fila va da bordo a bordo dello schermo e sfuma appena ai lati */
  .h2apps.h2apps--loop { overflow: hidden; padding: 4px 0 6px; margin: 2px calc(var(--gutter) * -1) 14px;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%); }
  .h2apps__track { gap: 12px; }
  .h2apps--loop .h2app { flex: 0 0 72px; width: 72px; }
  .h2app__lbl { font-size: 12.5px; }
  .h2panel { margin-inline: calc(var(--gutter) * -1 + 6px); }
  .h2panel__body { padding: 0 16px 22px; }
  .h2panel__head { padding: 12px 12px 12px 16px; }
  .h2panel__title { font-size: 21px; }
  .h2more #approfondimenti .deep { grid-template-columns: minmax(0, 1fr); }
  .h2more #approfondimenti .deep__card:nth-child(n+3) { display: block; }
  .h2more #approfondimenti .deep__card:nth-child(n+4) { display: none; }
  .h2gloss { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .h2-in { animation: none; }
  .h2app__tile { transition: none; }
}

/* Telegram e Strano ma vero dentro il pannello, sul computer: immagine a sinistra, testo a destra */
@media (min-width: 721px) {
  .h2panel__body > #telegram, .h2panel__body > #strano-ma-vero { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); column-gap: 28px; align-content: start; }
  .h2panel__body > #telegram > .tgbox__img, .h2panel__body > #strano-ma-vero > .smv__img { grid-row: 1 / span 6; margin: 0; }
  .h2panel__body > #telegram > :not(.tgbox__img), .h2panel__body > #strano-ma-vero > :not(.smv__img) { grid-column: 2; }
  .h2panel__body > #telegram .tgbox__btn, .h2panel__body > #strano-ma-vero .btn { justify-self: start; }
  /* Curiosità: foto a sinistra, le due righe centrate in verticale e in orizzontale nello spazio a destra */
  .h2panel--curiosita .h2panel__body > #strano-ma-vero { grid-template-columns: minmax(0, 380px) minmax(0, 1fr); grid-template-rows: auto; }
  .h2panel--curiosita .h2panel__body > #strano-ma-vero > .smv__img { grid-row: 1; }
  .h2panel--curiosita .h2panel__body > #strano-ma-vero > .h2smv-lede { grid-row: 1; align-self: center; margin: 0; font-size: 19px; line-height: 1.3; gap: 4px; }
  .h2panel--curiosita .h2panel__body > #strano-ma-vero > .h2smv-lede > span { white-space: nowrap; }
}

/* Un solo titolo per sezione: quello del pannello (le Notizie tengono i sottotitoli Importanti, Letture…) */
.h2panel:not(.h2panel--notizie) .h2panel__body > :first-child > .block__head > .block__title,
.h2panel:not(.h2panel--notizie) .h2panel__body > :first-child > .panel__title,
.h2panel:not(.h2panel--notizie) .h2panel__body > :first-child .jobs__title,
.h2panel:not(.h2panel--notizie) .h2panel__body > :first-child .jobs__ico { display: none; }
.h2panel:not(.h2panel--notizie) .h2panel__body > .block:first-child { margin-top: 16px; }
.h2panel:not(.h2panel--notizie) .h2panel__body > .panel:first-child { padding-top: 16px; }
.h2panel__body > .block:first-child > .block__head:empty { display: none; }

/* Curiosità: le ultime storie, poi il link a tutte */
.h2smv { padding-top: 6px; }
.h2smv__list { list-style: none; margin: 0; padding: 0; counter-reset: smv; }
.h2smv__item { counter-increment: smv; position: relative; padding: 20px 0 20px 48px; border-bottom: 1px solid var(--rule); }
.h2smv__item::before { content: counter(smv); position: absolute; left: 0; top: 16px; font-size: 34px; font-weight: 800; font-stretch: 76%; line-height: 1; color: var(--ai); }
.h2smv__h { font-size: 19px; line-height: 1.25; font-weight: 760; margin-bottom: 6px; }
.h2smv__h a { color: var(--ink); text-decoration: none; }
.h2smv__h a:hover { text-decoration: underline; }
.h2smv__p { color: var(--muted); font-size: 15.5px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.h2smv__src { font-size: 13.5px; color: var(--muted); margin-top: 8px; }
.h2smv__src strong { color: var(--ink); font-weight: 650; }
.h2smv__all { margin-top: 22px; display: inline-flex; }

/* Computer: con una sezione aperta il pannello prende tutta la larghezza, niente colonna vuota a destra */
@media (min-width: 1121px) {
  .home2.h2-open .layout { grid-template-columns: minmax(0, 1fr); }
  .home2.h2-open .side { display: none; }
  .home2.h2-open .h2apps { max-width: 1040px; }
}
@media (max-width: 720px) {
  .h2panel__change { padding: 7px 11px; font-size: 13px; gap: 4px; }   /* come sul computer: freccia e scritta */
  .h2panel__change svg { width: 15px; height: 15px; }
  .h2panel__title { white-space: normal; font-size: 19px; line-height: 1.15; }   /* sul telefono il titolo va a capo invece di tagliarsi */
  .h2smv__item { padding-left: 40px; }
}
@media (prefers-reduced-motion: reduce) { .h2app__tile, .h2app:hover .h2app__tile, .h2app:active .h2app__tile { transform: none; } }
.h2panel:not(.h2panel--notizie) .h2panel__body > :first-child > .block__head { border-bottom: 0; padding-bottom: 0; margin-bottom: 14px; }

/* Newsletter da computer: il riquadro di Faindo (quello del popup) fisso in cima alla colonna */
.nlpop.nlpop--fixed {
  position: relative; z-index: auto; left: auto; top: auto; bottom: auto; width: auto; max-width: none;
  transform: none; transition: none; border: 2px solid #0E1A33; border-radius: 22px; box-shadow: var(--shadow); padding: 28px 18px 16px;
}
.nlpop.nlpop--fixed::before { border-radius: 20px 20px 0 0; }
.nlpop.nlpop--fixed .nlpop__x { display: none; }
.nlpop.nlpop--fixed.is-typing { width: auto; }
.nlpop.nlpop--fixed.is-typing .nlpop__img { width: 82%; }
.nlpop.nlpop--fixed.is-typing .nlpop__input { font-size: 18px; padding: 12px 14px; }
@media (max-width: 1120px) { .nlpop.nlpop--fixed { align-self: start; } }
