/* === Farb- und Layout-Variablen === */
:root {
  --color-primary:   #2E5AAC;
  --color-secondary: #2A6F42;
  --color-secondary-bright: #39A05A;
  --color-accent:    #2A6F42;
  --color-bg:        #F5F0E1;
  --color-card-bg:   #FFFFFF;
  --color-text:      #333333;
  --color-text-light:#666666;
  --header-height: 40px;
  --progress-height: 4px;
}

section h1 {
  color: #ffffff;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  box-sizing: border-box;
  padding-top: calc(var(--header-height)/2);
  position: relative;
  z-index: 0;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: -1;
  background-image: url('../images/bg.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

main {
  padding: 20px;
}

/* === Header & Navigation === */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background-color: var(--color-bg);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  z-index: 1000;
  overflow: visible;
}

.logo {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  display: inline-block;
}

.logo img {
  max-height: var(--header-height);
  width: auto;
  pointer-events: none;
}

#menuToggle {
  position: absolute;
  right: 1rem; top: 0px;
  transform: none;
  background: none; border: none;
  cursor: pointer;
  padding: 10px;
  display: flex; align-items: center;
  z-index: 1000;
  height: 40px;
}

.burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 30px; height: 22px;
  position: relative;
  gap: 5px;
}

.burger span {
  position: absolute;
  width: 100%;
  height: 3px;
  background-color: var(--color-secondary);
  border-radius: 6px;
  transition: 0.3s ease;
}
.burger span:nth-child(1) { top: 0; }
.burger span:nth-child(2) { top: 50%; transform: translateY(-50%);}
.burger span:nth-child(3) { bottom: 0; }
#menuToggle.open .burger span:nth-child(1) { transform: rotate(45deg); top: 50%; }
#menuToggle.open .burger span:nth-child(2) { opacity: 0; }
#menuToggle.open .burger span:nth-child(3) { transform: rotate(-45deg); top: 50%; bottom: auto; }

#mainMenu {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  background: var(--color-card-bg);
  z-index: 999;
  display: none;
  max-height: calc(100vh - var(--header-height));
  overflow-y: auto;
  transition: max-height 0.4s ease-in-out;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  border-radius: 0 0 20px 20px;
  padding-top: calc(var(--header-height) / 2);
}
#mainMenu.open {
  display: block;
  max-height: calc(100vh - var(--header-height));
  overflow-y: auto;
}
#mainMenu ul {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
}
#mainMenu ul li {
  border-bottom: 1px solid #eee;
}
#mainMenu ul li a {
  display: block;
  padding: 14px 20px;
  color: #333;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 12px;
  transition: background 0.3s, padding-left 0.2s;
}
#mainMenu ul li a:hover {
  background-color: var(--color-secondary);
  padding-left: 28px;
  color: var(--color-text);
}

/* === Slider und Cards (zentriert & bugfrei) === */
/* === Slider und Cards (echtes Sliding, nur 1 Gericht sichtbar und animiert) === */
.slider, .slider-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 40px auto 0 auto;
    min-height: 400px;
}

.slider-wrapper {
    position: relative;
    overflow: hidden;
}

.slider-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.45, 0, 0.55, 1);
    will-change: transform;
}


.dish.active {
    opacity: 1;
    transform: scale(1.03);
    z-index: 2;
    box-shadow: 0 6px 24px rgba(0,0,0,0.10);
}
.dish h2 { margin: 10px 0 5px; font-size: 1.1rem; }
.dish p { margin: 0; color: #555; }
.viewer-wrapper {
    width: 140px;
    height: 140px;
    margin: 70px auto 0 auto; /* zentriert, kein negatives margin mehr */
    z-index: 2;
    position: relative;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 16px rgba(0,0,0,0.10);
    display: flex;
    align-items: center;
    justify-content: center;
}
.viewer-wrapper model-viewer {
    width: 120px;
    height: 120px;
    background: transparent;
    border-radius: 50%;
    display: block;
}



.dish-info {
    background: #fff;
    border-radius: 0 0 32px 32px;
    box-shadow: 0 4px 32px rgba(0,0,0,0.13);
    padding: 2rem 1.2rem 1.2rem 1.2rem;
    margin: 0 auto;
    width: 100%;
    max-width: 420px;
    z-index: 1;
    position: relative;
    color: #333;
    box-sizing: border-box;
    text-align: center;
}
.dish-info h2 { margin: 0; font-size: 1.25rem; }
.dish-info p { margin: 0.25rem 0 1rem; }
.dish-info > * + * { margin-top: 0.75rem; }

.dish-info .toggle-details {
  display: inline-block;
  background: none;
  border: none;
  color: var(--color-secondary);
  font-size: 1rem;
  cursor: pointer;
  margin-top: 0.5rem;
}
.dish-info .toggle-details:hover { text-decoration: underline; }

.dish-info .details {
  display: none;
  background: #fff;
  border: 1px solid #ddd;
  padding: 0.75rem;
  border-radius: 4px;
  color: #444;
  margin-top: 0.75rem;
}
.dish-info .details.open { display: block; }

.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: rgba(40, 60, 40, 0.25);
  border: none;
  color: #fff;
  font-size: 2.2rem;
  border-radius: 50%;
  padding: 0.3em 0.4em;
  cursor: pointer;
  transition: background 0.2s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.07);
  user-select: none;

}
.arrow.left { left: 0.7rem; }
.arrow.right { right: 0.7rem; }

.progress-container {
  width: 100%;
  background-color: #eee;
  height: 4px;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 8px;
}
.progress {
  width: 0%; height: 100%;
  background-color: var(--color-secondary);
  transition: width 0.3s ease;
}

.spinner {
  position: absolute;
  top: 50%; left: 50%;
  width: 32px; height: 32px;
  margin: -16px 0 0 -16px;
  border: 4px solid rgba(0,0,0,0.1);
  border-top: 4px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 768px) {
  .slider-track[data-count="2"] { justify-content: space-between; }
  body { background-attachment: scroll; }
  .viewer-wrapper {
    width: 200px;
    height: 200px;
    margin-bottom: 20px;
  }
  .viewer-wrapper model-viewer {
    width: 170px;
    height: 170px;
  }
  .dish-info {
    padding: 1.4rem 0.5rem 1rem 0.5rem;
    margin-top: 0px; /* Box schiebt sich näher ans Modell */
    width: 97vw;
    max-width: 340px;
    border-radius: 24px;
    box-shadow: 0 4px 32px rgba(0,0,0,0.13);
  }
  .dish-info .toggle-details,
  .dish-info .arButton {
    display: block;
    width: 100%;
    margin: 0.5em 0 0.3em 0;
    text-align: center;
  }
  .dish {
    min-width: 90vw;
    max-width: 95vw;
  }
}

button, .arButton {
  background-color: var(--color-secondary);
  color: var(--color-card-bg);
  border: none;
  border-radius: 8px;
  padding: 0.5em 1em;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: background 0.2s;
  margin-top: 10px;
}
button:hover {
  background: var(--color-secondary);
}

.arButton:hover {
  background: var(--color-secondary-bright);
}


.hamburger-icon:hover,
.icon:hover { fill: var(--color-secondary); }

a, .link { color: var(--color-accent); }

.dish-info .toggle-details,
.dish-info .arButton {
  margin: 0 auto;
  display: inline-block;
  border-radius: 99px;
  padding: 0.5em 1.4em;
  min-width: 120px;
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
}

.slider {
  width: 100%;
  /*overflow: hidden;*/
  position: relative;
  margin: 40px auto 0 auto; /*neu*/
}

.slider-wrapper {
  /*display: flex;*/
  align-items: center;
  /*justify-content: center;*/
  /*width: 100%;*/
  position: relative;
  overflow: hidden;
  /* optional: min-height setzen, z.B. min-height: 350px; */
}



/* --- Slider: Nur ein Gericht sichtbar, mittig, mit Luft --- */
.slider-track .dish,
.dish {
    min-width: 100%;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    /* Optional: etwas mehr Abstand nach unten für Schattenwirkung */
    margin-bottom: 24px;
}

.dish {
    min-width: 100%;
    max-width: 100%;
    margin: 0 auto 24px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
    opacity: 0.5;
    transition: opacity 0.3s, transform 0.5s, box-shadow 0.3s;
}

.option-info {
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  padding: 1rem;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
  border-radius: 10px;
  text-align: left;
  font-size: 0.9rem;
}

.option-info p {
  margin: 0 0 0.5rem 0;
  font-weight: 600;
}

.option-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.option-list li {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.3rem 0.6rem;
  border-radius: 99px;
  font-size: 0.85rem;
  white-space: nowrap;

}

.allergen {
  background-color: #FFD700;
  color: #000;
  padding: 0 6px;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-left: 4px;
}

.chili-level {
  height: 16px;
  width: auto;
  margin-left: 2px;
  vertical-align: middle;
}

.info-box {
  background: white;
  padding: 1.5rem;
  margin: 2rem auto;
  border-radius: 20px;
  max-width: 90%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.simple-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  font-size: 1.1em;
  color: #333;
}

.simple-list li {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #ddd;
  padding: 0.5rem 0;
}

.info-box h2 {
  background-color: #f4f4f4;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 1.3em;
  font-weight: bold;
  margin-bottom: 1rem;
  color: #333;
  display: inline-block;
}

.drink-item {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #ddd;
  padding-bottom: 0.5rem;
}

.drink-item strong {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: #222;
}

.drink-sizes span {
  display: block;
  color: #555;
  font-size: 0.95em;
}
#google_translate_element {
position: absolute;
left: -9999px; /* unsichtbar außerhalb vom Bildschirm */
}

/* Dropdown kompakter */
#google_translate_element .goog-te-gadget {
font-family: inherit !important;
}
#google_translate_element .goog-te-gadget .goog-te-combo {
padding: 6px 10px;
border-radius: 8px;
border: 1px solid #ddd;
font-size: 14px;
background: #fff;
}

/* optional: den “Powered by Google”-Text etwas dezenter */
.goog-logo-link, .goog-te-gadget span {
  opacity: 0.6;
  font-size: 12px;
}

/* Positionierung im Header */
.lang-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  cursor: pointer;
}

/* Standard-Google-UI ausblenden */
#google_translate_element .goog-te-gadget {
height: 0;
overflow: hidden;
}



/* Klick soll Dropdown auslösen */
.lang-icon:hover {
  opacity: 0.8;
}

/* Dropdown wieder anzeigen, wenn aktiv */
.show-translate #google_translate_element {
  display: block !important;
  position: absolute;
  top: var(--header-height);
  left: 1rem;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 5px;
  z-index: 2000;
}

.chili-rating{
  --size: 24px;          /* Icon-Größe */
  display:inline-block;
  height: var(--size);
  width: calc(var(--level) * var(--size));
  background-image: url("/images/chili.png"); /* oder .svg */
  background-size: var(--size) var(--size);
  background-repeat: repeat-x;
  vertical-align: middle;
}
