/* Viva Bracciano - Base & reset */
:root {
  --color-bg: #faf9f7;
  --color-text: #1a1a1a;
  --color-accent: #2d5a27;
  --color-whatsapp: #25D366;
  --color-whatsapp-hover: #20bd5a;
  --font-sans: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --max-width: 960px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }

/* Layout */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo-link { font-weight: 700; font-size: 1.35rem; color: var(--color-accent); text-decoration: none; display: inline-flex; align-items: center; gap: 0.5rem; }
.logo-img { border-radius: 50%; object-fit: cover; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}
.nav { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.nav a {
  padding: 0.5rem 0.75rem;
  color: var(--color-text);
  text-decoration: none;
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s;
}
.nav a:hover { background: rgba(0,0,0,0.06); color: var(--color-accent); }
.lang-switcher { display: flex; gap: 0.25rem; }
.lang-switcher a {
  padding: 0.35rem 0.6rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 8px;
  background: rgba(0,0,0,0.05);
  color: var(--color-text);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.lang-switcher a:hover { background: var(--color-accent); color: #fff; }

main { max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem 3rem; }
section { padding: 2.5rem 0; border-bottom: 1px solid rgba(0,0,0,0.06); }
section:last-of-type { border-bottom: none; }
h1 { font-size: clamp(1.75rem, 4vw, 2.25rem); margin: 0 0 0.5rem; color: var(--color-accent); }
h2 { font-size: 1.5rem; margin: 0 0 1rem; color: var(--color-text); }
h3 { font-size: 1.15rem; margin: 0 0 0.5rem; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }
a[href^="http"] { color: var(--color-accent); }
a[href^="http"]:hover { text-decoration: underline; }

/* Hero */
.hero {
  min-height: 40vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 3rem 1rem;
  background: linear-gradient(135deg, rgba(45,90,39,0.06) 0%, rgba(45,90,39,0.02) 100%);
  border-radius: 0 0 var(--radius) var(--radius);
}
.hero h1 { margin-bottom: 0.5rem; }
.hero .tagline { font-size: 1.1rem; color: #555; margin: 0 0 1.5rem; max-width: 32ch; }
.hero-image {
  display: block;
  width: 100%;
  max-width: 800px;
  height: auto;
  margin: 0 auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: #e8e6e3;
  min-height: 200px;
  object-fit: cover;
}

/* Contact block */
.contact-block { display: grid; gap: 0.75rem; }
.contact-block a { display: inline-flex; align-items: center; gap: 0.5rem; }

/* Hours */
.hours-list { list-style: none; padding: 0; margin: 0; }
.hours-list li { padding: 0.25rem 0; }

/* Form WhatsApp */
.whatsapp-form {
  background: linear-gradient(145deg, rgba(37,211,102,0.08) 0%, rgba(37,211,102,0.02) 100%);
  border: 1px solid rgba(37,211,102,0.25);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 420px;
  box-shadow: var(--shadow);
}
.whatsapp-form .form-title { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; font-size: 1.15rem; color: #1a1a1a; }
.whatsapp-form .form-intro { font-size: 0.9rem; color: #555; margin-bottom: 1rem; }
.whatsapp-form label { display: block; font-weight: 500; margin-bottom: 0.35rem; font-size: 0.9rem; }
.whatsapp-form input,
.whatsapp-form textarea,
.whatsapp-form select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.whatsapp-form input:focus,
.whatsapp-form textarea:focus,
.whatsapp-form select:focus {
  outline: none;
  border-color: var(--color-whatsapp);
  box-shadow: 0 0 0 3px rgba(37,211,102,0.2);
}
.whatsapp-form textarea { min-height: 100px; resize: vertical; }
.whatsapp-form button[type="submit"] {
  width: 100%;
  padding: 0.75rem 1.25rem;
  background: var(--color-whatsapp);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background 0.2s, transform 0.1s;
}
.whatsapp-form button[type="submit"]:hover { background: var(--color-whatsapp-hover); }
.whatsapp-form button[type="submit"]:active { transform: scale(0.98); }
.whatsapp-form .wa-icon { width: 22px; height: 22px; fill: currentColor; }

/* Footer */
.site-footer {
  margin-top: 2rem;
  padding: 1.5rem 1.25rem;
  text-align: center;
  font-size: 0.9rem;
  color: #666;
  border-top: 1px solid rgba(0,0,0,0.06);
}
.site-footer a { color: var(--color-accent); }
.site-footer .footer-legal { margin-top: 0.5rem; margin-bottom: 0; }
.site-footer .footer-legal small { font-size: 0.85em; opacity: 0.9; }

/* Responsive - mobile */
@media (max-width: 768px) {
  .header-inner { position: relative; }
  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
  }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 0.75rem 1rem 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  }
  .nav.is-open { display: flex; }
  .nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
  }
  .lang-switcher { margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px solid rgba(0,0,0,0.06); }
  main { padding: 0 1rem 2.5rem; }
  section { padding: 1.75rem 0; }
  .hero { padding: 2rem 1rem; min-height: 35vh; }
  .carousel-btn {
    min-width: 44px;
    min-height: 44px;
  }
  .whatsapp-form input,
  .whatsapp-form select,
  .whatsapp-form button[type="submit"] {
    min-height: 44px;
  }
  .whatsapp-form textarea { min-height: 100px; }
}

/* Section images */
.section-image {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
  background: #e8e6e3;
  min-height: 180px;
  object-fit: cover;
}

/* Carousel monolinea: in ogni sezione una sola riga orizzontale con auto-scorrimento */
.carousel-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 auto 1.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.carousel-track {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  gap: 0.5rem;
  scrollbar-width: none;
  width: 100%;
  min-height: 0;
  padding: 0 0.25rem;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide {
  flex: 0 0 auto;
  flex-shrink: 0;
  width: min(240px, 70vw);
  min-width: min(240px, 70vw);
  max-width: min(240px, 70vw);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.carousel-slide img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  background: #e8e6e3;
  cursor: pointer;
}
@media (min-width: 640px) {
  .carousel-slide {
    width: 260px;
    min-width: 260px;
    max-width: 260px;
  }
}
.carousel-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.carousel-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  transition: background 0.2s, transform 0.1s;
}
.carousel-btn:hover { background: #234020; }
.carousel-btn:active { transform: scale(0.95); }
.carousel-dots {
  display: flex;
  gap: 0.35rem;
  justify-content: center;
}
.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.2);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
}
.carousel-dot.is-active { background: var(--color-accent); }
.carousel-caption {
  font-size: 0.85rem;
  color: #666;
  text-align: center;
  margin-top: 0.5rem;
}

/* Lightbox - foto ingrandita al click */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
  padding: 1rem;
  cursor: pointer;
}
.lightbox.is-open {
  display: flex;
}
.lightbox-inner {
  position: relative;
  max-width: 95vw;
  max-height: 95vh;
  cursor: default;
}
.lightbox-inner img {
  max-width: 95vw;
  max-height: 95vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}
.lightbox-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #1a1a1a;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.lightbox-close:hover { background: #fff; }
.lightbox-close:focus { outline: 2px solid #fff; outline-offset: 2px; }
