:root {
    --primary: #002d5a;
    --accent: #e5eef5;
    --border-radius: 8px;
}

body { font-family: 'Roboto', sans-serif; background: #f8f9fa; color: #333; }
.audit-container { max-width: 1000px; margin: 2rem auto; padding: 0 20px; }

.info-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; margin-bottom: 30px; height: 140px;}
.info-card { background: white; border: 2px solid #ddd; border-radius: 12px; padding: 15px; display: flex; align-items: center; height: 140px;}
.border-blue { border-color: #002d5a; }
.border-orange { border-color: #f39c12; }

/* Tacho CSS */
/* Neuer Halbkreis-Tacho */
/* Tacho-Konstruktion: Bleibt garantiert rund */
/* Container für die Karte */
/* Der Container definiert die sichtbare Fläche */
.gauge {
    width: 160px;
    height: 80px; /* Exakt die Hälfte der Breite */
    position: relative;
    overflow: hidden; /* Wichtig: Schneidet die untere Kreishälfte ab */
    margin: 0 auto;
}

/* Hintergrund UND Füllung nutzen diese Basis */
.gauge-body, .gauge-fill {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
}

/* Der leere graue Hintergrund */
.gauge-body {
    background: #e5eef5;
    z-index: 1;
}

/* Der animierte Balken */
.gauge-fill {
    background: #27ae60;
    z-index: 2; /* Liegt direkt über dem Body */
    
    /* Der Drehpunkt muss exakt die Mitte des 160x160 Kreises sein */
    transform-origin: center center; 
    
    /* Startposition: -180 Grad (von unten nach links gedreht, unsichtbar) */
    transform: rotate(-180deg); 
    
    /* Weiche Animation */
    transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1), background 0.8s ease;
}

/* Die weiße Maske, die den "Ring-Look" erzeugt */
/* Der Container definiert die sichtbare Fläche */
.gauge-cover {
    width: 120px;
    height: 120px;
    background: #ffffff;
    border-radius: 50%;
    position: absolute;
    top: 20px; /* Zentrierung im 160px Body */
    left: 20px;
    z-index: 3;
    
    /* Flexbox für die Zentrierung */
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* WICHTIG: Da wir nur die obere Hälfte sehen, schieben wir 
       den Inhalt durch ein Padding nach oben */
    padding-bottom: 40px; 
    box-sizing: border-box;
}

.gauge-percentage {
    font-size: 1.6rem;
    font-weight: 800; /* Extra fett */
    color: #002d5a;
    line-height: 1;
    display: block;
}

.gauge-label {
    margin-top: 5px; /* Abstand zum Tacho verringern */
    font-size: 0.9rem;
    font-weight: bold;
    color: #666;
    text-align: center;
}
/* Quiz Styles */
.shadow-box { background: white; padding: 40px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.btn-opt { padding: 15px 25px; border: none; border-radius: 5px; cursor: pointer; font-weight: bold; transition: 0.3s; margin-right: 10px; }
.btn-ja { background: #27ae60; color: white; }
.btn-nein { background: #c0392b; color: white; }
.btn-neutral { background: #bdc3c7; }

/* Responsive */
@media (max-width: 768px) {
    .info-grid { grid-template-columns: 1fr; }
}
/* Grund-Design */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f4f7f9;
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Sorgt dafür, dass der Footer unten bleibt */
}

.site-container {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Header */
.main-header {
    background-color: #002d5a; /* Dunkelblau für Seriösität */
    color: white;
    padding: 2rem 1rem;
    text-align: center;
}

.logo-text { font-size: 1.5rem; }
.header-titles h1 { font-size: 2.2rem; margin-top: 10px; }
.subtitle { opacity: 0.9; font-weight: 300; }

.header-accent {
    height: 5px;
    background: linear-gradient(90deg, #f39c12, #e67e22); /* Orange Akzentlinie */
}

/* Hauptteil */
.content-wrapper {
    flex: 1;
    width: 100%;
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Footer Design */
.main-footer {
    background-color: #ffffff;
    border-top: 1px solid #dee2e6;
    padding: 30px 0;
    margin-top: auto;
    color: #666;
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Für mobile Ansicht */
}

.footer-info p {
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.disclaimer-text {
    font-size: 0.75rem;
    max-width: 500px;
    color: #999;
}

.footer-links a {
    color: #002d5a;
    text-decoration: none;
    margin-left: 20px;
    font-size: 0.9rem;
    font-weight: bold;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* Mobile Optimierung */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    .footer-links {
        margin-top: 20px;
    }
    .footer-links a {
        margin: 0 10px;
    }
}

/* Spinner Animation */
.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #002d5a;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite; /* Das hier lässt es drehen */
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Verstecken-Klasse */
.hidden { display: none !important; }

/* Sanfter Übergang für Fragen */
#question-view {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hidden {
    display: none !important;
}

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #002d5a;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 40px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.gauge-wrapper { display: flex; flex-direction: column; align-items: center; width: 100%; }
.gauge-text { margin-top: 10px; font-weight: bold; color: #002d5a; }
.icon { font-size: 2rem; margin-right: 15px; }
.card-content { display: flex; align-items: center; }
.btn-submit:hover { background: #003d7a; }


/* Grundstyling für alle Audit-Buttons */
/* Grundform für alle drei Buttons */
/* Den Container für die Buttons flexibel machen */
.options {
    display: flex;
    justify-content: center; /* Zentriert die Buttons */
    gap: 20px;               /* Abstand zwischen den Buttons */
    margin: 30px 0;
    flex-wrap: wrap;         /* Stapelt sie auf dem Handy automatisch */
}

/* Das neue Button-Design: Höher, Breiter, Runder */
.options button.btn-audit {
    /* Größe & Form */
    padding: 20px 40px;      /* Deutlich mehr Innenabstand (Höhe Breite) */
    min-width: 180px;        /* Mindestbreite, damit sie gleichmäßig wirken */
    border-radius: 50px;     /* "Vollrund" (Pillen-Form) - extrem modern */
    
    /* Schrift & Text */
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    
    /* Interaktion */
    cursor: pointer;
    border: none;            /* Rahmen weg für cleanen Look */
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Elastischer Effekt */
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); /* Leichter Basisschatten */
}

/* Der MouseOver-Effekt: Schwebe-Effekt */
.options button.btn-audit:hover {
    transform: translateY(-5px);    /* Schwebt deutlich nach oben */
    box-shadow: 0 10px 20px rgba(0,0,0,0.2); /* Tiefere Schattenwirkung */
}

/* Farben mit leichtem Verlauf für mehr Tiefe */
.btn-ja {
    background: linear-gradient(135deg, #2ecc71, #27ae60) !important;
    color: white !important;
}

.btn-teilweise {
    background: linear-gradient(135deg, #ffffff, #f1f1f1) !important;
    color: #333 !important;
    border: 1px solid #ddd !important;
}

.btn-nein {
    background: linear-gradient(135deg, #e74c3c, #c0392b) !important;
    color: white !important;
}

/* --- RESPONSIVE FIX FÜR SMARTPHONES --- */
@media (max-width: 768px) {
    /* 1. Das Info-Grid (Tacho & Boxen) untereinander stapeln */
    .info-grid {
        display: flex;
        flex-direction: column;
        height: auto !important; /* Feste Höhe von 140px aufheben */
        gap: 15px;
    }

    .info-card {
        height: auto !important;
        padding: 20px;
        width: 100%;
    }

    /* 2. Den Tacho-Bereich korrigieren, damit er nichts verdeckt */
    .gauge-wrapper {
        margin-top: 10px;
        margin-bottom: 10px;
    }

    /* 3. Den Fragen-Bereich nach unten schieben */
    .audit-container {
        margin-top: 1rem;
        padding: 10px;
    }

    #question-view {
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid #eee;
    }

    /* 4. Die Schriftgröße der Fragen auf Mobile anpassen */
    #question-text {
        font-size: 1.3rem !important;
        line-height: 1.3;
    }

    /* 5. Die Buttons schmaler machen, damit sie nicht überlappen */
    .options {
        flex-direction: column; /* Buttons untereinander */
        align-items: center;
    }

    .options button.btn-audit {
        width: 90%; /* Fast volle Breite auf dem Handy */
        margin: 5px 0;
        padding: 15px 20px;
    }
}

/* START: Kacheln ab hier */
/* Container für die 3er-Reihe */
/* --- NEUSTART: Kachel-System --- */

.audit-grid {
    display: flex !important;      /* Erzwingt Flexbox-Layout */
    flex-wrap: wrap !important;    /* Erlaubt Umbruch auf Mobile */
    gap: 10px !important;          /* Exakt 10px Abstand */
    justify-content: center;
    margin: 40px auto;
    max-width: 1100px;
}

.audit-tile {
    display: flex !important;
    flex-direction: column !important;
    /* Berechnet 3 Spalten unter Berücksichtigung der 10px Gap */
    flex: 0 1 calc(33.333% - 10px) !important; 
    min-width: 280px;
    background: #ffffff;
    border: 1px solid #ddd !important;
    border-radius: 15px !important;
    text-decoration: none !important;
    color: #333 !important;
    transition: all 0.3s ease;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* MouseOver mit Schatten */
.audit-tile:hover:not(.disabled) {
    box-shadow: 0 12px 25px rgba(0,0,0,0.15) !important;
    transform: translateY(-5px);
    border-color: #002d5a !important;
}

/* Bild-Container: Erzwingt gleiche Höhe und Ausrichtung */
.tile-image {
    width: 100%;
    height: 180px !important;
    overflow: hidden;
}

.tile-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; /* Verhindert Verzerrung */
}

/* Inhalts-Bereich: Gleiche Höhe für Titel und Text */
.tile-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Füllt die Kachel nach unten aus */
}

.tile-content h3 {
    margin: 0 0 15px 0 !important;
    color: #002d5a;
    font-size: 1.2rem;
    min-height: 2.8em; /* Platzhalter für 2 Zeilen Titel */
    display: flex;
    align-items: center; /* Zentriert Titel vertikal in ihrem Bereich */
}

.tile-content p {
    margin: 0 !important;
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
}

/* Deaktiviert-Zustand */
.audit-tile.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(1);
}

/* --- Responsive Anpassung --- */
@media (max-width: 992px) {
    .audit-tile {
        flex: 0 1 calc(50% - 10px) !important; /* 2 Spalten auf Tablet */
    }
}

@media (max-width: 650px) {
    .audit-tile {
        flex: 0 1 100% !important; /* 1 Spalte auf Smartphone */
    }
}
/* END Kacheln */