/* NIS2 Selbstcheck – Custom Styles */

/* ============================================
   CSS Variables & Base
   ============================================ */
:root {
    --primary-color: #003366;
    --secondary-color: #0066cc;
    --result-yes-bg: #fff0f0;
    --result-yes-border: #dc3545;
    --result-yes-text: #b00020;
    --result-no-bg: #f0fff0;
    --result-no-border: #28a745;
    --result-no-text: #006b1f;
    --result-unclear-bg: #fffde6;
    --result-unclear-border: #ffc107;
    --result-unclear-text: #856404;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: #f8f9fa;
    color: #333;
}

/* ============================================
   Navbar & Brand
   ============================================ */
.navbar {
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.brand-text {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* ============================================
   Progress Bar
   ============================================ */
.progress-wrapper {
    padding: 0 0.5rem;
}

.progress-label {
    font-size: 0.75rem;
    color: #999;
    font-weight: 500;
    transition: color 0.3s;
}

.progress-label.active {
    color: var(--primary-color);
    font-weight: 700;
}

.progress-label.completed {
    color: var(--secondary-color);
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.4s ease;
    border-radius: 3px;
}

/* ============================================
   Cards
   ============================================ */
.card {
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-radius: 12px;
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border-bottom: none;
    padding: 1rem 1.25rem;
}

.card-header h5 {
    color: #fff;
}

.card-body {
    padding: 1.5rem;
}

/* ============================================
   Wizard Blocks
   ============================================ */
.wizard-block {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.wizard-block.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   Form Elements
   ============================================ */
.question-group {
    position: relative;
}

.question-group .form-label {
    font-size: 0.95rem;
    line-height: 1.5;
}

.form-check {
    padding: 0.5rem 0.75rem 0.5rem 2rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.form-check:hover {
    background-color: #f0f4ff;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-select:focus,
.form-check-input:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.15);
}

.form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.15);
}

/* Validation */
.question-group.is-invalid .form-check-input,
.question-group.is-invalid .form-select {
    border-color: #dc3545;
}

.question-group.is-invalid .invalid-feedback {
    display: block;
}

/* ============================================
   Hints
   ============================================ */
.hint-toggle {
    color: var(--secondary-color);
    text-decoration: none;
}

.hint-toggle:hover {
    color: var(--primary-color);
}

.hint-text {
    background: #f0f7ff;
    border-left: 3px solid var(--secondary-color);
    padding: 0.75rem;
    border-radius: 0 6px 6px 0;
    margin-top: 0.5rem;
}

/* ============================================
   Buttons
   ============================================ */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.3);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.btn-success {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 8px;
}

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

.btn-outline-secondary {
    border-radius: 8px;
}

/* ============================================
   Sector Groups
   ============================================ */
.text-primary-custom {
    color: var(--primary-color) !important;
    font-weight: 600;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.25rem;
}

/* ============================================
   Result Page
   ============================================ */
.result-card {
    border-radius: 16px;
    overflow: hidden;
}

.result-card.result-yes {
    background-color: var(--result-yes-bg);
    border: 2px solid var(--result-yes-border);
}

.result-card.result-no {
    background-color: var(--result-no-bg);
    border: 2px solid var(--result-no-border);
}

.result-card.result-unclear {
    background-color: var(--result-unclear-bg);
    border: 2px solid var(--result-unclear-border);
}

.result-icon {
    font-size: 3rem;
}

.result-yes .result-icon { color: var(--result-yes-border); }
.result-no .result-icon { color: var(--result-no-border); }
.result-unclear .result-icon { color: var(--result-unclear-border); }

.result-title {
    font-weight: 700;
}

.result-yes .result-title { color: var(--result-yes-text); }
.result-no .result-title { color: var(--result-no-text); }
.result-unclear .result-title { color: var(--result-unclear-text); }

.result-description {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ============================================
   Digital Services Detail
   ============================================ */
.digital-services-detail {
    border-left: 3px solid var(--secondary-color);
    padding-left: 1rem;
    background: #f8fbff;
    border-radius: 0 8px 8px 0;
    padding: 0.75rem 1rem;
}

/* ============================================
   Footer
   ============================================ */
footer {
    font-size: 0.85rem;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .progress-label {
        font-size: 0.6rem;
    }

    .card-body {
        padding: 1rem;
    }

    .btn {
        font-size: 0.9rem;
    }

    .result-icon {
        font-size: 2.5rem;
    }

    h1.h3 {
        font-size: 1.3rem;
    }
}

@media (max-width: 576px) {
    .progress-label {
        font-size: 0.55rem;
        text-align: center;
    }

    .d-flex.justify-content-between.mt-4 {
        flex-direction: column;
        gap: 0.5rem;
    }

    .d-flex.justify-content-between.mt-4 .ms-auto {
        margin-left: 0 !important;
        display: flex;
        gap: 0.5rem;
    }

    .d-flex.justify-content-between.mt-4 .ms-auto .btn {
        flex: 1;
    }
}

/* ============================================
   Admin Area
   ============================================ */
.admin-section {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 1.5rem;
}

.admin-section h5 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.color-preview {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    border: 2px solid #dee2e6;
    cursor: pointer;
}
