/* Vicini di Casa - foglio di stile del sito statico e dell'area soci.
   Regola sui colori: il verde di marca (#07b186) non regge il testo bianco (2,6:1).
   Dietro al testo bianco si usa sempre il verde scuro; il verde di marca resta per bordi e accenti. */
:root {
  --verde: #07b186;
  --verde-scuro: #0a6b52;
  --verde-notte: #0b3d31;
  --oliva: #2d3800;
  --inchiostro: #1f2421;
  --grigio: #5a615d;
  --fondo: #f3f3f0;
  --bordo: #8a918c;
  --errore: #a4161a;
  --raggio: 10px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 1.0625rem; line-height: 1.65; color: var(--inchiostro); background: #fff; overflow-x: clip; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { line-height: 1.2; margin: 1.6em 0 .5em; font-weight: 700; }
h2 { font-size: 1.6rem; } h3 { font-size: 1.25rem; } h4 { font-size: 1.1rem; }
h2:first-child, h3:first-child { margin-top: 0; }
p, ul, ol, dl, blockquote, table { margin: 0 0 1em; }
a { color: var(--verde-scuro); text-underline-offset: .15em; }
a:hover { color: var(--verde-notte); }
blockquote { border-left: 4px solid var(--verde); padding: .2em 0 .2em 1em; margin-left: 0; }
blockquote p:last-child { margin-bottom: 0; }
strong, b { color: inherit; }
figure { margin: 0 0 1.2em; }
:focus-visible { outline: 3px solid #111; outline-offset: 2px; box-shadow: 0 0 0 6px #fff; border-radius: 3px; }
.eroe :focus-visible, .piede :focus-visible { outline-color: #fff; box-shadow: 0 0 0 6px #111; }
.solo-lettori { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.salta { position: absolute; left: -999px; top: 0; background: #fff; color: #111; padding: .7rem 1rem; z-index: 100; }
.salta:focus { left: .5rem; top: .5rem; }
.contenitore { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.contenitore.stretto, .stretto { max-width: 760px; }
.contenitore.gestione { width: min(1320px, 100% - 2.5rem); }
.nota { font-size: .95rem; color: var(--grigio); }

/* ---- testata e menu ---- */
.testata { background: #fff; border-bottom: 1px solid #dcdfdc; position: relative; z-index: 20; }
.testata-dentro { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .6rem; width: min(1400px, 100% - 2rem); }
.marchio { flex: 0 0 auto; display: block; line-height: 0; }
.marchio img { width: 230px; }
.menu ul { list-style: none; margin: 0; padding: 0; }
.menu > ul { display: flex; align-items: center; gap: .1rem; }
.menu a, .menu button { font: inherit; font-size: .98rem; font-weight: 600; color: var(--inchiostro); text-decoration: none; background: none; border: 0; padding: .55rem .6rem; border-radius: 6px; cursor: pointer; display: block; white-space: nowrap; }
.menu a:hover, .menu button:hover, .menu a[aria-current] { color: var(--verde-scuro); background: var(--fondo); }
.menu a[aria-current] { box-shadow: inset 0 -3px 0 var(--verde); }
.ha-sotto { position: relative; }
.ha-sotto ul { display: none; position: absolute; left: 0; top: 100%; min-width: 17rem; background: #fff; border: 1px solid #dcdfdc; border-radius: var(--raggio); padding: .4rem; box-shadow: 0 12px 28px rgba(0, 0, 0, .14); }
.ha-sotto button[aria-expanded="true"] + ul, html:not(.js) .ha-sotto:hover ul, html:not(.js) .ha-sotto:focus-within ul { display: block; }
.menu .pulsante { background: var(--verde-scuro); color: #fff; margin-left: .4rem; }
.menu .pulsante:hover { color: #fff; background: var(--verde-notte); }
.menu-apri { display: none; font: inherit; font-weight: 700; background: #fff; color: var(--inchiostro); border: 2px solid var(--verde-scuro); border-radius: 8px; padding: .5rem .9rem; cursor: pointer; }
@media (max-width: 1239px) {
  .js .menu-apri { display: block; }
  .js .menu { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 3px solid var(--verde); padding: .6rem 1.25rem 1.2rem; box-shadow: 0 16px 28px rgba(0, 0, 0, .16); max-height: calc(100vh - 5rem); overflow: auto; }
  .js .menu.aperto { display: block; }
  .menu > ul { flex-direction: column; align-items: stretch; }
  .menu a, .menu button { width: 100%; text-align: left; padding: .8rem .6rem; white-space: normal; }
  .ha-sotto ul { position: static; box-shadow: none; border: 0; padding: 0 0 0 1rem; min-width: 0; }
  html:not(.js) .ha-sotto ul { display: block; }
  .menu .pulsante { margin: .6rem 0 0; text-align: center; }
  html:not(.js) .testata-dentro { flex-direction: column; align-items: stretch; }
}

/* ---- pulsanti ---- */
.pulsante { display: inline-block; font: inherit; font-weight: 700; line-height: 1.3; text-decoration: none; text-align: center; cursor: pointer; background: var(--verde-scuro); color: #fff; border: 2px solid var(--verde-scuro); border-radius: 8px; padding: .65rem 1.2rem; }
.pulsante:hover { background: var(--verde-notte); border-color: var(--verde-notte); color: #fff; }
.pulsante-piccolo { padding: .45rem .9rem; }
.pulsante-secondario { background: #fff; color: var(--verde-scuro); }
.pulsante-secondario:hover { background: var(--fondo); color: var(--verde-notte); }
.pulsante-pericolo { background: var(--errore); border-color: var(--errore); }
.pulsante-pericolo:hover { background: #7a1014; border-color: #7a1014; }
.pulsante[disabled] { opacity: .6; cursor: progress; }
.pulsante-testo { font: inherit; background: none; border: 0; padding: .2rem 0; color: var(--verde-scuro); text-decoration: underline; cursor: pointer; min-height: 24px; }

/* ---- fascia del titolo ---- */
.eroe { position: relative; overflow: hidden; background: var(--verde-notte); color: #fff; text-align: center; padding: clamp(3.5rem, 10vw, 7.5rem) 0; }
.eroe-basso { padding: clamp(2.2rem, 5vw, 3.6rem) 0; background: linear-gradient(135deg, var(--verde-notte), var(--verde-scuro)); }
.eroe-foto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .28; }
.eroe .contenitore { position: relative; }
.eroe h1 { font-size: clamp(2rem, 5.2vw, 3.6rem); font-weight: 800; margin: 0; text-shadow: 0 2px 10px rgba(0, 0, 0, .55); overflow-wrap: anywhere; }
.eroe-basso h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
.eroe-sotto { font-size: clamp(1.25rem, 2.6vw, 1.7rem); font-style: italic; font-weight: 600; margin: .5rem 0 0; text-shadow: 0 2px 8px rgba(0, 0, 0, .55); }
.eroe-occhiello { font-size: 1.2rem; font-weight: 700; margin: .3rem 0 0; text-shadow: 0 2px 8px rgba(0, 0, 0, .55); }

/* ---- sezioni, righe e colonne (la griglia di Divi, ripulita) ---- */
.sezione { padding: clamp(1.8rem, 4vw, 3rem) 0; }
.sezione + .sezione { padding-top: 0; }
.riga { display: flex; gap: 2rem; margin-bottom: 2rem; }
.riga:last-child { margin-bottom: 0; }
.colonna { flex: 12 1 0; min-width: 0; }
.c-3_4 { flex-grow: 9; } .c-2_3 { flex-grow: 8; } .c-3_5 { flex-grow: 7; } .c-1_2 { flex-grow: 6; } .c-2_5 { flex-grow: 5; } .c-1_3 { flex-grow: 4; } .c-1_4 { flex-grow: 3; } .c-1_5 { flex-grow: 2; }
.riquadro { background: var(--fondo); border-radius: var(--raggio); padding: 1.4rem 1.5rem; }
.colonna > :last-child { margin-bottom: 0; }
.figura img { display: block; border-radius: var(--raggio); margin-inline: auto; }
@media (max-width: 799px) { .riga { flex-direction: column; gap: 1.4rem; } .colonna-vuota { display: none; } }

/* ---- notizie ---- */
.elenco-articoli { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.6rem; }
.scheda-articolo { border: 1px solid #dcdfdc; border-radius: var(--raggio); overflow: hidden; display: flex; flex-direction: column; background: #fff; }
.scheda-foto { display: block; line-height: 0; }
.scheda-foto img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.scheda-testo { padding: 1.1rem 1.2rem 1.2rem; }
.scheda-testo h2 { font-size: 1.2rem; margin: 0 0 .3rem; }
.scheda-testo h2 a { text-decoration: none; }
.scheda-testo h2 a:hover { text-decoration: underline; }
.scheda-testo p:last-child { margin-bottom: 0; }
.data { color: var(--grigio); font-size: .95rem; }
.articolo .figura img { width: 100%; }
.torna { margin-top: 2rem; }
.galleria { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .7rem; }
.galleria img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }

/* ---- moduli ---- */
.modulo { background: var(--fondo); border-radius: var(--raggio); padding: 1.5rem; margin: 0 0 1.5rem; }
.gestione .modulo, details .modulo { background: none; padding: 0; }
.campo { margin: 0 0 1rem; }
.campo label { display: block; font-weight: 600; margin-bottom: .25rem; }
.campo input:not([type=checkbox]), .campo textarea, select, .cerca input { font: inherit; width: 100%; padding: .6rem .7rem; border: 1px solid var(--bordo); border-radius: 6px; background: #fff; color: var(--inchiostro); }
select { width: auto; }
.campo-spunta label { font-weight: 400; display: flex; gap: .6rem; align-items: flex-start; }
.campo-spunta label > input { flex: 0 0 auto; width: 1.5rem; height: 1.5rem; margin: .1rem 0 0; accent-color: var(--verde-scuro); }
.campo-spunta label > :not(input) { flex: 0 1 auto; }
.campo-spunta label { flex-wrap: wrap; }
.griglia-2, .griglia-3 { display: grid; gap: 0 1.2rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.griglia-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .griglia-2, .griglia-3 { grid-template-columns: 1fr; } }
.obbligatorio { color: var(--errore); }
.trappola { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.modulo-esito, .avviso { border-radius: 8px; padding: .8rem 1rem; border: 2px solid; font-weight: 600; }
.modulo-esito, .avviso-errore { background: #fdecec; border-color: var(--errore); color: #6d0f12; }
.avviso-ok { background: #e3f6ec; border-color: var(--verde-scuro); color: #0b3d31; }

/* ---- area soci e gestione ---- */
.scheda { border: 1px solid #cfd4d0; border-radius: var(--raggio); padding: 1.2rem 1.4rem; margin: 0 0 1.5rem; background: #fff; }
.scheda > :last-child { margin-bottom: 0; }
.scheda h2 { font-size: 1.3rem; margin-top: 0; }
.scheda-ok { border: 2px solid var(--verde-scuro); background: #f0faf5; }
.scheda-no { border: 2px solid var(--errore); background: #fdf3f3; }
details.scheda summary { cursor: pointer; font-weight: 700; }
details.scheda[open] summary { margin-bottom: 1rem; }
.codice { font-family: Consolas, "Courier New", monospace; letter-spacing: .04em; white-space: nowrap; }
.dati { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1.2rem; }
.dati dt { font-weight: 700; } .dati dd { margin: 0; overflow-wrap: anywhere; }
.elenco-documenti li, .storia li { margin-bottom: .35rem; }
.esito { border-radius: var(--raggio); padding: 1.2rem 1.4rem; margin-bottom: 1.5rem; border: 3px solid; }
.esito p { margin: 0 0 .3rem; }
.esito-titolo { font-size: 1.4rem; font-weight: 800; }
.esito-ok { background: #e3f6ec; border-color: var(--verde-scuro); color: #0b3d31; }
.esito-no { background: #fdecec; border-color: var(--errore); color: #6d0f12; }
.menu-gestione { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid #cfd4d0; }
.menu-gestione a, .menu-gestione button { font: inherit; font-weight: 600; text-decoration: none; color: var(--verde-scuro); background: var(--fondo); border: 1px solid #cfd4d0; border-radius: 6px; padding: .45rem .85rem; cursor: pointer; }
.menu-gestione form { margin-left: auto; }
.filtri { display: flex; flex-wrap: wrap; gap: .4rem; }
.filtri a { text-decoration: none; padding: .35rem .8rem; border: 1px solid #cfd4d0; border-radius: 999px; }
.filtri a[aria-current] { background: var(--verde-scuro); color: #fff; border-color: var(--verde-scuro); }
.cerca { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 1.2rem; }
.cerca input { width: auto; flex: 1 1 14rem; max-width: 24rem; }
.tabella-scorri { overflow-x: auto; margin-bottom: 1.5rem; }
.tabella { border-collapse: collapse; width: 100%; font-size: .97rem; }
.tabella th, .tabella td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid #dcdfdc; vertical-align: top; }
.tabella th { background: var(--fondo); white-space: nowrap; }
.tabella form { margin: 0 .9rem 0 0; display: inline-block; }
.tabella td:last-child { white-space: nowrap; }
.pulsante-testo-pericolo { color: var(--errore); }
.stato { display: inline-block; font-size: .88rem; font-weight: 700; padding: .12rem .6rem; border-radius: 999px; white-space: nowrap; }
.stato-domanda { background: #fff3cd; color: #5c4400; }
.stato-attivo { background: #d8f3e6; color: #0b4d3a; }
.stato-sospeso { background: #e6e6e6; color: #333; }
.stato-respinto { background: #f8d7da; color: #7a1118; }
.azioni { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.azioni form { display: flex; gap: .5rem; align-items: center; margin: 0; }

/* ---- artigiani e fornitori convenzionati ---- */
.vdc-intro { background: #eef6d0; border-left: 4px solid var(--verde); border-radius: 0 var(--raggio) var(--raggio) 0; padding: 1.25rem 1.5rem; margin-bottom: 2.5rem; }
.vdc-intro h2 { color: var(--verde-scuro); margin: 0 0 .5rem; }
.vdc-intro p:last-child { margin: 0; }
.vdc-categoria { margin-bottom: 2rem; }
.vdc-cat-header { display: flex; align-items: center; gap: .6rem; margin-bottom: .9rem; padding-bottom: .4rem; border-bottom: 2px solid var(--verde); }
.vdc-cat-icon { font-size: 1.3rem; line-height: 1; }
.vdc-cat-header h3 { font-size: 1rem; letter-spacing: .08em; text-transform: uppercase; color: var(--verde-scuro); margin: 0; }
.vdc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .75rem; }
.vdc-card { background: #fff; border: 1px solid var(--verde-scuro); border-radius: var(--raggio); padding: 1rem 1.1rem; }
.vdc-card p { margin: 0 0 .3rem; overflow-wrap: anywhere; }
.vdc-name { font-weight: 700; }
.vdc-note { color: var(--grigio); font-size: .95rem; font-style: italic; }
.vdc-sconto { font-weight: 600; }
.vdc-sconto span { background: var(--verde-scuro); color: #fff; border-radius: 999px; padding: .05rem .6rem; font-size: .85rem; margin-right: .3rem; }
.vdc-footer-note { margin-top: 2rem; text-align: center; color: var(--grigio); font-size: .95rem; }

/* ---- piede ---- */
.piede { background: var(--oliva); color: #fff; margin-top: 2rem; }
.piede a { color: #fff; }
.piede-dentro { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; padding-block: 2.2rem; align-items: start; }
.piede-logo { width: 220px; }
.piede ul { list-style: none; padding: 0; margin: 0; }
.piede li { margin-bottom: .35rem; }
.piede-social { display: flex; gap: 1.2rem; }
.piede-crediti { background: #212121; margin: 0; text-align: center; padding: .9rem 1.25rem; font-size: .95rem; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
@media print { .testata, .piede, .menu-gestione, .salta { display: none; } .eroe { background: none; color: #000; padding: 1rem 0; } .eroe h1 { text-shadow: none; } }
