:root{
  --green:#1b7a4a;
  --green-600:#16633d;
  --brown:#6b4f3a;
  --cream:#f7f4ef;
  --stone:#f3f2f0;
  --ink:#1f1f1f;
  --muted:#6b6b6b;
  --radius:18px;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;color:var(--ink);background:var(--cream);line-height:1.5}
.serif{font-family:'Playfair Display',Georgia,serif}
.container{max-width:1140px;margin:0 auto;padding:0 18px}
.row{display:flex;gap:12px}
.row.between{justify-content:space-between}
.row.center{align-items:center}
.grid-4{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.grid-2{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}
.cards .card{background:#fff;border:1px solid #e8e5e1;border-radius:var(--radius);padding:18px;box-shadow:0 6px 18px rgba(0,0,0,.04)}
.cards.media-cards .card{padding:0;overflow:hidden}
.media{aspect-ratio:4/3;background:var(--stone);background-image:var(--bg);background-size:cover;background-position:center}
.media+.pad{padding:16px}
.hero{background:linear-gradient(135deg,var(--green) 0%, var(--brown) 100%);color:#fff;padding:64px 0}
.hero .hero-inner{display:grid;grid-template-columns:1.2fr .8fr;gap:24px;align-items:center}
.hero .lead{opacity:.9;font-size:1.05rem;max-width:60ch}
.hero .big{font-size:42px;line-height:1.1;margin:0 0 12px}
.section{padding:56px 0;background:transparent}
.section.alt{background:#fff}
h2{margin:0 0 16px;font-size:28px}
h3{margin:0 0 6px;font-size:18px}
.muted{color:var(--muted)}
.max{max-width:70ch}
.tiny{font-size:.8rem}
.small{font-size:.9rem}
.btn{display:inline-flex;align-items:center;justify-content:center;padding:12px 18px;border-radius:999px;border:1px solid rgba(0,0,0,.08);text-decoration:none;font-weight:600}
.btn.primary{background:var(--green);color:#fff;border-color:transparent}
.btn.primary:hover{background:var(--green-600)}
.btn.ghost{background:transparent}
.btn.small{padding:8px 14px}
.btn.tiny{padding:6px 12px;font-size:.85rem}
.topbar{position:sticky;top:0;z-index:1000;background:rgba(255,255,255,.9);backdrop-filter:blur(10px);border-bottom:1px solid #e8e5e1}
.topbar .brand{font-weight:600;text-decoration:none;color:var(--ink);font-family:'Playfair Display',Georgia,serif;font-size:22px}
.nav{display:flex;gap:16px}
.nav a{color:var(--ink);text-decoration:none;opacity:.85}
.nav a:hover{opacity:1;color:var(--green)}
.burger{display:none;background:none;border:0;font-size:24px}

/* MOBILE NAV OVERLAY - versione corretta */
.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh; /* prende tutta l’altezza visibile */
  background: rgba(0, 0, 0, 0.82);
  cursor: pointer; /* indica che si può cliccare */
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 100px 20px 40px;
  gap: 26px;
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
  z-index: 9999;
}

.mobile-nav.open {
  transform: translateY(0);
  opacity: 1;
}

.mobile-nav a, .mobile-nav span {
  display: block;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 500;
  text-decoration: none;
  text-align: center;
  letter-spacing: 0.5px;
  transition: color 0.25s ease, transform 0.25s ease;
  cursor: default; /* ma non sui link */
}

.mobile-nav a:hover {
  color: var(--green, #fff);
  transform: scale(1.05);
}


.mobile-nav .lang-switch {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 20px;
  margin-top: 30px;
}

.lang-switch {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 500;
  z-index: 1001;
}

/* Stile link */
.lang-switch a, .lang-switch span {
  text-decoration: none;
  color: var(#fff);
  opacity: 0.8;
  transition: all 0.25s ease;
}

.lang-switch a:hover {
  opacity: 1;
}

.lang-switch a.active {
  color: var(--green);
  opacity: 1;
  font-weight: 700;
}

/* === Desktop === */
.desktop-only.lang-switch {
  position: absolute;
  top: 18px;
  right: 20px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(6px);
  border: 1px solid #e8e5e1;
  border-radius: 999px;
  padding: 6px 12px;
}

.gallery{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.g-item{aspect-ratio:1/1;border-radius:14px;background:var(--stone);background-image:var(--bg);background-size:cover;background-position:center}
.mapbox{border:1px solid #e8e5e1;border-radius:var(--radius);background:#fff;height:380px;display:flex;align-items:center;justify-content:center;color:#999}
.footer{background:#141414;color:#ddd;padding-top:36px}
.footer .grid-4{gap:8px}
footer .grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}

.footer .muted{color:#a5a5a5}
.footer a{color:#e2e2e2}

/* Footer base */
footer {
  background: var(--dark, #111);
  color: #fff;
  padding: 60px 0 10px;
}

footer .container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}

footer h3, footer h4 {
  margin-top: 0px;
  margin-bottom: 8px;
  color: #fff;
  font-weight: 600;
}

footer p {
  margin: 0;
  line-height: 1.5;
}

footer a {
  color: #d2cbb2;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

.subfooter{border-top:1px solid #242424;margin-top:18px;padding:16px 0;color:#aaa}
.form input,.form select,.form textarea{width:100%;padding:12px 14px;border:1px solid #e0ddd8;border-radius:12px;background:#fff}
/* Cookie banner minimal */
.cookie-banner{position:fixed;inset:auto 0 10px 0;display:flex;justify-content:center;z-index:1002}
.cookie-card{display:flex;gap:10px;align-items:center;max-width:720px;padding:10px 12px;border:1px solid #e8e5e1;border-radius:999px;background:rgba(255,255,255,.92);backdrop-filter:blur(6px);box-shadow:0 8px 24px rgba(0,0,0,.06);font-size:.95rem}
/* Responsive */
@media (max-width: 960px){
  .grid-4{grid-template-columns:repeat(2,1fr)}
  .grid-3{grid-template-columns:repeat(2,1fr)}
  .grid-2{grid-template-columns:1fr}
  .hero .hero-inner{grid-template-columns:1fr}
  .gallery{grid-template-columns:repeat(3,1fr)}
  .nav{display:none}
  .burger{display:block}
}
@media (max-width: 600px){
  .hero{padding:44px 0}
  .hero .big{font-size:34px}
  .gallery{grid-template-columns:repeat(2,1fr)}
  .cookie-card{font-size:.9rem}
}


/* Timed popup modal */
/* Layer scuro di sfondo */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  z-index: 1100;
  padding: 18px;
}

/* Quando il popup è attivo */
.modal.show {
  display: flex;
  animation: fadeIn 0.3s ease forwards;
}

/* Box principale */
.modal-card {
  position: relative;
  background: #fff;
  border-radius: 18px;
  max-width: 760px;
  width: 100%;
  overflow: hidden;
  border: 1px solid #e8e5e1;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

/* Immagine / banner */
.modal-media {
  aspect-ratio: 16 / 9;
  background: #ddd;
  background-image: var(--bg);
  background-size: cover;
  background-position: center;
}

/* Corpo testo */
.modal-body {
  padding: 20px 24px;
  background: #fff;
}

/* Pulsante chiusura (X) */
.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: 0;
  border-radius: 999px;
  width: 32px;
  height: 32px;
  line-height: 28px;
  font-size: 20px;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s ease;
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.7);
}

/* Layout desktop */
@media (min-width: 880px) {
  .modal-card {
    grid-template-columns: 1.1fr 0.9fr;
  }
  .modal-media {
    aspect-ratio: auto;
    height: 100%;
  }
}

/* Effetto fade-in */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.cookie-banner.is-hidden {
  display: none !important;
}

/* Pulsante WhatsApp */
.btn.whatsapp {
  background-color: #25d366;
  border-color: #25d366;
  color: #fff;
  font-weight: 600;
}
.btn.whatsapp:hover {
  background-color: #1ebe5d;
}

/* Mostra/nasconde a seconda del device */
.desktop-only { display: inline-flex; }
@media (max-width: 960px) {
  .desktop-only { display: none !important; }
}

/* Pulsanti eleganti e rettangolari */
.btn.elegant {
  border-radius: 10px;
  font-weight: 500;
  letter-spacing: 0.2px;
  padding: 10px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.mapbox iframe {
  width: 100%;
  height: 400px;
  border: 0;
  border-radius: 16px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.1);
}

/* Griglia ristorazione compatta */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.media-cards.small .media {
  aspect-ratio: 1/1;
  border-radius: 12px;
  background-image: var(--bg);
  background-size: cover;
  background-position: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.media-cards.small .media:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

/* Logo brand */
.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  max-width: 220px; /* limite massimo generale */
}

.brand .logo {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.2s ease;
  object-fit: contain;
}

.brand .logo:hover {
  opacity: 0.9;
}

/* Responsive: logo più piccolo su tablet e mobile */
.brand {
  max-width: 220px; /* base desktop */
}

@media (max-width: 480px) {
  .brand {
    max-width: 120px;
  }
}

@media (max-width: 768px) {
  .brand {
    max-width: 180px;
  }
}

@media (max-width: 1024px) {
  .brand {
    max-width: 220px;
  }
}

footer .container > div {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* Pulsanti prenotazione */
.contact-buttons {
  margin-top: 30px;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.btn.big {
  font-size: 1.05rem;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.btn.big.ghost {
  background: transparent;
  border: 2px solid var(--green);
  color: var(--green);
}

.btn.big.ghost:hover {
  background: var(--green);
  color: #fff;
}

.btn.big.whatsapp {
  background: #25D366;
  color: #fff;
  border: 2px solid #25D366;
  box-shadow: 0 6px 16px rgba(37,211,102,0.2);
}

.btn.big.whatsapp:hover {
  background: #1ebe5d;
  border-color: #1ebe5d;
  transform: translateY(-2px);
}

.hero-media .media {
  background-image: var(--bg);
  background-size: cover;
  background-position: center;
  border-radius: 16px;
  width: 100%;
  opacity: 0;
  animation: heroFadeIn 0.8s ease forwards;
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: scale(1.02); }
  to   { opacity: 1; transform: scale(1); }
}

/* Corregge scroll per ancore con header fisso */
:target {
  scroll-margin-top: 60px; /* regola questo valore in base all’altezza del tuo header */
}

.no-scroll {
  overflow: hidden;
}

.burger.active {
  transform: rotate(90deg);
}