/* Ludoteca Bonaccorsi — Bologna
   Palette estratta da logo + depliant 3 ante. Mobile first. */

:root {
  --cream: #FBF7EA;
  --cream-deep: #F4EDD9;
  --white: #FFFFFF;
  --navy: #123A5E;
  --navy-soft: #35557a;
  --green: #8ABB2E;
  --green-dark: #6E9A1F;
  --yellow: #F7A81B;
  --red: #D8342C;
  --blue: #1E7BB0;
  --magenta: #E0356A;
  --purple: #8E3B94;
  --orange: #E9762B;

  --radius: 18px;
  --radius-lg: 28px;
  --shadow: 0 6px 20px rgba(18, 58, 94, .10);
  --shadow-lg: 0 14px 40px rgba(18, 58, 94, .16);
  --maxw: 1140px;
  --pad: 20px;

  --font-display: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .display { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 7vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 5.2vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 3.6vw, 1.45rem); }
p { margin: 0 0 1em; }
a { color: var(--blue); }
img { max-width: 100%; height: auto; display: block; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.section { padding: 56px 0; }
.section--tight { padding: 36px 0; }
.center { text-align: center; }
.lead { font-size: 1.1rem; color: var(--navy-soft); }
.muted { color: var(--navy-soft); }
.small { font-size: .9rem; }

/* ---------- Skip link + focus ---------- */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 0 0 12px 0;
}
.skip:focus { left: 0; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 247, 234, .94);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--cream-deep);
}
.header__inner { display: flex; align-items: center; gap: 12px; min-height: 66px; }
.header__logo { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.header__logo img { width: 116px; height: auto; }
.nav { display: none; gap: 4px; }
.nav a {
  font-family: var(--font-display); font-size: 1rem; color: var(--navy);
  text-decoration: none; padding: 8px 12px; border-radius: 12px;
}
.nav a:hover, .nav a[aria-current="page"] { background: var(--cream-deep); color: var(--green-dark); }
.nav__toggle {
  appearance: none; border: 2px solid var(--navy); background: var(--white); color: var(--navy);
  width: 44px; height: 44px; border-radius: 12px; font-size: 1.3rem; line-height: 1; cursor: pointer;
}
.header .btn--cta { display: none; }

@media (min-width: 900px) {
  .nav { display: flex; }
  .nav__toggle { display: none; }
  .header .btn--cta { display: inline-flex; }
  .header__logo img { width: 140px; }
}

.drawer {
  display: none; border-top: 2px solid var(--cream-deep); background: var(--cream);
  padding: 10px var(--pad) 18px;
}
.drawer.is-open { display: block; }
.drawer a {
  display: block; padding: 12px 6px; font-family: var(--font-display); font-size: 1.1rem;
  color: var(--navy); text-decoration: none; border-bottom: 1px dashed var(--cream-deep);
}
@media (min-width: 900px) { .drawer, .drawer.is-open { display: none; } }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-display); font-size: 1.05rem; font-weight: 600;
  padding: 14px 24px; border-radius: 999px; border: none; cursor: pointer;
  text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
  min-height: 48px;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn--cta { background: var(--red); color: #fff; }
.btn--cta:hover { background: #c22c25; }
.btn--green { background: var(--green); color: #fff; }
.btn--green:hover { background: var(--green-dark); }
.btn--ghost { background: var(--white); color: var(--navy); box-shadow: inset 0 0 0 2px var(--navy); }
.btn--block { width: 100%; }
.btn--lg { font-size: 1.15rem; padding: 16px 30px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 30px 0 0; }
.hero__logo { width: min(320px, 74vw); height: auto; margin: 0 auto 18px; }
.hero__title { text-align: center; }
.hero__title .hl { color: var(--green-dark); }
.hero__sub { text-align: center; font-size: 1.12rem; color: var(--navy-soft); max-width: 42ch; margin: 0 auto 22px; }
.hero__actions { display: flex; flex-direction: column; gap: 12px; max-width: 360px; margin: 0 auto 26px; }
@media (min-width: 620px) { .hero__actions { flex-direction: row; justify-content: center; max-width: none; } }

.hero__wave { position: relative; margin-top: 10px; }
.hero__wave svg { display: block; width: 100%; height: auto; }
.hero__band { background: var(--green); padding: 0 0 40px; margin-top: -1px; }
.hero__band .wrap { display: grid; gap: 18px; }
.hero__claim { color: #fff; font-family: var(--font-display); font-size: clamp(1.4rem, 5vw, 2.1rem); line-height: 1.25; }
.hero__claim em { font-style: italic; font-weight: 400; display: block; font-size: .78em; opacity: .95; }
.hero__photo { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; border: 5px solid #fff; }
.hero__photo img { width: 100%; height: 220px; object-fit: cover; }
@media (min-width: 820px) {
  .hero__band .wrap { grid-template-columns: 1fr 1fr; align-items: center; }
  .hero__photo img { height: 300px; }
}

/* coriandoli decorativi */
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; width: 10px; height: 10px; border-radius: 50%; opacity: .75; }

/* ---------- Badge orari ---------- */
.pills { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.pill {
  background: var(--white); border-radius: 999px; padding: 8px 16px; font-weight: 700;
  font-size: .92rem; box-shadow: var(--shadow); display: inline-flex; gap: 8px; align-items: center;
}
.pill span[aria-hidden] { font-size: 1.1rem; }

/* ---------- Card ---------- */
.grid { display: grid; gap: 18px; }
@media (min-width: 640px) { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 860px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } .grid--4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 640px) and (max-width: 859px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }

.card {
  background: var(--white); border-radius: var(--radius-lg); padding: 24px 22px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.card__icon {
  width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center;
  font-size: 1.7rem; margin-bottom: 14px; color: #fff;
}
.c-green { background: var(--green); } .c-yellow { background: var(--yellow); }
.c-red { background: var(--red); } .c-blue { background: var(--blue); }
.c-magenta { background: var(--magenta); } .c-purple { background: var(--purple); }
.c-orange { background: var(--orange); }
.card h3 { margin-bottom: 6px; }
.card p { margin: 0; color: var(--navy-soft); font-size: .98rem; }
.card--photo { padding: 0; }
.card--photo img { width: 100%; height: 170px; object-fit: cover; }
.card--photo .card__body { padding: 18px 20px 22px; }

/* ---------- Fascia cena ---------- */
.stripe { background: var(--navy); color: #fff; border-radius: 0; }
.stripe h2, .stripe h3 { color: #fff; }
.stripe p { color: #dfe8f1; }
.stripe .wrap { display: grid; gap: 22px; }
@media (min-width: 860px) { .stripe .wrap { grid-template-columns: 1.1fr .9fr; align-items: center; } }
.stripe__box { background: rgba(255,255,255,.08); border-radius: var(--radius); padding: 18px 20px; }
.stripe__box strong { color: var(--yellow); }
.checklist { list-style: none; margin: 0 0 18px; padding: 0; }
.checklist li { padding-left: 30px; position: relative; margin-bottom: 8px; }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 0; color: var(--green);
  font-weight: 800; font-family: var(--font-display);
}

/* ---------- Galleria ---------- */
.gallery { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.gallery img { width: 100%; height: 160px; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- Info / contatti ---------- */
.info { display: grid; gap: 18px; }
@media (min-width: 860px) { .info { grid-template-columns: 1fr 1fr; } }
.info dl { margin: 0; }
.info dt { font-family: var(--font-display); color: var(--green-dark); margin-top: 14px; }
.info dd { margin: 0; }
.map { border: 0; width: 100%; height: 280px; border-radius: var(--radius-lg); box-shadow: var(--shadow); }

/* ---------- FAQ ---------- */
.faq details {
  background: var(--white); border-radius: var(--radius); padding: 4px 20px;
  box-shadow: var(--shadow); margin-bottom: 12px;
}
.faq summary {
  font-family: var(--font-display); font-size: 1.05rem; padding: 14px 0; cursor: pointer;
  list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; color: var(--green-dark); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 8px; color: var(--navy-soft); }

/* ---------- CTA finale ---------- */
.cta-final {
  background: linear-gradient(135deg, var(--yellow), var(--orange));
  border-radius: var(--radius-lg); padding: 34px 24px; text-align: center; color: #fff;
  box-shadow: var(--shadow-lg);
}
.cta-final h2 { color: #fff; }
.cta-final p { color: rgba(255,255,255,.95); max-width: 46ch; margin-inline: auto; }

/* ---------- Footer ---------- */
.footer { background: var(--navy); color: #cfdbe7; padding: 40px 0 28px; margin-top: 10px; }
.footer a { color: #fff; }
.footer__grid { display: grid; gap: 22px; }
@media (min-width: 760px) { .footer__grid { grid-template-columns: 1.2fr 1fr 1fr; } }
.footer h4 { font-family: var(--font-display); color: #fff; margin-bottom: 8px; }
.footer__logo { width: 150px; height: auto; background: #fff; border-radius: 16px; padding: 8px; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 24px; padding-top: 16px; font-size: .85rem; display: flex; flex-wrap: wrap; gap: 8px 18px; }

/* ---------- Barra CTA mobile ---------- */
.stickybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: rgba(255,255,255,.97); border-top: 2px solid var(--cream-deep);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  display: flex; gap: 10px;
}
.stickybar .btn { flex: 1; padding: 12px 10px; font-size: 1rem; }
body { padding-bottom: 78px; }
@media (min-width: 900px) { .stickybar { display: none; } body { padding-bottom: 0; } }

/* ---------- Form ---------- */
.form { background: var(--white); border-radius: var(--radius-lg); padding: 24px 20px; box-shadow: var(--shadow-lg); }
.field { margin-bottom: 18px; }
.field > label, .fieldset__legend { display: block; font-family: var(--font-display); font-size: 1.02rem; margin-bottom: 6px; }
.field .hint { font-size: .85rem; color: var(--navy-soft); margin: 0 0 6px; }
.input, select, textarea {
  width: 100%; font-family: var(--font-body); font-size: 1rem; color: var(--navy);
  background: var(--cream); border: 2px solid var(--cream-deep); border-radius: 14px;
  padding: 13px 14px; min-height: 50px;
}
.input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: none; background: #fff; }
textarea { min-height: 110px; resize: vertical; }
.row { display: grid; gap: 14px; }
@media (min-width: 620px) { .row--2 { grid-template-columns: 1fr 1fr; } }
fieldset { border: none; margin: 0 0 18px; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.chip span {
  display: inline-block; padding: 9px 15px; border-radius: 999px; background: var(--cream);
  border: 2px solid var(--cream-deep); cursor: pointer; font-size: .95rem; user-select: none;
}
.chip input:checked + span { background: var(--green); border-color: var(--green-dark); color: #fff; font-weight: 700; }
.chip input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; margin-bottom: 12px; }
.check input { width: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--green); }
.error { color: var(--red); font-size: .88rem; font-weight: 700; margin-top: 6px; display: none; }
.field.has-error .input, .field.has-error select { border-color: var(--red); }
.field.has-error .error { display: block; }
.formmsg { border-radius: 14px; padding: 14px 16px; margin-bottom: 16px; display: none; font-weight: 600; }
.formmsg--err { background: #fde8e7; color: #9b201a; display: block; }
.formmsg--ok { background: #e9f5d8; color: #4c6f12; display: block; }

/* ---------- Calendario ---------- */
.cal { background: var(--white); border-radius: var(--radius-lg); padding: 18px 16px 22px; box-shadow: var(--shadow-lg); }
.cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 10px; }
.cal__title { font-family: var(--font-display); font-size: 1.2rem; text-transform: capitalize; }
.cal__nav {
  width: 44px; height: 44px; border-radius: 12px; border: 2px solid var(--cream-deep);
  background: var(--cream); font-size: 1.2rem; cursor: pointer; color: var(--navy);
}
.cal__nav[disabled] { opacity: .35; cursor: not-allowed; }
.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal__dow { text-align: center; font-size: .72rem; font-weight: 800; color: var(--navy-soft); text-transform: uppercase; padding-bottom: 4px; }
.cal__day {
  aspect-ratio: 1 / 1; min-height: 42px; border-radius: 12px; border: 2px solid transparent;
  background: var(--cream); font-family: var(--font-body); font-size: .98rem; font-weight: 700;
  color: var(--navy); cursor: pointer; display: grid; place-items: center; position: relative;
}
.cal__day[disabled] { background: transparent; color: #c2c6c0; cursor: not-allowed; font-weight: 400; }
.cal__day--open { background: #eef6dd; color: var(--green-dark); }
.cal__day--open::after {
  content: ""; position: absolute; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--green);
}
.cal__day--sel { background: var(--green) !important; color: #fff !important; border-color: var(--green-dark); }
.cal__day--sel::after { background: #fff; }
.cal__legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; font-size: .85rem; color: var(--navy-soft); }
.cal__legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; margin-right: 6px; vertical-align: -1px; }
.cal__pick { margin-top: 14px; background: var(--cream); border-radius: 14px; padding: 12px 14px; font-weight: 700; }
.cal__pick[data-empty="1"] { color: var(--navy-soft); font-weight: 400; }

/* ---------- Pagina prenota ---------- */
.book { display: grid; gap: 22px; }
@media (min-width: 980px) { .book { grid-template-columns: .95fr 1.05fr; align-items: start; } }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li {
  counter-increment: s; background: var(--white); border-radius: var(--radius); padding: 14px 16px 14px 52px;
  position: relative; box-shadow: var(--shadow); font-size: .95rem;
}
.steps li::before {
  content: counter(s); position: absolute; left: 14px; top: 13px; width: 28px; height: 28px;
  background: var(--yellow); color: #fff; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 600;
}

/* ---------- Pagine semplici ---------- */
.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }

/* ---------- Admin ---------- */
.adm { max-width: 1100px; }
.adm__card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 14px; }
.adm__meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .9rem; color: var(--navy-soft); margin-bottom: 8px; }
.tag { background: var(--cream-deep); border-radius: 999px; padding: 3px 12px; font-size: .8rem; font-weight: 700; }
.tag--new { background: var(--green); color: #fff; }
