/* Infiorata di Noto - foglio di stile comune (versione grafica) */
:root {
  --pietra: #f7efe2;
  --pietra-scura: #ead9bb;
  --vino: #5b1230;
  --vino-chiaro: #8e1148;
  --petalo: #c2185b;
  --zafferano: #e8a21a;
  --foglia: #2f7d4f;
  --terracotta: #a3412a;
  --inchiostro: #2b2118;
  --bianco: #fffdf9;
  --raggio: 16px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  line-height: 1.65;
  color: var(--inchiostro);
  background: var(--pietra);
}
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; line-height: 1.15; margin: 0 0 .6em; }
h1 { font-size: clamp(2.2rem, 7vw, 4.2rem); }
h2 { font-size: clamp(1.7rem, 4.5vw, 2.5rem); color: var(--vino); }
h3 { font-size: 1.25rem; color: var(--vino); }
a { color: var(--petalo); }
a:hover { color: var(--vino); }
img { max-width: 100%; height: auto; display: block; }
.contenitore { width: min(1120px, 92%); margin: 0 auto; }
.svg-nascosto { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Selettore di lingua ---------- */
.barra-lingue { background: var(--vino); color: #fff; font-size: .85rem; }
.barra-lingue-in { display: flex; align-items: center; justify-content: flex-end; gap: .6rem; padding: .3rem 0; }
.icona-globo { width: 18px; height: 18px; flex: none; fill: none; stroke: #ffd98a; stroke-width: 1.8; stroke-linecap: round; }
.lingue { display: flex; flex-wrap: wrap; gap: .15rem; }
.lingue button {
  background: transparent; border: 0; color: #f3e3ea; font: inherit;
  padding: .3rem .65rem; min-height: 34px; border-radius: 999px; cursor: pointer;
}
.lingue button:hover { background: rgba(255,255,255,.16); }
.lingue button[aria-pressed="true"] { background: var(--zafferano); color: var(--vino); font-weight: 700; }
@media (max-width: 560px) { .barra-lingue-in { justify-content: center; } }

/* ---------- Intestazione ---------- */
.sito-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 253, 249, .97);
  backdrop-filter: blur(6px);
  border-bottom: 3px solid var(--zafferano);
}
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .55rem 0; }
.logo {
  display: flex; align-items: center; gap: 0;
  font-family: Georgia, serif; font-weight: 700; font-size: 1.2rem;
  color: var(--vino); text-decoration: none;
}
.logo span { color: var(--petalo); }
.logo-fiore { width: 34px; height: 34px; flex: none; margin-right: .55rem; }
.menu { list-style: none; display: flex; gap: .2rem; margin: 0; padding: 0; }
.menu a {
  display: block; padding: .5rem .85rem; border-radius: 999px;
  text-decoration: none; color: var(--inchiostro); font-weight: 600; font-size: .95rem;
}
.menu a:hover { background: var(--pietra-scura); color: var(--vino); }
.menu a[aria-current="page"] { background: var(--vino); color: #fff; }
.menu-btn {
  display: none; background: var(--vino); color: #fff; border: 0;
  border-radius: 8px; padding: .45rem .8rem; font-size: 1rem; cursor: pointer;
}
@media (max-width: 860px) {
  .menu-btn { display: block; }
  .menu {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; background: var(--bianco);
    padding: .5rem 4% 1rem; border-bottom: 3px solid var(--zafferano);
  }
  .menu.aperto { display: flex; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    linear-gradient(160deg, rgba(91,18,48,.93), rgba(163,65,42,.84)),
    url("Infiorata2026.jpeg") center / cover no-repeat,
    #5b1230;
  padding: clamp(4rem, 12vw, 8rem) 0 clamp(5rem, 13vw, 9rem);
  min-height: 70vh; display: flex; align-items: center;
}
.hero::after { /* bordo a festone verso la sezione successiva */
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 30px;
  background: radial-gradient(circle at 15px 30px, var(--pietra) 15px, transparent 15.5px) repeat-x;
  background-size: 30px 30px;
}
.hero .contenitore { position: relative; z-index: 2; }
.hero-testo { max-width: 600px; }
.hero .sopratitolo {
  display: inline-block; text-transform: uppercase; letter-spacing: .2em;
  font-size: .8rem; font-weight: 700; color: var(--vino);
  background: var(--zafferano); padding: .35rem .9rem; border-radius: 999px;
}
.hero h1 { margin-top: .9rem; text-shadow: 0 3px 18px rgba(0,0,0,.35); }
.hero h1 em { font-style: italic; color: #ffd98a; }
.hero .logo-hero { margin: 1.1rem 0 1.3rem; line-height: 0; }
.hero .logo-hero img {
  width: min(320px, 72vw); height: auto; aspect-ratio: 1; border-radius: 50%;
  background: #fff; border: 6px solid var(--zafferano);
  box-shadow: 0 16px 44px rgba(0,0,0,.38);
}
.hero p.lead { font-size: 1.2rem; margin: 0 0 1.8rem; max-width: 520px; }
.hero-mandala {
  position: absolute; z-index: 1; right: -6%; top: 50%;
  width: min(640px, 72vw); aspect-ratio: 1;
  transform: translateY(-50%); animation: gira 140s linear infinite;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,.35));
}
@keyframes gira { from { transform: translateY(-50%) rotate(0); } to { transform: translateY(-50%) rotate(360deg); } }
@media (max-width: 860px) {
  .hero { min-height: 0; text-align: center; }
  .hero-testo { margin: 0 auto; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .hero .logo-hero { display: flex; justify-content: center; }
  .hero-mandala { right: auto; left: 50%; margin-left: -55vw; width: 110vw; opacity: .3; }
  .hero .bottoni { justify-content: center; }
}
.petali { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.petalo {
  position: absolute; top: -30px; border-radius: 75% 0 75% 0;
  opacity: .85; animation: cade linear infinite;
}
@keyframes cade {
  from { top: -30px; transform: translateX(0) rotate(0); }
  to   { top: 105%;  transform: translateX(var(--dx)) rotate(540deg); }
}

.bottoni { display: flex; gap: .8rem; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: .85rem 1.6rem; border-radius: 999px;
  font-weight: 700; text-decoration: none; border: 2px solid transparent;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primario { background: var(--petalo); color: #fff; box-shadow: 0 6px 16px rgba(194,24,91,.35); }
.btn-primario:hover { background: var(--vino-chiaro); color: #fff; }
.btn-secondario { border-color: #fff; color: #fff; }
.btn-secondario:hover { background: rgba(255,255,255,.18); color: #fff; }

/* ---------- Fascia numeri ---------- */
.numeri { background: linear-gradient(90deg, var(--vino), var(--vino-chiaro)); color: #fff; padding: 2.2rem 0; }
.numeri-griglia { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; text-align: center; }
.numero { font-family: Georgia, serif; font-size: clamp(2.2rem, 6vw, 3.2rem); color: var(--zafferano); line-height: 1; }
.numeri p { margin: .4rem 0 0; font-size: .95rem; letter-spacing: .04em; }

/* ---------- Tappeto di fiori ---------- */
.tappeto {
  height: 34px;
  background:
    radial-gradient(circle at 25% 50%, var(--petalo) 0 6px, transparent 7px),
    radial-gradient(circle at 75% 50%, var(--zafferano) 0 6px, transparent 7px),
    radial-gradient(circle at 50% 50%, var(--foglia) 0 3.5px, transparent 4.5px),
    var(--pietra-scura);
  background-size: 40px 34px;
}

/* ---------- Sezioni ---------- */
section { padding: clamp(3rem, 8vw, 5rem) 0; }
.sezione-chiara { background: var(--bianco); }
.intro { max-width: 720px; font-size: 1.08rem; }
.sottotitolo {
  color: var(--petalo); text-transform: uppercase; letter-spacing: .16em;
  font-size: .8rem; font-weight: 700; margin-bottom: .4rem;
}
.ornamento { display: flex; align-items: center; gap: .8rem; margin: 0 0 1.2rem; max-width: 260px; }
.ornamento::before, .ornamento::after { content: ""; flex: 1; height: 2px; background: linear-gradient(90deg, transparent, var(--zafferano)); }
.ornamento::after { background: linear-gradient(90deg, var(--zafferano), transparent); }
.ornamento svg { width: 26px; height: 26px; }

.schede { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.4rem; margin-top: 1.8rem; }
.scheda {
  position: relative; background: var(--bianco); border: 1px solid var(--pietra-scura);
  border-top: 5px solid var(--petalo); border-radius: var(--raggio); padding: 1.5rem;
  box-shadow: 0 8px 22px rgba(91,18,48,.08);
  transition: transform .2s ease, box-shadow .2s ease;
}
.scheda:nth-child(3n+2) { border-top-color: var(--zafferano); }
.scheda:nth-child(3n) { border-top-color: var(--foglia); }
.scheda:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(91,18,48,.16); }
.sezione-chiara .scheda { background: var(--pietra); }
.icona {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--petalo), var(--zafferano)); color: #fff; margin-bottom: .9rem;
}
.icona svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.scheda .etichetta { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--petalo); font-weight: 700; }
.scheda .valore { font-family: Georgia, serif; font-size: 1.6rem; color: var(--vino); margin: .15rem 0 .35rem; }
.scheda p { margin: 0; }
.scheda h3 .emoji { margin-right: .35rem; }

.due-colonne { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
@media (max-width: 860px) { .due-colonne { grid-template-columns: 1fr; gap: 2rem; } }
.illustrazione {
  background: radial-gradient(circle at 50% 50%, #fff 0 38%, #ffe9c2 70%, var(--pietra-scura));
  border-radius: 50%; padding: 6%; max-width: 440px; width: 100%; margin: 0 auto;
  box-shadow: 0 16px 40px rgba(91,18,48,.18);
}
.illustrazione svg { width: 100%; height: auto; display: block; animation: gira2 180s linear infinite; }
@keyframes gira2 { to { transform: rotate(-360deg); } }

.avviso {
  background: #fff4dc; border-left: 5px solid var(--zafferano);
  padding: 1rem 1.2rem; border-radius: 10px; margin-top: 1.4rem;
}

/* ---------- Foto in cornice ---------- */
.galleria { display: flex; flex-wrap: wrap; gap: 2.2rem; justify-content: center; margin-top: 2rem; }
.foto {
  background: #fff; padding: .7rem .7rem 2.6rem; width: min(340px, 100%);
  box-shadow: 0 12px 30px rgba(0,0,0,.22); transform: rotate(-2.5deg); position: relative; margin: 0;
}
.foto:nth-child(even) { transform: rotate(2deg); }
.foto img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--pietra-scura); }
.foto.verticale img { aspect-ratio: 3 / 4; }
.foto figcaption {
  position: absolute; bottom: .7rem; left: 0; right: 0; text-align: center;
  font-family: Georgia, serif; font-style: italic; color: var(--vino);
}
.fascia-vino { background: linear-gradient(160deg, #fbe9ef, #fff4dc); }

table { width: 100%; border-collapse: collapse; background: var(--bianco); border-radius: var(--raggio); overflow: hidden; box-shadow: 0 8px 22px rgba(91,18,48,.08); }
th, td { text-align: left; padding: .9rem 1.1rem; border-bottom: 1px solid var(--pietra-scura); vertical-align: top; }
th { background: var(--vino); color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
tbody tr:hover { background: #fff4dc; }
.tabella-scroll { overflow-x: auto; }

/* ---------- Pagine interne ---------- */
.titolo-pagina {
  position: relative; overflow: hidden; color: #fff;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-50 -50 100 100'%3E%3Cg fill='%23e8a21a' fill-opacity='.28'%3E%3Cellipse rx='8' ry='24' cy='-20'/%3E%3Cellipse rx='8' ry='24' cy='-20' transform='rotate(45)'/%3E%3Cellipse rx='8' ry='24' cy='-20' transform='rotate(90)'/%3E%3Cellipse rx='8' ry='24' cy='-20' transform='rotate(135)'/%3E%3Cellipse rx='8' ry='24' cy='-20' transform='rotate(180)'/%3E%3Cellipse rx='8' ry='24' cy='-20' transform='rotate(225)'/%3E%3Cellipse rx='8' ry='24' cy='-20' transform='rotate(270)'/%3E%3Cellipse rx='8' ry='24' cy='-20' transform='rotate(315)'/%3E%3C/g%3E%3Ccircle r='7' fill='%23e8a21a' fill-opacity='.4'/%3E%3C/svg%3E")
      right -40px center / 340px no-repeat,
    linear-gradient(160deg, var(--vino), var(--terracotta));
  padding: clamp(3rem, 8vw, 5rem) 0 clamp(3.4rem, 9vw, 5.4rem);
}
.titolo-pagina::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 30px;
  background: radial-gradient(circle at 15px 30px, var(--pietra) 15px, transparent 15.5px) repeat-x;
  background-size: 30px 30px;
}
.titolo-pagina .contenitore { position: relative; z-index: 2; }
.titolo-pagina .sottotitolo { color: var(--vino); background: var(--zafferano); display: inline-block; padding: .3rem .8rem; border-radius: 999px; }
.titolo-pagina h1 { color: #fff; }
.titolo-pagina p { max-width: 680px; margin: 0; font-size: 1.12rem; }
.titolo-pagina p.sottotitolo { font-size: .8rem; margin-bottom: .8rem; }

/* ---------- Testi legali (privacy) ---------- */
.testo-legale { max-width: 860px; }
.testo-legale h2 { font-size: 1.5rem; margin-top: 2.2rem; }
.testo-legale h3 { font-size: 1.1rem; margin-top: 1.4rem; }
.testo-legale ul { padding-left: 1.3rem; }
.testo-legale li { margin-bottom: .4rem; }
.testo-legale .tabella-scroll { margin: 1rem 0 1.4rem; }
.aggiornamento { color: #6b5a4a; font-size: .9rem; margin: 0 0 1rem; }

/* ---------- Footer ---------- */
.sito-footer { background: var(--vino); color: #ecdde3; padding: 2.8rem 0 1.5rem; font-size: .93rem; }
.sito-footer a { color: #ffd98a; }
.footer-griglia { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.sito-footer h3 { color: #fff; font-size: 1.05rem; }
.sito-footer ul { list-style: none; margin: 0; padding: 0; }
.sito-footer li { margin-bottom: .3rem; }
.copy { border-top: 1px solid rgba(255,255,255,.18); margin-top: 1.8rem; padding-top: 1rem; font-size: .85rem; color: #d3b9c4; }

/* ---------- Banner cookie ---------- */
#banner-cookie {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
  background: #fff; border-top: 4px solid var(--zafferano);
  box-shadow: 0 -6px 24px rgba(0,0,0,.2);
  padding: 1rem 4%; display: none;
}
#banner-cookie .in { max-width: 1120px; margin: 0 auto; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; justify-content: space-between; }
#banner-cookie p { margin: 0; flex: 1 1 380px; font-size: .92rem; }
#banner-cookie .btn { padding: .55rem 1.2rem; cursor: pointer; font-size: .92rem; font-family: inherit; }
#banner-cookie .btn-rifiuta { background: #fff; border-color: #bbb; color: var(--inchiostro); }

:focus-visible { outline: 3px solid var(--petalo); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-mandala, .illustrazione svg { animation: none; }
  .petali { display: none; }
  .btn, .scheda { transition: none; }
}
