/* ================================================
   Casa per Anziani Tremosine — Stile principale
   Palette ispirata al volantino: malva/lavanda + verde + azzurro
   ================================================ */

:root {
  --verde:        #5E7A60;   /* verde salvia — natura, giardino */
  --verde-scuro:  #3A5140;   /* verde bosco — header, footer */
  --verde-chiaro: #EAF0E8;   /* accenti verdi, icone */
  --malva:        #9B7AAA;   /* malva/lavanda — dal volantino */
  --malva-scuro:  #6B4F7A;   /* malva scuro — accenti titoli */
  --malva-chiaro: #EDE0F4;   /* sfondo sezioni alternate */
  --azzurro:      #4D85A8;   /* azzurro lago di Garda */
  --crema:        #FAF8F3;   /* sfondo principale, avorio */
  --testo:        #2A1F35;   /* testo principale — viola scuro */
  --testo-light:  #6B5A78;   /* testo secondario */
  --bianco:       #FFFFFF;
  --ombra:        rgba(42,31,53,0.12);
  --radius:       8px;
  --trans:        0.25s ease;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Lato', Georgia, sans-serif;
  background: var(--crema);
  color: var(--testo);
  line-height: 1.7;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: var(--malva-scuro); text-decoration: none; transition: color var(--trans); }
a:hover { color: var(--malva); }

h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  line-height: 1.25;
  color: var(--malva-scuro);
}

h1, h2 { font-style: italic; }

/* ---- HEADER ---- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bianco);
  box-shadow: 0 2px 12px var(--ombra);
}
.header-top {
  background: var(--verde-scuro);
  color: #cde0d5;
  font-size: 0.82rem;
  padding: 6px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.header-top a { color: #cde0d5; }
.header-top a:hover { color: var(--bianco); }

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  gap: 16px;
}
.logo { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.logo-icon {
  width: 52px; height: 52px;
  background: var(--verde-scuro);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-icon svg { width: 28px; height: 28px; fill: var(--bianco); }
.logo-text { line-height: 1.2; }
.logo-text strong {
  display: block;
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 1.2rem;
  color: var(--verde-scuro);
}
.logo-text span {
  font-size: 0.78rem;
  color: var(--testo-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Nav */
nav { display: flex; align-items: center; gap: 4px; }
nav a {
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--testo);
  transition: background var(--trans), color var(--trans);
  white-space: nowrap;
}
nav a:hover, nav a.active {
  background: var(--malva-chiaro);
  color: var(--malva-scuro);
}

/* Hamburger */
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--verde-scuro);
  margin: 5px 0;
  transition: var(--trans);
}

/* ---- HERO ---- */
.hero {
  position: relative;
  min-height: 480px;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--verde-scuro) 0%, #9B7AAA 55%, #4D85A8 100%);
}
.hero-bg {
  position: absolute; inset: 0;
  background: url('img/paesaggio.jpg') center/cover no-repeat;
  opacity: 0.25;
}
.hero-content {
  position: relative;
  padding: 60px 24px;
  max-width: 760px;
}
.hero-content h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: var(--bianco);
  margin-bottom: 20px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.hero-content p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255,255,255,0.9);
  margin-bottom: 32px;
  max-width: 560px;
  margin-left: auto; margin-right: auto;
}
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  transition: transform var(--trans), box-shadow var(--trans);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.2); }
.btn-primary { background: var(--bianco); color: var(--malva-scuro); }
.btn-primary:hover { color: var(--malva-scuro); }
.btn-outline { background: transparent; color: var(--bianco); border: 2px solid var(--bianco); margin-left: 12px; }
.btn-outline:hover { color: var(--bianco); }

/* ---- SEZIONI ---- */
.section { padding: 72px 24px; }
.section-alt { background: var(--malva-chiaro); }
.container { max-width: 1100px; margin: 0 auto; }
.section-title {
  text-align: center;
  margin-bottom: 48px;
}
.section-title h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 12px; }
.section-title p { color: var(--testo-light); max-width: 560px; margin: 0 auto; }
.section-title .linea {
  width: 56px; height: 3px;
  background: var(--malva);
  margin: 14px auto 0;
  border-radius: 2px;
}

/* ---- CARDS ---- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 860px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }
.card {
  background: var(--bianco);
  border-radius: 12px;
  padding: 36px 28px;
  box-shadow: 0 4px 20px var(--ombra);
  transition: transform var(--trans), box-shadow var(--trans);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px var(--ombra); }
.card-icon {
  width: 52px; height: 52px;
  background: var(--verde-chiaro);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.card-icon svg { width: 26px; height: 26px; fill: var(--verde); }
.card h3 { font-size: 1.2rem; margin-bottom: 10px; color: var(--malva-scuro); }
.card p { color: var(--testo-light); font-size: 0.94rem; }

/* ---- TWO-COL ---- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.two-col.reverse { direction: rtl; }
.two-col.reverse > * { direction: ltr; }
.text-block h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); margin-bottom: 18px; }
.text-block p { color: var(--testo-light); margin-bottom: 16px; }
.text-block p:last-child { margin-bottom: 0; }
.img-block { border-radius: 16px; overflow: hidden; box-shadow: 0 8px 32px var(--ombra); }
.img-block img { width: 100%; height: 360px; object-fit: cover; }
.img-placeholder {
  width: 100%; height: 360px;
  background: var(--verde-chiaro);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px;
  color: var(--testo-light);
  font-size: 0.9rem;
}
.img-placeholder svg { width: 48px; height: 48px; fill: var(--verde); opacity: 0.5; }

/* ---- GALLERY ---- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.gallery-item {
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
  background: var(--verde-chiaro);
  position: relative;
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item .overlay {
  position: absolute; inset: 0;
  background: rgba(61,89,73,0);
  transition: background 0.3s;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.gallery-item:hover .overlay { background: rgba(61,89,73,0.35); }
.gallery-item .overlay svg { width: 40px; height: 40px; fill: white; opacity: 0; transition: opacity 0.3s; }
.gallery-item:hover .overlay svg { opacity: 1; }

/* Placeholder gallery items */
.gallery-placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; color: var(--testo-light); font-size: 0.8rem; text-align: center; padding: 8px;
}
.gallery-placeholder svg { width: 36px; height: 36px; fill: var(--verde); opacity: 0.4; }

/* Lightbox */
.lightbox {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.9);
  align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 85vh; border-radius: 8px; object-fit: contain; }
.lightbox-close {
  position: absolute; top: 20px; right: 28px;
  color: white; font-size: 2.5rem; cursor: pointer; line-height: 1;
  background: none; border: none;
}
.lightbox-prev, .lightbox-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.15); border: none; color: white;
  font-size: 2rem; padding: 12px 20px; cursor: pointer; border-radius: 6px;
  transition: background var(--trans);
}
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.3); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

/* ---- CONTATTI ---- */
.contatti-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}
.contatto-card {
  background: var(--bianco);
  border-radius: 12px;
  padding: 28px;
  text-align: center;
  box-shadow: 0 4px 20px var(--ombra);
}
.contatto-card .ico {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--verde-chiaro);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.contatto-card .ico svg { width: 28px; height: 28px; fill: var(--verde); }
.contatto-card h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--testo-light); margin-bottom: 8px; }
.contatto-card p, .contatto-card a { font-size: 1.1rem; font-weight: 700; color: var(--testo); }
.contatto-card a:hover { color: var(--malva); }

/* Map */
.map-wrap { border-radius: 16px; overflow: hidden; box-shadow: 0 8px 32px var(--ombra); height: 400px; }
.map-wrap iframe { width: 100%; height: 100%; border: none; }

/* ---- INDIRIZZO ---- */
.indirizzo-box {
  background: var(--verde);
  color: var(--bianco);
  border-radius: 16px;
  padding: 40px;
  margin-bottom: 40px;
  display: flex; flex-wrap: wrap; gap: 32px; align-items: center;
}
.indirizzo-box .addr { flex: 1; min-width: 200px; }
.indirizzo-box .addr h3 { font-family: 'Lato', sans-serif; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.7; margin-bottom: 8px; }
.indirizzo-box .addr p { font-size: 1.05rem; font-weight: 600; }

/* ---- CONTRIBUTI ---- */
.contributi-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.contributi-table th {
  background: var(--verde);
  color: var(--bianco);
  padding: 14px 20px;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
}
.contributi-table td { padding: 14px 20px; border-bottom: 1px solid var(--verde-chiaro); }
.contributi-table tr:last-child td { border-bottom: none; }
.contributi-table tr:nth-child(even) td { background: var(--verde-chiaro); }
.contributi-table .euro { font-weight: 700; color: var(--verde-scuro); }

.anno-badge {
  display: inline-block;
  background: var(--verde);
  color: var(--bianco);
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

/* ---- FOOTER ---- */
.site-footer {
  background: var(--verde-scuro);
  color: rgba(255,255,255,0.75);
  padding: 56px 24px 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto;
}
.footer-col h4 {
  color: var(--bianco);
  font-family: 'Lato', sans-serif;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}
.footer-col p, .footer-col a {
  font-size: 0.9rem;
  line-height: 1.9;
  color: rgba(255,255,255,0.7);
}
.footer-col a:hover { color: var(--bianco); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  margin-top: 48px;
  padding-top: 20px;
  max-width: 1100px;
  margin-left: auto; margin-right: auto;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
}
.footer-bottom a { color: rgba(255,255,255,0.55); }
.footer-bottom a:hover { color: var(--bianco); }

.fb-link {
  display: inline-flex; align-items: center; gap: 8px;
  background: #1877F2;
  color: var(--bianco) !important;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 8px;
  transition: opacity var(--trans);
}
.fb-link:hover { opacity: 0.85; color: var(--bianco) !important; }
.fb-link svg { width: 18px; height: 18px; fill: white; }

/* ---- PAGE HEADER ---- */
.page-header {
  background: linear-gradient(135deg, var(--verde-scuro) 0%, #9B7AAA 60%, #4D85A8 100%);
  padding: 64px 24px;
  text-align: center;
}
.page-header h1 {
  color: var(--bianco);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-style: italic;
  margin-bottom: 10px;
}
.page-header p {
  color: rgba(255,255,255,0.8);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto;
}

/* ---- COOKIE BANNER ---- */
#cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9999;
  background: var(--verde-scuro);
  color: rgba(255,255,255,0.9);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.25);
  font-size: 0.88rem;
  line-height: 1.5;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
#cookie-banner.cb-hidden { opacity: 0; transform: translateY(100%); }
#cookie-banner .cb-text { flex: 1; min-width: 240px; }
#cookie-banner .cb-text a { color: #cde0d5; text-decoration: underline; }
#cookie-banner .cb-text a:hover { color: white; }
#cookie-banner .cb-actions { flex-shrink: 0; }
#cookie-banner #cb-accept {
  background: var(--malva);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 10px 28px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--trans);
}
#cookie-banner #cb-accept:hover { background: var(--malva-scuro); }

/* ---- NOTA IMG PLACEHOLDER ---- */
.nota-img {
  background: var(--malva-chiaro);
  border: 1px dashed var(--malva);
  border-radius: 8px;
  padding: 14px 20px;
  font-size: 0.85rem;
  color: var(--malva-scuro);
  margin-bottom: 32px;
  text-align: center;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; gap: 32px; }
  .two-col.reverse { direction: ltr; }
}

@media (max-width: 720px) {
  nav { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--bianco); padding: 16px; box-shadow: 0 8px 24px var(--ombra); }
  nav.open { display: flex; }
  nav a { padding: 12px 16px; border-radius: var(--radius); }
  .hamburger { display: block; }
  .header-main { padding: 12px 20px; po