/* Attività sportiva: il regolamento come il PDF.
   Lo usano la pagina del sito (blocco «Regolamento») e il generatore del PDF
   (tools/regolamento-pdf/genera.mjs): la grafica del documento è una sola. */

/* ---------- il documento ---------- */
.regolamento__testo { font-size: 16px; line-height: 1.6; min-width: 0; }
.regolamento__testo h1 { scroll-margin-top: 150px; position: relative; padding: 0 0 12px 64px; min-height: 52px; margin: 56px 0 20px; font-size: 30px; line-height: 1.1; font-weight: 900; letter-spacing: -.03em; color: #0A3F7A; border-bottom: 5px solid #0072CE; }
.regolamento__testo h1:first-child { margin-top: 0; }
.regolamento__testo h1::before { content: ""; position: absolute; left: 0; top: 0; width: 50px; height: 50px; background: url(../regolamenti/medaglia-aifg-piccola.png) center/contain no-repeat; }
.regolamento__testo h1 i, .regolamento__testo h2 i { font-style: normal; }
.regolamento__testo h2 { font-size: 19px; font-weight: 900; color: #0072CE; margin: 28px 0 10px; }
.regolamento__testo p { margin: 0 0 10px; }
.regolamento__testo ul { list-style: none; margin: 0 0 12px; padding: 0; }
.regolamento__testo li { position: relative; padding-left: 22px; margin-bottom: 7px; }
.regolamento__testo li .mk { position: absolute; left: 0; color: #0072CE; font-weight: 900; }
.regolamento__testo .c-blu { color: #0072CE; } .regolamento__testo .c-verde { color: #008C45; } .regolamento__testo .c-rosso { color: #CD212A; }
.regolamento__testo .c-viola { color: #77206D; } .regolamento__testo .c-oro { color: #9A7B2F; }
.regolamento__testo mark { background: #FFE58A; color: inherit; border-radius: 3px; padding: 0 2px; }
.regolamento__testo ul.cal, .regolamento__testo .esempio { background: #F4F8FC; border: 1px solid #CFE0F2; border-left: 6px solid #0072CE; border-radius: 12px; padding: 14px 16px 6px; margin: 8px 0 18px; }
.regolamento__testo p.card { background: #FFF8E6; border: 1px solid #F0DDA6; border-left: 6px solid #E8C25A; border-radius: 12px; padding: 12px 16px; }
.regolamento__testo p.card-blu { background: #EEF5FC; border: 1px solid #CFE0F2; border-left: 6px solid #0072CE; border-radius: 12px; padding: 12px 16px; }
.regolamento__testo ul.griglia { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.regolamento__testo ul.griglia li { margin: 0; background: #fff; border: 1px solid #CFE0F2; border-top: 5px solid #0072CE; border-radius: 12px; padding: 14px 16px 14px 36px; box-shadow: 0 3px 12px rgba(10, 63, 122, .1); }
.regolamento__testo ul.griglia li .mk { left: 14px; top: 14px; }
.regolamento__testo table.tab { width: 100%; border-collapse: separate; border-spacing: 0; margin: 8px 0 18px; font-size: 14px; border-radius: 12px; overflow: hidden; box-shadow: 0 3px 12px rgba(10, 63, 122, .14); display: block; overflow-x: auto; }
.regolamento__testo table.tab td { padding: 9px 12px; border-bottom: 1px solid #E6ECF2; vertical-align: top; }
.regolamento__testo table.tab tr:first-child td, .regolamento__testo table.tab tr.tt td { background: linear-gradient(90deg, #0A3F7A, #0072CE); color: #fff; font-weight: 800; }
.regolamento__testo table.tab tr:nth-child(even) td { background: #F6F9FC; }
.regolamento__testo table.tab td:first-child { font-weight: 800; color: #0A3F7A; }
.regolamento__testo table.tab tr:first-child td:first-child, .regolamento__testo table.tab tr.tt td { color: #fff; }
.regolamento__testo table.punti { font-size: 12px; text-align: center; }
.regolamento__testo table.punti tr.hd td { background: #E8F1FA; color: #0A3F7A; font-weight: 900; }
.regolamento__testo table.punti td:nth-child(odd) { color: #0072CE; }
.regolamento__testo .foglio__corpo > :last-child { margin-bottom: 0; }

/* ---------- i fogli: la pagina del sito sembra il PDF ---------- */
.foglio { position: relative; background: #fff; color: #1C2127; border-radius: 6px; box-shadow: 0 10px 30px rgba(10, 30, 60, .14), 0 1px 3px rgba(10, 30, 60, .1); padding: 26px 56px 22px; margin: 0 0 28px; }
.foglio__testa { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 14px; margin-bottom: 26px; border-bottom: 1px solid #E6ECF2; }
.foglio__testa img, .foglio__testa svg { width: 38px; height: 38px; object-fit: contain; flex: 0 0 auto; }
.foglio__testa span { font-size: 10.5px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: #0A3F7A; text-align: center; }
.foglio__piede { display: flex; justify-content: space-between; gap: 16px; margin-top: 30px; padding-top: 12px; border-top: 1px solid #E6ECF2; font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: #6B7785; font-variant-numeric: tabular-nums; }
.regolamento__testo mark.attuale { background: #FFB020; box-shadow: 0 0 0 2px #FFB020; }

/* ---------- la pagina del sito ---------- */
.regolamento { background: #E8EDF2; color: #1C2127; }
.regolamento .eyebrow { color: #0072CE; }
.regolamento .titolo-56 { color: #0A3F7A; }
.regolamento .tenue { color: #4A5663; }
.regolamento__testa { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.regolamento__corpo { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 40px; align-items: start; }
.regolamento__lato { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 18px; max-height: calc(100vh - 110px); }

/* l'area di ricerca */
.regolamento__ricerca { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 16px; background: #fff; box-shadow: 0 6px 20px rgba(10, 30, 60, .1); }
.regolamento__ricerca-titolo, .regolamento__indice-titolo { font-size: 11px; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; color: #0072CE; }
.regolamento__ricerca input { width: 100%; font: 500 15px/1.2 Archivo, system-ui, sans-serif; padding: 12px 14px; border: 2px solid #CFE0F2; border-radius: 12px; outline: none; color: #1C2127; background: #fff; }
.regolamento__ricerca input:focus { border-color: #0072CE; }
.regolamento__navigazione { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.regolamento__esito { font-size: 13px; color: #0A3F7A; font-weight: 700; }
.regolamento__frecce { display: flex; gap: 6px; }
.regolamento__frecce button { width: 32px; height: 32px; border-radius: 10px; border: 1px solid #CFE0F2; background: #F4F8FC; color: #0A3F7A; font: 800 16px/1 Archivo, sans-serif; cursor: pointer; }
.regolamento__frecce button:disabled { opacity: .4; cursor: default; }
.regolamento__risultati { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 38vh; overflow: auto; }
.regolamento__risultati button { width: 100%; text-align: left; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; font: inherit; cursor: pointer; color: #1C2127; }
.regolamento__risultati button:hover, .regolamento__risultati button.attuale { background: #EEF5FC; }
.regolamento__risultati b { display: block; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #0072CE; }
.regolamento__risultati span { font-size: 13px; line-height: 1.4; color: #3A4552; }
.regolamento__risultati mark { background: #FFE58A; color: inherit; border-radius: 2px; }
.regolamento__suggerimenti { display: flex; flex-wrap: wrap; gap: 6px; }
.regolamento__suggerimenti button { padding: 5px 10px; border-radius: 999px; border: 1px solid #CFE0F2; background: #F4F8FC; color: #0A3F7A; font: 700 12px/1.2 Archivo, sans-serif; cursor: pointer; }

/* l'indice */
.regolamento__indice { display: flex; flex-direction: column; gap: 2px; padding: 18px; border-radius: 16px; background: #fff; box-shadow: 0 6px 20px rgba(10, 30, 60, .1); overflow: auto; min-height: 0; font-size: 13px; }
.regolamento__indice a { color: #0A3F7A; text-decoration: none; line-height: 1.3; padding: 6px 0; border-bottom: 1px solid #E6ECF2; display: flex; justify-content: space-between; gap: 10px; }
.regolamento__indice a small { color: #8A96A3; font-variant-numeric: tabular-nums; }
.regolamento__indice a:hover { color: #0072CE; }
.regolamento__documento { min-width: 0; }

@media (max-width: 1000px) {
  .regolamento__corpo { grid-template-columns: 1fr; }
  .regolamento__lato { position: static; max-height: none; }
  .regolamento__indice { display: none; }
  .regolamento__risultati { max-height: 30vh; }
  .regolamento__suggerimenti { display: none; }
}
@media (max-width: 700px) {
  .foglio { padding: 18px 16px 14px; border-radius: 4px; }
  .foglio__testa span { font-size: 8.5px; letter-spacing: .14em; }
  .regolamento__testo { font-size: 15px; }
  .regolamento__testo ul.griglia { grid-template-columns: 1fr; }
  .regolamento__testo h1 { font-size: 23px; padding-left: 52px; }
  .regolamento__testo h1::before { width: 42px; height: 42px; }
}
