/* --- Styling für Gesundheitsrechner --- */

/* Wrapper für den gesamten Rechner */
.gr-rechner-wrapper {
    background-color: #f9f9f9; /* Heller Hintergrund, passend zum Seitendesign */
    border: 1px solid #e0e0e0;
    border-radius: 12px; /* Abgerundete Ecken wie bei Ihren Karten */
    padding: 25px;
    font-family: sans-serif; /* Fallback-Schriftart, passt sich meist an Ihr Theme an */
    max-width: 100%;
    margin: 20px auto;
    /* Isoliert Floats/Overflow vom Artikeltext darunter */
    display: flow-root;
    position: relative;
    box-sizing: border-box;
}

.gr-rechner-wrapper *,
.gr-rechner-wrapper *::before,
.gr-rechner-wrapper *::after {
    box-sizing: border-box;
}

.gr-rechner-wrapper h2 {
    margin-top: 0;
    color: #333;
}

.gr-rechner-wrapper p {
    color: #555;
    line-height: 1.6;
}

/* Styling der Formular-Gruppen */
.gr-if-form-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px; /* Abstand zwischen den Feldern */
    margin-top: 20px;
}

.gr-form-group {
    flex: 1;
    min-width: 180px;
}

.gr-form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

/* Styling für Input-Felder und Selects */
.gr-rechner-wrapper input[type="time"],
.gr-rechner-wrapper input[type="number"],
.gr-rechner-wrapper select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px; /* Auch hier runde Ecken */
    font-size: 16px;
    box-sizing: border-box; /* Verhindert, dass Padding die Breite beeinflusst */
}

/* Ergebnis-Bereich */
#gr-if-ergebnis {
    background-color: #ffffff; /* Weißer Hintergrund für das Ergebnis */
    border: 2px solid #008485; /* Hauptfarbe Ihrer Seite */
    border-radius: 12px;
    padding: 20px;
    margin-top: 30px;
}

#gr-if-ergebnis h3 {
    margin-top: 0;
    color: #008485; /* Hauptfarbe Ihrer Seite */
}

/* Visuelle Zeitleiste */
.gr-if-timeline {
    width: 100%;
    height: 30px;
    background-color: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    margin-top: 15px;
    font-size: 12px;
    color: white;
    line-height: 30px;
    text-align: center;
}

.gr-if-fasten-phase {
    background-color: #6c757d; /* Ein neutrales Grau für die Fastenzeit */
    overflow: hidden;
}

.gr-if-essens-phase {
    background-color: #008485; /* Hauptfarbe Ihrer Seite für die Essenszeit */
    overflow: hidden;
}

.gr-if-timeline-legende {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    font-size: 14px;
}
.gr-if-legende-item {
    display: flex;
    align-items: center;
}
.gr-if-legende-punkt {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}


/* --- Ergänzungen für Schlaf-Effizienz-Rechner --- */

/* Flexbox-Container für nebeneinander liegende Felder */
.gr-flex-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px; /* Abstand zwischen den Feldern */
    margin-bottom: 15px;
}

/* Styling der Ergebnis-Box */
.gr-se-ergebnis-box {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}
.gr-se-ergebnis-wert {
    font-size: 48px;
    font-weight: bold;
    color: #008485; /* Hauptfarbe Ihrer Seite */
    flex-shrink: 0; /* Verhindert, dass die Zahl schrumpft */
}
.gr-se-ergebnis-text strong {
    display: block;
    font-size: 20px;
    color: #333;
}
.gr-se-ergebnis-text span {
    font-size: 16px;
    color: #555;
}

/* Styling für die Fortschrittsanzeige */
.gr-se-progress-bar-container {
    background-color: #e0e0e0;
    border-radius: 10px;
    height: 20px;
    overflow: hidden;
}
.gr-se-progress-bar {
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease-in-out, background-color 0.5s ease-in-out;
}

/* Farb-Varianten für die Fortschrittsanzeige */
.gr-se-progress-bar.gut { background-color: #28a745; } /* Grün */
.gr-se-progress-bar.mittel { background-color: #fd7e14; } /* Orange */
.gr-se-progress-bar.schlecht { background-color: #dc3545; } /* Rot */


/* --- Ergänzungen für BMI- & BMR-Rechner --- */

/* Radio-Buttons für Geschlechtswahl */
.gr-radio-group {
    display: flex;
    gap: 15px;
    align-items: center;
    padding-top: 5px;
}
.gr-radio-group label {
    font-weight: normal !important;
    display: flex;
    align-items: center;
    gap: 5px;
}
/* Container für die beiden Ergebnis-Sektionen (BMI und Kalorien) */
.gr-ergebnis-sektion {
    flex: 1;
    min-width: 300px;
}
.gr-ergebnis-sektion h3 {
    margin-top: 0;
    color: #008485; /* Hauptfarbe */
}
/* Tacho-Anzeige für BMI */
.gr-bmi-gauge-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 220px;
}
.gr-bmi-gauge {
    width: 200px;
    height: 100px;
    border-radius: 100px 100px 0 0;
    position: relative;
    overflow: hidden;
    background: linear-gradient(to right, #3498db, #2ecc71 50%, #f1c40f 75%, #e74c3c); /* Farbverlauf für die Skala */
}
.gr-bmi-pointer {
    width: 2px;
    height: 80px;
    background: #333;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform-origin: bottom center;
    transition: transform 0.5s ease-in-out;
}
.gr-bmi-wert {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 28px;
    font-weight: bold;
    color: #333;
    background: #f9f9f9;
    padding: 2px 8px;
    border-radius: 5px;
}
.gr-bmi-bewertung-text {
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    margin-top: 10px;
    transition: color 0.5s;
}
/* Farb-Klassen für BMI-Bewertung */
.normalgewicht { color: #28a745; }
.untergewicht { color: #3498db; }
.uebergewicht { color: #fd7e14; }
.adipositas { color: #dc3545; }

/* Boxen für Kalorien-Ziele */
.gr-kalorien-boxen {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}
.gr-kalorien-box {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background: #fff;
    border-left-width: 5px;
}
.gr-kalorien-box h4 {
    margin: 0 0 5px 0;
}
.gr-kalorien-box span {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}
.gr-kalorien-box small {
    display: block;
    color: #777;
    margin-top: 3px;
}
/* Farben für die Ziele */
.ziel-abnehmen { border-left-color: #3498db; } /* Blau */
.ziel-halten { border-left-color: #28a745; } /* Grün */
.ziel-zunehmen { border-left-color: #fd7e14; } /* Orange */

/* --- Ergänzungen für Schlafphasen-Rechner --- */

.gr-sp-info-text {
    font-size: 14px;
    color: #777;
    margin-top: 5px;
}

#gr-sp-ergebnis {
    margin-top: 30px;
}

#gr-sp-ergebnis h3 {
    color: #333;
    margin-bottom: 15px;
}

.gr-sp-ergebnis-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

.gr-sp-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gr-sp-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.gr-sp-card.empfohlen {
    border: 2px solid #008485; /* Hauptfarbe Ihrer Seite */
    background-color: #f0f8ff;
    position: relative;
}

.gr-sp-card.empfohlen::after {
    content: 'Empfehlung';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #008485;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: bold;
}

.gr-sp-zeit {
    font-size: 28px;
    font-weight: bold;
    color: #333;
}

.gr-sp-details {
    margin-top: 5px;
    font-size: 14px;
    color: #555;
}

.gr-sp-details span {
    font-size: 12px;
    color: #777;
}

/* --- Ergänzungen für Diabetes-Risiko-Test --- */

/* Fortschrittsanzeige */
.gr-quiz-progress-container {
    background-color: #e0e0e0;
    border-radius: 5px;
    height: 10px;
    overflow: hidden;
    margin-bottom: 5px;
}
.gr-quiz-progress-bar {
    background-color: #008485;
    height: 100%;
    width: 0%;
    transition: width 0.3s ease-in-out;
}
.gr-quiz-fortschritt-text {
    font-size: 14px;
    color: #777;
    text-align: right;
    margin-bottom: 20px;
}

/* Fragen & Antworten */
#gr-quiz-frage-titel {
    font-size: 22px;
    color: #333;
    margin-bottom: 20px;
}
.gr-quiz-antworten-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}
.gr-quiz-btn-antwort {
    width: 100%;
    padding: 15px;
    background: #fff;
    border: 1px solid #ccc;
    color: #333;
    border-radius: 8px;
    font-size: 16px;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}
.gr-quiz-btn-antwort:hover {
    color: #333;
    background-color: #f0f8ff;
    border-color: #008485;
}

/* Navigation */
.gr-quiz-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    margin-bottom: 0;
    min-height: 3rem;
    /* Kein fixes height: Button darf nicht aus dem Rechner herausragen */
    height: auto;
}
.gr-quiz-btn-nav {
    background: none;
    border: none;
    color: #008485;
    font-weight: bold;
    cursor: pointer;
    padding: 0.5rem 0.25rem;
    visibility: hidden; /* JS setzt sichtbar ab Frage 2 */
}

/* Ergebnis-Anzeige */
.gr-quiz-gauge {
    width: 200px;
    height: 100px;
    border-radius: 100px 100px 0 0;
    position: relative;
    overflow: hidden;
    background: linear-gradient(to right, #28a745, #fd7e14 65%, #dc3545);
}
.gr-quiz-wert {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    background: #f9f9f9;
    padding: 5px 10px;
}
.gr-quiz-wert span {
    font-size: 32px;
    font-weight: bold;
    color: #333;
}
.gr-quiz-wert small {
    display: block;
    font-size: 14px;
    color: #777;
}
.gr-quiz-ergebnis-text {
    text-align: center;
    margin-top: 15px;
}
.gr-quiz-ergebnis-text h3 {
    margin-bottom: 10px;
    font-size: 24px;
}
/* Farb-Klassen für Ergebnis-Titel */
.gering, .leicht { color: #28a745; }
.maessig { color: #fd7e14; }
.hoch, .sehrhoch { color: #dc3545; }

/* Start-/Weiter-Button */
.gr-quiz-btn-start {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    background-color: #008485; /* Hauptfarbe */
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin: 0;
    margin-left: auto;
    float: none !important;
    position: static;
    transition: background-color 0.2s;
}
.gr-quiz-btn-start:hover {
    background-color: #006a6b; /* Etwas dunkler beim Hover */
    color: #fff;
}

/* Header innerhalb des Tests */
.gr-quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
	
}
.gr-quiz-header-title {
    margin: 0;
	font-size: 1.5em;
	font-weight: 900;
}

.gr-quiz-fortschritt-text {
    margin-bottom: 0; /* Margin entfernen, da jetzt im Header */
    text-align: right;
}
.gr-quiz-progress-container {
    margin-bottom: 25px; /* Etwas mehr Abstand nach der Bar */
}

/* (Navigation-Regeln oben gebündelt – kein fixes height mehr) */

/* --- Ergänzungen für Schlafbedarf-Rechner --- */

/* Schlafbedarf: Frage-Titel */
#gr-sb-frage-titel {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 15px;
}
.gr-sb-antworten-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}
.gr-sb-btn-antwort {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    height: 120px;
    background: #fff;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, transform 0.2s;
}
.gr-sb-btn-antwort:hover {
    color: #333;
    background-color: #f0f8ff;
    border-color: #008485;
    transform: translateY(-5px);
}
.gr-sb-icon {
    font-size: 36px;
}

/* Ergebnis-Visualisierung */
.gr-sb-ergebnis-visual {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
}
@property --p{
  syntax: '<number>';
  inherits: true;
  initial-value: 0;
}
.gr-sb-ergebnis-ring {
    --w: 180px; /* Breite des Rings */
    --b: 15px;  /* Dicke des Rings */
    --c: #008485; /* Hauptfarbe */
    width: var(--w);
    aspect-ratio: 1;
    position: relative;
    display: inline-grid;
    place-content: center;
    font-size: 25px;
    font-weight: bold;
    transition: --p 1s ease-in-out;
}
.gr-sb-ergebnis-ring::before {
    content: "";
    position: absolute;
    border-radius: 50%;
    inset: 0;
    background: conic-gradient(var(--c) calc(var(--p) * 1%), #e0e0e0 0);
    -webkit-mask: radial-gradient(farthest-side, #0000 transparent, #000 calc(100% - var(--b)));
            mask: radial-gradient(farthest-side, #0000 transparent, #000 calc(100% - var(--b)));
}
.gr-sb-ergebnis-wert span {
    font-weight: bold;
}
.gr-sb-ergebnis-wert #gr-sb-minuten {
    font-size: 0.8em;
    color: #555;
}
.gr-sb-ergebnis-text {
    text-align: center;
}
.gr-sb-ergebnis-text h3 {
    margin-top: 25px;
    color: #333;
}

/* --- Ergänzungen für Schlafbedarf-Rechner V2.1 --- */

.gr-sb-cta-box {
    text-align: center;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-top: 25px;
    background-color: #fafafa;
}

.gr-sb-cta-box h3 {
    margin-top: 0;
    color: #333;
}

.gr-sb-cta-box p {
    margin-bottom: 20px;
}

    .if-hinweis {
        background-color: #f0f4f8;
        border: 1px solid #dce6f0;
        border-radius: 10px;
        padding: 25px 30px;
        text-align: center;
        margin: 2em 0;
    }
    .if-hinweis h3 {
        color: #2c3e50;
        margin-top: 0;
        font-size: 1.4em;
    }
    .if-hinweis p {
        color: #34495e;
        font-size: 1.1em;
        line-height: 1.6;
    }
    .if-hinweis-button {
        display: inline-block;
        background-color: #16a085;
        color: #ffffff;
        padding: 12px 28px;
        border-radius: 5px;
        text-decoration: none;
        font-weight: bold;
        font-size: 1.1em;
        margin-top: 15px;
        transition: background-color 0.3s ease;
    }
    .if-hinweis-button:hover {
        color: #fff;
		text-decoration: underline;
    }
	
/* --- Premium-Überarbeitung für Nährstoff-Check V3.1 (Layout-Fix) --- */

#gr-nc-frage-untertitel {
    font-size: 14px;
    color: #777;
    margin-top: -15px;
    margin-bottom: 20px;
}

/* KORREKTUR: Erzwingt das Grid-Layout für die Antwort-Kacheln */
#gr-nc-antworten-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
}

/* Styling der einzelnen Kacheln (jetzt mit eigener Klasse) */
.gr-nc-btn-antwort {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    min-height: 100px; /* Gibt den Kacheln eine Mindesthöhe */
    background: #fff;
    border: 1px solid #ccc;
    color: #333;
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, transform 0.2s;
}
.gr-nc-btn-antwort:hover {
    color: #333;
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.gr-nc-btn-antwort.selected {
    border-color: #008485;
    background-color: #e6f3f3;
    border-width: 2px;
}
/* Ende Layout-Fix */

/* Ergebnis-Akkordeon V3 */
#gr-nc-ergebnis-container {
    margin-top: 25px;
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.gr-nc-accordion-wrapper {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s;
}
.gr-nc-accordion-wrapper:has(.active) {
    box-shadow: 0 4px 15px rgba(0, 132, 133, 0.1);
}
.gr-nc-accordion {
    background-color: white;
    color: #333;
    cursor: pointer;
    padding: 15px 20px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 18px;
    transition: background-color 0.4s ease;
    display: flex;
    align-items: center;
}
.gr-nc-accordion.active {
    background-color: #f9f9f9;
}
.gr-nc-accordion-icon { font-size: 20px; margin-right: 12px; }
.gr-nc-accordion-rank { font-weight: bold; color: #008485; margin-right: 10px; }
.gr-nc-accordion-title { font-weight: 600; }
.gr-nc-accordion::after {
    content: '+';
    font-family: 'Courier New', Courier, monospace;
    color: #008485;
    font-weight: bold;
    font-size: 24px;
    margin-left: auto;
    transition: transform 0.3s ease;
}
.gr-nc-accordion.active::after {
    content: "-";
    transform: rotate(180deg);
}
.gr-nc-panel {
    padding: 0 20px;
    background-color: white;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}
.gr-nc-detail-section {
    padding: 15px 0;
    border-top: 1px solid #f1f1f1;
}
.gr-nc-detail-section strong { display: block; margin-bottom: 8px; font-size: 1em; color: #333; }
.gr-nc-detail-section ul { list-style-type: '✓ '; padding-left: 20px; margin: 0; line-height: 1.7; }
.gr-nc-detail-section p { margin: 0; line-height: 1.6; }

/* Relevanz-Score-Balken */
.gr-nc-score-bar-container { height: 12px; width: 100%; background-color: #e0e0e0; border-radius: 6px; overflow: hidden; }
.gr-nc-score-bar { height: 100%; border-radius: 6px; background: linear-gradient(90deg, #00c6ff, #008485); transition: width 0.8s ease-in-out; }
/* Tipp-Sektion hervorheben */
.gr-nc-tipp-section { background-color: #e6f3f3; padding: 15px; margin: 15px -20px -1px -20px; border-top: 2px solid #008485; }

/* Styling für Nährstoff-Check Antwort-Buttons */
.gr-nc-btn-antwort {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    min-height: 100px;
    background: #fff;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, transform 0.2s;
}

.gr-nc-btn-antwort:hover {
    color: #333;
    background-color: #f0f8ff;
    border-color: #008485;
    transform: translateY(-5px);
}

.gr-nc-btn-antwort.selected {
    border-color: #008485;
    background-color: #e6f3f3;
    border-width: 2px;
}
/* --- Styling für "Die Reise der Nahrung durch den Darm" --- */

:root {
    --primary-color: #028383;
    --secondary-color: #00c6ff;
    --accent-color: #ffcc33;
    --background-color: #f0f8ff;
    --text-color: #333;
    --light-gray: #f1f1f1;
    --dark-gray: #555;
}

#darm-reise-container {
    background: linear-gradient(135deg, var(--background-color), #ffffff);
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 30px;
    font-family: sans-serif;
    max-width: 100%;
    margin: 20px auto;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.darm-reise-header h2 {
    color: var(--primary-color);
    margin-top: 0;
}

.darm-reise-header p {
    color: var(--dark-gray);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto 20px;
}

.darm-reise-visual {
    position: relative;
}

#digestive-tract {
    stroke: var(--primary-color);
    stroke-width: 5;
    fill: none;
}

.station {
    position: absolute;
    width: 120px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.station:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 198, 255, 0.3);
}

.station.magen { top: 100px; left: 150px; }
.station.duenn-darm { top: 300px; left: 400px; }
.station.dick-darm { top: 450px; left: 200px; }

#info-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#info-popup.hidden {
    display: none;
}

.info-popup-content {
    background-color: white;
    padding: 40px;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation: popup-fade-in 0.3s ease-out;
}

@keyframes popup-fade-in {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.close-popup {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: var(--dark-gray);
}

#popup-title {
    color: var(--primary-color);
    margin-top: 0;
}

#popup-text {
    color: var(--text-color);
    line-height: 1.7;
}

#popup-diagram {
    margin-top: 20px;
}

/* Animation for the food path */
#food-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: draw-path 5s linear forwards;
}

@keyframes draw-path {
    to {
        stroke-dashoffset: 0;
    }
}
/* --- Styling für Diagramme im Info-Popup --- */

.chart-container {
    margin-top: 20px;
}

.chart-container h4 {
    text-align: center;
    color: var(--dark-gray);
    margin-bottom: 10px;
}

.chart {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.bar-wrapper {
    display: flex;
    align-items: center;
}

.bar {
    background-color: var(--secondary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    white-space: nowrap;
    font-size: 14px;
}
/* --- Responsive Design --- */

@media (max-width: 768px) {
    .darm-reise-visual {
        transform: scale(0.8);
        transform-origin: top center;
        height: 480px; /* Adjust height to prevent overlap */
    }

    .station {
        width: 100px;
        height: 40px;
        font-size: 14px;
    }

    .station.magen { top: 80px; left: 50px; }
    .station.duenn-darm { top: 240px; left: 200px; }
    .station.dick-darm { top: 380px; left: 80px; }

    .info-popup-content {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    #darm-reise-container {
        padding: 20px;
    }

    .darm-reise-visual {
        transform: scale(0.6);
        height: 360px;
    }

    .station.magen { top: 60px; left: 20px; }
    .station.duenn-darm { top: 180px; left: 150px; }
    .station.dick-darm { top: 300px; left: 40px; }
}