@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700&family=Nunito+Sans:wght@400;600&display=swap');

/* --- Secure Horizon Design System --- */
:root {
    --primary: #1e40af;
    --secondary: #7c3aed;
    --accent: #f59e0b;
    --background: #f5f3ff;
    --surface: #ffffff;
    --card: #ede9fe;
    --text: #1e1b4b;
    --muted: #6b7280;
    --font-headings: 'Merriweather', serif;
    --font-body: 'Nunito Sans', sans-serif;
}

/* --- Base & Reset --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.75;
    background-color: var(--background);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

/* --- Layout --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

section {
    padding: 6rem 0;
}

/* --- Typography --- */
h1, h2, h3, h4 {
    font-family: var(--font-headings);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

h1 { font-size: 2.875rem; color: var(--primary); }
h2 { font-size: 2rem; color: var(--text); text-align: center; }
h3 { font-size: 1.375rem; color: var(--secondary); }
h4 { font-size: 1.15rem; color: var(--text); }

p { margin-bottom: 1rem; }
a { color: var(--secondary); text-decoration: none; transition: color 0.3s ease; }
a:hover { color: var(--primary); }
ul { list-style: none; }
strong { color: var(--primary); font-weight: 600; }
.intro-text { max-width: 700px; margin: 0 auto 3rem auto; text-align: center; color: var(--muted); }

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    border-radius: 10px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}
.btn-primary { background-color: var(--primary); color: white; }
.btn-primary:hover { background-color: #1e3a8a; transform: translateY(-3px); }
.btn-secondary { background-color: transparent; color: var(--primary); border-color: var(--primary); }
.btn-secondary:hover { background-color: var(--primary); color: white; transform: translateY(-3px); }
.btn-cta { background-color: var(--accent); color: var(--text); }
.btn-cta:hover { background-color: #d97706; transform: translateY(-3px); }

/* --- Header --- */
.site-header {
    background-color: var(--background);
    padding: 1.5rem 0;
    border-bottom: 1px solid #e0e0e0;
}
.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-headings);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text);
}
.site-header nav ul {
    display: flex;
    gap: 2rem;
}
.site-header nav a {
    color: var(--text);
    font-weight: 600;
    position: relative;
}
.site-header nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary);
    transition: width 0.3s ease;
}
.site-header nav a:hover::after {
    width: 100%;
}

/* --- Section-Specific Styles --- */

/* Hero Section */
.hero-section {
    background: linear-gradient(180deg, var(--background) 0%, var(--surface) 100%);
    padding: 4rem 0;
}
.hero-container {
    display: flex;
    align-items: center;
    gap: 3rem;
}
.hero-text { flex: 1; }
.hero-text .subtitle { font-size: 1.125rem; color: var(--muted); max-width: 550px; }
.hero-buttons { margin-top: 2.5rem; display: flex; gap: 1rem; }
.hero-image { flex: 1; }
.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(30, 27, 75, 0.1);
}

/* Wave Divider */
.wave-divider {
    background-color: var(--surface);
    line-height: 0;
    color: var(--card);
}
.wave-divider svg {
    position: relative;
    display: block;
    width: 100%;
    height: 80px;
}
.wave-divider .shape-fill {
    fill: currentColor;
}

/* Stats Section */
.stats-section { background-color: var(--card); }
.stats-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}
.stat-card {
    background-color: var(--surface);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}
.stat-card::before { /* Card Gradient */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
}
.stat-card h3 { font-size: 3rem; color: var(--primary); margin-bottom: 0.5rem; }
.stat-card p { color: var(--muted); font-size: 1rem; }
.stats-text {
    max-width: 800px;
    margin: 2rem auto 0;
    text-align: center;
}

/* Pillars Section */
.pillars-section { background-color: var(--surface); }
.pillars-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.pillar-card {
    background-color: var(--background);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid #ddd;
}
.pillar-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.pillar-card ul { padding-left: 1.2rem; }
.pillar-card li { margin-bottom: 0.5rem; list-style-type: '☀️'; padding-left: 0.5rem; }

/* Info Section (Riester & Rürup) */
.info-section { background-color: var(--card); }
.info-section-alt { background-color: var(--surface); }
.grid-2, .grid-2-rev { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.grid-2-rev .info-image { order: -1; }
.info-box-container { display: flex; flex-direction: column; gap: 1.5rem; }
.info-box-pros, .info-box-cons {
    background-color: var(--surface);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.info-box-pros ul, .info-box-cons ul { line-height: 2; }
.info-box-pros li { color: #166534; }
.info-box-cons li { color: #991b1b; }
.highlight-box {
    background-color: var(--background);
    padding: 1rem;
    border-left: 4px solid var(--accent);
    margin-top: 1.5rem;
    border-radius: 0 5px 5px 0;
}
.info-image img { width: 100%; border-radius: 10px; }

/* Process Section (bAV) */
.process-section { background-color: var(--card); }
.process-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
    text-align: center;
}
.step {
    background-color: var(--surface);
    padding: 1.5rem;
    border-radius: 10px;
}
.step span {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: var(--secondary);
    color: white;
    border-radius: 50%;
    margin: 0 auto 1rem;
    font-weight: 700;
}
.step h3 { font-size: 1.2rem; }
.example-box {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--surface);
    padding: 2rem;
    border-radius: 10px;
    border-left: 5px solid var(--accent);
}

/* Calculator Section */
.calculator-section { background-color: var(--surface); }
.calculator {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    background-color: var(--card);
    padding: 3rem;
    border-radius: 15px;
}
.calculator-inputs .form-group { margin-bottom: 1.5rem; }
.calculator-inputs label { display: block; font-weight: 600; margin-bottom: 0.5rem; }
.calculator-inputs input[type="range"] { width: 100%; }
.calculator-inputs input, .calculator-inputs select {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-family: var(--font-body);
    font-size: 1rem;
}
.calculator-outputs {
    background-color: var(--surface);
    padding: 2rem;
    border-radius: 10px;
}
.output-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}
.output-item strong { font-size: 1.5rem; color: var(--primary); }
.pension-gap strong { color: #c2410c; }
.required-savings { border-bottom: none; }
.required-savings strong { color: var(--accent); }
.disclaimer { font-size: 0.875rem; color: var(--muted); margin-top: 1.5rem; }

/* Table Section (ETF) */
.table-section { background-color: var(--card); }
.comparison-table { margin-top: 3rem; }
.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--surface);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border-radius: 10px;
    overflow: hidden;
}
.comparison-table th, .comparison-table td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}
.comparison-table thead {
    background-color: var(--primary);
    color: white;
    font-family: var(--font-headings);
}
.comparison-table tbody tr:nth-child(even) { background-color: var(--background); }
.comparison-table td:first-child { font-weight: 600; }

/* KI Section */
.ki-section { background-color: var(--surface); }
.feature-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.feature-card {
    background-color: var(--card);
    padding: 2rem;
    text-align: center;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}
.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--secondary), var(--accent));
}
.feature-icon { font-size: 3rem; margin-bottom: 1rem; }

/* Mistakes Section */
.mistakes-section { background-color: var(--card); }
.mistakes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}
.mistake-card {
    background-color: var(--surface);
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 5px solid #ef4444;
}
.mistake-card h3 { color: #b91c1c; }

/* Timeline Section */
.timeline-section { background-color: var(--surface); }
.timeline {
    position: relative;
    padding: 2rem 0;
}
.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 19px;
    width: 2px;
    height: 100%;
    background: linear-gradient(var(--secondary), var(--primary));
}
.timeline-item {
    position: relative;
    margin-left: 4rem;
    margin-bottom: 3rem;
}
.timeline-dot {
    position: absolute;
    left: -60px;
    top: 5px;
    width: 20px;
    height: 20px;
    background-color: var(--surface);
    border: 4px solid var(--secondary);
    border-radius: 50%;
}
.timeline-item:last-child { margin-bottom: 0; }
.timeline-content h4 { margin-bottom: 0.5rem; }

/* Checklist Section */
.checklist-section { background-color: var(--card); }
.checklist {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--surface);
    padding: 2rem;
    border-radius: 10px;
    columns: 2;
    column-gap: 2rem;
}
.checklist li { margin-bottom: 1rem; }
.checklist label { display: flex; align-items: center; cursor: pointer; }
.checklist input[type="checkbox"] {
    width: 1.25em;
    height: 1.25em;
    margin-right: 0.75rem;
    accent-color: var(--secondary);
}

/* FAQ Section */
.faq-section { background-color: var(--surface); }
.accordion { max-width: 800px; margin: 0 auto; }
.accordion details {
    background: var(--card);
    margin-bottom: 1rem;
    border-radius: 10px;
    border: 1px solid #ddd;
}
.accordion summary {
    padding: 1rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    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.5rem;
    transition: transform 0.3s ease;
}
.accordion details[open] summary::after { transform: rotate(45deg); }
.accordion p {
    padding: 0 1.5rem 1.5rem;
    color: var(--muted);
}

/* Contact Section */
.contact-section { background-color: var(--card); }
.contact-info p { margin-bottom: 0.5rem; }
.map-container { margin-top: 2rem; }
.contact-form {
    background-color: var(--surface);
    padding: 2.5rem;
    border-radius: 10px;
}
.contact-form .form-group { margin-bottom: 1rem; }
.contact-form label { display: block; font-weight: 600; margin-bottom: 0.5rem; }
.contact-form input, .contact-form select, .contact-form textarea {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-family: var(--font-body);
    font-size: 1rem;
}
.form-group-checkbox {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
}
.form-group-checkbox input { width: auto; margin-right: 0.5rem; }
.form-group-checkbox label { margin: 0; font-weight: normal; font-size: 0.9rem; }
.form-group-checkbox a { text-decoration: underline; }
.contact-form button { width: 100%; }

/* --- Footer --- */
.site-footer-main {
    background-color: var(--primary);
    color: #e0e7ff;
    padding-top: 4rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%231d4ed8' fill-opacity='0.4' d='M0,160L48,176C96,192,192,224,288,213.3C384,203,480,149,576,149.3C672,149,768,203,864,218.7C960,235,1056,213,1152,186.7C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: bottom;
    background-size: cover;
}
.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    padding-bottom: 3rem;
}
.footer-col h4 {
    color: white;
    font-family: var(--font-headings);
    margin-bottom: 1rem;
}
.logo-footer {
    font-family: var(--font-headings);
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    display: block;
    margin-bottom: 0.5rem;
}
.slogan { font-style: italic; color: var(--accent); }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col a { color: #e0e7ff; }
.footer-col a:hover { color: white; text-decoration: underline; }
.footer-bottom {
    border-top: 1px solid #3b82f6;
    padding: 1.5rem 0;
    font-size: 0.875rem;
    text-align: center;
}
.footer-bottom .container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* --- Animations --- */
.animate-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .hero-container { flex-direction: column; text-align: center; }
    .hero-text { order: 2; }
    .hero-image { order: 1; }
    .hero-buttons { justify-content: center; }
    .stats-cards, .pillars-container, .feature-cards { grid-template-columns: 1fr; }
    .grid-2, .grid-2-rev { grid-template-columns: 1fr; }
    .grid-2-rev .info-image { order: 1; }
    .info-image { text-align: center; }
    .info-image img { max-width: 400px; }
    .process-steps { grid-template-columns: 1fr 1fr; }
    .calculator { grid-template-columns: 1fr; }
    .footer-container { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.75rem; }
    section { padding: 4rem 0; }
    .site-header .container { flex-direction: column; gap: 1rem; }
    .site-header nav ul { gap: 1rem; flex-wrap: wrap; justify-content: center; }
    .process-steps { grid-template-columns: 1fr; }
    .checklist { columns: 1; }
    .footer-container { grid-template-columns: 1fr; }
    .footer-col { text-align: center; }
}