
/* VARIABILI GLOBALI */
:root {
  --primary: #C21F1E;
  --accent: #ffb4c1;
  --bg-light: ##e8e8e8;
  --bg-dark: #1e1e2f;
  --text: #222;
  --border: #ddd;
}

* {
  transition: all 0.3s ease;
}


body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background-color: var(--bg-light);
  background-image:url(https://raw.githubusercontent.com/alessandrofogliada/lacampagnola/refs/heads/main/img/background.webp);
  color: var(--text);
}


header {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 1rem;
  background-color: #e8e8e8;
  color: white;
}

/* Badge allergeni  */

.badge {
  color: white;
}

.allergene-glutine { background-color: #a0522d; }
.allergene-crostacei { background-color: #ff7f50; }
.allergene-uova { background-color: #f0ad4e; }
.allergene-pesce { background-color: #4682b4; }
.allergene-arachidi { background-color: #8b0000; }
.allergene-soia { background-color: #8fbc8f; }
.allergene-latte { background-color: #87ceeb; }
.allergene-frutta { background-color: #daa520; }
.allergene-sedano { background-color: #556b2f; }
.allergene-senape { background-color: #ffd700; }
.allergene-sesamo { background-color: #d2b48c; }
.allergene-solfiti { background-color: #708090; }
.allergene-lupini { background-color: #9932cc; }
.allergene-molluschi { background-color: #40e0d0; }

.badge {
  font-size: 0.8rem;
  padding: 0.4em 0.6em;
  border-radius: 12px;
}

.bg-category-bianco {
  background-color: #80c47e;
  border: 1px solid #ccc;
}

.bg-category-rosso {
  background-color: #b30000;
  color: #fff;
}

.bg-category-rosé,
.bg-category-rose {
  background-color: #ffb6c1;
  color: #000;
}

.badge.bg-category-spumante {
  background-color: lightblue;
  color:white;
  border: 1px solid #ccc;
}



/* SCHERMATA DI BENVENUTO */
#home-screen {
  height: 100%;
  border-radius: 16px;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #c21f1ecc;
  color: white;
  
}

.card-wrapper {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}


.menu-card {
  background: white;
  color: #dc2743;
  border: solid 2px white;
  border-radius: 20px;
  padding: 2rem 1rem;
  width: 140px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.welcome-button{
  background: white;
  color: #dc2743;
  border: solid 2px white;
  border-radius: 20px;
  padding: 2rem 1rem;
  height: 150px;
  width: 40%;
  font-size: 30px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  cursor: pointer;
}


.menu-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.3);
}

.menu-card .icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.social-icons a {
  color: white;
  transition: opacity 0.3s ease;
}

.social-icons a:hover {
  opacity: 0.8;
}

#menu-container{
  display: flex;
  flex-wrap: wrap;
  padding-bottom: 100px;
}

.logo{
  width: 15%;
  background-color: #e8e8e8;
  border-radius: 15px;
}

.contatti{
  margin: 2rem 0 2rem;
  background-color: #fff4f6;
  border-radius: 15px;
  color: var(--primary);
}



/* NAV BUTTONS TOP */
nav button {
  margin-left: 10px;
  padding: 0.5rem 1rem;
  border: none;
  background-color: var(--primary);
  color: white;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

nav button:hover {
  background-color: #b91e38;
}

button:active {
  transform: scale(0.97);
  opacity: 0.9;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  display: flex;
  justify-content: space-around;
  padding: 10px 0;
  background-color: #f3f3f3;
  border-top: 1px solid #ddd;
}

.bottom-nav.show {
  transform: translateY(0%);
  opacity: 1;
}

.dropdown-toggle{
  background-color:#C21F1E; 
  border: 2px solid white;
  color: white;
}


/* FILTRI */
#filtri,
#filtri-cibo,
#filtri-bevande {
  margin: 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

#filtri button,
#filtri-cibo button,
#filtri-bevande button {
  border: none;
  padding: 8px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

#filtri button:hover,
#filtri-cibo button:hover,
#filtri-bevande button:hover {
  opacity: 0.8;
}

/* CONTENITORE PIATTI */
/* #menu-container { */
  /* padding: 20px;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
} */

/* CARD PIATTO */
.menu-item {
  background: white;
  border: 1px solid var(--border);
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease;
  margin: 10px auto;
}

.menu-item:hover {
  transform: translateY(-4px);
}

.menu-item img {
  width: 90%;
  border-radius: 10px;
}

/* LOGIA SWITCH TASTI  */

.menu-switch {
  border-radius: 20px;
  min-height: 70px;
  font-size: 16px;
  font-weight: bold;
  white-space: normal;
  word-break: break-word;
  text-align: center;
  display: block;
  background-color: #fff4f6;
}

.menu-switch.active {
  background-color: var(--primary);
  color: white;
  border: solid 2px white;
}


/*  MESSAGGIO NESSUN RISULTATO  */
.infoNoDati,
#messaggio-filtri {
  background-color: white;
  width: 90%;
  margin: 0 auto;
  padding: 20px;
  font-size: 20px;
  text-align: center;
  color: var(--primary);
}

/* SOCIAL ICONS */
.icon {
  font-size: 40px;
  margin: 10px;
}

.fa-instagram {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  color: white;
  border-radius: 50%;
  padding: 10px;
}

.fa-facebook {
  background-color: white;
  color: #1877f2;
  border-radius: 50%;
  padding: 10px;
}

.fa-whatsapp {
  background-color: #25D366;
  color: white;
  border-radius: 50%;
  padding: 10px;
}

/* TABELLA ALLERGENI */

#tabella-allergeni {
  background-color: #fff;
  border-radius: 10px;
  margin: 20px;
}

#tabella-allergeni table {
  width: 100%;
  border-collapse: collapse;
}

#tabella-allergeni th, #tabella-allergeni td {
  padding: 10px;
  text-align: left;
  border: 1px solid #ccc;
}


/* BOTTOM NAVBAR */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 75px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-top: 1px solid #ccc;
  background-color: white;
  z-index: 1000;
}

.bottom-nav .nav-btn {
  text-align: center;
  font-size: 14px;
  padding: 6px 0;
}

i{
  margin-right: 5px;
  font-size: 20px;
}


.nav-btn {
  background: none;
  border: none;
  text-align: center;
  color: #555;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.nav-btn i {
  font-size: 18px;
  margin-bottom: 2px;
  transition: transform 0.2s ease;
}

.nav-btn:active i {
  transform: scale(1.2);
}

.nav-btn.active {
  color: var(--primary);
  font-weight: bold;
  background-color: #fff;
  box-shadow: inset -2px -2px 5px rgba(255,255,255,0.5),
              inset 2px 2px 5px rgba(0,0,0,0.1);
  border-radius: 20px;
  padding: 4px 8px;
}

.menu-switch, .filter-chip, .btn {
  transition: all 0.2s ease;
}

.menu-switch:active, .filter-chip:active {
  transform: scale(0.95);
}

.ingredienti-content {
  transition: all 0.3s ease;
}


/* STYLING BADGE  */
.badge {
  font-size: 0.75rem;
  padding: 0.4em 0.6em;
  border-radius: 0.4em;
}

.glutenfree{
  background-color: darkkhaki;
}

.badge {
  opacity: 0;
  transform: scale(0.8);
  animation: fadeInBadge 0.3s forwards;
}

@keyframes fadeInBadge {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* CARD  */

.menu-item {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 0.4s ease forwards;
  width: 30%;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.event-datetime {
  font-size: 1rem;
}
.event-date {
  font-weight: bold;
}
.event-time {
  font-size: 0.9rem;
  color: gray;
}

.filter-panel {
  background-color: #fff;
  max-width: 100%;
  border-radius: 12px;
  border: 1px solid #ddd;
}

.filter-category {
  margin-bottom: 1rem;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-chip {
  border: 1px solid #ccc;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 14px;
  background-color: #f8f9fa;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
}

.glutenfree.active {
  background-color: darkkhaki ;
  color: white;
  border-color: darkkhaki;
}

.lattosiofree.active {
  background-color: #0d6efd;
  color: white;
  border-color: #0d6efd;
}


.vegetariano.active {
  background-color: rgb(255, 193, 7);
  color: white;
  border-color:  rgb(255, 193, 7);
}


.vegano.active {
  background-color: #13b504;
  color: white;
  border-color: #13b504;
}


.piccante.active {
  background-color: red;
  color: white;
  border-color: red;
}

#filtri-bevande button.active {
  font-weight: bold;
  border: 1px solid #8a1c4b;
  box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

.filter-chip.active {
  transform: scale(1.05);
  transition: transform 0.2s;
  border: 2px solid #333;
}

.titolo-bevande{
  width: 100%;
  margin-bottom: 1rem;
  margin-top: 1.5rem;
  color: white;
  text-align: center;
  font-size: 42px;
}


/* LOADER */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100dvh;
  background: rgba(255, 255, 255, 0.8);
  z-index: 1000;
  display: none; /* <-- visibile solo se showLoader() */
  justify-content: center;
  align-items: center;
  flex-direction: column;
}


.fade-in {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#loader-eventi {
  display: flex;
  flex-direction: column;
  align-items: center;
}


/* RESPONSIVE */
@media (max-width: 768px) {
  .menu-item {
    width: 100% !important;
  }
}

@media (max-width: 500px) {
  nav button {
    font-size: 14px;
    padding: 0.4rem 0.8rem;
  }

  .logo{
    width: 40%;
  }
}
