/* Viva Bracciano - Self-hosted Lora font */
@import url('/fonts/lora.css');

/* Base & reset */
:root {
  --color-bg: #faf9f7;
  --color-text: #1a1a1a;
  --color-accent: #3a7a33;
  --color-whatsapp: #25D366;
  --color-whatsapp-hover: #20bd5a;
  --font-sans: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-serif: 'Lora', Georgia, 'Times New Roman', 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;
}
h1, h2, h3 { font-family: var(--font-serif); }
img { max-width: 100%; height: auto; }

/* Skip-to-content (accessibility) */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--color-accent);
  color: #fff;
  border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}

/* Focus styles (accessibility) */
:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(58,122,51,0.25);
}

/* 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); }

/* Language dropdown */
.lang-select {
  padding: 0.4rem 2rem 0.4rem 0.6rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 8px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") no-repeat right 0.6rem center;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.2s;
}
.lang-select:hover { border-color: var(--color-accent); }

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 {
  position: relative;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 3rem 1rem;
  overflow: hidden;
  border-radius: 0 0 var(--radius) var(--radius);
}
.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.55) 100%);
  z-index: 1;
}
.hero h1 { position: relative; z-index: 2; color: #fff; font-size: clamp(2.5rem, 6vw, 4rem); margin-bottom: 0.5rem; text-shadow: 0 2px 12px rgba(0,0,0,0.4); }
.hero .tagline { position: relative; z-index: 2; font-size: 1.15rem; color: rgba(255,255,255,0.92); margin: 0 0 1.5rem; max-width: 36ch; text-shadow: 0 1px 8px rgba(0,0,0,0.4); }
.hero .hero-cta { position: relative; z-index: 2; }

/* Hero CTA group */
.hero-cta-group {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* CTA buttons */
.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  background: var(--color-whatsapp);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(37,211,102,0.3);
}
.btn-cta:hover { background: var(--color-whatsapp-hover); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37,211,102,0.4); }
.btn-cta:active { transform: translateY(0); }
.btn-cta svg { width: 20px; height: 20px; fill: currentColor; }

.btn-cta--secondary {
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(4px);
  border: 2px solid rgba(255,255,255,0.6);
  box-shadow: none;
}
.btn-cta--secondary:hover { background: rgba(255,255,255,0.35); box-shadow: none; transform: translateY(-1px); }

/* 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; }

/* FAQ section */
.faq-section { padding: 2.5rem 0; }
.faq-section h2 { margin-bottom: 1.5rem; }
.faq-item {
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.faq-item summary {
  padding: 1rem 0;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-item summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--color-accent);
  flex-shrink: 0;
  transition: transform 0.2s;
}
.faq-item[open] summary::after {
  content: '−';
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item .faq-answer {
  padding: 0 0 1rem;
  color: #555;
  line-height: 1.7;
}

/* Maps placeholder (GDPR consent) */
.maps-placeholder {
  background: linear-gradient(135deg, #e8f0e5 0%, #dde8da 100%);
  border: 1px solid rgba(58,122,51,0.2);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}
.maps-placeholder p { color: #555; font-size: 0.95rem; margin: 0; }
.btn-maps {
  padding: 0.65rem 1.5rem;
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-maps:hover { background: #2d6128; }
.maps-iframe {
  width: 100%;
  height: 350px;
  border: none;
  border-radius: var(--radius);
  margin-top: 1.5rem;
}

/* 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); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .footer-legal { margin-top: 0.5rem; margin-bottom: 0; }
.site-footer .footer-legal small { font-size: 0.85em; opacity: 0.9; }
.footer-links { margin-top: 0.5rem; }
.footer-links a { margin: 0 0.5rem; }
.footer-lang { margin-top: 0.75rem; }

/* Sticky CTA bar (mobile only) */
.sticky-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(0,0,0,0.08);
  padding: 0.5rem 1rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}
.sticky-cta.is-visible {
  transform: translateY(0);
}
.sticky-cta-inner {
  display: flex;
  gap: 0.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}
.sticky-cta a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.2s;
}
.sticky-cta a svg { width: 18px; height: 18px; fill: currentColor; }
.sticky-cta .sticky-call {
  background: var(--color-accent);
  color: #fff;
}
.sticky-cta .sticky-call:hover { background: #2d6128; }
.sticky-cta .sticky-wa {
  background: var(--color-whatsapp);
  color: #fff;
}
.sticky-cta .sticky-wa:hover { background: var(--color-whatsapp-hover); }

/* Carousel */
.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: 3 / 2;
  object-fit: cover;
  display: block;
  background: #e8e6e3;
  cursor: pointer;
  border-radius: 8px;
}
/* Adaptive carousel: portrait images */
.carousel-slide[data-orientation="portrait"] img {
  aspect-ratio: 2 / 3;
}
@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: #2d6128; }
.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); }

/* Lightbox */
.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; }

/* Legal pages */
.legal-page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}
.legal-page h1 { font-size: 1.75rem; color: var(--color-text); margin-bottom: 1.5rem; }
.legal-page h2 { font-size: 1.25rem; margin-top: 2rem; }
.legal-page p, .legal-page li { line-height: 1.8; }
.legal-page ul { padding-inline-start: 1.5rem; }

/* RTL support */
[dir="rtl"] .nav { direction: rtl; }
[dir="rtl"] .carousel-track { direction: rtl; }
[dir="rtl"] .hero-cta-group { direction: rtl; }
[dir="rtl"] .lang-select {
  background-position: left 0.6rem center;
  padding: 0.4rem 0.6rem 0.4rem 2rem;
}
[dir="rtl"] .faq-item summary { flex-direction: row-reverse; }
[dir="rtl"] .sticky-cta-inner { direction: rtl; }

/* Responsive - tablet */
@media (max-width: 1024px) {
  .nav a { padding: 0.4rem 0.5rem; font-size: 0.9rem; }
  .carousel-slide {
    width: min(220px, 60vw);
    min-width: min(220px, 60vw);
    max-width: min(220px, 60vw);
  }
}

/* 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-select { margin-top: 0.5rem; padding-top: 0.5rem; width: 100%; }
  main { padding: 0 1rem 2.5rem; }
  section { padding: 1.75rem 0; }
  .hero { padding: 2rem 1rem; min-height: 50vh; }
  .hero-cta-group { flex-direction: column; align-items: center; }
  .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; }
  .sticky-cta { display: block; }
  body { padding-bottom: 4rem; }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
