/* ------------------- */
/* DESIGN SYSTEM       */
/* ------------------- */
:root {
    --primary: #ea580c;
    --secondary: #4f46e5;
    --accent: #fbbf24;
    --background: #fffbf0;
    --surface: #fff7ed;
    --card: #ffffff;
    --text: #292524;
    --muted: #78716c;
    --success: #16a34a;
    --danger: #dc2626;
    --fun-pink: #ec4899;
    --fun-teal: #14b8a6;
    --border-color: #f5f5f4;

    --font-headings: 'Baloo 2', cursive;
    --font-body: 'Quicksand', sans-serif;

    --border-radius-card: 24px;
    --border-radius-button: 50px;
    --border-radius-image: 16px;
}

/* ------------------- */
/* RESET & BASE STYLES */
/* ------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text);
    background-color: var(--background);
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-headings);
    line-height: 1.2;
    font-weight: 700;
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
    color: var(--primary);
}

h2 {
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary);
}

img {
    max-width: 100%;
    display: block;
}

/* ------------------- */
/* UTILITY & LAYOUT    */
/* ------------------- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

section {
    padding: 5rem 0;
    position: relative;
}

.blob {
    position: absolute;
    z-index: -1;
    opacity: 0.15;
    animation: blob-move 20s infinite alternate;
}
.blob1 { width: 400px; height: 400px; top: -100px; left: -150px; background: var(--accent); border-radius: 41% 59% 48% 52% / 47% 30% 70% 53%;}
.blob2 { width: 350px; height: 350px; bottom: 0; right: -100px; background: var(--fun-teal); border-radius: 68% 32% 58% 42% / 30% 71% 29% 70%; animation-duration: 15s;}
.blob3 { width: 300px; height: 300px; top: 50px; right: -150px; background: var(--fun-pink); border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; animation-duration: 25s;}
.blob4 { width: 450px; height: 450px; top: 10%; left: -200px; background: var(--primary); border-radius: 73% 27% 49% 51% / 51% 60% 40% 49%; animation-duration: 18s;}

@keyframes blob-move {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(20px, -30px) scale(1.1); }
}

.wavy-divider {
    color: var(--surface);
    line-height: 0;
}
.wavy-divider.flip { transform: scaleY(-1); }
.wavy-divider.top { transform: scaleY(-1); position: absolute; top: 0; left: 0; width: 100%;}
.wavy-divider svg { width: 100%; height: auto; }

/* ------------------- */
/* BUTTONS             */
/* ------------------- */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: var(--border-radius-button);
    font-family: var(--font-headings);
    font-weight: 700;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}
.btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.btn-primary {
    background-color: var(--primary);
    color: white;
}
.btn-primary:hover {
    background-color: #c2410c;
}
.btn-secondary {
    background-color: transparent;
    color: var(--secondary);
    border-color: var(--secondary);
}
.btn-secondary:hover {
    background-color: var(--secondary);
    color: white;
}

/* ------------------- */
/* HEADER              */
/* ------------------- */
.site-header {
    background-color: var(--background);
    padding: 1rem 0;
    border-bottom: 2px solid var(--surface);
}
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-family: var(--font-headings);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text);
}
.logo:hover { color: var(--primary); }
.site-header nav ul {
    list-style: none;
    display: flex;
    gap: 0.5rem;
}
.site-header nav a {
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-button);
    transition: all 0.3s ease;
}
.site-header nav a:hover {
    background-color: var(--surface);
    color: var(--primary);
}
.cta-header {
    padding: 0.6rem 1.5rem;
}

/* ------------------- */
/* HERO SECTION (1)    */
/* ------------------- */
.hero-section {
    text-align: center;
    padding-top: 4rem;
    overflow: hidden;
}
.hero-content {
    max-width: 800px;
}
.hero-section .subtitle {
    font-size: 1.2rem;
    color: var(--muted);
    max-width: 650px;
    margin: 1.5rem auto 2rem;
}
.hero-cta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}
.motivation-quote {
    background-color: var(--surface);
    border-left: 6px solid var(--accent);
    padding: 1.5rem;
    border-radius: var(--border-radius-card);
    display: inline-block;
    margin: 0 auto 2rem;
    font-style: italic;
    font-size: 1.1rem;
}
.motivation-quote span {
    display: block;
    text-align: right;
    font-style: normal;
    font-weight: 700;
    margin-top: 0.5rem;
    color: var(--muted);
}
.hero-image {
    border-radius: var(--border-radius-image);
    margin-top: 2rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

/* ------------------- */
/* FAKTEN SECTION (2)  */
/* ------------------- */
.facts-section { background-color: var(--surface); }
.facts-section p { max-width: 800px; margin-left: auto; margin-right: auto; text-align: center;}
.facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}
.fact-card {
    background-color: var(--card);
    padding: 2rem;
    border-radius: var(--border-radius-card);
    text-align: center;
    border-top: 6px solid;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}
.fact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.07);
}
.fact-card:nth-child(1) { border-color: var(--primary); }
.fact-card:nth-child(2) { border-color: var(--secondary); }
.fact-card:nth-child(3) { border-color: var(--accent); }
.fact-card:nth-child(4) { border-color: var(--success); }
.fact-number {
    font-family: var(--font-headings);
    font-size: 2.5rem;
    font-weight: 800;
    display: block;
    margin-bottom: 0.5rem;
}
.fact-text {
    color: var(--muted);
    font-size: 1rem;
}

/* ------------------- */
/* SCHULDEN-TYPEN (3)  */
/* ------------------- */
.types-section p { text-align: center; max-width: 800px; margin-left: auto; margin-right: auto; }
.table-container {
    margin-top: 3rem;
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    border-radius: var(--border-radius-card);
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
th, td {
    padding: 1.2rem;
    text-align: left;
}
thead {
    background-color: var(--surface);
    font-family: var(--font-headings);
    font-weight: 700;
}
tbody tr {
    border-bottom: 1px solid var(--border-color);
}
tbody tr:last-child {
    border-bottom: none;
}
tbody tr:hover {
    background-color: #fffdf9;
}

/* ------------------- */
/* STRATEGIE (4 & 5)   */
/* ------------------- */
.strategy-section { overflow: hidden; }
.strategy-section.alt { background-color: var(--surface); }
.strategy-section h2, .strategy-section p {
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}
.steps-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 3rem;
}
.step-item {
    background: var(--card);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-button);
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border: 1px solid var(--surface);
}
.step-item span {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-family: var(--font-headings);
    font-size: 1.5rem;
    font-weight: 700;
}
.step-item:nth-child(2) span { background: var(--secondary); }
.step-item:nth-child(3) span { background: var(--accent); }
.step-item:nth-child(4) span { background: var(--fun-pink); }
.step-item:nth-child(5) span { background: var(--fun-teal); }
.step-item:nth-child(6) span { background: var(--success); }

/* ------------------- */
/* RECHNER (6)         */
/* ------------------- */
.calculator-section { background-color: var(--surface); }
.calculator-card {
    background: var(--card);
    border-radius: var(--border-radius-card);
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    border-left: 6px solid var(--secondary);
}
.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    font-weight: 700;
    display: block;
    margin-bottom: 0.5rem;
}
.form-group input[type="number"] {
    width: 100%;
    padding: 0.8rem;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    font-size: 1.2rem;
    font-family: var(--font-body);
}
.form-group input[type="range"] {
    width: 100%;
}
.form-group span {
    font-family: var(--font-headings);
    font-weight: 700;
    color: var(--primary);
}
.calc-results {
    background-color: var(--surface);
    padding: 2rem;
    border-radius: var(--border-radius-card);
}
.result-box {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px dashed var(--border-color);
}
.result-box:last-of-type { border-bottom: none; }
.result-box span {
    color: var(--muted);
    display: block;
}
.result-box strong {
    font-family: var(--font-headings);
    font-size: 2rem;
    font-weight: 800;
    color: var(--secondary);
}
.progress-motivation {
    margin-top: 1.5rem;
    font-weight: 700;
}
.progress-bar {
    width: 100%;
    height: 20px;
    background: var(--border-color);
    border-radius: var(--border-radius-button);
    margin-top: 0.5rem;
    overflow: hidden;
}
#progressBarInner {
    width: 60%; /* Example */
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    border-radius: var(--border-radius-button);
}

/* ------------------- */
/* UMSCHULDUNG (7)     */
/* ------------------- */
.umschuldung-section p { max-width: 800px; margin-left: auto; margin-right: auto; text-align: center; }
.comparison-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 3rem;
    background-color: var(--card);
    border-radius: var(--border-radius-card);
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.comparison-box > div { padding: 1rem; }
.comparison-box h3 { color: var(--muted); }
.comparison-box div:nth-child(1) { border-left: 6px solid var(--danger); }
.comparison-box div:nth-child(2) { border-left: 6px solid var(--success); }
.comparison-box .saving {
    grid-column: 1 / -1;
    text-align: center;
    background: var(--surface);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
    color: var(--success);
}

/* ------------------- */
/* HAUSHALTSBUCH (8)   */
/* ------------------- */
.haushaltsbuch-section { background-color: var(--surface); }
.haushaltsbuch-section p { text-align: center; max-width: 800px; margin-left: auto; margin-right: auto; }
.budget-example {
    background-color: var(--card);
    padding: 2rem;
    border-radius: var(--border-radius-card);
    margin-top: 2rem;
    border-left: 6px solid var(--fun-teal);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.budget-example p {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}
.budget-example span {
    font-weight: 700;
    color: var(--success);
}
.budget-example .total {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px dashed var(--border-color);
    font-family: var(--font-headings);
    font-weight: 700;
    font-size: 1.3rem;
    text-align: center;
}

/* ------------------- */
/* HILFE (9)           */
/* ------------------- */
.hilfe-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}
.hilfe-section h2 { text-align: left; }
.hilfe-image img {
    border-radius: var(--border-radius-image);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}
.contact-list span {
    display: block;
    margin-top: 0.5rem;
    background: var(--surface);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-button);
}

/* ------------------- */
/* INSOLVENZ (10)      */
/* ------------------- */
.insolvenz-section { background-color: var(--surface); }
.insolvenz-section p { max-width: 800px; margin-left: auto; margin-right: auto; text-align: center; }

/* ------------------- */
/* PSYCHOLOGIE (11)    */
/* ------------------- */
.psychologie-section p { text-align: center; max-width: 800px; margin-left: auto; margin-right: auto; }
.motivation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}
.motivation-card {
    background: var(--card);
    padding: 2rem;
    border-radius: var(--border-radius-card);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}
.motivation-card:hover { transform: scale(1.03); }
.motivation-card:nth-child(1) { border-left: 6px solid var(--secondary); }
.motivation-card:nth-child(2) { border-left: 6px solid var(--accent); }
.motivation-card:nth-child(3) { border-left: 6px solid var(--primary); }
.motivation-card h4 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

/* ------------------- */
/* 50-30-20 REGEL (12) */
/* ------------------- */
.regel-section { background-color: var(--surface); }
.regel-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}
.regel-section h2 { text-align: left; }

@property --p{ syntax: '<number>'; inherits: true; initial-value: 1; }
.pie-chart {
    display: grid;
    place-content: center;
    width: 250px;
    height: 250px;
    position: relative;
    font-family: var(--font-headings);
    margin: 0 auto;
}
.pie-chart .slice {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    animation: p 1s .5s both;
}
.pie-chart .slice:nth-child(1) { --s: calc(var(--p) * 1%); }
.pie-chart .slice:nth-child(2) { --s: calc(var(--p) * 1%); clip-path: inset(0 calc(50 - var(--p))% 0 0); animation-delay: 1.5s; }
.pie-chart .slice:nth-child(3) { --s: calc(var(--p) * 1%); clip-path: inset(0 0 0 calc(50 - var(--p))%); transform: rotate(0.5turn) scale(-1, 1); animation-delay: 2.5s; }
.pie-chart span { position: absolute; font-weight: 700; color: white; }
.pie-chart span:nth-child(1) { top: 35%; left: 60%; }
.pie-chart span:nth-child(2) { top: 60%; left: 0; }
.pie-chart span:nth-child(3) { top: 10%; left: 20%; }
@keyframes p { from{--s:0 100%} }
.slice {
    background: conic-gradient(from -90deg, var(--c) var(--s), #0000 0);
}

/* ------------------- */
/* NOTGROSCHEN (13)    */
/* ------------------- */
.notgroschen-section p { max-width: 800px; margin-left: auto; margin-right: auto; text-align: center; }

/* ------------------- */
/* FAQ (14)            */
/* ------------------- */
.faq-section { background-color: var(--surface); }
.accordion {
    max-width: 800px;
    margin: 2rem auto 0;
}
.accordion details {
    background: var(--card);
    margin-bottom: 1rem;
    border-radius: var(--border-radius-card);
    border-left: 6px solid var(--primary);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.accordion details:nth-child(odd) { border-left-color: var(--secondary); }
.accordion summary {
    padding: 1.5rem;
    cursor: pointer;
    font-family: var(--font-headings);
    font-weight: 600;
    font-size: 1.2rem;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
    content: '＋';
    font-size: 1.8rem;
    color: var(--primary);
    transition: transform 0.3s ease;
}
.accordion details[open] summary::after {
    content: '−';
    transform: rotate(180deg);
}
.accordion p {
    padding: 0 1.5rem 1.5rem;
    margin: 0;
    color: var(--muted);
}

/* ------------------- */
/* KONTAKT (15)        */
/* ------------------- */
.contact-section {
    background-color: var(--surface);
    padding-top: 8rem;
    position: relative;
}
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    background-color: var(--card);
    padding: 3rem;
    border-radius: var(--border-radius-card);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}
.contact-section h2 { text-align: left; }
.contact-info address, .contact-info .opening-hours {
    line-height: 1.8;
    margin-top: 1rem;
}
.contact-form .form-group {
    margin-bottom: 1rem;
}
.contact-form input, .contact-form select, .contact-form textarea {
    width: 100%;
    padding: 0.8rem;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    font-size: 1rem;
    font-family: var(--font-body);
}
.contact-form button { width: 100%; }

/* ------------------- */
/* FOOTER              */
/* ------------------- */
.site-footer-main {
    background: #44403c; /* Stone 700, darker */
    color: #e7e5e4; /* Stone 200 */
    padding-top: 8rem;
    position: relative;
}
.site-footer-main .wavy-divider {
    color: #44403c;
}
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    padding-bottom: 3rem;
}
.footer-content h4 {
    font-size: 1.2rem;
    color: var(--accent);
    margin-bottom: 1rem;
}
.footer-content a {
    color: #d6d3d1; /* Stone 300 */
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    padding: 0.2rem 0;
    border-radius: 8px;
}
.footer-content a:hover {
    color: white;
    background-color: rgba(255,255,255,0.1);
}
.footer-brand .logo {
    color: white;
}
.footer-meta {
    font-size: 0.9rem;
    color: var(--muted);
}

/* ------------------- */
/* RESPONSIVE DESIGN   */
/* ------------------- */
@media (max-width: 1024px) {
    .hilfe-container, .regel-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hilfe-section h2, .regel-section h2 { text-align: center; }
    .hilfe-image { order: -1; }
    .pie-chart { margin: 2rem auto 0; }
}

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    section { padding: 3rem 0; }
    
    .header-container { flex-direction: column; gap: 1rem; }
    .site-header nav ul { flex-wrap: wrap; justify-content: center; }
    
    .hero-cta { flex-direction: column; }
    
    .calculator-card, .comparison-box, .contact-container {
        grid-template-columns: 1fr;
    }
    .calculator-card { gap: 2rem; }
}