/* ===========================================================
   Il Glicine — Casa di Riposo Paliano — Stylesheet
   =========================================================== */

:root {
  /* Verde salvia */
  --green-900: #2a3f33;
  --green-700: #3d5e4d;
  --green-500: #5e8a72;
  --green-300: #a6c6b3;
  /* Glicine / lilla */
  --glicine:      #8a6fab;
  --glicine-dark: #6f568f;
  --glicine-300:  #c7b4dd;
  --glicine-100:  #ece4f5;
  /* Neutri caldi */
  --sand-50:   #faf7f2;
  --sand-100:  #f3ede3;
  --sand-200:  #e6dccd;
  --ink:       #2a2723;
  --ink-soft:  #5c574f;
  --white:     #ffffff;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 4px 16px rgba(42, 63, 51, .07);
  --shadow-md: 0 14px 40px rgba(42, 63, 51, .12);
  --shadow-lg: 0 26px 60px rgba(42, 63, 51, .18);

  --max: 1160px;
  --font-head: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--sand-50);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--green-900);
}

.eyebrow {
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--glicine);
  margin-bottom: 14px;
}
.eyebrow-light { color: var(--glicine-300); }

.section { padding: clamp(64px, 9vw, 120px) 0; }

.section-head {
  max-width: 680px;
  margin: 0 auto clamp(40px, 6vw, 64px);
  text-align: center;
}
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.section-sub {
  margin-top: 16px;
  color: var(--ink-soft);
  font-size: 1.08rem;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .98rem;
  cursor: pointer;
  border: none;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.btn-primary {
  background: var(--glicine);
  color: #fff;
  box-shadow: 0 10px 24px rgba(138, 111, 171, .35);
}
.btn-primary:hover { background: var(--glicine-dark); transform: translateY(-2px); }
.btn-glass {
  background: rgba(255, 255, 255, .14);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, .55);
  backdrop-filter: blur(4px);
}
.btn-glass:hover { background: rgba(255, 255, 255, .26); transform: translateY(-2px); }
.btn-light { background: #fff; color: var(--green-900); }
.btn-light:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-block { width: 100%; }

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: background .3s ease, box-shadow .3s ease, padding .3s ease;
}
/* Velatura scura sfumata dietro l'header sopra l'hero (per leggibilità) */
.site-header::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 160px;
  background: linear-gradient(rgba(15, 22, 18, .55), rgba(15, 22, 18, 0));
  pointer-events: none;
  z-index: -1;
  transition: opacity .3s ease;
}
.site-header.scrolled::before { opacity: 0; }
.site-header.scrolled {
  background: rgba(250, 247, 242, .97);
  box-shadow: var(--shadow-sm);
  padding: 12px 0;
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-icon {
  height: 76px;
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.45));
  transition: height .3s ease;
}
.brand-text strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.7rem;
  font-weight: 600;
  color: #b79be0;
  line-height: 1;
  text-shadow: 0 2px 10px rgba(0,0,0,.7);
}
.brand-text small {
  display: block;
  margin-top: 3px;
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(255,255,255,.92);
  text-shadow: 0 1px 8px rgba(0,0,0,.4);
}
.site-header.scrolled .brand-icon { height: 60px; filter: drop-shadow(0 2px 5px rgba(0,0,0,.2)); }
.site-header.scrolled .brand-text strong { color: var(--glicine-dark); text-shadow: none; }
.site-header.scrolled .brand-text small { color: var(--green-500); text-shadow: none; }

.main-nav { display: flex; align-items: center; gap: 30px; }
.main-nav a {
  font-size: .96rem;
  font-weight: 500;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0,0,0,.35);
  position: relative;
  transition: color .2s ease;
}
.site-header.scrolled .main-nav a:not(.nav-cta) {
  color: var(--green-900);
  text-shadow: none;
}
.main-nav a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 2px;
  background: var(--glicine);
  transition: width .25s ease;
}
.main-nav a:not(.nav-cta):hover::after { width: 100%; }
.nav-cta {
  background: var(--glicine);
  color: #fff !important;
  padding: 10px 22px;
  border-radius: 999px;
}
.nav-cta:hover { background: var(--glicine-dark); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-overlay { display: none; }
.nav-toggle span {
  width: 26px; height: 2.5px;
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
  transition: transform .3s ease, opacity .3s ease, background .3s ease;
}
.site-header.scrolled .nav-toggle span,
.nav-toggle.open span {
  background: var(--green-900);
  box-shadow: none;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  padding: 140px 0 90px;
  overflow: hidden;
  background: #243042;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("assets/hero.jpg?v=3");
  background-size: cover;
  background-position: center 35%;
  background-repeat: no-repeat;
  z-index: 0;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(15, 22, 18, .58) 0%, rgba(15, 22, 18, .28) 30%, rgba(15, 22, 18, 0) 52%, rgba(15, 22, 18, .12) 100%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  color: #fff;
}
.hero .eyebrow { animation: fadeUp .7s ease both; }
.hero h1 {
  font-size: clamp(2.4rem, 5.4vw, 3.9rem);
  margin-bottom: 16px;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0,0,0,.55), 0 4px 26px rgba(0,0,0,.45);
  animation: fadeUp .7s ease .05s both;
}
.hero h1 em { color: var(--glicine-300); font-style: italic; }
.hero-lead {
  font-size: 1.12rem;
  color: #fff;
  max-width: 600px;
  margin: 0 auto 22px;
  text-shadow: 0 1px 5px rgba(0,0,0,.6), 0 2px 14px rgba(0,0,0,.4);
  animation: fadeUp .7s ease .12s both;
}
.hero-actions {
  display: flex; gap: 14px; flex-wrap: wrap; justify-content: center;
  animation: fadeUp .7s ease .18s both;
}
.hero-badges {
  display: flex;
  gap: 40px;
  margin-top: 54px;
  list-style: none;
  animation: fadeUp .7s ease .26s both;
}
.hero-badges strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.9rem;
  color: #fff;
}
.hero-badges span { font-size: .9rem; color: rgba(255,255,255,.8); }

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 6vw, 80px);
  align-items: center;
}
.about-media { position: relative; }
.about-photo {
  border-radius: var(--radius);
  background-size: cover;
  background-position: center;
  background-color: var(--green-300);
  box-shadow: var(--shadow-md);
}
.about-photo-1 {
  height: clamp(360px, 42vw, 560px);
  background-image: url("assets/chi-siamo.jpg?v=1");
  background-position: center;
}
.about-text h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-bottom: 20px; }
.about-text p { color: var(--ink-soft); margin-bottom: 16px; }
.check-list { list-style: none; margin-top: 24px; display: grid; gap: 12px; }
.check-list li {
  position: relative;
  padding-left: 34px;
  font-weight: 500;
  color: var(--green-900);
}
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0; top: 0;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  background: var(--glicine-300);
  color: var(--glicine-dark);
  border-radius: 50%;
  font-size: .8rem;
  font-weight: 700;
}

/* ===== Services ===== */
.services { background: var(--glicine-100); }
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  background: #fff;
  padding: 34px 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .3s ease, box-shadow .3s ease;
  border: 1px solid rgba(42,63,51,.05);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.card-icon {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--green-700);
  color: #fff;
  margin-bottom: 20px;
}
.card-icon svg { width: 28px; height: 28px; }
.card h3 { font-size: 1.25rem; margin-bottom: 10px; }
.card p { color: var(--ink-soft); font-size: .98rem; }

/* ===== Why ===== */
.why-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(36px, 6vw, 72px);
  align-items: center;
}
.why-text h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.why-list { margin-top: 32px; display: grid; gap: 26px; }
.why-item { display: flex; gap: 20px; }
.why-num {
  font-family: var(--font-head);
  font-size: 1.4rem;
  color: var(--glicine);
  font-weight: 600;
  min-width: 34px;
}
.why-item h3 { font-size: 1.2rem; margin-bottom: 4px; }
.why-item p { color: var(--ink-soft); font-size: .98rem; }
.why-media {
  height: 100%;
  min-height: 460px;
  border-radius: var(--radius);
  background: url("assets/camera-2.jpg") center/cover no-repeat, linear-gradient(160deg, var(--green-500), var(--green-900));
  box-shadow: var(--shadow-md);
}

/* ===== Gallery (griglia 2×2, tessere uguali) ===== */
.gallery { background: var(--sand-100); }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 820px;
  margin: 0 auto;
}
.g-item {
  position: relative;
  aspect-ratio: 4 / 5;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: linear-gradient(135deg, var(--green-300), var(--green-500));
  cursor: pointer;
}
.g-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}
.g-item:hover img { transform: scale(1.05); }
.g-item figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 34px 18px 16px;
  color: #fff;
  font-family: var(--font-head);
  font-size: 1.08rem;
  font-weight: 500;
  background: linear-gradient(transparent, rgba(20,30,24,.78));
}

/* ===== Testimonials ===== */
.t-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.t-card {
  background: #fff;
  padding: 32px 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  position: relative;
  border: 1px solid rgba(42,63,51,.05);
}
.t-card::before {
  content: "“";
  font-family: var(--font-head);
  font-size: 4rem;
  line-height: 1;
  color: var(--glicine-300);
  position: absolute;
  top: 8px; left: 22px;
}
.t-card p {
  margin: 28px 0 22px;
  color: var(--ink);
  font-size: 1.04rem;
}
.t-card footer strong { display: block; color: var(--green-900); }
.t-card footer span { font-size: .85rem; color: var(--ink-soft); }

/* ===== CTA Banner ===== */
.cta-banner {
  background: linear-gradient(135deg, var(--glicine), var(--glicine-dark));
  color: #fff;
  padding: clamp(48px, 7vw, 80px) 0;
}
.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}
.cta-inner h2 { color: #fff; font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
.cta-inner p { color: rgba(255,255,255,.88); margin-top: 8px; }

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(36px, 6vw, 72px);
  align-items: start;
}
.contact-info h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.contact-list { list-style: none; margin-top: 32px; display: grid; gap: 22px; }
.contact-list li { display: flex; gap: 16px; align-items: flex-start; }
.ci-icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  color: var(--glicine);
  background: var(--glicine-100);
  border-radius: 12px;
  flex-shrink: 0;
}
.ci-icon svg { width: 22px; height: 22px; display: block; }
.contact-list a:hover { color: var(--glicine); }

.contact-map {
  position: relative;
  margin-top: clamp(36px, 5vw, 56px);
  height: 380px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(42,63,51,.06);
}
.contact-map iframe { width: 100%; height: 100%; display: block; }
.map-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 24px;
  background: var(--glicine-100);
}
.map-placeholder p { margin: 0; max-width: 340px; color: var(--ink-soft); font-size: .96rem; }
.map-placeholder a { color: var(--glicine-dark); text-decoration: underline; font-size: .92rem; }
.contact-map.loaded .map-placeholder { display: none; }

/* ===== Banner cookie ===== */
.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 1100;
  width: min(92vw, 780px);
  background: #fff;
  border: 1px solid rgba(42,63,51,.1);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 20px 24px;
  animation: fadeUp .5s ease both;
}
.cookie-banner[hidden] { display: none; }
.cookie-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.cookie-inner p {
  flex: 1;
  min-width: 240px;
  margin: 0;
  font-size: .92rem;
  color: var(--ink-soft);
  line-height: 1.55;
}
.cookie-inner a { color: var(--glicine-dark); text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; }
.cookie-banner .btn { padding: 11px 22px; font-size: .92rem; }
@media (max-width: 620px) {
  .cookie-actions { width: 100%; }
  .cookie-actions .btn { flex: 1; }
}

.contact-form {
  background: #fff;
  padding: clamp(28px, 4vw, 40px);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label {
  display: block;
  font-size: .9rem;
  font-weight: 600;
  color: var(--green-900);
  margin-bottom: 7px;
}
.field input, .field textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--sand-200);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .98rem;
  background: var(--sand-50);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--glicine);
  box-shadow: 0 0 0 4px rgba(138, 111, 171, .14);
  background: #fff;
}
.field textarea { resize: vertical; }
.form-note {
  margin-top: 14px;
  font-size: .92rem;
  font-weight: 500;
  min-height: 20px;
}
.form-note.ok { color: var(--green-700); }
.form-note.err { color: #c0392b; }

/* ===== Footer ===== */
.site-footer {
  background: var(--green-900);
  color: rgba(255,255,255,.78);
  padding: 64px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-brand .brand-text strong { color: #fff; font-family: var(--font-head); font-size: 1.4rem; }
.footer-brand .brand-text small { color: var(--glicine-300); letter-spacing: .1em; text-transform: uppercase; font-size: .72rem; }
.footer-brand p { margin-top: 14px; max-width: 320px; font-size: .95rem; }
.footer-col h4 {
  color: #fff;
  font-size: 1.05rem;
  margin-bottom: 16px;
}
.footer-col a, .footer-col span {
  display: block;
  margin-bottom: 10px;
  font-size: .95rem;
  transition: color .2s ease;
}
.footer-col a:hover { color: var(--glicine-300); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: .88rem;
}
.footer-legal a:hover { color: var(--glicine-300); }

/* ===== Notice / callout ===== */
.notice {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 26px;
  padding: 20px 22px;
  background: var(--glicine-100);
  border-left: 4px solid var(--glicine);
  border-radius: var(--radius-sm);
}
.notice p { color: var(--ink); font-size: .98rem; margin: 0; }
.notice-icon { font-size: 1.2rem; line-height: 1.4; flex-shrink: 0; display: flex; align-items: center; color: var(--glicine); }
.notice-icon svg { display: block; }
.notice-wide { margin-top: 36px; }

/* ===== Gestione band ===== */
.mgmt-band {
  background: linear-gradient(135deg, var(--green-700), var(--green-900));
  color: #fff;
  padding: clamp(56px, 8vw, 96px) 0;
}
.mgmt-inner { max-width: 760px; }
.mgmt-band h2 { color: #fff; font-size: clamp(1.7rem, 3.5vw, 2.5rem); margin-bottom: 18px; }
.mgmt-band p { color: rgba(255,255,255,.9); margin-bottom: 14px; }
.mgmt-band strong { color: #fff; }
.mgmt-sub { color: rgba(255,255,255,.78) !important; font-size: .98rem; }
.mgmt-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 32px;
}
.mgmt-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 224px;
  height: 88px;
  background: #fff;
  border-radius: 14px;
  padding: 12px 18px;
  box-shadow: 0 8px 20px rgba(0,0,0,.18);
}
.mgmt-logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* ===== A chi si rivolge ===== */
.audience { background: var(--sand-100); }
.audience-grid { max-width: 820px; margin: 0 auto; text-align: center; }
.audience-text h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 18px; }
.audience-text p { color: var(--ink-soft); font-size: 1.06rem; }
.audience-note {
  position: relative;
  margin: 34px auto 0;
  max-width: 640px;
  padding-top: 28px;
  font-family: var(--font-head);
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--glicine-dark) !important;
}
.audience-note::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 56px; height: 3px;
  border-radius: 2px;
  background: var(--glicine-300);
}

/* ===== Timeline (la giornata) ===== */
.day-timeline {
  list-style: none;
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}
.day-timeline::before {
  content: "";
  position: absolute;
  left: 27px; top: 14px; bottom: 14px;
  width: 2px;
  background: linear-gradient(var(--glicine-300), var(--glicine-100));
}
.dt-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 22px;
  padding: 9px 0;
}
.dt-marker {
  flex-shrink: 0;
  width: 56px; height: 56px;
  display: grid; place-items: center;
  color: var(--glicine);
  background: #fff;
  border: 2px solid var(--glicine-100);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  z-index: 1;
}
.dt-marker svg { width: 26px; height: 26px; display: block; }
.dt-card {
  flex: 1;
  background: #fff;
  border: 1px solid rgba(42,63,51,.06);
  border-radius: var(--radius);
  padding: 16px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}
.dt-card:hover { transform: translateX(5px); box-shadow: var(--shadow-md); }
.dt-time {
  display: inline-block;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--glicine);
  margin-bottom: 3px;
}
.dt-card h3 { font-size: 1.12rem; margin-bottom: 3px; }
.dt-card p { color: var(--ink-soft); font-size: .95rem; }

/* ===== Attività chips ===== */
.activities { max-width: 820px; margin: 56px auto 0; text-align: center; }
.activities-title { font-size: 1.3rem; margin-bottom: 20px; }
.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.chips li {
  background: var(--glicine-100);
  color: var(--glicine-dark);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: .92rem;
  font-weight: 500;
}
.activities-note { margin-top: 22px; color: var(--ink-soft); font-size: .98rem; }

/* ===== Alimentazione band ===== */
.food-band {
  background: url("assets/alimentazione.jpg?v=1") center/cover no-repeat, var(--green-900);
  position: relative;
  color: #fff;
  padding: clamp(64px, 10vw, 120px) 0;
}
.food-band::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(42,63,51,.92) 0%, rgba(42,63,51,.78) 45%, rgba(42,63,51,.45) 100%);
}
.food-inner { position: relative; max-width: 620px; }
.food-band h2 { color: #fff; font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin-bottom: 18px; }
.food-band p { color: rgba(255,255,255,.92); margin-bottom: 14px; }
.food-sub { color: rgba(255,255,255,.8) !important; }

/* ===== Struttura / amenities ===== */
.amenities {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin: 0 auto 52px;
}
.amenity {
  background: #fff;
  border: 1px solid rgba(42,63,51,.06);
  border-radius: var(--radius);
  padding: 30px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform .3s ease, box-shadow .3s ease;
}
.amenity:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.amenity-ico {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  color: var(--glicine);
  background: var(--glicine-100);
  border-radius: 16px;
  margin-bottom: 18px;
}
.amenity-ico svg { width: 28px; height: 28px; display: block; }
.amenity h3 { font-size: 1.2rem; margin-bottom: 8px; }
.amenity p { color: var(--ink-soft); font-size: .96rem; }

/* ===== Steps (ingresso) ===== */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 48px;
}
.steps li {
  display: flex;
  gap: 16px;
  background: #fff;
  padding: 24px 22px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(42,63,51,.05);
}
.steps span {
  flex-shrink: 0;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: var(--glicine);
  color: #fff;
  font-family: var(--font-head);
  font-size: 1.2rem;
  border-radius: 50%;
}
.steps h3 { font-size: 1.08rem; margin-bottom: 4px; }
.steps p { color: var(--ink-soft); font-size: .94rem; }

.admission-cta {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}
.admission-cta p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin-bottom: 22px;
}

/* ===== Famiglie e territorio ===== */
.community-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.community-card {
  background: #fff;
  padding: 36px 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(42,63,51,.05);
}
.community-card .card-icon { margin-bottom: 20px; }
.community-card h3 { font-size: 1.35rem; margin-bottom: 12px; }
.community-card p { color: var(--ink-soft); }

/* ===== Pagine legali (privacy / cookie) ===== */
.legal-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 247, 242, .92);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}
.legal-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
.legal-header .brand { gap: 12px; }
.legal-header .brand-icon { height: 60px; width: auto; display: block; filter: none; }
.legal-header .brand-text strong {
  font-family: var(--font-head);
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--glicine-dark);
  display: block;
  line-height: 1;
  text-shadow: none;
}
.legal-header .brand-text small {
  display: block;
  margin-top: 3px;
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--green-500);
  text-shadow: none;
}
.legal-back {
  background: var(--glicine);
  color: #fff;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background .25s ease;
}
.legal-header .brand { min-width: 0; }
.legal-header .brand-text { min-width: 0; }
.legal-header .brand-text strong,
.legal-header .brand-text small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legal-back:hover { background: var(--glicine-dark); color: #fff; }
/* anche quando il pulsante è dentro il contenuto della pagina legale */
.legal a.legal-back,
.legal a.legal-back:hover { color: #fff; text-decoration: none; }

@media (max-width: 620px) {
  .legal-header .container { padding-top: 10px; padding-bottom: 10px; }
  .legal-header .brand { gap: 9px; }
  .legal-header .brand-icon { height: 44px; }
  .legal-header .brand-text strong { font-size: 1.2rem; }
  .legal-header .brand-text small { display: none; }
  .legal-back { padding: 8px 14px; font-size: .82rem; }
}

.legal { padding: clamp(48px, 7vw, 90px) 0; background: var(--sand-50); }
.legal .container { max-width: 820px; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 8px; }
.legal-updated { color: var(--ink-soft); font-size: .92rem; margin-bottom: 36px; }
.legal h2 {
  font-size: 1.4rem;
  margin: 36px 0 12px;
  color: var(--green-900);
}
.legal h3 { font-size: 1.1rem; margin: 22px 0 8px; color: var(--green-900); }
.legal p, .legal li { color: var(--ink-soft); margin-bottom: 12px; line-height: 1.7; }
.legal ul { margin: 0 0 16px 22px; }
.legal li { margin-bottom: 8px; }
.legal a { color: var(--glicine-dark); text-decoration: underline; }
.legal a:hover { color: var(--glicine); }
.legal strong { color: var(--ink); }
.legal .legal-note {
  margin-top: 36px;
  padding: 18px 22px;
  background: var(--glicine-100);
  border-left: 4px solid var(--glicine);
  border-radius: var(--radius-sm);
  font-size: .95rem;
}

/* ===== Lightbox (galleria a schermo intero) ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: rgba(15, 22, 18, .93);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  touch-action: manipulation;
  transition: opacity .3s ease, visibility .3s ease;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lb-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.lb-stage {
  position: relative;
  display: inline-flex;
  line-height: 0;
}
.lb-img {
  max-width: 90vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  background: #fff;
}
.lb-caption {
  color: #fff;
  font-family: var(--font-head);
  font-size: 1.1rem;
  text-align: center;
}
.lb-btn {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(15, 22, 18, .45);
  color: #fff;
  font-size: 1.9rem;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background .25s ease;
}
.lb-btn:hover { background: rgba(15, 22, 18, .72); }
/* chiusura: in alto a destra dello schermo */
.lb-close { position: absolute; top: 22px; right: 26px; font-size: 2.1rem; z-index: 2; }
/* frecce: DENTRO la foto, ai bordi sinistro/destro */
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }

@media (max-width: 620px) {
  .lightbox { padding: 14px; }
  .lb-btn { width: 42px; height: 42px; font-size: 1.6rem; }
  .lb-close { top: 12px; right: 14px; }
  .lb-prev { left: 10px; }
  .lb-next { right: 10px; }
  .lb-img { max-height: 76vh; }
}

/* ===== Reveal animation ===== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

/* ===== Responsive ===== */
@media (max-width: 940px) {
  .main-nav {
    position: fixed;
    top: 0; bottom: 0; right: 0;
    width: min(84vw, 330px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 0;
    padding: 92px 26px 32px;
    background: var(--sand-50);
    box-shadow: -12px 0 40px rgba(15, 22, 18, .22);
    transform: translateX(105%);
    transition: transform .38s cubic-bezier(.4, 0, .2, 1);
    overflow-y: auto;
    will-change: transform;
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav a,
  .site-header.scrolled .main-nav a:not(.nav-cta) {
    color: var(--green-900);
    text-shadow: none;
  }
  .main-nav a:not(.nav-cta) {
    padding: 16px 6px;
    font-size: 1.12rem;
    font-weight: 500;
    border-bottom: 1px solid var(--sand-200);
  }
  .main-nav a:not(.nav-cta)::after { display: none; }
  .main-nav .nav-cta {
    margin-top: 24px;
    text-align: center;
    padding: 15px 22px;
    font-size: 1.05rem;
    color: #fff !important;
  }
  .nav-toggle { display: flex; z-index: 110; }

  /* Sfondo scurito dietro il menu */
  .nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(15, 22, 18, .5);
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s ease, visibility .35s ease;
  }
  .nav-overlay.open { opacity: 1; visibility: visible; }
  body.nav-open { overflow: hidden; }
  .about-grid, .why-grid, .contact-grid { grid-template-columns: 1fr; }
  .why-media { min-height: 320px; }
  .cards, .t-grid { grid-template-columns: repeat(2, 1fr); }
  .amenities { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .community-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  /* Hero su mobile: foto verticale a tutto schermo (file dedicato hero-mobile.jpg) */
  .hero { padding: 120px 0 60px; }
  .hero::before {
    background-image: url("assets/hero-mobile.jpg?v=2");
    background-position: center;
  }
  .hero-badges { gap: 24px; }
  .hero-badges strong { font-size: 1.5rem; }
  .cards, .t-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .amenities, .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }

  .brand { padding: 6px 14px 6px 8px; gap: 9px; }
  .mgmt-logo { width: 180px; height: 74px; padding: 10px 14px; }
  .brand-icon { height: 58px; width: auto; }
  .brand-text strong { font-size: 1.35rem; }
  .brand-text small { font-size: .62rem; letter-spacing: .18em; }
  .site-header.scrolled .brand-icon { height: 50px; }

  /* Timeline compatta su mobile */
  .dt-item { gap: 14px; }
  .dt-marker { width: 46px; height: 46px; font-size: 1.25rem; }
  .day-timeline::before { left: 22px; }
  .dt-card { padding: 14px 18px; }
}
