/* QI Test - nuovo stile (2026-11-06). Template stile/main_nuovo.html, logica in stile/nuovo_stile.php.
   Colori presi dal logo: blu notte, azzurro dei neuroni, arancio del bagliore; pulsante verde come quello originale.
   Se cambi questo file incrementa IQ_VER in nuovo_stile.php. */

@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url(/stile/fonts/SourceSans3-400-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url(/stile/fonts/SourceSans3-400-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Sans 3"; font-style: italic; font-weight: 200 900; font-display: swap;
  src: url(/stile/fonts/SourceSans3-400i-latin.woff2) format("woff2"); }
@font-face { font-family: Motoroil; font-display: swap; src: url(/font/Motoroil.ttf) format("truetype"); }

:root {
  --notte: #0e2b47; --blu: #14497a; --azzurro: #4dacf0; --azzurro-scuro: #1f7fc4; --arancio: #f07a24;
  --verde: #23a243; --verde-scuro: #17823a;
  --sfondo: #eef3f8; --carta: #fff; --testo: #1d2a38; --tenue: #5a6b7d; --linea: #d5dee8;
  --testo-font: "Source Sans 3", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --titolo-font: Motoroil, "Source Sans 3", Helvetica, Arial, sans-serif;
  --raggio: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.iq { margin: 0; background: var(--sfondo); color: var(--testo); font: 400 18px/1.6 var(--testo-font); text-align: left; }
.iq img { border: 0; max-width: 100%; height: auto; }
.iq a { color: var(--azzurro-scuro); }
.iq a:hover { color: var(--arancio); }

/* ---------- testata: logo su una fascia che riprende i colori dei bordi dell'immagine ---------- */
.iq-testata { background: linear-gradient(90deg, #14497a 0 50%, #0e2b47 50% 100%); }
.iq-logo { display: block; max-width: 978px; margin: 0 auto; line-height: 0; }
.iq-logo img { display: block; width: 100%; height: auto; }

.iq-menu { background: #0a1f35; border-top: 1px solid rgba(77,172,240,.35); box-shadow: 0 2px 10px rgba(0,0,0,.18); }
.iq-menu-in { max-width: 1180px; margin: 0 auto; padding: 8px 16px; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.iq .iq-voce { display: inline-flex; align-items: center; min-height: 40px; padding: 4px 16px; border-radius: 999px;
  color: #dbe7f3; text-decoration: none; font-size: 17px; font-weight: 600; letter-spacing: .01em; transition: background .15s, color .15s; }
.iq .iq-voce:hover { background: rgba(77,172,240,.16); color: #fff; }
.iq .iq-voce.iq-attiva { background: var(--azzurro); color: #062033; }
.iq .iq-voce-test { background: var(--verde); color: #fff; font-family: var(--titolo-font); font-weight: 400; font-size: 18px; letter-spacing: .03em; }
.iq .iq-voce-test:hover { background: #2cb94f; color: #fff; }
.iq .iq-voce-test.iq-attiva { background: #fff; color: var(--verde-scuro); }

/* ---------- pagina: contenuto + colonna annunci a destra sugli schermi larghi ---------- */
.iq-pagina { max-width: 1180px; margin: 24px auto; padding: 0 16px; display: grid; gap: 20px;
  grid-template-columns: minmax(0, 1fr); grid-template-areas: "corpo" "dopo" "alto" "lato"; }
.iq-corpo { grid-area: corpo; }
.iq-ad-alto { grid-area: alto; }
.iq-ad-dopo { grid-area: dopo; }
.iq-lato { grid-area: lato; }
@media (min-width: 1000px) {
  .iq-pagina { grid-template-columns: minmax(0, 1fr) 300px; grid-template-areas: "alto lato" "corpo lato" "dopo lato"; align-items: start; }
  .iq-lato { position: sticky; top: 16px; }
  /* durante il test la domanda resta in cima, l'annuncio scende sotto */
  .iq-pag-iqtest .iq-pagina { grid-template-areas: "corpo lato" "alto lato" "dopo lato"; }
}
.iq-ad:empty, .iq-ad-alto:not(:has(ins)), .iq-ad-dopo:not(:has(ins)) { display: none; }
.iq-ad { min-width: 0; text-align: center; }
ins.adsbygoogle[data-ad-status="unfilled"], ins.adsbygoogle[data-ad-status="unfill-optimized"] { display: none !important; }

/* ---------- riquadro del contenuto ---------- */
.iq-corpo { background: var(--carta); border-radius: var(--raggio); padding: 28px 36px 32px; box-shadow: 0 1px 2px rgba(14,43,71,.06), 0 6px 24px rgba(14,43,71,.07); min-width: 0; overflow-wrap: break-word; }
.iq-corpo > br:first-child { display: none; }
.iq-corpo .title { display: block; font-family: var(--titolo-font); font-weight: 400; font-size: 34px; line-height: 1.15; color: var(--notte); margin: 0 0 .1em; }
.iq-corpo .title::after { content: ""; display: block; width: 64px; height: 4px; margin-top: 12px; border-radius: 2px; background: linear-gradient(90deg, var(--azzurro), var(--arancio)); }
.iq-corpo .subtitle { font-weight: 700; font-size: 19px; color: var(--notte); line-height: 1.4; }
.iq-corpo .text, .iq-corpo .text18 { font-size: 18px; line-height: 1.65; color: var(--testo); }
.iq-corpo .text18 { font-size: 19px; }
.iq-corpo b { color: var(--notte); }
.iq-corpo a.link_dark, .iq-corpo a.link_dark_italic { color: var(--azzurro-scuro); text-decoration: underline; text-underline-offset: 2px; }
.iq-corpo a.link_dark:hover, .iq-corpo a.link_dark_italic:hover { color: var(--arancio); }
.iq-corpo sub { font-size: 15px; color: var(--tenue); vertical-align: baseline; }

/* pulsanti "Vai al test!" / "Inizia il test!" (prima immagini) */
.iq-azione { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 18px; margin: 26px 0 8px; }
.iq a.iq-btn { display: inline-block; padding: 14px 34px 12px; border-radius: 999px; text-decoration: none;
  font-family: var(--titolo-font); font-size: 26px; letter-spacing: .04em; color: #fff;
  background: linear-gradient(180deg, #34c158, var(--verde) 55%, var(--verde-scuro)); box-shadow: 0 4px 0 #11692e, 0 8px 18px rgba(35,162,67,.35);
  transition: transform .1s, box-shadow .1s, filter .15s; }
.iq a.iq-btn:hover { filter: brightness(1.06); color: #fff; }
.iq a.iq-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #11692e, 0 4px 10px rgba(35,162,67,.3); }
.iq-azione-nota { color: var(--tenue); font-size: 16px; }

/* tabelle (classificazione dei punteggi, statistiche) */
.iq-corpo table.tbl400 { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--linea); border-radius: 10px; overflow: hidden; margin: 8px 0; }
.iq-corpo table.tbl400 td, .iq-corpo table.tbl400 th { border: 0; border-bottom: 1px solid var(--linea); padding: 9px 14px; text-align: left; vertical-align: top; }
.iq-corpo table.tbl400 tr:last-child td { border-bottom: 0; }
.iq-corpo table.tbl400 tr:first-child td { background: var(--notte); }
.iq-corpo table.tbl400 tr:first-child td, .iq-corpo table.tbl400 tr:first-child td * { color: #fff; }
.iq-corpo table.tbl400 tr:nth-child(odd):not(:first-child) td { background: #f5f8fb; }
.iq-corpo table.tbl400 .text { font-size: 17px; line-height: 1.45; }
.iq-corpo div[style*="width:"] { max-width: 100%; }          /* riquadri a larghezza fissa delle vecchie pagine */
.iq-corpo table[style*="width:40em"] { width: 100% !important; max-width: 40em; }
.iq-corpo table[style*="width:40em"] img { width: 100% !important; max-width: 10em; border: 1px solid var(--linea); border-radius: 8px; }
.iq-scorre { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }

/* risultato: il grafico si adatta alla larghezza */
.iq-corpo canvas { display: block; max-width: 100%; height: auto; margin: 10px auto; border-radius: 10px; box-shadow: 0 0 0 1px var(--linea); }

/* ---------- pagina della domanda ---------- */
.iq-domanda { max-width: 900px; margin: 0 auto; }
.iq-stato { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; align-items: baseline; font-size: 18px; color: var(--tenue); }
.iq-stato b { color: var(--notte); font-size: 22px; }
.iq-tempo b { font-variant-numeric: tabular-nums; }
.iq-barra { height: 12px; margin: 10px 0 22px; border-radius: 99px; background: #dde6ef; overflow: hidden; }
.iq-barra > div { height: 100%; min-width: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--azzurro), var(--azzurro-scuro)); transition: width .3s; }
.iq-quesito { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 28px; align-items: start; }
.iq-matrice { background: #fff; border: 1px solid var(--linea); border-radius: 12px; padding: 10px; }
.iq-matrice img { display: block; width: 100%; }
.iq-risposte p { margin: 0 0 12px; font-weight: 600; color: var(--notte); }
.iq-griglia { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.iq-griglia button { padding: 8px; background: #fff; border: 2px solid var(--linea); border-radius: 12px; cursor: pointer; line-height: 0;
  transition: border-color .12s, box-shadow .12s, transform .08s; }
.iq-griglia button:hover, .iq-griglia button:focus-visible { border-color: var(--azzurro); box-shadow: 0 0 0 4px rgba(77,172,240,.25); outline: none; }
.iq-griglia button:active { transform: scale(.97); }
.iq-griglia img { width: 100%; height: auto; }
@media (max-width: 760px) {
  .iq-quesito { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .iq-matrice { max-width: 420px; margin: 0 auto; width: 100%; }
}

/* contatti: il modulo usa i colori del sito */
.iq .ct { --ct-accento: var(--azzurro-scuro); --ct-titoli: var(--notte); --ct-font: var(--testo-font); --ct-sfondo: #f5f8fb; --ct-linea: var(--linea); }
.iq .ct-titolo { font-family: var(--titolo-font); font-weight: 400; color: var(--notte); }

/* ---------- pie' di pagina ---------- */
.iq-piede { background: var(--notte); color: #b9c8d8; margin-top: 36px; }
.iq-piede-in { max-width: 1180px; margin: 0 auto; padding: 24px 16px 30px; font-size: 16px; text-align: center; }
.iq-piede p { margin: 6px 0; }
.iq-piede a { color: #e3eef9; }
.iq-piede a:hover { color: var(--azzurro); }
.iq-piede-link { font-size: 17px; }
.iq-piede-nota { font-size: 14px; color: #8fa3b8; max-width: 820px; margin: 12px auto 0 !important; }

/* ---------- telefono ---------- */
@media (max-width: 700px) {
  body.iq { font-size: 17px; }
  .iq-testata { background: #0e2843; }
  .iq-logo { max-width: 600px; }
  /* menu: "Avvia il test!" su tutta la riga, le altre voci due per riga */
  .iq-menu-in { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px 10px 10px; }
  .iq .iq-voce { justify-content: center; text-align: center; min-height: 42px; padding: 4px 8px; font-size: 16px; border-radius: 10px; background: rgba(255,255,255,.06); }
  .iq .iq-voce.iq-attiva { background: var(--azzurro); }
  /* 2026-11-12: "Avvia il test!" tolta dal menu del telefono (richiesta dell utente); nelle pagine resta il pulsante "Vai al test!" */
  .iq .iq-voce-test { display: none; }
  .iq-pagina { margin: 12px auto; padding: 0 10px; gap: 14px; }
  .iq-corpo { padding: 20px 18px 24px; border-radius: 12px; }
  .iq-corpo .title { font-size: 28px; }
  .iq-corpo .text, .iq-corpo .text18 { font-size: 17px; }
  .iq a.iq-btn { font-size: 23px; padding: 13px 28px 11px; }
  .iq-corpo table.tbl400 td { padding: 8px 9px; }
  .iq-corpo table.tbl400 .text { font-size: 15px; }
  .iq-griglia { gap: 8px; }
  .iq-griglia button { padding: 5px; border-radius: 10px; }
}

/* ---------- ritocchi 2026-11-06 ---------- */
/* dopo il titolo le pagine hanno due <br>: ne basta uno */
.iq-corpo .title + br { display: none; }
@media (max-width: 700px) {
  .iq .iq-voce-test.iq-attiva { background: var(--verde); color: #fff; box-shadow: inset 0 0 0 2px #fff; }
  /* domanda del test: matrice e risposte nella stessa schermata */
  .iq-pag-iqtest .iq-stato { font-size: 16px; }
  .iq-pag-iqtest .iq-stato b { font-size: 19px; }
  .iq-pag-iqtest .iq-barra { margin: 6px 0 14px; }
  .iq-pag-iqtest .iq-corpo { padding: 14px 12px 16px; }
  .iq-pag-iqtest .iq-matrice { max-width: 300px; padding: 6px; }
  .iq-pag-iqtest .iq-quesito { gap: 12px; }
  .iq-pag-iqtest .iq-risposte p { margin-bottom: 8px; font-size: 16px; }
}
/* contatti: stesso carattere del resto del sito (contatti.css usa Arial) */
.iq .ct-pagina { font: inherit; padding: 0; }
.iq .ct-titolo { font: 400 34px/1.15 var(--titolo-font); color: var(--notte); margin: 0 0 14px; }
/* 2026-11-06: logo piu' alto sul computer (da 72 a circa 96 px) */
@media (min-width: 701px) { .iq-logo { max-width: 1300px; } }
