:root {
  --bg: #f2eee4;
  --card: #f7f4eb;
  --text: #2f2a24;
  --muted: #6b645a;
  --olive: #8b8650;
  --olive-dark: #6f6a3e;
  --line: #ddd4c3;
  --shadow: 0 18px 45px rgba(30, 22, 10, 0.18);
}

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

body {
  min-height: 100vh;
  font-family: "Lora", serif;
  color: var(--text);
  background: radial-gradient(circle at 10% 20%, #f8f6ef 0%, #f2eee4 38%, #ece6d8 100%);
  padding: 20px 12px;
}

.site {
  max-width: 1180px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid #e4ddcf;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  position: relative;
  padding: 16px 16px 16px 120px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 244, 235, 0.95);
}

.brand-link {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  border-radius: 6px;
  overflow: hidden;
}

.brand-logo {
  display: block;
  width: auto;
  height: 54px;
}

.nav {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  min-width: 0;
  color: #413a31;
  font-size: 0.95rem;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.nav a {
  position: relative;
  flex: 0 0 auto;
  white-space: nowrap;
  color: inherit;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 999px;
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 2px;
  height: 1px;
  background: var(--olive-dark);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.nav a:hover,
.nav a:focus-visible,
.nav a[aria-current="page"] {
  background: #ece2ca;
  color: #302a22;
  transform: translateY(-1px);
}

.nav a:hover::after,
.nav a:focus-visible::after,
.nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav a:active {
  transform: translateY(0) scale(0.98);
}

.btn {
  display: inline-block;
  border-radius: 999px;
  border: 1px solid var(--olive);
  background: var(--olive);
  color: #f8f3e5;
  text-decoration: none;
  font-weight: 600;
  padding: 10px 24px;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.btn:hover {
  background: var(--olive-dark);
  border-color: var(--olive-dark);
}

.btn-secondary {
  background: transparent;
  color: var(--olive-dark);
}

.btn-secondary:hover {
  background: #ece2ca;
  border-color: #b7a982;
}

.hero {
  position: relative;
  background-image: url("/assets/img/chi_siamo/locale.jpg");
  background-size: cover;
  background-position: center;
  min-height: 250px;
  padding: 20px 16px;
  display: flex;
  align-items: flex-end;
}

.main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 18px 16px 22px;
}

.section-title {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.9rem, 6vw, 2.6rem);
  margin-bottom: 4px;
}

.section-sub {
  color: var(--muted);
  margin-bottom: 14px;
  line-height: 1.45;
}

.menu-section .btn {
  display: table;
  margin: 0 auto 14px;
}

.divider {
  border: none;
  border-top: 1px solid var(--line);
  margin-bottom: 14px;
}

.content-grid {
  display: grid;
  gap: 12px;
}

.content-card {
  width: 100%;
  border: 1px solid #cbbf9f;
  background: #f8f2e6;
  border-radius: 14px;
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  animation: cardIdle 3.2s ease-in-out infinite;
}

.content-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 10px 25px rgba(63, 47, 24, 0.15);
  border-color: #b8aa87;
}

.content-card:active {
  transform: translateY(-1px) scale(0.995);
}

.content-card img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
}

.card-body {
  padding: 10px 12px 12px;
}

.card-body h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.55rem;
  margin-bottom: 2px;
}

.card-body p {
  color: var(--muted);
  font-size: 0.95rem;
}

.status-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid #8e846a;
  color: #5d563f;
  background: #ece2ca;
}

.status-pill.on {
  color: #f8f5ea;
  background: #718049;
  border-color: #718049;
}

.dish-strip-section {
  margin-top: -4px;
}

.dish-strip-head {
  margin-bottom: 8px;
}

.dish-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 72%;
  gap: 10px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding-bottom: 6px;
}

.dish-strip-item {
  scroll-snap-align: start;
}

.dish-strip-item img {
  width: 100%;
  height: 170px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid #c9ba9c;
  display: block;
}

.award-section {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2px 0 4px;
}

.award-image {
  width: min(72vw, 260px);
  height: auto;
  object-fit: contain;
}

.voucher-section {
  border: 1px solid #d7c8aa;
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(247, 240, 226, 0.95), rgba(241, 231, 210, 0.96)),
    url("https://images.unsplash.com/photo-1517248135467-4c7edcad34c4?auto=format&fit=crop&w=1200&q=80");
  background-size: cover;
  background-position: center;
  padding: 16px;
}

.voucher-card {
  border: 1px solid #d2c3a6;
  background: rgba(252, 247, 237, 0.88);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-item {
  margin: 8px 0;
  color: #40392f;
}

.contact-item strong {
  color: var(--olive-dark);
  margin-right: 6px;
}

.contact-item a {
  color: inherit;
}

.social {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  color: var(--olive-dark);
  font-size: 1.15rem;
}

@keyframes cardIdle {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-1.5px);
  }
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(22, 16, 9, 0.7);
}

.modal-panel {
  position: relative;
  background: #f9f4e9;
  border: 1px solid #cfc2a7;
  border-radius: 14px;
  padding: 18px;
  width: min(100%, 540px);
  max-height: 92vh;
  overflow: auto;
  z-index: 1;
}

.modal-panel.menu-document {
  width: min(96vw, 780px);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 1px solid #b9ac8f;
  border-radius: 8px;
  width: 30px;
  height: 30px;
  background: #f4ebd7;
  cursor: pointer;
}

#modal-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  margin-bottom: 4px;
}

#modal-subtitle {
  color: var(--muted);
  margin-bottom: 12px;
  white-space: pre-line;
}

.modal-subtitle-alert {
  color: #a12828;
  font-weight: 700;
}

.modal-menu-switch {
  display: inline-flex;
  gap: 8px;
  margin: 0 0 12px;
}

.modal-menu-switch[hidden] {
  display: none;
}

.modal-switch-btn {
  border: 1px solid #c9ba9c;
  background: #f4ead5;
  color: #4c4336;
  border-radius: 999px;
  padding: 6px 14px;
  font: inherit;
  cursor: pointer;
}

.modal-switch-btn.is-active {
  background: #8b8650;
  border-color: #8b8650;
  color: #f8f5ea;
}

#modal-image {
  width: 100%;
  max-height: min(56vh, 680px);
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #d2c6ad;
  margin-bottom: 12px;
}

#modal-image.fit-contain {
  object-fit: contain;
  background: #ffffff;
  max-height: min(74vh, 980px);
}

@media (min-width: 880px) {
  body {
    padding: 36px;
  }

  .topbar {
    justify-content: flex-end;
    padding: 20px 30px 20px 148px;
  }

  .brand-link {
    left: 30px;
  }

  .brand-logo {
    height: 64px;
  }

  .nav {
    justify-content: flex-end;
    width: auto;
    min-width: auto;
    gap: 22px;
    font-size: 1rem;
    overflow: visible;
    padding-bottom: 0;
    margin: 0 0 0 auto;
  }

  .hero {
    min-height: 360px;
    padding: 36px 44px;
  }

  .main {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "menu menu"
      "cards cards"
      "dishstrip dishstrip"
      "award award"
      "voucher voucher";
    gap: 22px 28px;
    padding: 28px 44px 38px;
  }

  .menu-section {
    grid-area: menu;
  }

  .content-section {
    grid-area: cards;
  }

  .dish-strip-section {
    grid-area: dishstrip;
  }

  .award-section {
    grid-area: award;
    padding: 4px 0 8px;
  }

  .award-image {
    width: min(360px, 34vw);
  }

  .voucher-section {
    grid-area: voucher;
    padding: 24px;
  }

  .content-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dish-strip {
    grid-auto-flow: row;
    grid-auto-columns: unset;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    overflow: visible;
    gap: 12px;
  }

  .dish-strip-item img {
    height: 160px;
  }

  .content-card img {
    height: 96px;
  }

}
