/* ===========================================================
   VARIABILI GLOBALI
   =========================================================== */
:root {
  /* Colori principali */
  --color-primary: #317256;       /* verde principale */
  --color-primary-dark: #f8f8fa;  /* verde scuro */
  --color-text: #2c3e50;          /* testo base */
  --color-text-light: #555;       
  --color-text-lighter: #777;
  --color-white: #ffffff;

  /* Header */
  --header-bg: rgba(0, 0, 0, 0.2); /* sfondo header (era bianco trasparente / ora nero trasparente) */
  --header-shadow: rgba(0,0,0,0.1);

  /* Category */
  --category-bg: #ffffff;
  --category-border: var(--color-primary);
  --category-shadow: rgba(39,174,96,0.3);
  --category-hover-bg: var(--color-primary);
  --category-hover-text: #ffffff;
  --category-hover-shadow: rgba(39,174,96,0.5);

  /* Dish card */
  --dish-bg: rgba(255, 255, 255, 0.9);
  --dish-shadow: rgba(0,0,0,0.1);
  --dish-text: #2c3e50;

  /* Link pill (indirizzo/telefono) */
  --pill-bg: rgba(39, 174, 96, 0.1);
  --pill-bg-hover: rgba(39, 174, 96, 0.25);

  /* Footer */
  --footer-bg: var(--color-primary);
  --footer-border: var(--color-primary-dark);
  --footer-shadow: rgba(0,0,0,0.1);
  --footer-text-light: #e0f2d7;
  --footer-text-link: #d1f2c4;

  /* Background immagine */
  --bg-image-url: url('../images/background.jpg');
}

/* ===========================================================
   RESET BASE
   =========================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===========================================================
   SFONDO FISSO — background dietro tutto
   =========================================================== */
.bg-image {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100%;
  background-image: var(--bg-image-url);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
  z-index: -9999;
  pointer-events: none;
  will-change: transform;
  transform: translateZ(0);
}

@media (max-width: 600px) {
  .bg-image {
    background-attachment: scroll;
  }
}

/* ===========================================================
   BODY — struttura base
   =========================================================== */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  color: var(--color-text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  background: transparent;
}

.container {
  max-width: 600px;
  margin: 1rem auto 2rem;
  padding: 0 1rem;
  flex-grow: 1;
}

/* ===========================================================
   HEADER
   =========================================================== */
header {
  background-color: var(--header-bg);
  text-align: center;
  padding: 1rem 1rem 1.5rem;
  box-shadow: 0 4px 6px var(--header-shadow);
  border-radius: 0 0 15px 15px;
  user-select: none;
}

.logo {
  height: 170px;
  margin-bottom: 0.5rem;
  border-radius: 20px;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.address,
.phone,
.slogan {
  font-weight: 600;
  margin: 0.3rem 0;
  color: var(--color-primary-dark);
}

.phone a {
  text-decoration: none;
  color: var(--color-primary-dark);
}

.phone a:hover {
  text-decoration: underline;
}

/* ===========================================================
   LINK ADDRESS & PHONE
   =========================================================== */
.address a,
.phone a {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  padding: 4px 12px;
  background-color: var(--pill-bg);
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.address a:hover,
.phone a:hover,
.address a:focus,
.phone a:focus {
  background-color: var(--pill-bg-hover);
}

.address a i,
.phone a i {
  font-size: 1.1em;
  line-height: 1;
}

.address a::before,
.phone a::before {
  content: none;
}

.hours {
  font-weight: 700;
  color: #e8f4ea; /* stesso colore degli altri link */
  margin: 0.25rem 0;
  font-size: 0.9rem;
}

.hours i {
  margin-right: 0.4rem;
  color: #27ae60; /* colore icona orario */
}

/* ===========================================================
   CATEGORY HEADER
   =========================================================== */
.category {
  margin-bottom: 1rem;
}

.category-header {
  background-color: var(--category-bg);
  border: 2px solid var(--category-border);
  border-radius: 50px;
  padding: 0.5rem 2rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-primary);
  cursor: pointer;
  text-align: center;
  user-select: none;
  max-width: 540px;
  margin: 0 auto;
  transition: 0.3s ease;
  box-shadow: 0 2px 6px var(--category-shadow);
}

.category-header:hover,
.category-header:focus {
  background-color: var(--category-hover-bg);
  color: var(--category-hover-text);
  box-shadow: 0 4px 12px var(--category-hover-shadow);
}

/* ===========================================================
   CATEGORY CONTENT
   =========================================================== */
.category-content {
  height: 0;
  overflow: hidden;
  margin-top: 0.75rem;
  padding: 0 1rem;
  transition: height 0.4s ease, padding 0.4s ease;
  color: var(--color-text);
}

.category-content.active {
  padding-bottom: 1rem;
}

.hidden {
  display: none !important;
}

/* ===========================================================
   DISH CARD
   =========================================================== */
.dish {
  display: flex;
  gap: 1rem;
  background: var(--dish-bg);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 6px var(--dish-shadow);
  align-items: center;
  color: var(--dish-text);
}

.dish-img {
  width: 100px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}



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

.dish-content h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.dish-content p {
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--color-text-light);
}

.variant-name { color: black; }
.variant-type { color: #333; font-weight: 500; font-size: 0.9rem; }
.variant-price { color: var(--color-primary); font-weight: 600; font-size: 0.9rem; }

.dish-content ul li {
  margin-bottom: 2px;
  padding-left: 2px;
}

.dish-price {
  font-weight: 700;
  color: var(--color-primary);
  font-size: 1rem;
  padding-top: 0.5rem;
}

/* ===========================================================
   ALLERGENS & TRACES
   =========================================================== */
.allergens-text,
.traces-text {
  font-size: 0.75rem;
  color: var(--color-text-light);
  margin-top: 0.3rem;
  line-height: 1.3;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.allergens-text strong,
.traces-text strong {
  font-weight: 400;
  color: #444;
  text-decoration: underline;
}

.traces-text { color: var(--color-text-lighter); }

/* ===========================================================
   FOOTER
   =========================================================== */
footer {
  background-color: var(--footer-bg);
  color: white;
  padding: 1.5rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  border-top: 3px solid var(--footer-border);
  box-shadow: 0 -2px 8px var(--footer-shadow);
  position: relative;
  z-index: 10;
}

footer p {
  margin: 0;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--footer-text-light);
}

footer p a {
  color: var(--footer-text-link);
  font-weight: 600;
  text-decoration: underline;
  transition: 0.3s ease;
}

footer p a:hover {
  color: white;
  text-decoration: none;
}

/* ===========================================================
   RESPONSIVE (mobile)
   =========================================================== */
@media (max-width: 600px) {

  .logo {
    height: 100px;
  }

  .category-header {
    max-width: 90%;
    padding: 0.5rem 1.2rem;
    font-size: 1rem;
  }

  .dish {
    flex-direction: column;
    align-items: flex-start;
  }

  .dish-img {
    width: 100%;
    height: auto;
    margin: 0 auto; /* centrare immagine */
    display: block;
  }
  

  .dish-img.small {
    width: 90px;
    height: auto;
    margin: 0; 
  }
  .dish.small-image {
    flex-direction: row;
    align-items: center;
  }


  .dish-content h4 {
    font-size: 1rem;
  }

  .dish-content p {
    font-size: 0.85rem;
  }
}