﻿/* â”€â”€ Kapitallebensversicherung Rechner - Custom Styles â”€â”€ */

.sg-tool-page {
    position: relative;
    padding-top: calc(var(--space-10) + 20px);
    margin-top: 20px;
    padding-bottom: var(--space-20);
    overflow: hidden;
}

/* â”€â”€ Hero Split Section â”€â”€ */
.sg-hero-section {
    position: relative;
    padding-block: var(--space-4) var(--space-10);
    margin-bottom: var(--space-10);
}

.sg-hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--space-12);
    align-items: center;
}

.sg-hero-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.sg-hero-content .tool-breadcrumb {
    justify-content: flex-start;
    margin-bottom: var(--space-2);
    font-size: var(--text-xs);
    flex-wrap: wrap;
    gap: 6px;
}

.sg-hero-content .tool-breadcrumb a {
    color: var(--color-text-secondary);
    font-weight: 500;
}

.sg-hero-content .tool-breadcrumb span:last-child {
    color: var(--color-text);
    font-weight: 600;
}

.sg-badge-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-bottom: var(--space-2);
}

.sg-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2.5);
    background: rgba(0, 153, 204, 0.08);
    border: 1px solid rgba(0, 153, 204, 0.25);
    color: var(--color-accent);
    padding: 8px 18px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.4;
}

.sg-badge-dot {
    width: 8px;
    height: 8px;
    background: var(--color-accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--color-accent);
    animation: pulseDot 2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.3); }
}

.sg-hero-title {
    font-family: var(--font-display);
    font-size: clamp(var(--text-3xl), 3.6vw, var(--text-5xl));
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.03em;
    color: var(--color-text);
}

.sg-hero-title .highlight-text {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sg-hero-intro {
    font-size: var(--text-base);
    line-height: 1.75;
    color: var(--color-text-secondary);
}

.sg-hero-intro strong {
    color: var(--color-text);
    font-weight: 700;
}

.sg-hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-4);
    margin-top: var(--space-4);
}

.sg-feature-item {
    display: flex;
    align-items: center;
    gap: var(--space-3.5);
    background: rgba(37, 99, 235, 0.04);
    border: 1px solid rgba(37, 99, 235, 0.14);
    padding: 12px 18px;
    border-radius: var(--radius-lg);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--color-text);
}

.sg-feature-icon {
    width: 26px;
    height: 26px;
    border-radius: var(--radius-sm);
    background: var(--color-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 4px;
}

.sg-feature-icon svg {
    width: 14px;
    height: 14px;
    stroke-width: 3;
}

/* â”€â”€ Hero Image / Visual Side â”€â”€ */
.sg-hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sg-image-card {
    position: relative;
    width: 100%;
    max-width: 480px;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18), 0 0 30px rgba(0, 153, 204, 0.15);
    transition: transform 0.4s var(--ease-spring), box-shadow 0.4s ease;
}

.sg-image-card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.25), 0 0 40px rgba(37, 99, 235, 0.25);
}

.sg-hero-img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    display: block;
    mix-blend-mode: luminosity;
    opacity: 0.88;
    filter: contrast(1.1) brightness(1.05);
}

.sg-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.1) 0%, rgba(15, 23, 42, 0.75) 100%);
}

.sg-floating-badge {
    position: absolute;
    bottom: var(--space-5);
    left: var(--space-5);
    right: var(--space-5);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-4);
    box-shadow: var(--shadow-lg);
}

.sg-floating-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: var(--shadow-glow);
}

.sg-floating-text h4 {
    font-size: var(--text-sm);
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 2px;
}

.sg-floating-text p {
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
    line-height: 1.3;
}

/* â”€â”€ Calculator Layout â”€â”€ */
.sg-calc-wrapper {
    margin-bottom: var(--space-16);
}

.sg-calc-header-title {
    text-align: center;
    margin-bottom: var(--space-8);
}

.sg-calc-header-title h2 {
    font-family: var(--font-display);
    font-size: clamp(var(--text-2xl), 3vw, var(--text-4xl));
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: var(--space-2);
}

.sg-calc-header-title p {
    font-size: var(--text-base);
    color: var(--color-text-secondary);
    max-width: 600px;
    margin-inline: auto;
}

/* â”€â”€ Comprehensive SEO Article Content â”€â”€ */
.sg-seo-article {
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
    padding-top: var(--space-16);
    margin-top: var(--space-16);
}

.sg-article-header {
    text-align: center;
    max-width: 780px;
    margin-inline: auto;
    margin-bottom: var(--space-12);
}

.sg-article-header h2 {
    font-family: var(--font-display);
    font-size: clamp(var(--text-3xl), 3.5vw, var(--text-5xl));
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-text);
    margin-bottom: var(--space-4);
}

.sg-article-header p {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    line-height: 1.7;
}

.sg-content-block {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    margin-bottom: var(--space-8);
    box-shadow: var(--shadow-sm);
    transition: border-color 0.3s;
}

.sg-content-block:hover {
    border-color: rgba(37, 99, 235, 0.25);
}

.sg-content-block h3 {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.sg-content-block h3 svg {
    color: var(--color-primary);
    flex-shrink: 0;
}

.sg-content-block p {
    font-size: var(--text-base);
    color: var(--color-text-secondary);
    line-height: 1.8;
    margin-bottom: var(--space-4);
}

.sg-content-block p:last-child {
    margin-bottom: 0;
}

/* â”€â”€ Formula Cards â”€â”€ */
.sg-formula-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-4);
    margin-top: var(--space-6);
}

.sg-formula-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.sg-formula-num {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: #fff;
    font-weight: 800;
    font-size: var(--text-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sg-formula-card h4 {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--color-text);
}

.sg-formula-card p {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* â”€â”€ Table Overflow Fix â”€â”€ */
.sg-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-block: var(--space-6);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.sg-comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
    text-align: left;
}

.sg-comparison-table th {
    background: var(--color-card);
    color: var(--color-text);
    font-weight: 700;
    padding: var(--space-4);
    border-bottom: 1px solid var(--color-border);
}

.sg-comparison-table td {
    padding: var(--space-4);
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-secondary);
}

.sg-comparison-table tr:last-child td {
    border-bottom: none;
}

.sg-comparison-table tr:hover td {
    background: rgba(37, 99, 235, 0.02);
}

.sg-tag-blue {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: rgba(37, 99, 235, 0.1);
    color: var(--color-primary);
    font-weight: 700;
    font-size: var(--text-xs);
}

/* â”€â”€ FAQ Accordion â”€â”€ */
.sg-faq-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-top: var(--space-6);
}

.sg-faq-item {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.sg-faq-item[open] {
    border-color: var(--color-primary);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.08);
}

.sg-faq-summary {
    padding: var(--space-4) var(--space-5);
    font-weight: 700;
    font-size: var(--text-base);
    color: var(--color-text);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}

.sg-faq-summary::-webkit-details-marker {
    display: none;
}

.sg-faq-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
    color: var(--color-primary);
    flex-shrink: 0;
}

.sg-faq-item[open] .sg-faq-icon {
    transform: rotate(180deg);
}

.sg-faq-answer {
    padding: 0 var(--space-5) var(--space-5) var(--space-5);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: 1.7;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    padding-top: var(--space-4);
}

/* â”€â”€ Responsive adjustments â”€â”€ */
@media (max-width: 992px) {
    .sg-hero-grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .sg-hero-visual {
        order: -1;
    }

    .sg-image-card {
        max-width: 100%;
    }

    .sg-hero-img {
        height: 280px;
    }
}

@media (max-width: 640px) {
    .sg-hero-content .tool-breadcrumb {
        font-size: 11px;
        gap: 4px;
        flex-wrap: wrap;
        line-height: 1.4;
    }

    .sg-hero-content .tool-breadcrumb span:last-child {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: inline-block;
        vertical-align: bottom;
    }

    .sg-hero-features {
        grid-template-columns: 1fr;
        width: 100%;
        gap: 10px;
    }

    .sg-feature-item {
        width: 100%;
        box-sizing: border-box;
        max-width: 100%;
        padding: 10px 14px;
        gap: 12px;
        min-width: 0;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    .sg-feature-item span {
        min-width: 0;
        word-break: break-word;
        line-height: 1.4;
        flex: 1;
    }

    .sg-feature-icon {
        flex-shrink: 0;
        margin-right: 0;
    }

    .sg-content-block {
        padding: var(--space-4);
    }

    .sg-floating-badge {
        padding: var(--space-3);
    }

    /* Table Mobile Card Responsive Mode */
    .sg-comparison-table {
        border: none;
    }

    .sg-comparison-table thead {
        display: none;
    }

    .sg-comparison-table tbody tr {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 14px;
        margin-bottom: 12px;
        background: var(--color-card);
        border-radius: var(--radius-lg);
        border: 1px solid var(--color-border);
    }

    .sg-comparison-table tbody tr:last-child {
        margin-bottom: 0;
    }

    .sg-comparison-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        padding: 6px 0;
        border: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.04);
        font-size: var(--text-xs);
        width: 100%;
        box-sizing: border-box;
        flex-wrap: wrap;
        gap: 6px;
    }

    .sg-comparison-table tbody td:last-child {
        border-bottom: none;
    }

    .sg-comparison-table tbody td:before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--color-text);
        font-size: var(--text-xs);
        text-align: left;
    }
}


/* ──────────────────────────────────────────────── */
/* ── SG Legacy Result/BreakEven/Table (kept) ── */
/* ──────────────────────────────────────────────── */
/* â”€â”€ SG: Sterbegeldversicherung â”€â”€ */

/* â”€â”€ Layout â”€â”€ */

.sg-layout {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.sg-form-wrap {
    max-width: 520px;
    margin: 0 auto;
    width: 100%;
}

/* â”€â”€ Result grid â”€â”€ */

.sg-result-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: var(--space-4);
    align-items: stretch;
    margin-bottom: var(--space-6);
}

.sg-result-card {
    min-width: 0;
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    background: rgba(255, 255, 255, .015);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    transition: border-color .25s;
    overflow: hidden;
}

.sg-result--insurance:hover {
    border-color: rgba(0, 194, 255, .25);
}

.sg-result--save:hover {
    border-color: rgba(16, 185, 129, .25);
}

.sg-result-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-1);
}

.sg-result--insurance .sg-result-icon {
    background: rgba(0, 194, 255, .08);
    color: var(--color-accent);
}

.sg-result--save .sg-result-icon {
    background: rgba(16, 185, 129, .08);
    color: var(--color-success);
}

.sg-result-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.sg-result-price {
    font-size: clamp(1.3rem, 1.4rem + 0.5vw, var(--text-3xl));
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.02em;
    white-space: nowrap;
}

.sg-result--insurance .sg-result-price {
    color: var(--color-accent);
}

.sg-result--save .sg-result-price {
    color: var(--color-success);
}

.sg-result-sub {
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.sg-result-details {
    margin-top: auto;
    padding-top: var(--space-3);
    border-top: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.sg-result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
    min-width: 0;
}

.sg-result-row strong,
.sg-result-row span:last-child {
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
}

.sg-result-row span:first-child {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* â”€â”€ VS badge â”€â”€ */

.sg-vs-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    min-width: 40px;
    max-width: 52px;
}

.sg-vs-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--color-border);
    font-size: 10px;
    font-weight: 800;
    color: var(--color-text-secondary);
    letter-spacing: .03em;
}

.sg-vs-line {
    flex: 1;
    width: 1px;
    background: var(--color-border);
    min-height: 40px;
}

/* â”€â”€ Break-Even â”€â”€ */

.sg-be-wrap {
    margin-bottom: var(--space-6);
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: rgba(255, 255, 255, .015);
}

.sg-be-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: var(--space-3);
}

.sg-be-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.sg-be-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    padding: var(--space-1) 0;
}

.sg-be-row strong {
    font-weight: 700;
    color: var(--color-text);
    font-feature-settings: 'tnum';
}

/* â”€â”€ Table â”€â”€ */

.sg-table-wrap {
    overflow-x: auto;
    margin-bottom: var(--space-6);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: rgba(255, 255, 255, .01);
}

.sg-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}

.sg-table thead th {
    padding: var(--space-3) var(--space-4);
    text-align: right;
    font-weight: 600;
    font-size: 11px;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 1px solid var(--color-border);
    background: rgba(255, 255, 255, .015);
}

.sg-table thead th:first-child {
    text-align: left;
}

.sg-table tbody td {
    padding: var(--space-2) var(--space-4);
    text-align: right;
    border-bottom: 1px solid rgba(255, 255, 255, .025);
    color: var(--color-text);
    white-space: nowrap;
}

.sg-table tbody td:first-child {
    text-align: left;
    font-weight: 600;
    color: var(--color-text-secondary);
}

.sg-table tbody tr:last-child td {
    border-bottom: none;
}

.sg-row-last {
    background: rgba(0, 194, 255, .04);
}

.sg-row-last td {
    font-weight: 700;
}

/* â”€â”€ Mobile â”€â”€ */

@media (max-width: 640px) {
    .sg-result-grid {
        grid-template-columns: 1fr;
        gap: var(--space-3);
    }

    .sg-vs-wrap {
        flex-direction: row;
        min-width: auto;
    }

    .sg-vs-line {
        width: 100%;
        height: 1px;
        min-height: auto;
    }

    .sg-table thead {
        display: none;
    }

    .sg-table tbody tr {
        display: block;
        padding: var(--space-2) var(--space-4);
    }

    .sg-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        padding: var(--space-1) 0;
        border: none;
    }

    .sg-table tbody td:before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--color-text-secondary);
        font-size: var(--text-xs);
    }
}

@media (max-width: 400px) {
    .sg-result-price {
        font-size: var(--text-2xl);
    }
}

