/* Zurück-Link */
.back-link {
    display: inline-block;
    color: white !important;
    text-decoration: none !important;
    font-size: 0.95em;
    margin-bottom: 15px;
    transition: color 0.2s ease;
    font-weight: 500;
}
.back-link:hover { color: #fab600 !important; text-decoration: underline !important; }
.back-link:visited { color: white !important; }
.back-link:active { color: #fab600 !important; }

/* Umfrage Container */
.umfrage-container { max-width: 900px; margin: 0 auto; }

/* Frageblock */
.frageblock {
    background: white;
    border-radius: 8px;
    padding: 50px;
    margin-bottom: 80px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 2px solid #d0d5dd;
    animation: fadeInUp 0.4s ease-out backwards;
}

.frageblock-titel {
    font-size: 1.6em;
    font-weight: 600;
    color: #004289;
    margin-bottom: 50px;
    padding-bottom: 25px;
    border-bottom: 3px solid #e1e6f1;
}

.frage-item { margin-bottom: 60px; }
.frage-item:last-child { margin-bottom: 0; }

.frage-text {
    display: block;
    font-size: 1.1em;
    font-weight: 500;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* TYP 3 */
.frageblock.typ-3 .frage-item { margin-bottom: 40px; }
.frageblock.typ-3 .frage-text {
    display: block; font-size: 1.05em; font-weight: 500;
    color: #333; margin-bottom: 12px; line-height: 1.6;
}
.frageblock.typ-3 .freitext-antwort {
    width: 100%; padding: 14px 18px;
    border: 2px solid #e1e6f1; border-radius: 6px;
    font-family: inherit; font-size: 0.95em;
    line-height: 1.5; resize: vertical; min-height: 80px;
    transition: border-color 0.2s ease;
}
.frageblock.typ-3 .freitext-antwort:focus {
    outline: none; border-color: #004289;
    box-shadow: 0 0 0 3px rgba(0, 66, 137, 0.1);
}
.frageblock.typ-3 .freitext-antwort::placeholder { color: #999; }

/* TYP 2: Desktop */
.typ2-mobile { display: none; }
.typ2-desktop { display: block; }

.frageblock.typ-2 .antworten-header {
    display: flex; background: #f8f9fa;
    border: 2px solid #d0d5dd;
    border-radius: 6px 6px 0 0; margin-bottom: 0;
}
.frageblock.typ-2 .antworten-header-leer {
    flex: 2; padding: 14px 18px;
    font-weight: 600; color: #333;
    border-right: 2px solid #d0d5dd;
}
.frageblock.typ-2 .antworten-header-option {
    flex: 1; padding: 14px 12px;
    text-align: center; font-weight: 600;
    font-size: 0.9em; color: #333;
    border-right: 2px solid #d0d5dd;
}
.frageblock.typ-2 .antworten-header-option:last-child { border-right: none; }

.frageblock.typ-2 .frage-item { margin-bottom: 0; }
.frageblock.typ-2 .frage-zeile {
    display: flex; border: 2px solid #d0d5dd;
    border-top: none; background: white;
    transition: background-color 0.2s ease;
}
.frageblock.typ-2 .frage-zeile:hover { background: #f8f9fa; }
.frageblock.typ-2 .frage-item:last-child .frage-zeile { border-radius: 0 0 6px 6px; }

.frageblock.typ-2 .frage-text-zelle {
    flex: 2; padding: 14px 18px;
    font-size: 1em; font-weight: 400;
    color: #333; line-height: 1.5;
    border-right: 2px solid #d0d5dd;
    display: flex; align-items: center;
}
.frageblock.typ-2 .antwort-zelle {
    flex: 1; padding: 14px 12px;
    display: flex; align-items: center; justify-content: center;
    border-right: 2px solid #d0d5dd;
    transition: background-color 0.2s ease;
}
.frageblock.typ-2 .antwort-zelle:last-child { border-right: none; }
.frageblock.typ-2 .antwort-zelle input[type="radio"] {
    width: 20px; height: 20px; margin: 0;
    cursor: pointer; accent-color: #004289;
}
.frageblock.typ-2 .antwort-zelle:has(input[type="radio"]:checked) { background: #e1e6f1; }

/* TYP 1 */
.frageblock.typ-1 .frage-item { margin-bottom: 35px; }
.frageblock.typ-1 .frage-item:last-child { margin-bottom: 0; }
.frageblock.typ-1 .frage-text { margin-bottom: 12px; font-size: 1em; }

.antworten-container.typ-horizontal {
    display: flex; flex-direction: row;
    gap: 0; align-items: stretch;
}
.antworten-container.typ-horizontal .antwort-option {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center; padding: 12px 10px;
    background: white; border: 2px solid #d0d5dd;
    border-right: none; cursor: pointer;
    transition: all 0.2s ease; flex: 1; min-width: 70px;
}
.antworten-container.typ-horizontal .antwort-option:first-child { border-radius: 6px 0 0 6px; }
.antworten-container.typ-horizontal .antwort-option:last-child {
    border-radius: 0 6px 6px 0;
    border-right: 2px solid #d0d5dd;
}
.antworten-container.typ-horizontal .antwort-option:hover {
    background: #f8f9fa; border-color: #004289; z-index: 1;
}
.antworten-container.typ-horizontal .antwort-option input[type="radio"] {
    width: 18px; height: 18px; margin: 0 0 6px 0;
    cursor: pointer; accent-color: #004289;
}
.antworten-container.typ-horizontal .antwort-option:has(input[type="radio"]:checked) {
    background: #e1e6f1; border-color: #004289; z-index: 2;
}
.antworten-container.typ-horizontal .antwort-text {
    font-size: 0.85em; color: #333;
    line-height: 1.3; word-break: break-word;
}
.antwort-option input[type="radio"]:checked + .antwort-text {
    font-weight: 600; color: #004289;
}

/* Freitext */
.freitext-antwort {
    width: 100%; padding: 14px 18px;
    border: 2px solid #e1e6f1; border-radius: 6px;
    font-family: inherit; font-size: 0.95em;
    line-height: 1.5; resize: vertical;
    transition: border-color 0.2s ease;
}
.freitext-antwort:focus {
    outline: none; border-color: #004289;
    box-shadow: 0 0 0 3px rgba(0, 66, 137, 0.1);
}
.freitext-antwort::placeholder { color: #999; }

/* Keine Fragen */
.no-questions {
    background: white; border-radius: 6px;
    padding: 40px; text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    border: 2px solid #e1e6f1;
}
.no-questions p { color: #666; font-size: 1.1em; }

/* Form Actions */
.form-actions {
    display: flex; gap: 16px;
    justify-content: flex-end;
    margin-top: 60px; padding-top: 50px;
    border-top: 3px solid #e1e6f1;
}

/* Buttons */
.btn {
    padding: 14px 36px; border: none;
    border-radius: 6px; font-size: 1.05em;
    font-weight: 600; cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none; display: inline-block;
}
.btn-primary { background: #004289; color: white; }
.btn-primary:hover {
    background: #003366;
    box-shadow: 0 3px 8px rgba(0, 66, 137, 0.3);
}
.btn-secondary { background: white; color: #004289; border: 2px solid #004289; }
.btn-secondary:hover { background: #f8f9fa; }

/* Animation */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    /* Typ 2: Desktop ausblenden, Mobile einblenden */
    .typ2-desktop { display: none !important; }
    .typ2-mobile { display: block !important; }

    .mobile-frage-card {
        background: white;
        border: 2px solid #d0d5dd;
        border-radius: 8px;
        padding: 15px;
        margin-bottom: 12px;
    }

    .mobile-frage-text {
        font-size: 1em; font-weight: 600;
        color: #333; margin-bottom: 12px;
        padding-bottom: 10px;
        border-bottom: 1px solid #e1e6f1;
        line-height: 1.5;
    }

    .mobile-antworten {
        display: flex; flex-direction: column; gap: 8px;
    }

    .mobile-antwort-label {
        display: flex; align-items: center; gap: 12px;
        padding: 12px; border: 1px solid #d0d5dd;
        border-radius: 6px; background: white;
        cursor: pointer; font-size: 1em; color: #333;
        transition: all 0.2s ease;
    }

    .mobile-antwort-label:has(input[type="radio"]:checked) {
        background: #e1e6f1;
        border-color: #004289;
        font-weight: 600;
    }

    .mobile-antwort-label input[type="radio"] {
        width: 22px; height: 22px;
        accent-color: #004289; flex-shrink: 0;
    }

    /* Typ 1 auf Mobile */
    .antworten-container.typ-horizontal { flex-direction: column; }
    .antworten-container.typ-horizontal .antwort-option {
        flex-direction: row; justify-content: flex-start;
        text-align: left; border-right: 2px solid #d0d5dd;
        border-radius: 6px !important; margin-bottom: 8px;
        padding: 12px; width: 100%;
    }
    .antworten-container.typ-horizontal .antwort-option input[type="radio"] {
        margin: 0 12px 0 0; width: 22px; height: 22px;
    }

    /* Allgemein */
    .frageblock { padding: 20px; margin-bottom: 30px; }
    .frageblock-titel { font-size: 1.2em; margin-bottom: 20px; }
    .frage-text { font-size: 1em; }
    .frage-item { margin-bottom: 25px; }
    .btn { width: 100%; padding: 16px; font-size: 1.1em; text-align: center; }
    .form-actions { flex-direction: column; }
    .freitext-antwort { font-size: 1em; min-height: 100px; }
}