/* ============================================================
   Rentenrechner – finanzen-im-alter.ch
   Stylesheet
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --blue:       #1a4d8f;
    --blue-light: #2563eb;
    --blue-pale:  #eff6ff;
    --gold:       #b8952a;
    --gold-light: #fdf6e3;
    --text:       #1c2333;
    --text-muted: #5a6270;
    --text-light: #8a95a3;
    --border:     #d8dde6;
    --bg:         #f5f7fb;
    --white:      #ffffff;
    --success:    #16a34a;
    --radius:     10px;
    --shadow:     0 2px 12px rgba(0,0,0,0.08);
    --font-head:  'Lora', Georgia, serif;
    --font-body:  'Source Sans 3', system-ui, sans-serif;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ── Header ── */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: .9rem 0;
}
.site-header .container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.logo {
    font-family: var(--font-head);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--blue);
    text-decoration: none;
    letter-spacing: -.01em;
}
.header-sub {
    font-size: .85rem;
    color: var(--text-muted);
    border-left: 1px solid var(--border);
    padding-left: 1.5rem;
}

/* ── Main ── */
main { flex: 1; padding: 2.5rem 0 3rem; }

.calc-wrapper { max-width: 720px; margin: 0 auto; }

/* ── Progress ── */
.progress-nav {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    overflow-x: auto;
    padding-bottom: .25rem;
}
.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}
.step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--white);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
}
.step-circle svg { width: 16px; height: 16px; }
.progress-step.active .step-circle {
    background: var(--blue);
    border-color: var(--blue);
    color: var(--white);
}
.progress-step.done .step-circle {
    background: var(--success);
    border-color: var(--success);
    color: var(--white);
}
.step-label-text {
    font-size: 10px;
    color: var(--text-light);
    text-align: center;
    max-width: 70px;
    line-height: 1.3;
}
.progress-step.active .step-label-text { color: var(--blue); font-weight: 600; }
.progress-step.done .step-label-text   { color: var(--success); }
.progress-line {
    flex: 1;
    height: 2px;
    background: var(--border);
    min-width: 12px;
    margin-bottom: 18px;
    transition: background .2s;
}
.progress-line.done { background: var(--success); }

/* ── Form Card ── */
.form-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.25rem 2.5rem;
    box-shadow: var(--shadow);
}

.step-badge {
    font-size: 11px;
    font-weight: 600;
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: .4rem;
}
.step-title {
    font-family: var(--font-head);
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: .35rem;
    color: var(--text);
    line-height: 1.25;
}
.step-desc {
    font-size: .95rem;
    color: var(--text-muted);
    margin-bottom: 1.75rem;
    line-height: 1.65;
}

/* ── Form Groups ── */
.q-group { margin-bottom: 1.6rem; }
.q-group + .q-group { padding-top: 1.4rem; border-top: 1px solid var(--border); }

.q-label {
    display: block;
    font-weight: 600;
    font-size: .95rem;
    margin-bottom: .15rem;
    color: var(--text);
}
.q-sub {
    display: block;
    font-size: .84rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: .6rem;
}

/* ── Pills (radio/checkbox look) ── */
.pills-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: .5rem;
}
.pill-label {
    display: inline-block;
    cursor: pointer;
}
.pill-label input[type="radio"],
.pill-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.pill-label span {
    display: inline-block;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    padding: 6px 16px;
    font-size: .88rem;
    background: var(--white);
    color: var(--text);
    transition: all .15s;
    user-select: none;
}
.pill-label:hover span { border-color: var(--blue-light); color: var(--blue-light); }
.pill-label input:checked + span {
    background: var(--blue-pale);
    border-color: var(--blue-light);
    color: var(--blue);
    font-weight: 600;
}

/* ── Option Cards ── */
.cards-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: .5rem;
}
.card-label {
    cursor: pointer;
}
.card-label input[type="radio"],
.card-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.card-label .card-inner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    background: var(--white);
    min-width: 155px;
    max-width: 210px;
    transition: all .15s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.card-label:hover .card-inner { border-color: var(--blue-light); }
.card-label input:checked + .card-inner {
    background: var(--blue-pale);
    border-color: var(--blue-light);
}
.card-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    margin-top: 1px;
    color: var(--blue);
}
.card-text .ctitle { font-size: .88rem; font-weight: 600; display: block; color: var(--text); }
.card-text .csub   { font-size: .78rem; color: var(--text-muted); display: block; margin-top: 2px; }

/* ── Range Slider ── */
.range-wrap { margin-top: .5rem; }
.range-value {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--blue);
    margin-bottom: .4rem;
}
input[type="range"] {
    width: 100%;
    accent-color: var(--blue);
    cursor: pointer;
}
.range-meta {
    display: flex;
    justify-content: space-between;
    font-size: .8rem;
    color: var(--text-light);
    margin-top: 4px;
}

/* ── Text Input ── */
.text-input {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 9px 13px;
    font-family: var(--font-body);
    font-size: .95rem;
    color: var(--text);
    background: var(--white);
    margin-top: .4rem;
    transition: border-color .15s;
}
.text-input:focus { outline: none; border-color: var(--blue-light); }

/* ── Nav Buttons ── */
.form-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.btn {
    padding: 10px 26px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    display: inline-block;
    transition: all .15s;
}
.btn-back {
    background: var(--white);
    color: var(--text-muted);
    border: 1.5px solid var(--border);
}
.btn-back:hover { border-color: var(--blue-light); color: var(--blue); }
.btn-next {
    background: var(--blue);
    color: var(--white);
    letter-spacing: .01em;
}
.btn-next:hover { background: var(--blue-light); }

/* ── Privacy Note ── */
.privacy-note {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .8rem;
    color: var(--text-light);
    margin-top: 1rem;
    text-align: center;
    justify-content: center;
}
.privacy-note svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ── Footer ── */
.site-footer {
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: .9rem 0;
}
.site-footer .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .82rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: .5rem;
}
.btn-reset {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 4px 12px;
    font-size: .8rem;
    cursor: pointer;
    color: var(--text-muted);
    font-family: var(--font-body);
}
.btn-reset:hover { border-color: #e53e3e; color: #e53e3e; }

/* ── Ergebnis-Seite ── */
.result-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem 2.5rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow);
}
.result-card h2 {
    font-family: var(--font-head);
    font-size: 1.25rem;
    margin-bottom: .75rem;
    color: var(--text);
}
.luecke-box {
    background: #fef2f2;
    border: 1.5px solid #fca5a5;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin: 1rem 0;
}
.luecke-box.positiv { background: #f0fdf4; border-color: #86efac; }
.luecke-amount {
    font-size: 2rem;
    font-weight: 700;
    color: #dc2626;
    font-family: var(--font-head);
}
.luecke-box.positiv .luecke-amount { color: var(--success); }
.luecke-label { font-size: .9rem; color: var(--text-muted); }
.massnahmen-list { list-style: none; }
.massnahmen-list li {
    padding: .6rem 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: .95rem;
}
.massnahmen-list li:last-child { border-bottom: none; }
.massnahmen-list li::before {
    content: "→";
    color: var(--blue);
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}
.cta-box {
    background: var(--gold-light);
    border: 1.5px solid var(--gold);
    border-radius: var(--radius);
    padding: 1.5rem 2rem;
    margin-top: 1.5rem;
    text-align: center;
}
.cta-box p { color: var(--text-muted); margin-bottom: 1rem; font-size: .95rem; }
.btn-cta {
    background: var(--gold);
    color: var(--white);
    padding: 12px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
    transition: opacity .15s;
}
.btn-cta:hover { opacity: .88; }

/* ── Responsive ── */
@media (max-width: 600px) {
    .form-card { padding: 1.5rem 1.25rem; }
    .step-label-text { display: none; }
    .cards-row { flex-direction: column; }
    .card-label .card-inner { max-width: 100%; }
    .site-header .container { flex-direction: column; align-items: flex-start; gap: .25rem; }
    .header-sub { border-left: none; padding-left: 0; }
}

/* ── Aktions-Buttons (Ergebnisseite) ── */
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: .95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all .15s;
    min-width: 220px;
    justify-content: center;
}
.btn-action-pdf {
    background: var(--blue);
    color: var(--white);
}
.btn-action-pdf:hover { background: var(--blue-light); }
.btn-action-contact {
    background: var(--white);
    color: var(--blue);
    border: 2px solid var(--blue);
}
.btn-action-contact:hover {
    background: var(--blue-pale);
}
@media (max-width: 500px) {
    .btn-action { min-width: 100%; }
}
