/* === Webfont: Lora (Tarif-Karten: Preis, Name, Testnote) === */
@import url('https://fonts.googleapis.com/css2?family=Lora:wght@600;700&display=swap');

/* === Webfonts: Lato === */
@font-face {
    font-family: 'Lato';
    src: url('/static/css/fonts/Lato-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Lato';
    src: url('/static/css/fonts/Lato-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Lato';
    src: url('/static/css/fonts/Lato-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* === Farbvariablen === */
:root {
    --primary: #004981;
    --primary-light: #2E6895;
    --background: #F3F9FF;
    --text: #352B48;
    --border: #5C88A9;
    --accent: #FACF54;
    --accent-light: #F5D579;
    --grey: #7C7687;
}

/* === Grundlayout === */
body {
    font-family: 'Lato', sans-serif;
    background-color: var(--background);
    color: var(--text);
    margin: 0;
    padding: 0;
}

/* === Formular-Karten === */
.form-card {
    background-color: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(0, 73, 129, 0.08);
}

.form-card label {
    font-weight: 600;
    color: var(--primary);
}

.form-card input,
.form-card select {
    border-radius: 6px;
    border: 1px solid var(--border);
    padding: 8px 12px;
    background-color: var(--background);
    color: var(--text);
}

.form-card input:focus,
.form-card select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 4px rgba(46, 104, 149, 0.4);
    outline: none;
}

/* === Buttons === */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    transition: background-color 0.2s ease-in-out;
}

.btn-primary:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-light);
}

/* === Fehlermeldungen === */
.alert-danger {
    background-color: var(--accent-light);
    color: var(--text);
    border: 1px solid var(--accent);
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 20px;
}

/* === Deckungsauswahl (Karten-Stil) === */
.coverage-options {
    display: flex;
    gap: 16px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.coverage-card {
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 16px 20px;
    cursor: pointer;
    background-color: #fff;
    flex: 1 1 200px;
    text-align: center;
    transition: all 0.2s ease;
    position: relative;
}

.coverage-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 73, 129, 0.1);
}

.coverage-card input[type="radio"] {
    appearance: none;
    position: absolute;
    top: 12px;
    right: 12px;
    width: 20px;
    height: 20px;
    padding: 0;
    margin: 0;
    background-color: #fff;
    border: 2px solid var(--border);
    border-radius: 50%;
    outline: none;
    cursor: pointer;
    box-sizing: border-box;
}

.coverage-card input[type="radio"]:checked {
    border-color: var(--primary);
    background-color: var(--primary);
}

.coverage-card input[type="radio"]:checked::before {
    content: "";
    display: block;
    width: 8px;
    height: 8px;
    margin: 4px auto;
    background-color: white;
    border-radius: 50%;
}

.coverage-label {
    font-weight: 600;
    margin-top: 24px;
    color: var(--text);
    font-size: 1.125rem; /* entspricht ca. 18px */
}

.coverage-label small {
    font-weight: 400;
    color: var(--grey);
    font-size: 0.85rem;
}

.form-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
    margin-top: 24px;
    display: block;
    border-top: 1px solid #e0e6eb;
    padding-top: 16px;
}
.form-title_result {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    display: block;    
}

.hero-header {
    background: linear-gradient(135deg, #004981 0%, #0066B2 50%, #1A7FCC 100%);
    color: white;
    padding: 60px 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 73, 129, 0.15);
    text-align: center;
}

.hero-title {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.25rem);
    opacity: 0.95;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.page-wrapper {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
}
.logo-img {
    height: auto;
    width: 100%;
    max-width: 150px;
    max-height: 150px;
    object-fit: contain;
}

.display-6 {
    font-family: 'Lato' , sans-serif;
    font-weight: 300; /* regular */
}

.table td:first-child {
    width: 40%;
    max-width: 200px;
    font-weight: 600;
    word-break: break-word;
}
@media (max-width: 576px) {
    .table td:first-child {
        width: 45%;
        font-size: 0.9rem;
    }
}
.feedback-age .invalid-feedback {
    display: block;
    visibility: hidden;
    min-height: 1.5em;
    font-size: 0.9rem;
    color: #ff4d4d; /* z. B. ein helleres Rot speziell für dieses Feld */
}

.feedback-age input:invalid + .invalid-feedback {
    visibility: visible;
}
.insurer-logo{
    max-height: 70px;
    max-width: 100%;   /* hier beliebig anpassen, z. B. 50 px */
    width: auto;        /* Seitenverhältnis bewahren */
    object-fit: contain;/* falls das Bild größer angeliefert wird */
}
.insurer-logo-box {
    width: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* === Tarif-Vergleichskarten === */
.tariff-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 73, 129, 0.06);
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.tariff-card:hover {
    border-color: #C9DCEF;
    box-shadow: 0 6px 20px rgba(0, 73, 129, 0.1);
}

.tariff-card.is-best {
    border-color: var(--primary-light);
    box-shadow: 0 4px 20px rgba(0, 73, 129, 0.14);
}

.tariff-badges {
    display: flex;
    flex-wrap: wrap;
}

.tariff-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--accent);
    color: #0C2240;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 0 0 8px 0;
}

.tariff-badge.badge-rating {
    background: #008000;
    color: #fff;
}

.tariff-badge.badge-value {
    background: var(--primary);
    color: #fff;
}

.tariff-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1.7fr 1fr;
    gap: 1.5rem;
    align-items: center;
    padding: 1.5rem 1.75rem;
}

@media (max-width: 767px) {
    .tariff-card-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1rem;
    }
}

/* 3-Spalten-Variante ohne Bewertungs-Spalte (Moped/E-Scooter: kein Rating-System) */
.tariff-card-grid.tariff-card-grid-3col {
    grid-template-columns: 1fr 2fr 1fr;
}

@media (max-width: 767px) {
    .tariff-card-grid.tariff-card-grid-3col {
        grid-template-columns: 1fr;
    }
}

.tariff-logo-col {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
}

.tariff-rating-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.tariff-rating-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 82px;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 73, 129, 0.08);
    background: #fff;
}

.tariff-rating-box-value {
    font-family: 'Lora', Georgia, serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: #0C2240;
    line-height: 1.1;
    padding-top: 10px;
}

.tariff-rating-box-label {
    font-size: 0.62rem;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding-bottom: 8px;
}

.tariff-rating-box-tag {
    width: 100%;
    text-align: center;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 0;
}

.tariff-rating-points {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    padding: 0;
    cursor: pointer;
}

.tariff-rating-points:hover { color: var(--primary-light); }

.tariff-name {
    font-family: 'Lora', Georgia, serif;
    font-weight: 600;
    color: #0C2240;
    font-size: 1.05rem;
    margin-bottom: 0.6rem;
}

.tariff-purchase-price {
    font-size: 0.82rem;
    color: #94A3B8;
    margin-bottom: 0.6rem;
}

/* Detailzeilen (Moped/E-Scooter-Karten) in derselben Farbe wie die Feature-Checkliste */
.tariff-info-text {
    font-size: 0.85rem;
    color: var(--text);
    margin-bottom: 0;
}

.tariff-features {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.tariff-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text);
    justify-content: flex-start;
    text-align: left;
}

@media (max-width: 767px) {
    .tariff-feature { justify-content: center; }
}

.tariff-feature svg { flex-shrink: 0; }
.tariff-feature.ok svg { color: #008000; }
.tariff-feature.no svg { color: #ff0000; opacity: 0.6; }

.tariff-price-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.tariff-price {
    font-family: 'Lora', Georgia, serif;
    font-weight: 700;
    font-size: 1.9rem;
    color: var(--primary);
    line-height: 1;
}

.tariff-price-period {
    font-size: 0.78rem;
    color: #94A3B8;
    margin-top: -0.35rem;
}

.tariff-cta {
    display: inline-block;
    background-color: var(--primary);
    color: #fff;
    padding: 10px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background-color 0.2s ease;
    width: 100%;
    text-align: center;
}

.tariff-cta:hover {
    background-color: var(--primary-light);
    color: #fff;
}

.tariff-details-toggle {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.tariff-details-toggle svg {
    transition: transform 0.2s ease;
}

.tariff-details-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.tariff-details-footer {
    border-top: 1px solid var(--border);
    padding: 0.6rem 1.75rem;
    text-align: center;
    background: #FBFCFE;
}

.tariff-details-body {
    border-top: 1px solid var(--border);
    padding: 1.5rem 1.75rem;
    background: #FBFCFE;
}

.tariff-details-body .nav-tabs {
    border-bottom: none;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.tariff-details-body .nav-tabs .nav-link {
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 0.35rem 1rem;
    background: #fff;
}

.tariff-details-body .nav-tabs .nav-link.active {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}

.tariff-details-body .table {
    font-size: 0.88rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.tariff-details-body .table td {
    border-color: var(--border);
    vertical-align: middle;
}

/* === Mini-Formular / Filter (Fahrrad-Ergebnisseite) === */
.filter-panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 73, 129, 0.06);
    padding: 1.75rem;
}

.filter-panel h2 {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.15rem;
    color: #0C2240;
    font-weight: 600;
    margin-bottom: 1.1rem;
}

.filter-panel hr {
    border-color: var(--border);
    opacity: 1;
}

.filter-check {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.filter-toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}

.filter-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.filter-toggle-track {
    position: absolute;
    inset: 0;
    background: #D7E2EE;
    border-radius: 22px;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.filter-toggle-track::before {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.filter-toggle input:checked + .filter-toggle-track {
    background: var(--primary);
}

.filter-toggle input:checked + .filter-toggle-track::before {
    transform: translateX(18px);
}

.filter-toggle-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.filter-toggle-row label {
    font-size: 0.88rem;
    color: var(--text);
    font-weight: 500;
    cursor: pointer;
    margin: 0;
}

.filter-toggles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.9rem 1.5rem;
}

.tariff-section-header td {
    background: #EEF4FB !important;
    color: var(--primary) !important;
    font-weight: 700 !important;
    font-size: 0.78rem !important;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 10px 14px !important;
    border-bottom: 1px solid var(--border) !important;
}