/* ==========================================================================
   La Taverna Dei Mercanti — foglio di stile
   Palette: bordeaux (vino), crema, legno scuro, oro. Mobile-first.
   ========================================================================== */

:root {
  --bordeaux: #7a1f2b;
  --bordeaux-dark: #5c1620;
  --oro: #c9a227;
  --crema: #faf6ef;
  --carta: #ffffff;
  --testo: #2b2320;
  --testo-soft: #6b5d55;
  --bordo: #e7ddd0;
  --ombra: 0 2px 12px rgba(43, 35, 32, 0.08);
}

[data-theme="dark"] {
  --bordeaux: #b5495a;
  --bordeaux-dark: #8f3241;
  --oro: #d4b24a;
  --crema: #1c1715;
  --carta: #262019;
  --testo: #efe7dd;
  --testo-soft: #b3a496;
  --bordo: #3a322b;
  --ombra: 0 2px 12px rgba(0, 0, 0, 0.4);
}

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

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--crema);
  color: var(--testo);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand {
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  line-height: 1.2;
}

img { max-width: 100%; height: auto; }

.container { width: min(1080px, 92%); margin-inline: auto; }
.container.narrow { width: min(760px, 92%); }

/* ----- Header / nav ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--carta);
  border-bottom: 1px solid var(--bordo);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  flex-wrap: wrap;
}

.brand {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--bordeaux);
  text-decoration: none;
  white-space: nowrap;
}
.brand span { color: var(--oro); }

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--testo);
  transition: transform 0.2s;
}

.nav-menu {
  display: none;
  list-style: none;
  width: 100%;
  flex-direction: column;
  gap: 0.25rem;
  padding-bottom: 0.75rem;
}
.nav-menu.open { display: flex; }
.nav-menu a {
  display: block;
  padding: 0.5rem 0.25rem;
  color: var(--testo);
  text-decoration: none;
  font-weight: 500;
}
.nav-menu a:hover { color: var(--bordeaux); }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  background: none;
  border: 1px solid var(--bordo);
  border-radius: 999px;
  color: var(--testo);
  padding: 6px 10px;
  cursor: pointer;
}
.theme-toggle:hover { border-color: var(--bordeaux); color: var(--bordeaux); }
.icon-moon { display: none; }
[data-theme="dark"] .icon-moon { display: block; }
[data-theme="dark"] .icon-sun { display: none; }

/* ----- Hero ----- */
.hero {
  background:
    linear-gradient(rgba(52, 12, 18, 0.72), rgba(52, 12, 18, 0.78)),
    url("assets/hero-sala.jpg") center 60% / cover no-repeat;
  color: #fdf8f0;
  text-align: center;
  padding: 5.5rem 0 5rem;
}

.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  opacity: 0.85;
}

.hero h1 {
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  margin: 0.4rem 0 0.6rem;
}

.hero-claim {
  font-size: clamp(1.05rem, 2.5vw, 1.3rem);
  opacity: 0.95;
  max-width: 34em;
  margin-inline: auto;
}

.hero-rating { margin-top: 1rem; font-size: 0.95rem; }
.stars { color: var(--oro); letter-spacing: 2px; }

.cta-row {
  margin-top: 1.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: center;
}

/* ----- Bottoni ----- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--ombra); }

.btn-primary { background: var(--oro); color: #2b2016; }
.btn-whatsapp { background: #25d366; color: #fff; }
.btn-outline { background: transparent; color: inherit; border-color: currentColor; }

.section .btn-outline { color: var(--bordeaux); }

/* ----- Sezioni ----- */
.section { padding: 3.5rem 0; }
.section.alt { background: var(--carta); }

.section h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  color: var(--bordeaux);
  margin-bottom: 0.5rem;
}

.section-sub { color: var(--testo-soft); margin-bottom: 1.6rem; }
.lead { font-size: 1.15rem; margin-bottom: 1rem; }
.section p + p { margin-top: 0.8rem; }

.note { margin-top: 1.4rem; font-size: 0.95rem; color: var(--testo-soft); }
.note a { color: var(--bordeaux); }

/* ----- Card ----- */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.card {
  background: var(--crema);
  border: 1px solid var(--bordo);
  border-radius: 12px;
  padding: 1.3rem 1.4rem;
  box-shadow: var(--ombra);
}
.section.alt .card { background: var(--crema); }
.section:not(.alt) .card { background: var(--carta); }

.card h3 {
  color: var(--bordeaux);
  margin-bottom: 0.6rem;
  font-size: 1.15rem;
}

.card ul { list-style: none; }
.card li {
  padding: 0.35rem 0;
  border-bottom: 1px dashed var(--bordo);
}
.card li:last-child { border-bottom: 0; }

.review p { font-style: italic; }
.review footer {
  margin-top: 0.7rem;
  font-size: 0.9rem;
  color: var(--testo-soft);
  font-style: normal;
}
.review .stars { font-size: 0.95rem; margin-bottom: 0.4rem; }

/* ----- Chi siamo con foto ----- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}

.about-photo {
  width: 100%;
  border-radius: 12px;
  box-shadow: var(--ombra);
  object-fit: cover;
  max-height: 520px;
}

/* ----- Galleria ----- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
}

.gallery-item {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--ombra);
  background: var(--carta);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.gallery-item:hover img { transform: scale(1.04); }

.gallery-item figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.45rem 0.7rem;
  font-size: 0.85rem;
  color: #fdf8f0;
  background: linear-gradient(transparent, rgba(30, 10, 14, 0.75));
  padding-top: 1.6rem;
}

.photo-credit { font-size: 0.8rem; opacity: 0.75; }

/* ----- Orari ----- */
.hours-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--carta);
  border: 1px solid var(--bordo);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--ombra);
}

.hours-table th,
.hours-table td {
  padding: 0.65rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--bordo);
}
.hours-table tr:last-child th,
.hours-table tr:last-child td { border-bottom: 0; }
.hours-table th { font-weight: 600; }
.hours-table td { text-align: right; color: var(--testo-soft); }

/* ----- Contatti ----- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.contact-info p + p { margin-top: 0.9rem; }
.contact-info a { color: var(--bordeaux); }

.cta-col {
  margin-top: 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: flex-start;
}

.map-wrap { min-height: 320px; }

.map-placeholder {
  height: 100%;
  min-height: 320px;
  border: 1px dashed var(--bordo);
  border-radius: 12px;
  background: var(--carta);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  text-align: center;
  padding: 1.5rem;
  color: var(--testo-soft);
}

.map-link { color: var(--bordeaux); font-size: 0.95rem; }

.map-wrap iframe {
  width: 100%;
  height: 100%;
  min-height: 320px;
  border: 0;
  border-radius: 12px;
}

/* ----- Badge segnaposto ----- */
.badge-confirm {
  display: inline-block;
  background: #fff3cd;
  color: #7a5c00;
  border: 1px solid #e6c96b;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 6px;
  vertical-align: middle;
}
[data-theme="dark"] .badge-confirm {
  background: #3d3111;
  color: #e6c96b;
  border-color: #6b5716;
}

/* ----- Footer ----- */
.site-footer {
  background: var(--bordeaux-dark);
  color: #f0e4d8;
  text-align: center;
  padding: 1.8rem 0;
}
.site-footer a { color: var(--oro); }
.footer-small { font-size: 0.85rem; opacity: 0.8; margin-top: 0.4rem; }

/* ----- Desktop ----- */
@media (min-width: 760px) {
  .nav { flex-wrap: nowrap; }
  .nav-toggle { display: none; }
  .nav-menu {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: auto;
    gap: 1.1rem;
    padding-bottom: 0;
  }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .cards-grid.reviews { grid-template-columns: repeat(3, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: 1fr 1.2fr; }
  .about-grid { grid-template-columns: 1.4fr 1fr; gap: 2.5rem; align-items: center; }
}

@media (min-width: 1000px) {
  .cards-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Riduzione animazioni */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
