/* ===== MOBILE FIRST APPROACH ===== */

/* Full-Page-Layout */
html {
  height: 100%;
}

/* ============================================= */
/* PARAMETERPOOL (Benutzerdefinierte Variablen)  */
/* ============================================= */
:root {
  --button-spacing: 1.5rem; /* Abstand zwischen den Navigations-Buttons */
  --accent-color: #ff7e5f; /* Ihre Akzentfarbe (für Hover & Icons) */
  --divider-color: var(--accent-color);
  --divider-thickness: 2px;

  /* NEWS-TICKER Standardwerte */
  --ticker-font-size: 18px;
  --ticker-speed: 26s; /* Default-Geschwindigkeit, falls kein Inline-Style */
  --ticker-gap: 3rem; /* Abstand zwischen Text 1 und 2 */

  /* BALLOON-Parameter (kannst du bei Bedarf tweaken) */
  --balloon-start-size: 40px;
  --balloon-end-scale: 3.5;
  --balloon-scale-start: 0.5;
  --balloon-x: 50%;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: sans-serif;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* RESPONSIVE: Nur auf Desktop soll der Body nicht scrollen */
@media (min-width: 768px) {
  body {
    overflow: hidden;
  }
}

/* RESPONSIVE: Verhindert das Scrollen des Hintergrunds, wenn das mobile Menü offen ist */
body.nav-open {
  overflow: hidden;
}

/* FONTS - aus Original übernommen */
@font-face {
  font-family: "Corinthiago";
  src: url("/static/fonts/Corinthiago.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

/* RESPONSIVE: Schriftart und Abstände auf Mobile reduzieren */
.corinthiago {
  font-family: "Corinthiago", cursive;
  font-weight: bold;
  font-size: clamp(2.8rem, 10vw, 3.5rem); /* Schriftgröße leicht angepasst */
  line-height: 1.2; /* KORREKTUR: Zeilenabstand erhöht */
  margin: 0;
  padding: 0.2em 0; /* Gibt der Schrift etwas Luft nach oben/unten */
}

/* ===== HEADER ===== */
.header {
  position: relative;
  width: 100%;
  height: auto;
  flex-shrink: 0;
  flex-direction: column;
  overflow: hidden;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 1rem; /* RESPONSIVE: Weniger Padding auf Mobile */
  min-height: 150px;
}

.header-text {
  text-align: center;
  z-index: 10;
  font-size: clamp(0.9rem, 2.5vw, 1.3rem);
  margin-top: 0.5rem; /* Weniger Abstand nach oben */
  margin-bottom: 0;
  padding: 0 1rem;
}

/* SLIDESHOW - aus Original übernommen */
.slideshow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.slide.active {
  opacity: 1;
}

/* ===== SPRACHAUSWAHL ===== */
.language-switch {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 1003; /* Über allem */
  display: flex; /* NEU */
  gap: 0.25rem; /* NEU */
}
.lang-button {
  /* KORREKTUR: Padding und Schriftgröße reduziert für kleinere Buttons */
  padding: 0.15rem;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 0.3rem;
  text-decoration: none;
  color: black;
  /* RESPONSIVE: Minimale Umrandung für Flaggen */
  border: 1px solid rgba(0, 0, 0, 0.1);
  display: flex; /* Hilft bei der Zentrierung des Emojis */
  align-items: center;
  justify-content: center;
}
.lang-button:hover,
.lang-button:focus {
  background: #ffd54f;
  border-color: #333;
}

/* ===== RESPONSIVE: HAMBURGER MENÜ ===== */
.mobile-menu-button {
  display: none; /* Standardmäßig auf Desktop ausblenden */
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 1002; /* Muss über dem Nav-Container liegen */
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 8px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.hamburger-icon {
  position: relative;
  width: 24px;
  height: 2px;
  background-color: #333;
  transition: all 0.3s ease;
}
.hamburger-icon::before,
.hhamburger-icon::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 2px;
  background-color: #333;
  left: 0;
  transition: all 0.3s ease;
}
.hamburger-icon::before {
  top: -8px;
}
.hamburger-icon::after {
  top: 8px;
}

/* Hamburger-Animation zu 'X', wenn Menü offen ist */
body.nav-open .hamburger-icon {
  background-color: transparent;
}
body.nav-open .hamburger-icon::before {
  transform: rotate(45deg) translate(5px, 6px);
}
body.nav-open .hamburger-icon::after {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* ===== CONTENT WRAPPER - Mobile First ===== */
.content-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
  background: white;
  overflow: hidden;
}

/* Container für mobile Navigation (NEU) */
.mobile-nav-container {
  position: fixed; /* Geändert von absolute zu fixed */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #222;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  padding: 60px 1rem 1rem 1rem;
  transform: translateX(-100%);
  transition: transform 0.4s ease-in-out;
  /* KORREKTUR: Der Container scrollt jetzt, nicht die Kinder */
  overflow-y: auto;
}
/* Wenn das Menü offen ist, wird der Container sichtbar */
body.nav-open .mobile-nav-container {
  transform: translateX(0);
}

/* ===== NAVIGATION ALLGEMEIN ===== */
.nav-left,
.nav-right {
  width: 100%;
  background: transparent;
  color: white;
  display: flex;
  flex-direction: column;
  padding: 0;
  /* KORREKTUR: Kinder scrollen nicht mehr selbst */
  overflow-y: visible;
}

/* KORREKTUR: Neue, stabile Trennlinie */
.nav-left::after {
  content: "";
  display: block;
  height: var(--divider-thickness);
  background: var(--accent-color);
  margin: 1.5rem 10% 1.5rem 10%; /* Abstand oben/unten und seitlich */
  width: 80%;
}

/* Navigation Buttons - Mobile optimiert */
.nav-left button,
.nav-right button,
.accordion-item {
  background: #fbfbfb;
  color: black;
  border: none;
  width: 100%;
  box-sizing: border-box;
  padding: 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 16px;
  text-align: center;
  cursor: pointer;
  transition: background 0.3s;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  word-break: break-word;
}

/* REGEL FÜR EINHEITLICHEN ABSTAND */
.nav-left > *,
.nav-right > * {
  margin-bottom: var(--button-spacing);
}
.nav-left > *:last-child,
.nav-right > *:last-child {
  margin-bottom: 0;
}

/* Hover-Effekte */
.nav-left button:hover,
.nav-right button:hover,
.accordion-item:hover {
  background: var(--accent-color);
}

/* ===== PREVIEW BEREICH ===== */
#preview {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 1rem;
  background-color: #fbfbfb;
  overflow-y: auto;
  min-height: 300px;
}

#preview-content {
  max-width: 600px;
  width: 100%;
  text-align: center;
}

.profile-image {
  width: 100%;
  max-width: 250px;
  height: auto;
  border-radius: 1rem;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

/* Stile für die Textinhalte in der Vorschau */
.profile-subtitle {
  font-size: 1.25rem;
  font-weight: 600;
  color: #333;
  text-align: left;
  margin-top: 2rem;
  margin-bottom: 1rem;
}
.profile-text {
  font-size: 1rem;
  line-height: 1.6;
  color: #555;
  text-align: left;
  margin-bottom: 1rem;
}
.soft-divider {
  height: var(--divider-thickness);
  background: linear-gradient(
    to right,
    transparent,
    var(--divider-color),
    transparent
  );
  margin: 2rem 0;
  border: none;
}

/* ===== TABLET (ab 768px) ===== */
@media (min-width: 768px) {
  /* Hamburger-Menü auf größeren Bildschirmen ausblenden */
  .mobile-menu-button {
    display: none;
  }

  .content-wrapper {
    flex-direction: row;
  }

  .mobile-nav-container {
    display: contents;
  }

  .nav-left,
  .nav-right {
    background: #222;
    padding: 1rem;
    flex-direction: column;
    flex-wrap: nowrap;
    width: 250px;
    flex-shrink: 0;
    overflow-y: auto; /* Scrollen auf Desktop wieder aktivieren */
  }
  .nav-left::after {
    display: none;
  }

  .nav-left {
    order: 1;
  }
  #preview {
    order: 2;
  }
  .nav-right {
    order: 3;
  }

  .header {
    min-height: auto;
    padding: 2rem 1rem;
  }
  footer {
    padding: 1rem;
    font-size: 14px;
  }
}

/* ===== DESKTOP (ab 1024px) ===== */
@media (min-width: 1024px) {
  .nav-left button,
  .accordion-item {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #preview {
    padding: 2rem;
  }
}

/* ===== GROSSE BILDSCHIRME (ab 1440px) ===== */
@media (min-width: 1440px) {
  .nav-left,
  .nav-right {
    width: 300px;
    padding: 1.5rem;
  }

  .nav-left button,
  .accordion-item {
    font-size: 15px;
    padding: 0.875rem 1.25rem;
  }
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  background: #111;
  color: white;
  padding: 0.5rem;
  font-size: 12px;
  flex-shrink: 0;
}
/* Footer-Links: weiß statt lila */
footer a {
  color: #ffffff;
  text-decoration: underline; /* wenn du die Unterstreichung behalten willst */
}

footer a:visited {
  color: #ffffff;
}

footer a:hover,
footer a:focus {
  color: #facc15; /* optional: leichte Highlight-Farbe bei Hover, z.B. Gelb */
}

/* ===== Header für rechte Navigation (nur Desktop) ===== */
.nav-header {
  text-align: center;
  margin-bottom: var(--button-spacing);
}
.nav-header .titel-box {
  background-color: white;
  border: 2px solid #333;
  padding: 0.625rem 2rem;
  font-weight: bold;
  border-radius: 5px;
  font-size: 1rem;
  color: black;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
  display: inline-block;
}
.nav-header .dreieck {
  width: 0;
  height: 0;
  border-left: 2rem solid transparent;
  border-right: 2rem solid transparent;
  border-top: 0.8rem solid white;
  margin: 0 auto;
}

/* Schrift in den rechten Buttons zentrieren */
.nav-right button.accordion-button {
  text-align: center;
}

/* Accordion als Overlay mit Scroll-Funktion */
.accordion-container {
  position: relative;
}

.file-list {
  list-style: none;
  padding: 0.5rem;
  margin-top: 5px;
  background-color: #2a2a2a;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  z-index: 100;
  max-height: 45vh;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

/* Styling für den Scrollbalken */
.file-list::-webkit-scrollbar {
  width: 8px;
}
.file-list::-webkit-scrollbar-track {
  background: #444;
  border-radius: 4px;
}
.file-list::-webkit-scrollbar-thumb {
  background-color: var(--accent-color);
}

.accordion-container:hover .file-list {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.file-list-item a {
  display: block;
  background-color: #333;
  color: #f0f0f0;
  padding: 0.75rem 1rem;
  margin-bottom: 2px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  transition: background-color 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-list-item a:hover {
  background-color: var(--accent-color);
  color: black;
}

/* ============================================= */
/* STYLES FÜR KONTAKTFORMULAR               */
/* ============================================= */
.contact-container {
  max-width: 600px;
  margin: 0 auto;
  text-align: left;
  padding: 1rem;
}
.contact-title {
  font-family: "Corinthiago", cursive;
  text-align: center;
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  margin-bottom: 0.5rem;
}
.contact-subtitle {
  text-align: center;
  margin-bottom: 1rem;
  color: #666;
}
.form-group {
  margin-bottom: 1.5rem;
}
.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #333;
  font-weight: 600;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  font-family: sans-serif;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(255, 126, 95, 0.2);
}
.form-group textarea {
  resize: vertical;
  min-height: 120px;
}
.submit-button {
  display: block;
  width: 100%;
  padding: 1rem;
  background: #222;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
}
.submit-button:hover {
  background: var(--accent-color);
}
.divider-or {
  display: flex;
  align-items: center;
  text-align: center;
  color: #aaa;
  margin: 2rem 0;
}
.divider-or::before,
.divider-or::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid #ddd;
}
.divider-or:not(:empty)::before {
  margin-right: 0.5em;
}
.divider-or:not(:empty)::after {
  margin-left: 0.5em;
}

/* Styling für das Telefon-Icon */
.phone-call-container {
  text-align: center;
  margin-bottom: 2rem;
}
.phone-icon-link {
  display: inline-block;
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #f0f0f0;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.phone-icon-link:hover {
  transform: scale(1.1);
}
.phone-icon-svg {
  width: 30px;
  height: 30px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  fill: var(--accent-color);
  animation: vibrate 0.5s infinite;
}

/* Vibrations-Animation für den Hörer */
@keyframes vibrate {
  0%,
  100% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  25% {
    transform: translate(-50%, -50%) rotate(-5deg);
  }
  75% {
    transform: translate(-50%, -50%) rotate(5deg);
  }
}

/* Pulsierende Ringe */
.phone-icon-link::before,
.phone-icon-link::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 2px solid var(--accent-color);
  border-radius: 50%;
  animation: pulsate 1.5s infinite;
  opacity: 0;
}
.phone-icon-link::after {
  animation-delay: 0.75s;
}
@keyframes pulsate {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

/* RESPONSIVE: Media Query, um Hamburger-Button auf Mobilgeräten anzuzeigen */
@media (max-width: 767px) {
  .mobile-menu-button {
    display: flex;
  }
}

/* Basic styles for the project page */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  background-color: #f4f4f9;
  color: #333; /* Dark grey for better reading contrast */
  line-height: 1.6;
}

/* The main card for the project */
.project-card {
  background-color: #ffffff;
  margin: 20px auto;
  padding: 25px;
  max-width: 800px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

/* Headings */
.project-card h2 {
  color: #000000;
  margin-top: 0;
}
.project-card h3 {
  color: #000000;
  border-bottom: 2px solid #e1e1e1;
  padding-bottom: 5px;
  margin-top: 25px;
}
.project-card h4 {
  color: #333; /* Slightly lighter than the main headings */
  font-weight: 600;
  margin-bottom: 15px;
}

/* Text and lists */
.project-card p,
.project-card ul {
  margin-bottom: 15px;
}
.project-card ul {
  list-style-type: none;
  padding-left: 0;
}
.project-card ul li {
  /* SVG icon as list bullet, color changed to black */
  background: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%23000000" class="bi bi-check-circle-fill" viewBox="0 0 16 16"><path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"/></svg>')
    no-repeat left center;
  padding-left: 25px;
  margin-bottom: 10px;
}

/* Layout for the value proposition */
.value-proposition {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.perspective {
  flex: 1;
  min-width: 280px;
  background-color: #f9f9f9;
  padding: 15px;
  border-radius: 5px;
  border: 1px solid #e1e1e1;
}
.perspective h4 {
  color: #000000;
  margin-top: 0;
  border-bottom: 1px solid #ccc;
  padding-bottom: 8px;
}
.perspective p {
  font-size: 0.95em;
}
.kpi-label {
  font-weight: bold;
  color: #000000;
}

/* === CTA unter dem Profilbild =========================================== */
.cta-under-profile {
  display: flex;
  justify-content: center;
  margin-top: 18px; /* Abstand unter dem Bild */
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.cta-under-profile.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
}

.cta-under-profile .cta-btn {
  display: inline-block;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid #111;
  color: #fff;
  background: #111;
  text-decoration: none;
  line-height: 1.15;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  transition: transform 0.15s ease, background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.cta-under-profile .cta-btn:hover {
  background: #222;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
  transform: translateY(-1px);
}

/* Desktop: leicht kompakter, da Preview meist breiter ist */
@media (min-width: 1100px) {
  .cta-under-profile {
    margin-top: 20px;
  }
  .cta-under-profile .cta-btn {
    padding: 9px 16px;
  }
}

/* -------------------------------------------------
   NEWS-TICKER – Basis-Variablen (werden oben gesetzt)
   ------------------------------------------------- */

/* -------------------------------------------------
   Pille / Container
   ------------------------------------------------- */
.news-ticker {
  position: relative;
  max-width: 840px;
  margin: 2.4rem auto 0;
  padding: 0.7rem 2.6rem;
  border-radius: 9999px;
  font-size: var(--ticker-font-size);
  line-height: 1.3;
}

/* Glassmorphism-Theme */
.news-ticker--glass {
  background: #b0bdc7;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* -------------------------------------------------
   Viewport & Track
   ------------------------------------------------- */
.news-ticker__viewport {
  position: relative;
  width: 100%;
  overflow: hidden; /* WICHTIG: Text bleibt in der Pille */
}

.news-ticker__track {
  display: inline-flex;
  align-items: center; /* Text vertikal mittig */
  gap: var(--ticker-gap);
  white-space: nowrap;

  /* Animation – Dauer kommt aus CSS-Variable oder Inline-Style */
  animation-name: ticker-move;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-duration: var(--ticker-speed, 26s);
}

/* Einzelne Textelemente */
.news-ticker__item {
  font-size: var(--ticker-font-size);
  font-weight: 600;
  color: #eb6619;
}

/* Optional: leichte Farbe, wenn Hintergrund mal dunkler wird */
.news-ticker--glass .news-ticker__item {
  color: #eb6619;
}

/* -------------------------------------------------
   Keyframes – Distanz kommt aus JS über --ticker-distance
   ------------------------------------------------- */
@keyframes ticker-move {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-1 * var(--ticker-distance, 100%)));
  }
}

/* ========================================================= */
/* BALLOON – sichtbarer, anklickbarer Aufstieg von unten     */
/* ========================================================= */

#balloon-layer {
  position: fixed;
  inset: 0; /* über die ganze Viewport-Fläche */
  pointer-events: none; /* Layer blockiert nichts */
  z-index: 2000; /* über Inhalt, unter Tooltip/Modals */
}

/* Der Button selbst – klickbar, animiert */
.balloon {
  position: absolute;
  left: var(--balloon-x, 50%);
  bottom: -120px; /* startet knapp unter dem sichtbaren Bereich */
  transform: translateX(-50%);
  width: var(--balloon-start-size);
  height: var(--balloon-start-size);
  border-radius: 999px;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  pointer-events: auto; /* macht den Ballon trotzdem klickbar */
  animation: balloon-rise var(--balloon-rise-duration, 18s) linear forwards;
}

/* Standard-Theme für den Ballon-Körper */
.balloon__inner {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle at 30% 20%,
    #ffe9d6 0,
    #fb923c 30%,
    #ea580c 100%
  );
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.25);
}

/* Beispiel für ein alternatives Theme (z. B. zweiter Ballon) */
.balloon--theme-secondary .balloon__inner {
  background: radial-gradient(
    circle at 30% 20%,
    #e0f2fe 0,
    #60a5fa 35%,
    #1e3a8a 100%
  );
}
/* Neutrales graues Theme (rechter Ballon) */
.balloon--theme-gray .balloon__inner {
  background: radial-gradient(
    circle at 30% 20%,
    #f5f5f5 0,
    #d4d4d4 40%,
    #737373 100%
  );
}

/* kleines Hand-Icon als Klick-Hinweis */
.balloon__inner::after {
  content: "👆";
  position: absolute;
  bottom: 18%;
  right: 18%;
  font-size: 0.9rem;
  filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.4));
}

/* Schnur */
.balloon__string {
  position: absolute;
  width: 2px;
  height: 60px;
  background: rgba(0, 0, 0, 0.25);
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  transform-origin: top center;
  /* leichtes Schwingen im "Wind" */
  animation: balloon-string-sway 2.4s ease-in-out infinite;
}

/* Faden verschwindet, sobald der Ballon "popped" ist */
.balloon--popped .balloon__string {
  opacity: 0;
}

/* Keyframes für das Schwingen der Schnur */
@keyframes balloon-string-sway {
  0% {
    transform: translateX(-50%) rotate(0deg);
  }
  25% {
    transform: translateX(-50%) rotate(3deg);
  }
  50% {
    transform: translateX(-50%) rotate(-3deg);
  }
  75% {
    transform: translateX(-50%) rotate(2deg);
  }
  100% {
    transform: translateX(-50%) rotate(0deg);
  }
}

/* Aufstiegs-Animation: von unten klein nach oben größer
   Scale-Werte kommen aus Variablen und werden pro Ballon gesetzt */
@keyframes balloon-rise {
  0% {
    transform: translate(-50%, 20vh) scale(var(--balloon-scale-start, 0.5));
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -110vh) scale(var(--balloon-scale-end, 3.5));
    opacity: 0.9;
  }
}

/* Wird nach dem Platzen/einmaliger Nutzung ausgeblendet */
.balloon--hidden {
  display: none;
}

/* Pop-Effekt */
.balloon--popped .balloon__inner {
  animation: balloon-pop 0.35s ease-out forwards;
}

@keyframes balloon-pop {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.3);
    opacity: 1;
  }
  100% {
    transform: scale(0.2);
    opacity: 0;
  }
}

/* Overlay-Dialog beim Klick */
.balloon-message {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 2100;
}

.balloon-message.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.balloon-message__content {
  max-width: 420px;
  width: 90%;
  background: #ffffff;
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.2);
  text-align: left;
}

.balloon-message__content h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.balloon-message__content p {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

.balloon-message__close {
  display: inline-block;
  border: none;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  padding: 0.5rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.balloon-message__close:hover {
  background: #4b5563;
}
