/* ═══════════════════════════════════════════════════════════════
   AGAPE RISTORANTE
   Font:   Blacklist (heading) · Campton (body) — caricati via PHP
   Design: minimalista, ispirato ai menu originali
   ═══════════════════════════════════════════════════════════════ */

/* ─── Variabili ────────────────────────────────────────────────── */
:root {
  --orange:    #C8581A;
  --dark:      #111111;
  --mid:       #6B6560;
  --light:     #AFA9A2;
  --bg:        #FFFFFF;
  --bg-off:    #F9F7F5;
  --rule:      #E2DDD8;
  --rule-dark: #C8C2BB;
  --divider:   #111111;
  --header-bg: #EDE5D5;

  --f-title: 'Blacklist', Georgia, serif;
  --f-body:  'Campton', 'Helvetica Neue', Arial, sans-serif;

  --logo-h:  26px;
  --max-w:   660px;
  --hh:      82px!important;          /* altezza header (logo + lang switcher) */

  /* tipografia (sovrascritta da PHP se impostata in admin) */
  --size-title: 1.8rem;
  --size-name:  1.1rem;
  --size-desc:  0.88rem;
  --size-price: 1rem;
  --gap:     1.25rem;
  --section-gap: 3.5rem;
}

/* ─── Reset ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body  { font-family: var(--f-body); font-weight: 300;
        background: var(--bg); color: var(--dark);
        line-height: 1.6; -webkit-font-smoothing: antialiased; }
ul    { list-style: none; }
img   { display: block; max-width: 100%; height: auto; }
a     { color: inherit; text-decoration: none; }
button{ cursor: pointer; background: none; border: none;
        font-family: var(--f-body); padding: 0; }

.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }

/* ═══════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════ */
.site-header {
  position:        sticky;
  top:             0;
  z-index:         200;
  height:          var(--hh);
  background:      var(--header-bg, #EDE5D5);
  border-bottom:   1px solid rgba(0,0,0,.08);
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  padding:         0 1.25rem;
}

.header-svr-link      { display: flex; align-items: center; }
.header-svr-logo      { height: var(--svr-logo-h, 22px); width: auto; display: block; }
.header-svr-placeholder { display: block; width: 1px; }

/* Switch lingua — ITA / ENG pill scorrevole ────────────────────── */
.lang-switcher {
  position:        relative;
  display:         flex;
  align-items:     center;
  gap:             0;
  background:      rgba(0,0,0,0.07);
  border-radius:   20px;
  padding:         3px;
}

.lang-indicator {
  position:        absolute;
  top:    2px;
  bottom: 2px;
  height: auto;  /* invece di calc(100% - 6px) */
  background:      var(--dark);
  border-radius:   16px;
  transition:      transform 0.28s cubic-bezier(.4,0,.2,1),
                   width    0.28s cubic-bezier(.4,0,.2,1);
  pointer-events:  none;
  z-index:         0;
}

.lang-btn {
  position:               relative;
  z-index:                1;
  -webkit-appearance:     none;
  appearance:             none;
  border:                 none;
  outline:                none;
  background:             transparent;
  margin:                 0;
  padding: 0.45rem 0.65rem
!important;
  border-radius:          14px;
  cursor:                 pointer;
  -webkit-tap-highlight-color: transparent;
  font-family:            var(--f-title);
  font-size:              var(--size-lang, 0.58rem);
  font-weight:            400;
  letter-spacing:         0.14em;
  color:                  var(--dark);
  opacity:                0.38;
  line-height:            1;
  transition:             opacity .2s, color .2s;
  white-space:            nowrap;
}

.lang-btn.active             { opacity: 1; color: var(--bg); }
.lang-btn:hover:not(.active) { opacity: 0.6; }

/* ═══════════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════════ */
.hero {
  position:      relative;
  text-align:    center;
  background:    var(--bg);
  border-bottom: 1px solid var(--rule);
  overflow:      hidden;
}

/* Versione senza immagine: padding compatto con sfondo header */
.hero:not(.hero--has-bg) {
  padding:    2rem 1.25rem;
  background: var(--header-bg, #EDE5D5);
}

/* Logo nell'hero */
.hero-logo-link { display: inline-flex; align-items: center; }
.hero-logo-img  { display: block; width: auto; }

/* Versione con immagine di sfondo */
.hero--has-bg {
  padding:             2rem 1.25rem 2rem !important;
  background-size:     cover !important;
  background-position: center;
  background-repeat:   no-repeat;
}


.hero-overlay {
  position:   absolute;
  inset:      0;
  background: rgba(255,255,255,0.62); /* sovrascritto da inline style via PHP */
  z-index:    0;
}

.hero-content {
  position: relative;
  z-index:  1;
}

.hero-season {
  font-family:    var(--f-body);
  font-weight:    300;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  /* font-size e color gestiti via inline style da admin */
}

/* ═══════════════════════════════════════════════════════════════
   TAB BAR
   ═══════════════════════════════════════════════════════════════ */
.menu-tabs {
  position:   sticky;
  top:        var(--hh);
  z-index:    100;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  display:    flex;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.menu-tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  flex:           0 0 auto;
  font-family:    var(--f-body);
  font-size:      0.72rem;
  font-weight:    500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color:          var(--tab-inactive, var(--light));
  padding:        1rem 1.1rem;
  border-bottom:  2px solid transparent;
  margin-bottom:  -1px;
  white-space:    nowrap;
  transition:     color .2s, border-color .2s;
  min-height:     48px;
  -webkit-tap-highlight-color: transparent;
}

.tab-btn:hover              { color: var(--mid); }
.tab-btn.active             { color: var(--dark); border-color: var(--orange); font-weight: 500; }

/* ═══════════════════════════════════════════════════════════════
   PANNELLI TAB
   ═══════════════════════════════════════════════════════════════ */
.tab-panel          { display: none; padding: 2.5rem 0 5rem; }
.tab-panel.active,
.tab-panel:not([hidden]) { display: block; }

/* Intestazione pagina (vini, bevande) */
.page-hd {
  text-align:    center;
  padding:       0 1.25rem 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}

.page-hd-it {
  font-family:    var(--f-title);
  font-size:      1.8rem;
  font-weight:    400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color:          var(--dark);
}

.page-hd-en {
  font-family:    var(--f-body);
  font-size:      0.65rem;
  font-weight:    300;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color:          var(--light);
  margin-top:     0.3rem;
}

/* ═══════════════════════════════════════════════════════════════
   INTESTAZIONE SEZIONE (comune a piatti / vini / bevande)
   ═══════════════════════════════════════════════════════════════ */
.menu-section,
.wine-section,
.bevanda-section { margin-bottom: var(--section-gap); }

.section-hd {
  display:         flex;
  align-items: center;
  justify-content: space-between;
  gap:             1rem;
  padding-bottom:  0.6rem;
  margin-bottom:   1.5rem;
  border-bottom:   1px solid var(--divider);
}

.section-hd-titles { flex: 1; }

.section-title-it {
  font-family:    var(--f-title);
  font-size:      var(--size-title, 1.2rem);
  font-weight:    700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color:          var(--dark);
  line-height:    1.1;
}

.section-title-en {
  font-family:    var(--f-title);
  font-size:      var(--size-title, 1.2rem);
  font-weight:    700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color:          var(--light);
  margin-top:     0.2rem;
}

/* Prezzo di sezione (es. €18 / tutti gli antipasti) */
.section-price-wrap { text-align: right; flex-shrink: 0; }

.section-price-label {
  display:        block;
  font-family:    var(--f-body);
  font-size:      0.58rem;
  font-weight:    300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color:          var(--light);
  margin-bottom:  0.1rem;
}

.section-price-val {
  font-family: var(--f-body);
  font-size:   1.5rem;
  font-weight: 500;
  color:       var(--orange);
  line-height: 1;
}

/* ═══════════════════════════════════════════════════════════════
   LISTA PIATTI
   ═══════════════════════════════════════════════════════════════ */
.dishes-list { display: flex; flex-direction: column; }

.dish-item {
  display:       flex;
  align-items:   flex-start;
  gap:           0.75rem;
  padding:       1rem 0;
  border-bottom: 0.5px solid var(--rule);
}
.dish-item:last-child { border-bottom: none; }

.dish-body  { flex: 1; min-width: 0; }

.dish-name-it {
  font-family: var(--f-body);
  font-size:   var(--size-name, 1.1rem);
  font-weight: 500;
  color:       var(--dark);
  line-height: 1.3;
}

.dish-name-en {
  font-family:    var(--f-body);
  font-size:      0.68rem;
  font-weight:    300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color:          var(--light);
  margin-top:     0.2rem;
}

.dish-desc   { margin-top: 0.35rem; }

.desc-it {
  font-family: var(--f-body);
  font-size:   var(--size-desc, 0.88rem);
  font-weight: 300;
  color:       var(--mid);
  line-height: 1.55;
}

.desc-en {
  font-family: var(--f-body);
  font-size:   var(--size-desc, 0.88rem);
  font-weight: 300;
  color:       var(--light);
  line-height: 1.5;
  margin-top:  0.15rem;
}

.dish-price {
  font-family:  var(--f-body);
  font-size:    var(--size-price, 1rem);
  font-weight:  500;
  color:        var(--orange);
  white-space:  nowrap;
  flex-shrink:  0;
  padding-top:  0.1rem;
}

/* ═══════════════════════════════════════════════════════════════
   SWITCH LINGUA — nascondi/mostra IT o EN
   ═══════════════════════════════════════════════════════════════ */

/* Classi generiche riutilizzabili ovunque (tab, allergens, ecc.) */
body.lang-it .lang-en-el { display: none; }
body.lang-en .lang-it-el { display: none; }

body.lang-it .dish-name-en,
body.lang-it .desc-en,
body.lang-it .bevanda-desc.en,
body.lang-it .section-title-en,
body.lang-it .page-hd-en           { display: none; }

body.lang-en .dish-name-it,
body.lang-en .desc-it,
body.lang-en .bevanda-desc.it,
body.lang-en .section-title-it,
body.lang-en .page-hd-it           { display: none; }

/* EN — stessi stili delle classi italiane corrispondenti */
body.lang-en .dish-name-en {
  font-family:    var(--f-body);
  font-size:      var(--size-name, 1.1rem);
  font-weight:    500;
  color:          var(--dark);
  line-height:    1.3;
  text-transform: none;
  letter-spacing: 0;
  margin-top:     0;
}
body.lang-en .desc-en {
  font-family: var(--f-body);
  font-size:   var(--size-desc, 0.88rem);
  font-weight: 300;
  color:       var(--mid);
  line-height: 1.55;
  margin-top:  0;
}
body.lang-en .section-title-en {
  font-family:    var(--f-title);
  font-size:      var(--size-title, 1.2rem);
  font-weight:    700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color:          var(--dark);
  line-height:    1.1;
}
body.lang-en .bevanda-desc.en {
  font-family: var(--f-body);
  font-size:   0.75rem;
  font-weight: 300;
  color:       var(--mid);
  margin-top:  0.2rem;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════
   CARTA DEI VINI
   ═══════════════════════════════════════════════════════════════ */
.wine-list { display: flex; flex-direction: column; }

.wine-item {
  display:       flex;
  align-items:   flex-start;
  gap:           0.75rem;
  padding:       1rem 0;
  border-bottom: 1px solid var(--rule);
}
.wine-item:last-child { border-bottom: none; }

.wine-info { flex: 1; min-width: 0; }

.wine-cantina {
  font-family:    var(--f-body);
  font-size:      0.6rem;
  font-weight:    500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color:          var(--orange);
  margin-bottom:  0.15rem;
}

.wine-name {
  font-family: var(--f-body);
  font-size:   var(--size-name, 1.1rem);
  font-weight: 500;
  color:       var(--dark);
  line-height: 1.3;
}

.wine-annata {
  font-family: var(--f-body);
  font-size:   0.72rem;
  font-weight: 300;
  color:       var(--mid);
  margin-left: 0.35rem;
}

.wine-uve {
  font-family: var(--f-body);
  font-size:   0.72rem;
  font-weight: 300;
  color:       var(--light);
  margin-top:  0.18rem;
}

.wine-meta {
  display:        flex;
  flex-direction: column;
  align-items:    flex-end;
  gap:            0.15rem;
  flex-shrink:    0;
}

.wine-grad {
  font-family: var(--f-body);
  font-size:   0.62rem;
  font-weight: 300;
  color:       var(--light);
}

.wine-price {
  font-family: var(--f-body);
  font-size:   var(--size-price, 1rem);
  font-weight: 500;
  color:       var(--orange);
}

.wine-calice {
  font-family: var(--f-body);
  font-size:   0.62rem;
  font-weight: 300;
  color:       var(--mid);
}

/* ═══════════════════════════════════════════════════════════════
   BEVANDE
   ═══════════════════════════════════════════════════════════════ */
.bevande-list { display: flex; flex-direction: column; }

.bevanda-item {
  display:         flex;
  align-items:     flex-start;
  justify-content: space-between;
  gap:             0.75rem;
  padding:         0.75rem 0;
  border-bottom:   1px solid var(--rule);
}
.bevanda-item:last-child { border-bottom: none; }

.bevanda-info { flex: 1; min-width: 0; }

.bevanda-name {
  font-family: var(--f-body);
  font-size:   var(--size-name, 1.1rem);
  font-weight: 500;
  color:       var(--dark);
}

.bevanda-abv {
  font-family: var(--f-body);
  font-size:   0.6rem;
  font-weight: 300;
  color:       var(--light);
  margin-left: 0.3rem;
}

.bevanda-desc {
  font-family: var(--f-body);
  font-size:   0.75rem;
  font-weight: 300;
  color:       var(--mid);
  margin-top:  0.2rem;
  line-height: 1.5;
}
.bevanda-desc.en { color: var(--light); }

.bevanda-price-wrap {
  display:        flex;
  flex-direction: column;
  align-items:    flex-end;
  gap:            0.1rem;
  flex-shrink:    0;
}

.bevanda-price {
  font-family: var(--f-body);
  font-size:   var(--size-price, 1rem);
  font-weight: 500;
  color:       var(--orange);
}

.bevanda-nota {
  font-family: var(--f-body);
  font-size:   0.6rem;
  font-weight: 300;
  color:       var(--light);
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--footer-bg, #111111);
  padding:    3.5rem 1.25rem 2.5rem;
  text-align: center;
}

.footer-inner {
  max-width:      var(--max-w);
  margin:         0 auto;
  display:        flex;
  flex-direction: column;
  align-items:    center;
  gap:            0;
}

/* Riga loghi: Agape + SVR affiancati */
.footer-logos {
  display:         flex;
  align-items:     center;
  justify-content: center;
  gap:             2.5rem;
  margin-bottom:   1.75rem;
}

.footer-logo-agape {
  height:  auto;
  width:   140px;
  opacity: 1;
}

.footer-divider {
  width:         40px;
  height:        1px;
  background:    var(--footer-divider, rgba(255,255,255,.15));
  margin-bottom: 1.75rem;
}

/* Social links — icone grandi, testo sotto */
.footer-social-links {
  display:         flex;
  flex-direction:  row;
  justify-content: center;
  gap:             2.5rem;
  margin-bottom:   1.75rem;
}

.footer-social-link {
  display:        flex;
  flex-direction: column;
  align-items:    center;
  gap:            0.5rem;
  font-family:    var(--f-body);
  font-size:      0.6rem;
  font-weight:    300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color:          var(--footer-text-dim, rgba(255,255,255,.35));
  text-decoration:none;
  transition:     color .2s;
}
.footer-social-link:hover { color: var(--footer-text, rgba(255,255,255,.8)); }

.footer-social-icon {
  width:      40px;
  height:     40px;
  flex-shrink:0;
  opacity:    0.5;
  transition: opacity .2s, transform .2s;
}
.footer-social-link:hover .footer-social-icon {
  opacity:   1;
  transform: scale(1.1);
}

.footer-logo-svr {
  height:        76px!important;
  width:         auto;
  opacity:       0.55;
  margin-bottom: 0;
  transition:    opacity .2s;
}
.footer-svr-wrap:hover .footer-logo-svr { opacity: 0.9; }

/* ═══════════════════════════════════════════════════════════════
   SEZIONE ALLERGENI (in fondo al tab cibo)
   ═══════════════════════════════════════════════════════════════ */
.allergens-section {
  background:    var(--bg-off);
  border-top:    1px solid var(--rule);
  margin-top:    3rem;
}

.allergens-inner {
  max-width:  var(--max-w);
  margin:     0 auto;
  padding:    2rem 1.25rem;
}

.allergens-label {
  font-family:    var(--f-title);
  font-size:      0.7rem;
  font-weight:    400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color:          var(--dark);
  margin-bottom:  0.75rem;
}

.allergens-text {
  font-family: var(--f-body);
  font-size:   0.68rem;
  font-weight: 300;
  color:       var(--mid);
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

.allergens-blast {
  font-family: var(--f-body);
  font-size:   0.62rem;
  font-weight: 300;
  font-style:  italic;
  color:       var(--light);
  line-height: 1.65;
  margin-top:  0.5rem;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — tablet ≥ 580px
   ═══════════════════════════════════════════════════════════════ */
@media (min-width: 580px) {
  :root { --section-gap: 4.5rem; }

  .site-header { padding: 0 2rem; }
  .hero--has-bg { padding: 6rem 2rem 5rem; }
  .menu-tabs .tab-btn { padding: 1.1rem 1.5rem; font-size: 0.68rem; }

  .section-title-it { font-size: 1.3rem; }
  .page-hd-it       { font-size: 2.1rem; }

  .footer-social-links { gap: 3.5rem; }
}

/* ── desktop ≥ 900px ─────────────────────────────────────────── */
@media (min-width: 900px) {
  :root { --max-w: 780px; --section-gap: 5rem; }
  .menu-tabs { justify-content: center; }
  .tab-btn   { padding: 1.1rem 2rem; }
}

/* ═══════════════════════════════════════════════════════════════
   STAMPA
   ═══════════════════════════════════════════════════════════════ */
@media print {
  .site-header, .menu-tabs, .site-footer { display: none !important; }
  .tab-panel    { display: block !important; page-break-before: always; }
  .tab-panel.active { page-break-before: avoid; }
  .hero-logo    { width: 140px; }
  body          { font-size: 10pt; background: #fff; }
}
