/**
 * Immobilien Bewertung - Styles
 * Angepasst für jadli-partner.de
 */

:root {
    /* Jadli & Partner Farbschema */
    --ib-primary: #1a3a5c;          /* Tiefes Blau - Header/Akzente */
    --ib-primary-dark: #0f2840;     /* Dunkleres Blau */
    --ib-primary-light: #2a4a6c;    /* Helleres Blau */
    --ib-accent: #d4a855;           /* Warmes Gold - CTAs */
    --ib-accent-hover: #e5b966;     /* Gold Hover */
    --ib-accent-dark: #b8923f;      /* Dunkleres Gold */
    --ib-bg: #ffffff;               /* Weißer Hintergrund */
    --ib-bg-light: #f8f9fa;         /* Leichtes Grau */
    --ib-bg-section: #fafbfc;       /* Section Hintergrund */
    --ib-text: #2c3e50;             /* Dunkler Text */
    --ib-text-light: #5a6c7d;       /* Heller Text */
    --ib-border: #e1e5e9;           /* Rand-Farbe */
    --ib-success: #28a745;          /* Grün für Erfolg */
    --ib-shadow: rgba(26, 58, 92, 0.12);
    
    /* Legacy-Kompatibilität (Alias-Variablen) */
    --ib-blue: #1a3a5c;             /* = primary */
    --ib-blue-2: #2a4a6c;           /* = primary-light */
    --ib-gold: #d4a855;             /* = accent */
    --ib-gold-2: #e5b966;           /* = accent-hover */
}

/* Container */
.ib-bewertung-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--ib-bg);
    border-radius: 8px;
    box-shadow: 0 4px 20px var(--ib-shadow);
    overflow: hidden;
}

/* CTA Intro - Professioneller Look */
.ib-cta-intro {
    background: linear-gradient(135deg, var(--ib-primary) 0%, var(--ib-primary-dark) 100%);
    color: #ffffff;
    border-radius: 0;
    padding: 35px 30px;
    margin-bottom: 0;
    text-align: center;
    position: relative;
}

.ib-cta-intro::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--ib-accent);
}

.ib-cta-text {
    margin: 0 0 18px 0;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.5;
    opacity: 0.95;
}

.ib-open-form-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 35px;
    font-size: 16px;
    font-weight: 600;
    color: var(--ib-primary-dark);
    background: var(--ib-accent);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(212, 168, 85, 0.4);
    transition: all 0.25s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ib-open-form-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 168, 85, 0.5);
    background: var(--ib-accent-hover);
}

.ib-open-form-btn:active {
    transform: translateY(0);
}

/* Form Wrapper */
.ib-form-wrapper {
    padding: 35px;
    background: var(--ib-bg);
}

/* Header */
.ib-header {
    text-align: center;
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 2px solid var(--ib-border);
    position: relative;
}

.ib-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: var(--ib-accent);
}

.ib-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--ib-primary);
    margin: 0 0 10px 0;
    letter-spacing: -0.3px;
}

.ib-subtitle {
    font-size: 15px;
    color: var(--ib-text-light);
    margin: 0;
    line-height: 1.5;
}

/* Sections - Professionelles Karten-Design */
.ib-section {
    background: linear-gradient(to bottom, #ffffff 0%, var(--ib-bg-section) 100%);
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 24px;
    border: 1px solid var(--ib-border);
    box-shadow: 0 2px 8px rgba(26, 58, 92, 0.04);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.ib-section:hover {
    box-shadow: 0 4px 16px rgba(26, 58, 92, 0.08);
}

.ib-section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--ib-primary);
    margin: 0 0 22px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--ib-border);
}

.ib-section-title::before {
    content: '';
    width: 4px;
    height: 22px;
    background: linear-gradient(to bottom, var(--ib-accent), var(--ib-accent-dark));
    border-radius: 2px;
    flex-shrink: 0;
}

.ib-icon {
    font-size: 20px;
    color: var(--ib-accent);
    display: none; /* Icons über ::before statt Emojis */
}

/* Rows & Fields */
.ib-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.ib-row:last-child {
    margin-bottom: 0;
}

.ib-field {
    flex: 1;
}

.ib-field-half {
    flex: 0 0 calc(50% - 10px);
}

.ib-field-third {
    flex: 0 0 calc(33.333% - 14px);
}

.ib-field-full {
    flex: 0 0 100%;
}

.ib-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ib-primary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.ib-field label .ib-tooltip {
    opacity: 0.6;
    font-weight: 400;
}

/* Inputs - Premium Design */
.ib-field input[type="text"],
.ib-field input[type="number"],
.ib-field select {
    width: 100%;
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 500;
    border: 2px solid var(--ib-border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ib-text);
    transition: all 0.25s ease;
    box-sizing: border-box;
}

.ib-field input:hover,
.ib-field select:hover {
    border-color: #c5ccd4;
}

.ib-field input:focus,
.ib-field select:focus {
    outline: none;
    border-color: var(--ib-accent);
    box-shadow: 0 0 0 4px rgba(212, 168, 85, 0.15);
    background: #fffdf9;
}

.ib-field input::placeholder {
    color: #a0a8b0;
    font-weight: 400;
}

.ib-field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%231a3a5c' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 14px center;
    background-repeat: no-repeat;
    background-size: 18px;
    padding-right: 45px;
    cursor: pointer;
}

/* Input Group (mit Suffix) */
.ib-input-group {
    position: relative;
}

.ib-input-group input {
    padding-right: 60px;
}

.ib-input-suffix {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ib-primary);
    font-size: 14px;
    font-weight: 600;
    pointer-events: none;
    background: var(--ib-bg-light);
    padding: 4px 8px;
    border-radius: 4px;
}

/* Field Hints */
.ib-field-hint {
    display: block;
    font-size: 12px;
    color: var(--ib-text-light);
    margin-top: 8px;
    padding-left: 2px;
}

.ib-hint-success {
    color: var(--ib-success);
    font-weight: 500;
}

.ib-hint-error {
    color: #dc3545;
    font-weight: 500;
}

/* Checkboxes - Premium Design */
.ib-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 20px;
}

.ib-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: #ffffff;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 2px solid var(--ib-border);
    min-width: 140px;
}

.ib-checkbox:hover {
    border-color: var(--ib-accent);
    background: #fffdf9;
    transform: translateY(-1px);
}

.ib-checkbox input {
    display: none;
}

.ib-checkbox input:checked + .ib-checkbox-label::before {
    content: "✓ ";
    color: var(--ib-accent);
    font-weight: 700;
}

.ib-checkbox:has(input:checked) {
    background: linear-gradient(135deg, #fffdf9 0%, #fff8ec 100%);
    border-color: var(--ib-accent);
    box-shadow: 0 4px 12px rgba(212, 168, 85, 0.2);
}

.ib-checkbox-label {
    font-size: 14px;
    color: var(--ib-text);
    font-weight: 500;
}

/* Submit Section */
.ib-submit-section {
    text-align: center;
    margin-top: 35px;
    padding-top: 30px;
    border-top: 2px solid var(--ib-border);
    position: relative;
}

.ib-submit-section::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: var(--ib-accent);
}

.ib-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 55px;
    font-size: 16px;
    font-weight: 700;
    color: var(--ib-primary-dark);
    background: linear-gradient(135deg, var(--ib-accent) 0%, var(--ib-accent-hover) 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 300px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 6px 20px rgba(212, 168, 85, 0.4);
    position: relative;
    overflow: hidden;
}

.ib-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.ib-submit-btn:hover:not(:disabled)::before {
    left: 100%;
}

.ib-submit-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(212, 168, 85, 0.5);
}

.ib-submit-btn:active:not(:disabled) {
    transform: translateY(-1px);
}

.ib-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Spinner */
.ib-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(26, 58, 92, 0.2);
    border-top-color: var(--ib-primary);
    border-radius: 50%;
    animation: ib-spin 0.8s linear infinite;
}

@keyframes ib-spin {
    to { transform: rotate(360deg); }
}

.ib-privacy-hint {
    font-size: 12px;
    color: var(--ib-text-light);
    margin-top: 15px;
    line-height: 1.5;
}

.ib-privacy-hint a {
    color: var(--ib-primary);
    text-decoration: underline;
}

/* Result - Modernisiert */
.ib-result {
    background: linear-gradient(135deg, #ffffff 0%, var(--ib-bg-section) 100%);
    border-radius: 16px;
    padding: 36px;
    box-shadow: 0 12px 35px rgba(26, 58, 92, 0.12);
    border: 2px solid var(--ib-primary);
    text-align: center;
}

.ib-result-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--ib-primary);
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.ib-result-price {
    margin-bottom: 18px;
}

.ib-price-value {
    font-size: 52px;
    font-weight: 700;
    color: var(--ib-accent);
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(212, 168, 85, 0.2);
}

.ib-result-range {
    font-size: 15px;
    color: var(--ib-primary-light);
    margin-bottom: 26px;
    padding: 14px 24px;
    background: #ffffff;
    border-radius: 12px;
    display: inline-block;
    border: 2px solid var(--ib-border);
    box-shadow: 0 2px 8px rgba(26, 58, 92, 0.06);
}

.ib-range-label {
    color: var(--ib-text-light);
}

/* Result Details */
.ib-result-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-bottom: 26px;
    padding-top: 22px;
    border-top: 2px solid var(--ib-border);
}

.ib-detail-item {
    text-align: center;
    padding: 16px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid var(--ib-border);
    transition: all 0.25s ease;
}

.ib-detail-item:hover {
    box-shadow: 0 4px 12px rgba(26, 58, 92, 0.08);
    border-color: var(--ib-accent);
}

.ib-detail-label {
    display: block;
    font-size: 11px;
    color: var(--ib-text-light);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.ib-detail-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--ib-primary);
}

/* Confidence Colors */
.ib-conf-high { color: var(--ib-success); }
.ib-conf-medium { color: #f59e0b; }
.ib-conf-low { color: #ef4444; }

/* Result Footer */
.ib-result-footer {
    padding-top: 22px;
    border-top: 2px solid var(--ib-border);
}

.ib-disclaimer {
    font-size: 12px;
    color: var(--ib-text-light);
    margin: 0 0 18px 0;
    font-style: italic;
    line-height: 1.5;
}

.ib-reset-btn {
    padding: 14px 28px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ib-primary);
    background: #ffffff;
    border: 2px solid var(--ib-primary);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ib-reset-btn:hover {
    background: var(--ib-primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(26, 58, 92, 0.2);
}

/* Error */
.ib-error {
    background: linear-gradient(135deg, #fef2f2 0%, #fce8e8 100%);
    border: 2px solid #fca5a5;
    border-radius: 14px;
    padding: 24px;
    text-align: center;
    color: #991b1b;
}

.ib-error-icon {
    font-size: 28px;
    margin-right: 10px;
}

.ib-error-message {
    font-size: 15px;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .ib-form-wrapper {
        padding: 25px 20px;
    }
    
    .ib-title {
        font-size: 24px;
    }
    
    .ib-section {
        padding: 22px 18px;
        border-radius: 10px;
    }
}

@media (max-width: 600px) {
    .ib-bewertung-container {
        border-radius: 0;
        box-shadow: none;
    }
    
    .ib-form-wrapper {
        padding: 20px 16px;
    }
    
    .ib-header {
        margin-bottom: 25px;
        padding-bottom: 20px;
    }
    
    .ib-title {
        font-size: 22px;
    }
    
    .ib-section {
        padding: 20px 16px;
        margin-bottom: 18px;
    }
    
    .ib-section-title {
        font-size: 14px;
    }
    
    .ib-row {
        flex-direction: column;
        gap: 16px;
    }
    
    .ib-field-half,
    .ib-field-third {
        flex: 0 0 100%;
    }
    
    .ib-field label {
        font-size: 12px;
    }
    
    .ib-field input[type="text"],
    .ib-field input[type="number"],
    .ib-field select {
        padding: 12px 14px;
        font-size: 16px; /* Verhindert Zoom auf iOS */
    }
    
    .ib-checkboxes {
        flex-direction: column;
        gap: 10px;
    }
    
    .ib-checkbox {
        width: 100%;
        min-width: auto;
    }
    
    .ib-submit-section {
        margin-top: 25px;
        padding-top: 20px;
    }
    
    .ib-submit-btn {
        width: 100%;
        min-width: auto;
        padding: 16px 30px;
    }
    
    .ib-price-value {
        font-size: 40px;
    }
    
    .ib-result-details {
        grid-template-columns: 1fr;
    }
}

@media (prefers-color-scheme: dark) {
    .ib-bewertung-container[data-style="auto"] {
        /* Dark mode styles können hier ergänzt werden */
    }
}

/* Tooltip */
.ib-tooltip {
    cursor: help;
    font-size: 14px;
    opacity: 0.7;
    margin-left: 4px;
    transition: opacity 0.2s ease;
}

.ib-tooltip:hover {
    opacity: 1;
}

/* Field Transitions (für Objekttyp-Wechsel) */
.ib-field {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ib-field[style*="display: none"] {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    pointer-events: none;
}

/* Objekttyp Feld hervorheben */
#ib-objekttyp {
    font-weight: 500;
}

/* ============================================
   NEUE VERTRAUENS-ELEMENTE - 3-Preis-Darstellung
   ============================================ */

/* Ergebnis Container - Neu */
.ib-result-new {
    background: #fff;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 12px 28px rgba(15, 41, 77, 0.12);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

/* Hero Header */
.ib-result-hero {
    background: linear-gradient(135deg, #0f294d 0%, #123563 100%);
    border-bottom: 1px solid #e2e8f0;
    padding: 24px 32px;
    text-align: center;
    color: #f4f6fb;
}

.ib-result-hero h3 {
    font-size: 13px;
    font-weight: 600;
    color: #e5eaf2;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.ib-result-hero .ib-property-summary {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.ib-property-badge {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    color: #e5eaf2;
    font-weight: 400;
}

/* 3-Preis-Karten - PROFESSIONELLE DARSTELLUNG */
.ib-price-tiers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    padding: 0;
}

.ib-price-tier {
    padding: 32px 20px;
    text-align: center;
    position: relative;
    transition: all 0.2s ease;
    border-right: 1px solid #e2e8f0;
}

.ib-price-tier:last-child {
    border-right: none;
}

.ib-price-tier:hover {
    background: #f7f9fc;
}

/* Tier Labels */
.ib-tier-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    color: #999;
}

/* 1. Realistischer Marktwert (Hauptwert, grün hervorgehoben) */
.ib-tier-conservative {
    background: linear-gradient(135deg, #fff7e6 0%, #ffe9c2 100%);
    border-right: 1px solid #f5d7a5;
}

.ib-tier-conservative .ib-tier-label {
    color: var(--ib-gold);
    font-size: 12px;
}

.ib-tier-conservative .ib-tier-price {
    color: var(--ib-gold);
    font-size: 32px;
    font-weight: 700;
}

.ib-tier-conservative .ib-tier-subtitle {
    color: #7a5a1b;
}

/* 2. Typische Marktspanne (mittel, dezent) */
.ib-tier-range {
    background: #f7f9fc;
}

.ib-tier-range .ib-tier-label {
    color: var(--ib-blue);
}

.ib-tier-range .ib-tier-price {
    color: var(--ib-blue-2);
    font-size: 24px;
}

/* 3. Optimaler Angebotspreis (dezent, blau) */
.ib-tier-optimistic .ib-tier-label {
    color: var(--ib-blue-2);
}

.ib-tier-optimistic .ib-tier-price {
    color: var(--ib-blue);
}

/* Preis-Werte */
.ib-tier-price {
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.2;
    font-feature-settings: 'tnum';
}

.ib-tier-subtitle {
    font-size: 12px;
    color: #aaa;
    line-height: 1.4;
    max-width: 160px;
    margin: 0 auto;
}

/* Info-Sektion */
.ib-info-section {
    padding: 24px 32px;
    background: #fff;
    border-top: 1px solid #e2e8f0;
}

/* Accordion */
.ib-accordion {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    margin-bottom: 12px;
}

.ib-accordion:last-child {
    margin-bottom: 0;
}

.ib-accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    cursor: pointer;
    transition: background 0.2s;
}

.ib-accordion-header:hover {
    background: #f7f9fc;
}

.ib-accordion-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ib-blue);
}

.ib-accordion-icon {
    font-size: 16px;
    opacity: 0.6;
}

.ib-accordion-arrow {
    font-size: 10px;
    color: #94a3b8;
    transition: transform 0.2s;
}

.ib-accordion.active .ib-accordion-arrow {
    transform: rotate(180deg);
}

.ib-accordion-content {
    display: none;
    padding: 0 18px 18px 18px;
}

.ib-accordion.active .ib-accordion-content {
    display: block;
}

/* Faktoren Grid */
.ib-factors-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.ib-factor-item {
    padding: 12px 14px;
    background: #f8fafc;
    border-radius: 8px;
}

.ib-factor-label {
    font-size: 11px;
    color: #7c889b;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ib-factor-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--ib-blue);
}

.ib-factor-impact {
    font-size: 11px;
    color: #6b7280;
    margin-top: 2px;
}

/* Vergleichsobjekte */
.ib-comparisons-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ib-comparison-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 3px solid var(--ib-gold);
}

.ib-comparison-details {
    font-size: 14px;
    color: #475569;
}

.ib-comparison-price {
    font-size: 16px;
    font-weight: 600;
    color: var(--ib-gold);
}

.ib-comparison-avg {
    margin-top: 16px;
    padding: 16px;
    background: #fff7e6;
    border-radius: 10px;
    text-align: center;
}

.ib-comparison-avg-label {
    font-size: 12px;
    color: var(--ib-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.ib-comparison-avg-value {
    font-size: 24px;
    font-weight: 700;
    color: #7a5a1b;
}

/* Konfidenz-Balken */
.ib-confidence-section {
    padding: 18px 32px;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
}

.ib-confidence-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.ib-confidence-label {
    font-size: 12px;
    font-weight: 500;
    color: #888;
}

.ib-confidence-value {
    font-size: 12px;
    font-weight: 500;
    color: #666;
}

.ib-confidence-bar {
    height: 4px;
    background: #e5e5e5;
    border-radius: 2px;
    overflow: hidden;
}

.ib-confidence-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.6s ease-out;
}

.ib-confidence-fill.high {
    background: var(--ib-gold);
}

.ib-confidence-fill.medium {
    background: #f59e0b;
}

.ib-confidence-fill.low {
    background: #e74c3c;
}

.ib-confidence-hint {
    font-size: 11px;
    color: #aaa;
    margin-top: 6px;
}

/* Methodik Badge */
.ib-method-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f5f5f5;
    border-radius: 6px;
    margin-bottom: 16px;
}

.ib-method-icon {
    font-size: 16px;
    opacity: 0.7;
}

.ib-method-text {
    font-size: 12px;
    color: #666;
}

.ib-method-text strong {
    font-weight: 500;
    color: #333;
}

/* CTA Sektion */
.ib-cta-section {
    padding: 20px 32px;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.ib-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}

.ib-cta-primary {
    background: linear-gradient(135deg, var(--ib-gold) 0%, var(--ib-gold-2) 100%);
    color: #0f294d;
    border: none;
}

.ib-cta-primary:hover {
    filter: brightness(1.03);
}

.ib-cta-secondary {
    background: #fff;
    color: var(--ib-blue);
    border: 1px solid #e2e8f0;
}

.ib-cta-secondary:hover {
    background: #f7f9fc;
    border-color: #d7deea;
}

/* Disclaimer neu */
.ib-disclaimer-new {
    padding: 16px 32px;
    background: #fafafa;
    text-align: center;
}

.ib-disclaimer-text {
    font-size: 11px;
    color: #aaa;
    line-height: 1.5;
    max-width: 500px;
    margin: 0 auto;
}

.ib-disclaimer-link {
    color: #666;
    text-decoration: none;
}

.ib-disclaimer-link:hover {
    text-decoration: underline;
}

/* Features Erklärung */
.ib-features-explanation {
    font-size: 13px;
    line-height: 1.6;
    color: #555;
}

.ib-features-intro {
    margin: 0 0 16px 0;
    color: #666;
}

.ib-feature-category {
    margin-bottom: 14px;
}

.ib-feature-category h4 {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    margin: 0 0 6px 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ib-feature-category ul {
    margin: 0;
    padding: 0 0 0 16px;
    list-style: none;
}

.ib-feature-category li {
    position: relative;
    padding-left: 12px;
    margin-bottom: 4px;
    font-size: 12px;
    color: #666;
}

.ib-feature-category li::before {
    content: "–";
    position: absolute;
    left: 0;
    color: #bbb;
}

.ib-feature-category li strong {
    color: #444;
    font-weight: 500;
}

.ib-features-note {
    margin: 14px 0 0 0;
    padding-top: 12px;
    border-top: 1px solid #eee;
    font-size: 11px;
    color: #999;
}

/* Transparenz-Hinweis */
.ib-transparency-note {
    margin-top: 16px;
    padding: 14px 16px;
    background: #f9f9f9;
    border-radius: 6px;
}

.ib-transparency-title {
    font-size: 12px;
    font-weight: 500;
    color: #666;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ib-transparency-title span {
    font-size: 14px;
}

.ib-transparency-text {
    font-size: 12px;
    color: #888;
    line-height: 1.5;
}

/* Responsive für neue Elemente */
@media (max-width: 768px) {
    .ib-price-tiers {
        grid-template-columns: 1fr;
    }
    
    .ib-price-tier {
        border-right: none;
        border-bottom: 1px solid #e8e8e8;
    }
    
    .ib-price-tier:last-child {
        border-bottom: none;
    }
    
    .ib-tier-range::before {
        position: static;
        transform: none;
        display: inline-block;
        margin-bottom: 12px;
        border-radius: 20px;
    }
    
    .ib-factors-grid {
        grid-template-columns: 1fr;
    }
    
    .ib-result-hero {
        padding: 20px;
    }
    
    .ib-property-summary {
        flex-direction: column;
        align-items: center;
    }
    
    .ib-info-section,
    .ib-confidence-section,
    .ib-cta-section,
    .ib-disclaimer-new {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .ib-cta-section {
        flex-direction: column;
    }
    
    .ib-cta-btn {
        width: 100%;
        justify-content: center;
    }
    
    .ib-tier-price {
        font-size: 32px;
    }
}

/* Animation für Ergebnis-Einblendung */
@keyframes ib-slide-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ib-result-new {
    animation: ib-slide-up 0.5s ease-out;
}

.ib-price-tier {
    animation: ib-slide-up 0.5s ease-out;
    animation-fill-mode: both;
}

.ib-price-tier:nth-child(1) { animation-delay: 0.1s; }
.ib-price-tier:nth-child(2) { animation-delay: 0.2s; }
.ib-price-tier:nth-child(3) { animation-delay: 0.3s; }

/* =====================================================
   KONTAKTFORMULAR MODAL
   ===================================================== */

/* Body Scroll Lock */
body.ib-modal-open {
    overflow: hidden;
}

/* Modal Container */
.ib-contact-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

/* Backdrop */
.ib-contact-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 58, 92, 0.8);
    backdrop-filter: blur(4px);
}

/* Modal Content */
.ib-contact-content {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    max-width: 540px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.35);
    animation: ib-modal-slide-up 0.3s ease-out;
}

@keyframes ib-modal-slide-up {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal Header */
.ib-contact-header {
    background: linear-gradient(135deg, var(--ib-primary) 0%, var(--ib-primary-dark) 100%);
    color: #ffffff;
    padding: 32px 35px;
    text-align: center;
    border-radius: 12px 12px 0 0;
    position: relative;
}

.ib-contact-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--ib-accent);
}

.ib-contact-header .ib-contact-icon {
    font-size: 40px;
    margin-bottom: 12px;
    display: block;
}

.ib-contact-header h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 700;
}

.ib-contact-header p {
    margin: 0;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

/* Modal Body / Contact Form */
.ib-contact-body,
.ib-contact-form {
    padding: 30px 35px 35px 35px;
}

/* Form Rows */
.ib-contact-row {
    margin-bottom: 20px;
}

.ib-contact-row label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ib-text);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ib-contact-row label .required {
    color: #dc3545;
}

/* Input Fields */
.ib-contact-row input[type="text"],
.ib-contact-row input[type="email"],
.ib-contact-row input[type="tel"],
.ib-contact-row select,
.ib-contact-row textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border: 1px solid var(--ib-border);
    border-radius: 6px;
    background: #fff;
    color: var(--ib-text);
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.ib-contact-row input[type="text"]:focus,
.ib-contact-row input[type="email"]:focus,
.ib-contact-row input[type="tel"]:focus,
.ib-contact-row select:focus,
.ib-contact-row textarea:focus {
    outline: none;
    border-color: var(--ib-primary);
    box-shadow: 0 0 0 3px rgba(26, 58, 92, 0.1);
}

.ib-contact-row textarea {
    min-height: 100px;
    resize: vertical;
}

.ib-contact-row select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%235a6c7d' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 20px;
    padding-right: 40px;
}

/* Checkbox Wrapper */
.ib-contact-checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--ib-bg-light);
    border-radius: 6px;
    border: 1px solid var(--ib-border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.ib-contact-checkbox-wrapper:hover {
    border-color: var(--ib-primary-light);
}

.ib-contact-checkbox-wrapper input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--ib-accent);
    flex-shrink: 0;
}

.ib-contact-checkbox-label {
    flex: 1;
}

.ib-contact-checkbox-label span {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--ib-primary);
    margin-bottom: 2px;
}

.ib-contact-checkbox-label small {
    font-size: 13px;
    color: var(--ib-text-light);
}

/* Kontaktwunsch Section */
.ib-contact-wish-section {
    margin: 20px 0;
}

.ib-contact-wish-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border: 2px solid var(--ib-border);
    border-radius: 10px;
    padding: 5px;
    transition: all 0.25s ease;
}

.ib-contact-wish-box:hover {
    border-color: var(--ib-accent);
}

.ib-contact-wish-box:has(input:checked) {
    background: linear-gradient(135deg, #fffdf9 0%, #fff8ec 100%);
    border-color: var(--ib-accent);
    box-shadow: 0 4px 12px rgba(212, 168, 85, 0.15);
}

.ib-contact-wish-checkbox {
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
}

.ib-contact-wish-checkbox .ib-checkbox-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ib-contact-wish-checkbox .ib-checkbox-text strong {
    font-size: 15px;
    color: var(--ib-primary);
}

.ib-contact-wish-checkbox .ib-checkbox-text small {
    font-size: 13px;
    color: var(--ib-text-light);
}

/* Extra Felder bei Kontaktwunsch */
.ib-contact-extra-fields {
    padding: 20px;
    margin: 15px 0;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid var(--ib-border);
    border-left: 4px solid var(--ib-accent);
}

.ib-contact-extra-fields .ib-contact-row:last-child {
    margin-bottom: 0;
}

/* Privacy Checkbox */
.ib-contact-privacy {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 13px;
    color: var(--ib-text-light);
    line-height: 1.6;
    padding: 16px;
    background: var(--ib-bg-light);
    border-radius: 8px;
    margin-top: 20px;
    border: 1px solid var(--ib-border);
}

.ib-contact-privacy .ib-contact-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.ib-contact-privacy input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--ib-accent);
    flex-shrink: 0;
}

.ib-contact-privacy .ib-checkbox-text {
    flex: 1;
}

.ib-contact-privacy a {
    color: var(--ib-primary);
    text-decoration: underline;
    font-weight: 500;
}

/* Buttons */
.ib-contact-buttons,
.ib-contact-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.ib-contact-submit-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 28px;
    font-size: 15px;
    font-weight: 700;
    color: var(--ib-primary-dark);
    background: linear-gradient(135deg, var(--ib-accent) 0%, var(--ib-accent-hover) 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 6px 20px rgba(212, 168, 85, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ib-contact-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--ib-accent-hover) 0%, var(--ib-accent) 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 168, 85, 0.5);
}

.ib-contact-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.ib-contact-submit-btn .ib-btn-loading {
    display: none;
}

/* Mobile Responsive - Kontaktformular */
@media (max-width: 600px) {
    .ib-contact-modal {
        padding: 0;
        align-items: flex-end;
    }
    
    .ib-contact-content {
        border-radius: 16px 16px 0 0;
        max-height: 95vh;
        width: 100%;
        max-width: 100%;
    }
    
    .ib-contact-header {
        padding: 28px 24px;
        border-radius: 16px 16px 0 0;
    }
    
    .ib-contact-header .ib-contact-icon {
        font-size: 36px;
    }
    
    .ib-contact-header h3 {
        font-size: 20px;
    }
    
    .ib-contact-header p {
        font-size: 14px;
    }
    
    .ib-contact-body,
    .ib-contact-form {
        padding: 24px 20px 30px 20px;
    }
    
    .ib-contact-buttons,
    .ib-contact-actions {
        flex-direction: column;
    }
    
    .ib-contact-submit-btn {
        padding: 16px 20px;
        font-size: 14px;
    }
    
    .ib-contact-privacy {
        padding: 14px;
    }
}

/* Main Form Responsive */
@media (max-width: 768px) {
    .ib-bewertung-container {
        border-radius: 0;
        box-shadow: none;
    }
    
    .ib-form-wrapper {
        padding: 20px;
    }
    
    .ib-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .ib-field-half,
    .ib-field-third {
        flex: 0 0 100%;
    }
    
    .ib-submit-btn {
        width: 100%;
        min-width: auto;
    }
    
    .ib-checkboxes {
        flex-direction: column;
    }
    
    .ib-checkbox {
        width: 100%;
    }
}
