:root {
    --gruen: #0d3b36;
    --beige: #f5f3ef;
    --gold: #d6b56f;
    --text: #1f2937;
}
* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background-color: var(--beige);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}
header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 3rem;
    background-color: var(--gruen);
    color: white;
    border-bottom: 3px solid #08312e;
}
header h1 {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-family: 'Playfair Display', serif;
    font-size: 1.7rem;
}
header img.logo {
    width: 38px;
    height: 38px;
    border-radius: 6px;
}
nav a {
    color: white;
    margin-left: 1.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}
nav a:hover { opacity: 0.85; }

.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    background-color: var(--beige);
    min-height: 70vh;
}
.hero-content {
    padding: 4rem;
}
.hero-content h2 {
    font-family: 'Playfair Display', serif;
    color: var(--gruen);
    font-size: 2.8rem;
    margin-bottom: 1rem;
}
.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #374151;
}
.btn {
    display: inline-block;
    margin-right: 1rem;
    background-color: var(--gold);
    color: var(--gruen);
    font-weight: 600;
    padding: 0.8rem 1.6rem;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: background 0.3s;
}
.btn:hover {
    background-color: #e7ca86;
}
.btn.secondary {
    background-color: var(--gruen);
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

.btn.secondary:hover {
    background-color: #0a2a27;
}
.hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.features {
    padding: 4rem 3rem;
    background-color: white;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    text-align: center;
}
.feature {
    background-color: var(--beige);
    border-radius: 1rem;
    padding: 2rem;
    transition: transform 0.3s;
}
.feature:hover {
    transform: translateY(-4px);
}
.feature h3 {
    margin-top: 1rem;
    font-family: 'Playfair Display', serif;
    color: var(--gruen);
}

.module {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    padding: 5rem 3rem;
}
.module img {
    width: 100%;
    border-radius: 1rem;
}
.module h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--gruen);
    margin-bottom: 1rem;
}
.module p { margin-bottom: 1.5rem; color: #374151; }

.search-bar {
    display: flex;
    gap: 1rem;
    background-color: var(--gold);
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    align-items: center;
}
.search-bar input {
    flex: 1;
    border: none;
    font-size: 1rem;
    background: none;
    color: var(--text);
}
.search-bar input:focus { outline: none; }
.search-bar button {
    background-color: var(--gold);
    color: var(--gruen);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 0.6rem;
    font-weight: 600;
    cursor: pointer;
}

.filters {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}
.filters button {
    background-color: var(--gold);
    color: var(--gruen);
    border: 1px solid var(--gold);
    border-radius: 999px;
    padding: 0.5rem 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}
.filters button:hover {
    background-color: var(--gold);
    color: var(--gruen);
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2.5rem;
}

.card {
    background-color: var(--gold);
    border-radius: 1rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.thumb {
    background-color: var(--beige);
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--gruen);
}
.card-body {
    padding: 1.2rem;
}
.card-body h3 {
    font-family: 'Playfair Display', serif;
    color: var(--gruen);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}
.card-body p {
    color: #555;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}
.cta {
    display: inline-block;
    background-color: var(--gold);
    color: var(--gruen);
    padding: 0.6rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
}
.cta:hover {
    background-color: #e7c27d;
}

footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--gruen);
    color: white;
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-top: auto;
    width: 100%;
}



/* --- Quiz Styles --- */

.quiz-container {
    max-width: 800px;
    margin: 4rem auto;
    padding: 0 2rem;
    flex: 1 0 auto; /* Wächst, um den Platz zu füllen */
    display: flex;       /* Damit wir die Karte darin zentrieren können */
    flex-direction: column;
    justify-content: center; /* Vertikal zentrieren */
    align-items: center;
}

.quiz-card {
    background-color: white;
    border-radius: 1rem;
    padding: 3rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    text-align: center;
}

.question-count {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 1rem;
    display: block;
}

.quiz-question {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--gruen);
    margin-bottom: 2.5rem;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 3rem;
}

.option-btn {
    background-color: var(--beige);
    border: 2px solid transparent;
    border-radius: 0.8rem;
    padding: 1rem;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    color: var(--gruen);
    transition: all 0.2s ease;
}

.option-btn:hover {
    background-color: #eaddc5;
    transform: translateY(-2px);
}

.option-btn.btn-pp { /* ++ */
    background-color: #d1fae5;
    color: #065f46;
}
.option-btn.btn-p { /* + */
    background-color: #ecfdf5;
    color: #065f46;
}
.option-btn.btn-m { /* - */
    background-color: #fef2f2;
    color: #991b1b;
}
.option-btn.btn-mm { /* -- */
    background-color: #fee2e2;
    color: #991b1b;
}

/* Visual Balance Meter - Vier Themen */
.balance-container {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

/* --- VISUELLE BALKEN (Das Diagramm) --- */

/* Der Container für alle 4 Balken */
.themes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); /* Responsiv: Nebeneinander */
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

/* Ein einzelnes Thema (Kästchen) */
.theme-section {
    background-color: #fafafa;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: transform 0.2s;
}

.theme-section:hover {
    transform: translateY(-2px); /* Kleiner Hover-Effekt */
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Name des Themas (oben) */
.theme-name {
    display: block;
    font-weight: bold;
    font-size: 0.9rem;
    color: var(--gruen);
    margin-bottom: 0.5rem;
}

/* Der graue Hintergrund-Balken */
.theme-bar-bg {
    width: 100%;
    height: 12px; /* Höhe des Balkens */
    background-color: #e5e7eb;
    border-radius: 6px;
    overflow: hidden; /* Wichtig, damit der farbige Balken nicht übersteht */
    position: relative;
}

/* Der farbige Füll-Balken */
.theme-marker {
    height: 100%;
    width: 50%; /* Standardwert, wird per JS geändert */
    transition: width 0.5s cubic-bezier(0.4, 0.0, 0.2, 1); /* Weiche Animation */
}

/* --- FARBEN --- */
/* BAföG = Grün */
.theme-marker.bafög { background-color: #10b981; } 

/* Stipendium = Lila */
.theme-marker.stipendium { background-color: #8b5cf6; } 

/* Kredit = Orange */
.theme-marker.kredit { background-color: #f59e0b; } 

/* Arbeit = Pink */
.theme-marker.arbeit { background-color: #ec4899; } 


/* Prozentzahl (unten) */
.theme-percentage {
    display: block;
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.5rem;
    font-family: monospace; /* Damit die Zahlen nicht wackeln */
}

.balance-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gruen);
    margin-bottom: 0.5rem;
}

.balance-bar-bg {
    width: 100%;
    height: 12px;
    background-color: #e5e7eb;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.balance-marker {
    width: 16px;
    height: 16px;
    background-color: var(--gold);
    border: 2px solid white;
    border-radius: 50%;
    position: absolute;
    top: -2px;
    left: 50%; /* Start in der Mitte */
    transform: translateX(-50%);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: left 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
    z-index: 2;
}

.balance-center-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: rgba(255,255,255,0.5);
    z-index: 1;
}

/* Result styling */
.result-box {
    display: none;
    text-align: center;
}



@media (max-width: 900px) {
    .hero, .module {
        grid-template-columns: 1fr;
    }
    .hero-content { padding: 2rem; text-align: center; }
    .hero-content h2 { font-size: 2rem; }
    .module { padding: 3rem 1.5rem; }
    .btn { display: block; margin: 0.5rem auto; }
}