:root {
  --viola: #713c95;
  --viola-scuro: #4e2869;
  --corallo: #ef646c;
  --testo: #26212b;
  --tenue: #6b6472;
  --bordo: #ddd6e3;
  --fondo: #f6f3f8;
  --carta: #ffffff;
  --ok: #1f7a4d;
  --errore: #b3261e;
  --avviso: #8a5a00;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--testo);
  background: var(--fondo);
}
[hidden] { display: none !important; }

.fascia { padding: 10px 16px; font-size: 14px; text-align: center; }
.fascia-bozza { background: #fff1c2; color: #5c4200; border-bottom: 1px solid #e9d27a; }
.fascia-prova { background: #e6f0ff; color: #1d3f7a; border-bottom: 1px solid #b9cff5; }

.testata {
  background: linear-gradient(135deg, var(--viola-scuro), var(--viola) 60%, var(--corallo));
  color: #fff;
  padding: 40px 16px 48px;
  text-align: center;
}
.testata h1 { margin: 4px 0 10px; font-size: clamp(24px, 5vw, 38px); line-height: 1.15; }
.sopratitolo { margin: 0; text-transform: uppercase; letter-spacing: .12em; font-size: 13px; opacity: .85; }
.dove { margin: 0; font-size: 16px; opacity: .95; }

.testata-banner { background: #fff; text-align: center; border-bottom: 4px solid; border-image: linear-gradient(90deg, var(--corallo), var(--viola)) 1; }
.testata-banner img.banner { display: block; width: 100%; max-width: 700px; height: auto; margin: 0 auto; }
.sottobanner { margin: 0; padding: 10px 16px 14px; font-size: 15px; color: var(--viola-scuro); }
.testata-banner + .contenitore { margin-top: 24px; }
.solo-lettori { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.contenitore { max-width: 860px; margin: -24px auto 40px; padding: 0 16px; }
.scheda {
  background: var(--carta);
  border: 1px solid var(--bordo);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: 0 2px 10px rgba(60, 30, 80, .05);
}
.scheda h2 { margin: 0 0 18px; font-size: 20px; color: var(--viola-scuro); display: flex; align-items: center; gap: 10px; }
.scheda h3 { margin: 18px 0 10px; font-size: 16px; color: var(--viola-scuro); }
.num {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--viola); color: #fff; font-size: 15px; flex: none;
}

.griglia { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.campo.largo { grid-column: 1 / -1; }
@media (max-width: 640px) {
  .griglia { grid-template-columns: 1fr; }
  .scheda { padding: 18px 16px; }
}
.campo label, legend { display: block; font-weight: 600; font-size: 14px; margin-bottom: 5px; }
.obb { color: var(--corallo); }
input[type="text"], input:not([type]), input[type="email"], input[type="tel"], select {
  width: 100%;
  font: inherit;
  padding: 11px 12px;
  border: 1px solid #c9bfd2;
  border-radius: 8px;
  background: #fff;
  color: var(--testo);
}
input:focus { outline: 3px solid rgba(113, 60, 149, .25); border-color: var(--viola); }
#codice { text-transform: uppercase; max-width: 320px; }
#codice.non-valido { border-color: var(--errore); }

.categorie { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.categorie legend { grid-column: 1 / -1; padding: 0; margin-bottom: 8px; }
@media (max-width: 640px) { .categorie { grid-template-columns: 1fr; } }
.opzione {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border: 1px solid var(--bordo); border-radius: 10px; cursor: pointer;
}
.opzione:has(input:checked) { border-color: var(--viola); background: #f3ecf8; }
.opzione input { width: 18px; height: 18px; accent-color: var(--viola); flex: none; }

.metodo { margin-top: 16px; }
.dati-bonifico { padding: 14px 16px; border: 1px dashed var(--viola); border-radius: 10px; background: #fbf9fd; margin-bottom: 14px; }
.dati-bonifico p { margin: 4px 0; }
.dati-bonifico .iban { font-family: Consolas, "Courier New", monospace; letter-spacing: .04em; word-break: break-all; }
input[type="file"] { font: inherit; font-size: 15px; max-width: 100%; }
.giornate { display: grid; grid-template-columns: 1fr; gap: 8px; }
.opzione:has(input[type="checkbox"]:checked) { border-color: var(--viola); background: #f3ecf8; }
.opzione input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--viola); flex: none; }
.prezzo-giorno { margin-left: 6px; color: var(--viola-scuro); }
.nota-requisito { margin: 0 0 12px; padding: 8px 12px; border-radius: 8px; background: #fff; border: 1px solid #f3c2c5; color: var(--viola-scuro); font-weight: 600; font-size: 14px; }
.servizi li.gruppo { list-style: none; margin: 12px 0 4px -20px; font-weight: 700; color: var(--viola-scuro); }
.servizi li.gruppo:first-child { margin-top: 0; }
.consiglio { margin: 10px 0 0; padding: 12px 16px; border-radius: 10px; background: #fff4d6; border: 1px solid #f0c96b; }
.consiglio p { margin: 0 0 10px; color: var(--avviso); font-weight: 600; font-size: 15px; }
.scheda.corso { border-left: 5px solid var(--corallo); }
.corso-titolo { margin: 0 0 8px; font-size: 18px; font-weight: 700; color: var(--viola-scuro); font-style: italic; }
.corso-dati { margin: 4px 0; font-size: 15px; }
.corso-scelta { margin-top: 14px; }
.corso-scelta:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.prezzo-corso-categoria { margin: 12px 0 0; padding: 10px 14px; border-radius: 10px; background: #f6f1fa; color: var(--tenue); font-size: 15px; }
.quota-barrata { color: var(--tenue); font-weight: 600; margin-right: 10px; text-decoration-thickness: 2px; text-decoration-color: var(--corallo); }
.quota-ridotta { display: inline-block; color: var(--ok); }
.prezzo-corso-categoria.attiva { background: linear-gradient(90deg, #f3ecf8, #fdeef0); color: var(--viola-scuro); font-size: 18px; font-weight: 700; border: 1px solid #e3d5ec; }
.tabella-servizi h2 { margin-bottom: 12px; }
.scorri-tabella { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--bordo); border-radius: 10px; }
.tabella-servizi table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 14px; }
.tabella-servizi thead th { background: var(--viola); color: #fff; padding: 10px 8px; text-align: center; font-size: 13px; line-height: 1.25; vertical-align: bottom; }
.tabella-servizi thead th:first-child { text-align: left; }
.tabella-servizi thead small { display: block; font-weight: 400; font-size: 11px; opacity: .85; margin-top: 3px; }
.tabella-servizi tbody th { text-align: left; font-weight: 400; padding: 8px 10px; color: var(--testo); }
.tabella-servizi tbody tr:nth-child(even) th, .tabella-servizi tbody tr:nth-child(even) td { background-color: #fbf9fd; }
.tabella-servizi td { text-align: center; padding: 8px 6px; border-left: 1px solid #eee7f2; width: 19%; }
.tabella-servizi tbody tr { border-top: 1px solid #eee7f2; }
.tabella-servizi td.si { color: var(--ok); font-weight: 700; font-size: 16px; }
.tabella-servizi td.no { color: #b9b2bf; }
.tabella-servizi td.condizione { color: var(--avviso); font-size: 12px; font-style: italic; line-height: 1.3; }
.tabella-servizi .riga-corso th, .tabella-servizi .riga-corso td { background: #f3ecf8 !important; color: var(--viola-scuro); font-weight: 700; }
@media (max-width: 640px) {
  .tabella-servizi table { min-width: 0; font-size: 12px; table-layout: fixed; }
  .tabella-servizi thead th { font-size: 10px; padding: 8px 2px; letter-spacing: -.01em; }
  .tabella-servizi thead th:first-child { width: 40%; }
  .tabella-servizi thead small { font-size: 9px; }
  .tabella-servizi tbody th { padding: 7px 6px; font-size: 12px; }
  .tabella-servizi td { padding: 6px 2px; width: auto; }
  .tabella-servizi td.si { font-size: 14px; }
  .tabella-servizi td.condizione { font-size: 10px; }
  .tabella-servizi .riga-corso td { font-size: 11px; }
}
.prezzo-categoria {
  margin: 14px 0 0; padding: 12px 16px; border-radius: 10px;
  background: linear-gradient(90deg, #f3ecf8, #fdeef0); color: var(--viola-scuro);
  font-size: 18px; font-weight: 700; border: 1px solid #e3d5ec;
}
.condizionale { margin-top: 18px; padding: 4px 16px 16px; border-left: 4px solid var(--corallo); background: #fdf3f4; border-radius: 0 10px 10px 0; }
.spunta { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; cursor: pointer; }
.spunta input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--viola); flex: none; }

.servizi { margin-top: 20px; padding: 4px 18px 10px; background: #f6f1fa; border-radius: 10px; }
.servizi ul { margin: 0; padding-left: 20px; }
.servizi li { margin: 4px 0; }
.giornata { margin: 0 0 8px; font-weight: 600; color: var(--viola-scuro); }

.aiuto { color: var(--tenue); font-size: 14px; margin: 8px 0 0; }
.esito-codice { margin: 8px 0 0; font-size: 14px; font-weight: 600; }
.esito-codice.ok { color: var(--ok); }
.esito-codice.errore { color: var(--errore); }
.esito-codice.avviso { color: var(--avviso); }
#sposta-socio { margin-top: 10px; }
.nota-socio { margin: 0; padding: 10px 14px; border-radius: 8px; background: #f6f1fa; color: var(--viola-scuro); font-weight: 600; }
.errore-campo { color: var(--errore); font-size: 13px; margin: 5px 0 0; }
.con-errore input:not([type="radio"]):not([type="checkbox"]) { border-color: var(--errore); }
.trappola { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }

.tabella-riepilogo { display: grid; grid-template-columns: 1fr auto; margin: 0; border-top: 1px solid var(--bordo); }
.tabella-riepilogo dt, .tabella-riepilogo dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--bordo); }
.tabella-riepilogo dd { text-align: right; font-weight: 600; padding-left: 16px; }
.tabella-riepilogo .totale { font-size: 19px; color: var(--viola-scuro); font-weight: 700; border-bottom: 0; }
.campo-privacy { margin-top: 16px; padding: 12px 14px; border: 1px solid var(--bordo); border-radius: 10px; background: #faf8fc; }
.campo-privacy .spunta { font-weight: 400; font-size: 13px; line-height: 1.5; text-align: justify; }
.cancellazioni { margin-top: 16px; padding: 12px 16px; border-left: 4px solid var(--viola); background: #f6f1fa; border-radius: 0 10px 10px 0; font-size: 14px; }
.cancellazioni h3 { margin: 0 0 6px; font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: var(--viola-scuro); }
.cancellazioni p { margin: 4px 0; }
.accetta-rimborsi { margin-top: 10px; padding-top: 10px; border-top: 1px solid #e3d5ec; font-weight: 400; font-size: 14px; }
.segreteria { text-align: center; padding: 18px 16px 0; font-size: 14px; line-height: 1.6; color: var(--testo); }
.segreteria p { margin: 0; }
.segreteria .segreteria-titolo { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; color: var(--tenue); margin-bottom: 4px; }
.segreteria a { color: var(--viola); text-decoration: none; }
.segreteria a:hover { text-decoration: underline; }
.campo-privacy a { color: var(--viola); font-weight: 600; }
.avviso-privacy { font-size: 13px; color: var(--avviso); background: #fff7e0; padding: 8px 12px; border-radius: 8px; }

.messaggio { margin: 16px 0 0; padding: 12px 14px; border-radius: 8px; font-weight: 600; }
.messaggio.errore { background: #fdecea; color: var(--errore); }
.messaggio.avviso { background: #fff4d6; color: var(--avviso); }
.azione { margin-top: 20px; }
.etichetta-azione { font-size: 18px; font-weight: 700; color: var(--viola-scuro); margin: 0; }
#paypal-pulsanti { margin-top: 14px; max-width: 420px; }
.bottone {
  font: inherit; font-weight: 700; font-size: 17px;
  background: var(--viola); color: #fff; border: 0; border-radius: 10px;
  padding: 14px 26px; cursor: pointer; width: 100%; max-width: 420px;
}
.bottone:hover { background: var(--viola-scuro); }
.bottone:disabled { opacity: .6; cursor: wait; }
form.in-corso section:not(.riepilogo) { opacity: .65; }

.conferma { border-color: #b8e0c9; background: #f1fbf5; }
.conferma h2 { color: var(--ok); }
.conferma p { font-size: 17px; }
.piede { text-align: center; color: var(--tenue); font-size: 13px; padding: 0 16px 30px; }

.socio-stato { margin: 0 0 12px; font-weight: 600; color: var(--avviso); }
.socio-stato.ok { color: var(--ok); }
.bottone-secondario {
  font: inherit; font-weight: 600; background: #fff; color: var(--viola);
  border: 2px solid var(--viola); border-radius: 10px; padding: 10px 18px; cursor: pointer;
}
.bottone-secondario:hover { background: #f3ecf8; }
.finestra {
  border: 0; border-radius: 14px; padding: 24px; width: min(460px, calc(100vw - 32px));
  box-shadow: 0 20px 60px rgba(40, 10, 60, .35); color: var(--testo);
}
.finestra::backdrop { background: rgba(40, 20, 55, .55); }
.finestra h3 { margin: 0 0 8px; color: var(--viola-scuro); font-size: 19px; }
.finestra .campo { margin: 16px 0 14px; }
.codice-socio { font-family: Consolas, "Courier New", monospace; font-size: 24px !important; letter-spacing: .35em; text-align: center; text-transform: uppercase; }
.finestra-azioni { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }
.finestra-azioni .bottone { width: auto; padding: 11px 20px; font-size: 16px; }

/* lingua */
.testata, .testata-banner { position: relative; }
.lingue { display: flex; justify-content: flex-end; gap: 4px; padding: 8px 16px 0; max-width: 1400px; margin: 0 auto; }
.lingue a {
  font-size: 14px; font-weight: 600; text-decoration: none; padding: 5px 12px; border-radius: 20px;
  color: var(--viola); border: 1px solid #d9cbe4; background: #fff;
}
.lingue a[aria-current] { background: var(--viola); color: #fff; border-color: var(--viola); }
.testata .lingue { padding-top: 0; margin-top: -24px; margin-bottom: 16px; }

select {
  appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, #713c95 50%), linear-gradient(135deg, #713c95 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
select:focus { outline: 3px solid rgba(113, 60, 149, .25); border-color: var(--viola); }
.con-errore select { border-color: var(--errore); }

/* fatturazione */
.scelta-tipo { border: 0; padding: 0; margin: 0 0 6px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.scelta-tipo legend { grid-column: 1 / -1; padding: 0; margin-bottom: 8px; }
@media (max-width: 640px) { .scelta-tipo { grid-template-columns: 1fr; } }
.bottone-link {
  font: inherit; font-size: 14px; color: var(--viola); background: none; border: 0; padding: 0;
  text-decoration: underline; cursor: pointer;
}

/* footer con skyline */
.piede { padding: 0 0 24px; background: #fff; border-top: 1px solid var(--bordo); margin-top: 20px; }
.piede-img { display: block; width: 100%; max-width: 700px; height: auto; margin: 0 auto; }
.piede p { margin: 12px 16px 0; }

/* ===== Testata e footer in stile siescongress.eu ===== */
body { font-family: "Familjen Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; background: #fafafa; }
.sito-wrap { max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.sito-testata { background: #fff; border-bottom: 1px solid #ece6f0; }
.barra-alta { background: #a7a7a9; }
.barra-alta .sito-wrap { display: flex; justify-content: flex-end; }
.barra-alta .lingue { padding: 5px 0; gap: 2px; max-width: none; margin: 0; }
.barra-alta .lingue a { font-size: 12px; padding: 3px 10px; border: 0; background: transparent; color: #fff; border-radius: 3px; }
.barra-alta .lingue a[aria-current] { background: #fff; color: #67378c; }
.barra-menu .sito-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 10px; padding-bottom: 10px; }
.barra-menu .logo img { display: block; height: 44px; width: auto; }
.menu-sito { display: flex; gap: 22px; }
.menu-sito a { color: #000; text-decoration: none; font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; }
.menu-sito a:hover { color: #67378c; }
.briciole { background: #f1edf4; font-size: 13px; }
.briciole .sito-wrap { padding-top: 8px; padding-bottom: 8px; }
.briciole a { color: #67378c; text-decoration: none; }
.briciole .corrente { color: var(--tenue); }
.titolo-pagina { text-align: center; padding-top: 26px; padding-bottom: 6px; }
.titolo-pagina h1 { margin: 0; font-size: clamp(24px, 4vw, 34px); font-weight: 600; color: #67378c; }
.titolo-pagina .dove { margin: 6px 0 18px; color: var(--tenue); font-size: 15px; }
.titolo-pagina img.banner { display: block; width: 100%; max-width: 700px; height: auto; margin: 0 auto; border-radius: 10px; }
.titolo-pagina + .contenitore, .contenitore { margin-top: 24px; }
.piede { background: #e1d7e8; border-top: 0; padding: 0 0 26px; text-align: left; color: #26212b; font-size: 14px; }
.piede .piede-img { background: #fff; }
.piede-colonne { display: grid; grid-template-columns: 1fr 1fr 0.6fr; gap: 28px; padding-top: 26px; }
.piede-colonne h5 { margin: 0 0 12px; font-size: 22px; font-weight: 400; color: #67378c; }
.piede-colonne .piede-logo { display: block; height: 44px; width: auto; margin-bottom: 10px; }
.piede-colonne p { margin: 0 0 10px; line-height: 1.45; }
.piede-colonne address { font-style: normal; line-height: 1.6; }
.piede-colonne a { color: #67378c; text-decoration: none; }
.piede-colonne a:hover { text-decoration: underline; }
.piede-link { padding-top: 6px; }
@media (max-width: 760px) {
  .piede-colonne { grid-template-columns: 1fr; gap: 22px; }
  .menu-sito { gap: 14px; }
  .menu-sito a { font-size: 12px; }
  .barra-menu .logo img { height: 36px; }
}
