/* --- Design System: Classic Trust --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Source+Sans+Pro:wght@400;600&display=swap');

:root {
    --primary: #1e3a5f;      /* Tiefes Marineblau */
    --secondary: #c9a227;    /* Gold */
    --accent: #2563eb;       /* Königsblau */
    --background: #f8fafc;   /* Sehr helles Grau */
    --surface: #ffffff;
    --card: #f1f5f9;
    --text: #0f172a;
    --muted: #64748b;
    --border-color: #e2e8f0;

    --font-headings: 'Playfair Display', serif;
    --font-body: 'Source Sans Pro', sans-serif;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

/* --- Global Styles & Resets --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 100%;
}

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

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

h1 { font-size: 3.25rem; }
h2 { font-size: 2.25rem; position: relative; padding-bottom: 0.75rem; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; }

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--secondary);
}
.text-center h2::after {
    left: 50%;
    transform: translateX(-50%);
}

p { margin-bottom: 1rem; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Layout --- */
.container {
    width: 90%;
    max-width: 1140px;
    margin-left: auto;
    margin-right: auto;
}

.content-section {
    padding: 5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.bg-background { background-color: var(--background); }
.bg-card { background-color: var(--card); }

/* --- Header --- */
.site-header {
    background-color: var(--surface);
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-headings);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary);
    text-decoration: none;
}
.logo-icon { color: var(--secondary); }
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}
.main-nav a {
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
    position: relative;
    padding-bottom: 0.25rem;
}
.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--secondary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}
.main-nav a:hover::after {
    transform: scaleX(1);
}
.header-contact { display: flex; align-items: center; gap: 1.5rem; }
.phone-number { font-weight: 600; color: var(--muted); }
.mobile-nav-toggle { display: none; }

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--secondary);
    transform: translateX(-101%);
    transition: transform 0.3s ease;
}
.btn:hover::after { transform: translateX(0); }
.btn-primary { background-color: var(--primary); color: white; }
.btn-primary:hover { background-color: #162c4a; }
.btn-secondary { background-color: var(--secondary); color: var(--primary); }
.btn-secondary:hover { background-color: #b38e1f; }
.btn-secondary::after { background-color: var(--primary); }

/* --- Sektion 1: Hero --- */
.hero-section {
    position: relative;
    height: 80vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}
.hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    z-index: -2;
}
.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(30, 58, 95, 0.75);
    z-index: -1;
}
.hero-content h1 { font-size: 3.5rem; margin-bottom: 1.5rem; }
.hero-content .subtitle {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

/* --- Sektion 2: Stats Bar --- */
.stats-bar {
    background-color: var(--primary);
    color: white;
    padding: 2rem 0;
}
.stats-container {
    display: flex;
    justify-content: space-around;
    text-align: center;
}
.stat-item {
    display: flex;
    flex-direction: column;
}
.stat-number {
    font-family: var(--font-headings);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary);
}
.stat-label {
    font-size: 0.9rem;
    max-width: 150px;
}

/* --- Sektion 3: Drei Säulen --- */
.intro-text { max-width: 800px; margin: 2rem auto 3rem; }
.pillars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.pillar-card {
    background-color: var(--card);
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
    padding: 2rem;
    text-align: center;
    border: 1px solid var(--border-color);
}
.pillar-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 1rem;
}
.pillar-icon { font-size: 2.5rem; color: var(--secondary); margin-bottom: 0.5rem; }
.pillar-card h3 { color: var(--primary); }

/* --- Sektion 4 & 8: Two Column Layout --- */
.two-column-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}
.two-column-layout.reverse { grid-template-columns: 1fr 1fr; }
.two-column-layout.reverse .text-content { grid-column: 2; }
.two-column-layout.reverse .image-content { grid-column: 1; }

.image-content img {
    width: 100%;
    border-radius: 4px;
    box-shadow: var(--shadow-md);
}
.text-content h2::after { left: 0; transform: none; }

/* --- Sektion 5: ETF-Sparpläne --- */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    text-align: left;
}
.benefit-box {
    background-color: var(--surface);
    padding: 2rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}
.benefit-icon { font-size: 2rem; color: var(--secondary); }
.benefit-box h4 { margin-top: 1rem; color: var(--primary); }

/* --- Sektion 6: Rentenrechner --- */
.calculator-visual {
    background: var(--surface);
    padding: 2rem;
    border-radius: 4px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    max-width: 800px;
    margin: 2rem auto;
}
.calculator-visual table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
}
.calculator-visual th, .calculator-visual td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}
.calculator-visual th {
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--muted);
}
.calculator-visual td { font-size: 1.1rem; }
.calculator-visual .gap {
    font-weight: 700;
    color: var(--primary);
    background-color: #e0f2fe;
}
.muted-text { color: var(--muted); font-size: 0.9rem; margin-top: 1rem; }

/* --- Sektion 7: Timeline --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 3rem auto 0;
}
.timeline::after {
    content: '';
    position: absolute;
    width: 3px;
    background: var(--border-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1.5px;
}
.timeline-item {
    padding: 1rem 3rem;
    position: relative;
    width: 50%;
}
.timeline-item:nth-child(odd) { left: 0; }
.timeline-item:nth-child(even) { left: 50%; }
.timeline-item::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    right: -8px;
    background-color: var(--surface);
    border: 3px solid var(--secondary);
    top: 2rem;
    border-radius: 50%;
    z-index: 1;
}
.timeline-item:nth-child(even)::after { left: -8px; }
.timeline-content {
    padding: 1.5rem;
    background: var(--card);
    position: relative;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}
.timeline-item:nth-child(odd) .timeline-content { text-align: right; }

/* --- Sektion 9: Fehler vermeiden --- */
.error-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}
.error-card {
    background-color: var(--surface);
    border-left: 5px solid #ef4444;
    padding: 1.5rem;
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
}
.error-card h4 { color: #b91c1c; }

/* --- Sektion 10: FAQ --- */
.accordion { max-width: 800px; margin: 2rem auto 0; }
.accordion-item {
    border-bottom: 1px solid var(--border-color);
}
.accordion-header {
    width: 100%;
    background: transparent;
    border: none;
    text-align: left;
    padding: 1.5rem 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    color: var(--primary);
}
.accordion-header::after {
    content: '+';
    position: absolute;
    right: 1rem;
    font-size: 1.5rem;
    color: var(--secondary);
    transition: transform 0.3s ease;
}
.accordion-item.active .accordion-header::after { transform: rotate(45deg); }
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}
.accordion-content p {
    padding: 0 1rem 1.5rem;
    margin: 0;
}

/* --- Sektion 11: Kontakt --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
}
.contact-info p { line-height: 1.8; }
.contact-info strong { color: var(--primary); }
.map-container { margin-top: 2rem; }
.form-group { margin-bottom: 1.5rem; }
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}
.form-group-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.form-group-checkbox input { width: auto; }

/* --- Sektion 12: CTA Banner --- */
.cta-banner {
    background-color: var(--primary);
    padding: 4rem 0;
    color: white;
}
.cta-banner h2 { color: var(--secondary); }
.cta-banner h2::after { display: none; }

/* --- Sektion 13: Footer --- */
.site-footer-main {
    background-color: var(--primary);
    color: #cbd5e1;
    font-size: 0.95rem;
    padding-top: 4rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    padding-bottom: 3rem;
}
.footer-col h4 { color: var(--secondary); font-size: 1.1rem; }
.footer-col ul { list-style: none; }
.footer-col a { color: #cbd5e1; }
.footer-col a:hover { color: white; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col .logo { color: white; }
.footer-bottom {
    border-top: 1px solid #334155;
    padding: 1.5rem 0;
}
.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.disclaimer { font-size: 0.8rem; color: var(--muted); margin: 0; }

/* --- Animation --- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
.hero-content .fade-in:nth-child(1) { transition-delay: 0.2s; }
.hero-content .fade-in:nth-child(2) { transition-delay: 0.4s; }
.hero-content .fade-in:nth-child(3) { transition-delay: 0.6s; }
.stats-container .fade-in:nth-child(1) { transition-delay: 0.1s; }
.stats-container .fade-in:nth-child(2) { transition-delay: 0.2s; }
.stats-container .fade-in:nth-child(3) { transition-delay: 0.3s; }
.stats-container .fade-in:nth-child(4) { transition-delay: 0.4s; }


/* --- Responsive --- */
@media (max-width: 1024px) {
    h1 { font-size: 2.75rem; }
    h2 { font-size: 2rem; }
    .header-contact .phone-number { display: none; }
    .pillars-grid { grid-template-columns: 1fr; }
    .two-column-layout, .two-column-layout.reverse { grid-template-columns: 1fr; }
    .two-column-layout.reverse .text-content { grid-row: 1; }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    html { font-size: 93.75%; }
    h1 { font-size: 2.25rem; }
    .hero-section { height: auto; padding: 6rem 0; }

    .main-nav {
        display: none;
        position: absolute;
        top: 100px; /* Adjust based on header height */
        left: 0;
        width: 100%;
        background-color: var(--surface);
        flex-direction: column;
        text-align: center;
        box-shadow: var(--shadow-md);
    }
    .main-nav.active { display: flex; }
    .main-nav ul { flex-direction: column; gap: 0; width: 100%;}
    .main-nav li { border-bottom: 1px solid var(--border-color); width: 100%; }
    .main-nav a { display: block; padding: 1rem; }
    
    .mobile-nav-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 1000;
    }
    .mobile-nav-toggle .bar {
        width: 25px;
        height: 3px;
        background-color: var(--primary);
        transition: all 0.3s ease;
    }
    .mobile-nav-toggle.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .mobile-nav-toggle.active .bar:nth-child(2) { opacity: 0; }
    .mobile-nav-toggle.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .stats-container { flex-direction: column; gap: 2rem; }
    .benefits-grid, .error-grid { grid-template-columns: 1fr; }
    
    .timeline::after { left: 1rem; }
    .timeline-item { width: 100%; padding-left: 3rem; padding-right: 1rem; }
    .timeline-item:nth-child(even) { left: 0; }
    .timeline-item::after { left: calc(1rem - 8px); }
    .timeline-item:nth-child(odd) .timeline-content { text-align: left; }

    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom .container { flex-direction: column; gap: 0.5rem; text-align: center; }
}