/* PAGINE MENU (menu-caffetteria-santarcangelo.html, menu-wine-cocktail-santarcangelo.html)
   Hero con foto e riquadro dietro (rosa caffetteria, verde wine), sezioni come card con foto
   che si aprono a fisarmonica (<details>, tutte chiuse all'arrivo), in fondo "Guarda anche".
   Nessuna animazione. Generate da strumenti-menu/build-menu.js */

:root {
  --grigio-testo: #5b5b5b;
}

.pagina-menu main {
  padding-top: 6rem;
}

/* niente "ancoraggio" automatico dello scroll (Chrome Android): quando una card sopra si chiude,
   la posizione la corregge menu.js; se lo facesse anche il browser la pagina salterebbe due volte */
html.js-menu,
html.js-menu body.pagina-menu {
  overflow-anchor: none;
}

/* HERO */
.menu-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3.5rem;
  align-items: center;
  padding-top: 4rem;
  padding-bottom: 3rem;
}

.menu-hero::before {
  content: "";
  position: absolute;
  right: 0;
  top: 2.5rem;
  width: 45%; /* resta dietro la foto, non sotto il testo */
  height: 70%;
  z-index: -1;
}

.menu-hero-rosa::before {
  background-color: var(--beige);
}

.menu-hero-verde::before {
  background-color: var(--verde);
}

.menu-kicker {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.25rem;
  text-transform: uppercase;
  color: var(--verde);
  margin-bottom: 0.8rem;
}

.pagina-menu h1 {
  font-weight: 400;
  margin-bottom: 1.2rem;
}

.menu-lead {
  color: var(--grigio-testo);
  line-height: 1.6;
  max-width: 560px;
}

/* foto spostata a destra e in basso: il riquadro dietro si vede a sinistra e sopra */
.menu-hero-foto {
  padding: 3.5rem 1.5rem 0 3.5rem;
}

.menu-hero-foto img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 4;
  object-fit: cover;
}

/* SEZIONI A FISARMONICA */
.menu-sezioni-box {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem;
}

.menu-istruzioni {
  text-align: center;
  color: var(--grigio-testo);
  font-size: 1rem;
  margin: 2rem 0 1.4rem;
}

.menu-card {
  margin-bottom: 1.1rem;
  scroll-margin-top: 6.5rem;
}

.menu-card summary {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  min-height: 190px;
  padding: 1.5rem 2.2rem;
  background-size: cover;
  background-position: center;
  background-color: #3d3d3d; /* se la foto non carica, il testo bianco si legge lo stesso */
  cursor: pointer;
  list-style: none;
}

.menu-card summary::-webkit-details-marker {
  display: none;
}

.menu-card summary:focus-visible {
  outline: 3px solid var(--verde);
  outline-offset: 3px;
}

/* velo scuro: più forte a sinistra (dove c'è il testo) e a destra (dove c'è il cerchio) */
.menu-card-velo {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.5) 55%, rgba(0, 0, 0, 0.42) 100%);
  transition: background-color 0.2s;
}

.menu-card summary:hover .menu-card-velo {
  background-color: rgba(0, 0, 0, 0.08);
}

.menu-card-testo {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  max-width: none !important;
  color: white;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  letter-spacing: 0;
  text-transform: none;
}

.menu-card-nome {
  display: block;
  font-size: 1.9rem;
  font-weight: 500;
  letter-spacing: 0.25rem;
  text-transform: uppercase;
  line-height: 1.2;
}

.menu-card-sotto {
  display: block;
  font-size: 1.05rem;
  font-weight: 500;
  margin-top: 0.5rem;
  line-height: 1.4;
}

/* cerchio + / − ben visibile su qualsiasi foto */
.menu-card-segno {
  position: relative;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border: 2px solid white;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.45);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  transition: background-color 0.35s ease;
}

.menu-card-segno::before,
.menu-card-segno::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 3px;
  border-radius: 2px;
  background-color: white;
  transform: translate(-50%, -50%);
}

/* la barretta verticale del + ruota fino a sdraiarsi: diventa − */
.menu-card-segno::after {
  transform: translate(-50%, -50%) rotate(90deg);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* aperta: senza JS vale [open], con JS la classe .aperta (che segue l'animazione) */
html:not(.js-menu) .menu-card[open] .menu-card-segno,
.menu-card.aperta .menu-card-segno {
  background-color: var(--verde);
}

html:not(.js-menu) .menu-card[open] .menu-card-segno::after,
.menu-card.aperta .menu-card-segno::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

@media (prefers-reduced-motion: reduce) {
  .menu-card-segno,
  .menu-card-segno::after {
    transition: none;
  }
}

.menu-card-pannello {
  border: 1px solid #e3e3e3;
  border-top: 0;
  padding: 0.5rem 2.2rem 2.2rem;
}

/* GRUPPI E VOCI */
.menu-gruppo {
  margin-top: 2rem;
}

.gruppo-testa {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid #e6e6e6;
  padding-bottom: 0.6rem;
  margin-bottom: 0.9rem;
}

.menu-gruppo h3 {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.25rem;
  color: var(--verde);
  margin: 0;
}

.gruppo-colonne span {
  display: inline-block;
  width: 4rem;
  text-align: right;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--grigio-testo);
}

.gruppo-nota {
  font-size: 0.9rem;
  color: var(--grigio-testo);
  margin: -0.3rem 0 0.7rem;
}

.menu-gruppo ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.voce {
  padding: 0.45rem 0;
}

.voce-riga {
  display: flex;
  align-items: baseline;
  font-size: 1.12rem;
  font-weight: 500;
}

.voce-nome {
  flex: 0 1 auto;
}

.voce-punti {
  flex: 1 1 1.5rem;
  min-width: 1.5rem;
  border-bottom: 1px dotted #a5a5a5;
  margin: 0 0.6rem;
  transform: translateY(-0.3rem);
}

.voce-prezzo {
  flex: 0 0 auto;
  white-space: nowrap;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.voce-2 .voce-prezzo {
  width: 4rem;
  text-align: right;
}

.voce-desc {
  font-size: 0.93rem;
  line-height: 1.4;
  color: var(--grigio-testo);
  margin: 0.15rem 0 0;
}

.menu-nota {
  border: 4px solid var(--verde);
  padding: 0.9rem 1.2rem;
  margin: 2rem 0 0;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 600;
}

.menu-prezzi-nota {
  text-align: center;
  font-size: 0.95rem;
  color: var(--grigio-testo);
  margin: 1.6rem 0 0;
}

/* GUARDA ANCHE */
.menu-altri {
  padding-top: 5rem;
  padding-bottom: 6rem;
}

.menu-altri h2 {
  text-align: center;
  font-size: 1.7rem;
  max-width: none !important;
  margin-bottom: 1.8rem;
}

.menu-altri-griglia {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.5rem;
}

.menu-mini {
  position: relative;
  display: block;
  height: 260px;
  overflow: hidden;
  color: white;
  text-decoration: none;
}

.menu-mini img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.menu-mini-velo {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.05) 70%);
}

.menu-mini-testo {
  position: absolute;
  left: 1.6rem;
  bottom: 1.5rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.menu-mini-testo strong {
  display: block;
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: 0.25rem;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.menu-mini-testo span {
  border-top: 1px solid white;
  padding-top: 0.25rem;
  font-size: 1rem;
}

.menu-mini:hover,
.menu-mini:focus {
  color: white;
}

.menu-mini:hover img {
  filter: brightness(1.08);
}

/* TELEFONO */
@media (max-width: 767px) {
  .pagina-menu main {
    padding-top: 4.5rem;
  }

  .menu-hero {
    grid-template-columns: 1fr;
    gap: 1.6rem;
    padding-top: 2.2rem;
    padding-bottom: 3rem; /* più stacco tra hero e card del menu */
  }

  .menu-hero::before {
    top: auto;
    bottom: 0.5rem;
    width: 80%;
    height: 45%;
  }

  .pagina-menu h1 {
    font-size: 2rem;
    letter-spacing: 0.15rem;
  }

  .menu-hero-foto {
    padding: 0 1.2rem 0 0;
  }

  .menu-hero-foto img {
    width: 100% !important;
  }

  .menu-istruzioni {
    margin: 2.2rem 0 1.1rem;
    font-size: 0.95rem;
  }

  .menu-card {
    margin-bottom: 0.8rem;
  }

  .menu-card summary {
    min-height: 140px;
    padding: 1rem 1.1rem;
    gap: 0.8rem;
  }

  .menu-card-testo {
    padding-right: 0.3rem;
  }

  .menu-card-nome {
    font-size: 1.05rem;
    letter-spacing: 0.06rem;
  }

  .menu-card-sotto {
    font-size: 0.88rem;
  }

  .menu-card-segno {
    flex-basis: 46px;
    width: 46px;
    height: 46px;
  }

  .menu-card-segno::before,
  .menu-card-segno::after {
    width: 17px;
  }

  .menu-card-pannello {
    padding: 0.2rem 1rem 1.6rem;
  }

  .voce-riga {
    font-size: 1.04rem;
  }

  .voce-desc {
    font-size: 0.88rem;
  }

  .gruppo-colonne span,
  .voce-2 .voce-prezzo {
    width: 3.4rem;
  }

  .menu-altri {
    padding-top: 3.5rem;
    padding-bottom: 4rem;
  }

  .menu-altri h2 {
    font-size: 1.35rem;
  }

  .menu-altri-griglia {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .menu-mini {
    height: 190px;
  }

  .menu-mini img {
    width: 100% !important;
  }
}
