:root {
  --bg-beige: #e9d9cc;
  --brown-dark: #3b2a23;
  --gold: #b97f45;
  --max-width: 1200px;
}

/* RESET E BASE */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: "Outfit", system-ui, Segoe UI, Roboto, Arial;
  color: var(--brown-dark);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

/* ---------- NAVBAR ---------- */
/* ---------- NAVBAR ---------- */
.topbar {
  background: rgba(233, 217, 204, 0.55); /* beige semi-trasparente */
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%); /* per Safari */
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  position: sticky;
  top: 0;
  z-index: 30;
  transition: all 0.3s ease;
}

.topbar .container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo img { height: 44px; display: block; }
.logo .brand {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.5px;
  color: var(--brown-dark);
}

/* ---------- MENU ---------- */
nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 28px;
  align-items: center;
}

nav a {
  text-decoration: none;
  color: var(--brown-dark);
  font-size: 15px;
  padding: 6px 0;
  transition: opacity 0.3s ease;
}

nav a:hover {
  opacity: 0.8;
}

/* ---------- DROPDOWN ---------- */
nav ul li {
  position: relative; /* necessario per ancorare il menu */
}

.dropdown-content {
  display: none;
  position: absolute;
  top: calc(100% + 8px); /* un po' di spazio sotto il link */
  left: 50%; /* ancorato al centro del link */
  transform: translateX(-50%); /* centrato perfettamente */
  background-color: #fff;
  min-width: 220px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  padding: 10px 0;
  z-index: 200;
  text-align: left;
  white-space: nowrap;
}

.dropdown-content a {
  color: var(--brown-dark);
  padding: 10px 16px;
  display: block;
  font-size: 15px;
  transition: background 0.3s ease;
}

.dropdown-content a:hover {
  background-color: #f5f0eb;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* Evita overflow sui lati destri */
nav ul li:last-child .dropdown-content,
nav ul li:nth-last-child(2) .dropdown-content {
  left: auto;
  right: 0;
  transform: none;
}


/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 540px;
  background-image: url('hero-bg.jpg');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-start;
  color: #fff;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.45), rgba(0,0,0,0.55));
}
.hero .container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 20px 120px;
  position: relative;
  z-index: 2;
}
.hero h1 {
  font-family: "Playfair Display", serif;
  font-weight: 900;
  font-size: 64px;
  margin: 0;
  line-height: 0.95;
  text-shadow: 0 6px 30px rgba(0,0,0,0.5);
}
.hero p.lead {
  max-width: 760px;
  margin-top: 18px;
  font-size: 18px;
  color: rgba(255,255,255,0.95);
}
.hero svg.torn {
  position: absolute;
  bottom: -1px;
  width: 100%;
  height: 120px;
}

/* ---------- ABOUT ---------- */
.about {
  background: #fff;
  padding: 100px 20px 140px;
}
.about .container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.eyebrow {
  text-transform: uppercase;
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 1px;
  margin-bottom: 12px;
  font-weight: 700;
}
.about h2 {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: 48px;
  color: var(--gold);
  margin: 0 0 18px 0;
  line-height: 1.02;
}
.about .text {
  font-size: 15px;
  line-height: 1.65;
  color: #444;
}

/* ---------- GALLERIA — BANDA CONTINUA ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  width: 100%;
  margin: 0;
  padding: 0;
  gap: 0;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  height: 340px;
  cursor: pointer;
  border-radius: 0; /* bordi spigolosi */
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-item:hover img {
  transform: scale(1.08);
}
.gallery-item .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.4s ease;
}
.gallery-item:hover .overlay {
  background: rgba(0, 0, 0, 0.6);
}
.gallery-item .overlay span {
  color: #fff;
  font-family: "Playfair Display", serif;
  font-size: 22px;
  text-align: center;
  padding: 10px 15px;
}

/* ---------- FESTA / PREVENTIVO (stile About) ---------- */
.festa-alt {
  background-color: #f6f0ea;
  padding: 100px 20px 120px;
}

.festa-alt .container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.festa-img img {
  width: 100%;
  height: auto;
  object-fit: cover;
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.festa-text {
  text-align: left;
}

.festa-text .eyebrow {
  text-transform: uppercase;
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 1px;
  margin-bottom: 12px;
  font-weight: 700;
}

.festa-text h2 {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: 44px;
  color: var(--brown-dark);
  margin: 0 0 18px 0;
  line-height: 1.05;
}

.festa-text p {
  font-size: 16px;
  line-height: 1.65;
  color: #5a4a3d;
  margin-bottom: 35px;
}

.cta-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--gold), #a76e3e);
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  padding: 16px 38px;
  border-radius: 50px;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
}
.cta-btn:hover {
  background: linear-gradient(135deg, #a76e3e, var(--gold));
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

/* ---------- RESPONSIVO ---------- */
@media (max-width: 900px) {
  .festa-alt .container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .festa-text {
    text-align: center;
  }
  .festa-text h2 {
    font-size: 36px;
  }
  .festa-img img {
    border-radius: 12px;
  }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width:1000px) {
  .hero h1 { font-size: 48px; }
  .about .container { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width:640px) {
  .hero { min-height: 420px; }
  .hero .container { padding: 60px 20px 90px; }
  .hero h1 { font-size: 36px; }
  .about { padding: 60px 16px 100px; }
  .about h2 { font-size: 34px; }
  .festa h2 { font-size: 32px; }
  .festa p { font-size: 16px; }
}


/* ---------- FOOTER CENTRATO ---------- */
.site-footer {
  background-color: var(--bg-beige);
  border-top: 4px solid rgba(0,0,0,0.05);
  padding: 70px 20px;
  color: var(--brown-dark);
  text-align: center;
  font-family: "Outfit", sans-serif;
}

.site-footer .container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-logo {
  height: 60px;
  width: auto;
  margin-bottom: 10px;
}

.footer-brand {
  font-family: "Playfair Display", serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--brown-dark);
}

.footer-address {
  font-size: 15px;
  line-height: 1.6;
  margin: 10px 0 0;
}

.footer-phone {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.footer-phone:hover {
  color: #a76e3e;
}

.site-footer .muted {
  margin-top: 12px;
  font-size: 13px;
  color: rgba(0,0,0,0.45);
}

/* Responsive */
@media (max-width: 640px) {
  .footer-logo {
    height: 48px;
  }
  .footer-brand {
    font-size: 20px;
  }
}

/* ---------- MENU HAMBURGER (MOBILE) ---------- */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 38px;
  height: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 300;
}

.menu-toggle .bar {
  width: 100%;
  height: 3px;
  background-color: var(--brown-dark);
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Attiva animazione in modalità aperta */
.menu-toggle.active .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.menu-toggle.active .bar:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Layout mobile */
@media (max-width: 800px) {
  nav {
    position: absolute;
    top: 72px;
    left: 0;
    width: 100%;
    background: var(--bg-beige);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: none;
    flex-direction: column;
    text-align: center;
    padding: 20px 0;
    z-index: 250;
  }

  nav ul {
    flex-direction: column;
    gap: 14px;
  }

  nav ul li {
    width: 100%;
  }

  nav a {
    font-size: 17px;
    display: block;
    padding: 10px;
  }

  .menu-toggle {
    display: flex;
  }

  nav.active {
    display: flex;
    animation: fadeIn 0.3s ease;
  }

  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* dropdown su mobile (mostra cliccando il link) */
  .dropdown-content {
    position: static;
    box-shadow: none;
    background: transparent;
    padding: 0;
    display: none;
  }

  .dropdown.open .dropdown-content {
    display: block;
  }
}

/* ---------- MENU DESKTOP ---------- */
nav {
  flex: 1;
  display: flex;
  justify-content: center;
}
nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 28px;
  align-items: center;
}
nav a {
  text-decoration: none;
  color: var(--brown-dark);
  font-size: 15px;
  padding: 6px 0;
  transition: opacity 0.3s ease, color 0.3s ease;
}
nav a:hover {
  opacity: 0.8;
  color: var(--gold);
}

/* ---------- DROPDOWN ---------- */
nav ul li { position: relative; }

.dropdown-content {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  padding: 10px 0;
  min-width: 220px;
  z-index: 100;
}
.dropdown-content a {
  display: block;
  padding: 10px 16px;
  color: var(--brown-dark);
  font-size: 15px;
  transition: background 0.3s ease;
}
.dropdown-content a:hover {
  background-color: #f5f0eb;
}
.dropdown:hover .dropdown-content {
  display: block;
}

/* Evita overflow a destra */
nav ul li:last-child .dropdown-content,
nav ul li:nth-last-child(2) .dropdown-content {
  left: auto;
  right: 0;
  transform: none;
}

/* ---------- HAMBURGER ---------- */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 300;
}
.menu-toggle .bar {
  width: 100%;
  height: 3px;
  background-color: var(--brown-dark);
  border-radius: 3px;
  transition: all 0.3s ease;
}
.menu-toggle.active .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.menu-toggle.active .bar:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ---------- MOBILE ---------- */
@media (max-width: 800px) {
  nav {
    position: absolute;
    top: 72px;
    left: 0;
    width: 100%;
    background: var(--bg-beige);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: none;
    flex-direction: column;
    text-align: center;
    padding: 20px 0;
    z-index: 250;
  }
  nav.active {
    display: flex;
    animation: fadeIn 0.3s ease;
  }

  nav ul {
    flex-direction: column;
    gap: 14px;
  }

  nav ul li {
    width: 100%;
  }

  nav a {
    font-size: 17px;
    display: block;
    padding: 10px;
  }

  .menu-toggle {
    display: flex;
  }

  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* Dropdown su mobile */
  .dropdown-content {
    position: static;
    box-shadow: none;
    background: transparent;
    padding: 0;
    display: none;
  }
  .dropdown.open .dropdown-content {
    display: block;
  }
}

/* ---------- DROPDOWN MOBILE CON TRANSIZIONE ---------- */
@media (max-width: 800px) {
  .dropdown-content {
    position: static;
    box-shadow: none;
    background: transparent;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.35s ease;
  }

  .dropdown.open .dropdown-content {
    max-height: 400px; /* abbastanza grande per contenere tutti i link */
    opacity: 1;
    padding-top: 6px;
  }

  .dropdown-content a {
    padding: 10px;
    font-size: 16px;
    display: block;
    color: var(--brown-dark);
  }

  .dropdown-content a:hover {
    background: #f5f0eb;
  }
}

/* ===== MODALE LISTINO ===== */
.listino-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(59, 42, 35, 0.85);
  display: none;
  justify-content: center;
  z-index: 2000;
  padding: 2rem 1rem;
  overflow-y: auto;         /* Scroll generale */
  box-sizing: border-box;
}

.listino-modal.active {
  display: flex;
  align-items: flex-start;   /* permette di partire dall'alto */
}

.listino-content {
  background: #fff;
  color: #3b2a23;
  border-radius: 16px;
  max-width: 800px;
  width: 100%;
  padding: 2rem 2.5rem;
  font-family: "Outfit", sans-serif;
  position: relative;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  margin: 2rem auto;         /* distanza dall'alto e dal basso */
}

.listino-content h2 {
  text-align: center;
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: #3b2a23;
}

.listino-sezione {
  margin-bottom: 2rem;
}

.listino-sezione h3 {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  color: #3b2a23;
  font-size: 1.3rem;
  border-bottom: 2px solid #3b2a23;
  margin-bottom: 0.8rem;
  padding-bottom: 0.3rem;
}

.listino-sezione ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.listino-sezione ul li {
  padding: 0.3rem 0;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: #3b2a23;
  cursor: pointer;
}

.close-modal:hover {
  color: #a8734a;
}

/* Responsive */
@media (max-width: 600px) {
  .listino-content {
    padding: 1.5rem;
  }
  .listino-content h2 {
    font-size: 1.6rem;
  }
  .listino-sezione h3 {
    font-size: 1.1rem;
  }
}

/* ===== MODALE CONTATTI (versione rifinita) ===== */
.contatti-modal {
  position: fixed;
  inset: 0;
  background: rgba(59, 42, 35, 0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2100;
  padding: 1rem;
  overflow-y: auto;
  backdrop-filter: blur(3px);
}

.contatti-modal.active {
  display: flex;
  animation: fadeIn 0.4s ease forwards;
}

.contatti-card {
  background: #fff;
  color: #3b2a23;
  border-radius: 24px;
  max-width: 420px;
  width: 100%;
  padding: 2rem;
  text-align: center;
  font-family: "Outfit", sans-serif;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
  position: relative;
  animation: slideUp 0.4s ease forwards;
}

.contatti-logo {
  width: 80px;
  margin-bottom: 1rem;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(59, 42, 35, 0.2);
}

.contatti-card h2 {
  font-family: "Playfair Display", serif;
  font-size: 1.8rem;
  color: #3b2a23;
  margin-bottom: 0.5rem;
}

.contatti-card .descrizione {
  color: #5c4a3d;
  font-size: 1rem;
  margin-bottom: 1.8rem;
  line-height: 1.5;
}

/* blocchi info */
.contatti-card .info {
  text-align: left;
  margin-bottom: 1.8rem;
}

.contatti-card .info p {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0.8rem 0;
  font-size: 1rem;
  color: #3b2a23;
  line-height: 1.4;
}

.contatti-card .info strong {
  font-weight: 600;
  color: #3b2a23;
}

.contatti-card .info a {
  color: #3b2a23;
  text-decoration: none;
  font-weight: 600;
}

.contatti-card .info a:hover {
  text-decoration: underline;
}

/* icone */
.contatti-card svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  color: #3b2a23;
}

/* bottone maps */
.cta-maps {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 1rem;
  padding: 0.7rem 1.5rem;
  background: #3b2a23;
  color: #fff;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(59, 42, 35, 0.3);
  transition: all 0.3s ease;
}

.cta-maps:hover {
  background: #5a4034;
  transform: scale(1.05);
}

/* pulsante chiusura */
.close-contatti {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: #3b2a23;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-contatti:hover {
  color: #a8734a;
}

/* animazioni */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Mobile friendly */
@media (max-width: 500px) {
  .contatti-card {
    padding: 1.5rem;
    max-width: 90%;
  }
  .contatti-card h2 {
    font-size: 1.5rem;
  }
}
