/* ================================================================
   inscripcion.css — Sistema de Inscripción Escolar
   Paleta: Blanco puro / Grises claros (#F8FAFC, #F1F5F9) / Naranja (#F97316)
   Estilo: 100% Claro (Luminoso, limpio, sin colores oscuros)
   ================================================================ */

/* ── Variables ─────────────────────────────────────────────────── */
:root {
    --orange:        #F97316;
    --orange-dark:   #EA580C;
    --orange-light:  #FED7AA;
    --orange-xlight: #FFF7ED;
    --gray-50:       #F8FAFC;
    --gray-100:      #F1F5F9;
    --gray-200:      #E2E8F0;
    --gray-300:      #CBD5E1;
    --gray-400:      #94A3B8;
    --gray-500:      #64748B;
    --gray-600:      #475569;
    --gray-700:      #334155;
    --gray-800:      #1E293B;
    --gray-900:      #0F172A;
    --white:         #FFFFFF;
    --shadow-sm:     0 1px 3px rgba(0,0,0,.05), 0 1px 2px rgba(0,0,0,.03);
    --shadow-md:     0 4px 12px rgba(0,0,0,.06), 0 2px 4px rgba(0,0,0,.04);
    --shadow-lg:     0 10px 25px rgba(0,0,0,.08), 0 4px 8px rgba(0,0,0,.04);
    --radius:        12px;
    --radius-sm:     8px;
    --radius-lg:     18px;
    --transition:    .25s cubic-bezier(.4,0,.2,1);
}

/* ── Base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: #F8FAFC;
    color: var(--gray-800);
    font-size: .9375rem;
    line-height: 1.6;
}

/* Ancho en escritorio al 80% */
@media (min-width: 992px) {
    .container-wide {
        width: 80% !important;
        max-width: 1500px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

a { color: var(--orange-dark); text-decoration: none; }
a:hover { color: var(--orange); text-decoration: underline; }

/* ── Navbar ─────────────────────────────────────────────────────── */
.navbar {
    padding: .75rem 0;
    position: sticky;
    top: 0;
    z-index: 1040;
    background: var(--white) !important;
}

.brand-icon {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 2px 8px rgba(249,115,22,.25);
}

.brand-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--gray-800);
    line-height: 1.2;
}

.brand-sub {
    font-size: .7rem;
    color: var(--gray-500);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.badge-curp {
    background: var(--orange-xlight);
    color: var(--orange-dark);
    border: 1px solid var(--orange-light);
    padding: .3rem .75rem;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 600;
}

/* ── Dashboard Banner (100% Claro, Sin colores oscuros) ─────────── */
.dashboard-banner {
    background: linear-gradient(135deg, #FFFFFF 0%, #FFF7ED 100%);
    border: 1.5px solid var(--orange-light);
    color: var(--gray-800);
    border-radius: var(--radius-lg);
    padding: 2rem 2.5rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.dashboard-banner::after {
    content: '';
    position: absolute;
    right: -40px; top: -40px;
    width: 220px; height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(249,115,22,.12) 0%, transparent 70%);
}

.dash-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1.5px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    padding: 1.75rem;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
}

.dash-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--orange);
}

.dash-card-icon {
    width: 54px; height: 54px;
    border-radius: var(--radius);
    background: var(--orange-xlight);
    color: var(--orange-dark);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    border: 1px solid var(--orange-light);
}

.dash-card.completed {
    border-color: #86efac;
    background: #FAFDFA;
}

.dash-card.completed .dash-card-icon {
    background: #f0fdf4;
    color: #15803d;
    border-color: #86efac;
}

.dash-status-badge {
    position: absolute;
    top: 1.5rem; right: 1.5rem;
    font-size: .75rem;
    font-weight: 700;
    padding: .35rem .75rem;
    border-radius: 20px;
}

.dash-status-pending { background: #fff7ed; color: #c2410c; border: 1px solid #ffedd5; }
.dash-status-done { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

/* ── Sub-Dashboard Cards ────────────────────────────────────────── */
.subdash-header {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    margin-bottom: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}

.subdash-card {
    background: var(--white);
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: all var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.subdash-card:hover {
    border-color: var(--orange);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.subdash-card.completed {
    border-color: #86efac;
    background: #f0fdf4;
}

.subdash-card.completed:hover {
    border-color: #4ade80;
    transform: none;
    box-shadow: none;
}

/* ── Form Controls ──────────────────────────────────────────────── */
.form-label {
    font-weight: 600;
    font-size: .875rem;
    color: var(--gray-700);
    margin-bottom: .4rem;
}

.form-control, .form-select {
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-sm);
    padding: .65rem 1rem;
    font-size: .9rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    background: var(--white);
    color: var(--gray-800);
}

.form-control:focus, .form-select:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(249,115,22,.15);
    outline: none;
}

.form-control.is-invalid { border-color: #dc2626; background-color: #fef2f2; }

.curp-input {
    font-family: 'Courier New', monospace;
    font-size: 1.05rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    text-align: center;
}

/* ── Buttons ────────────────────────────────────────────────────── */
.btn-primary-orange {
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: .75rem 2rem;
    font-weight: 600;
    font-size: .95rem;
    transition: transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 4px 14px rgba(249,115,22,.3);
}

.btn-primary-orange:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249,115,22,.4);
    color: white;
}

.btn-outline-orange {
    border: 1.5px solid var(--orange);
    color: var(--orange-dark);
    background: transparent;
    border-radius: var(--radius-sm);
    padding: .6rem 1.5rem;
    font-weight: 600;
    font-size: .9rem;
    transition: all var(--transition);
}

.btn-outline-orange:hover, .btn-outline-orange.active {
    background: var(--orange);
    color: white;
}

/* ── Section Cards ──────────────────────────────────────────────── */
.section-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.section-header {
    background: var(--gray-50);
    border-bottom: 2px solid var(--orange-light);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: .75rem;
}

.section-icon {
    width: 42px; height: 42px;
    background: var(--orange-xlight);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    color: var(--orange-dark);
    flex-shrink: 0;
    border: 1px solid var(--orange-light);
}

.section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0;
}

.section-subtitle {
    font-size: .78rem;
    color: var(--gray-500);
    margin: 0;
}

.section-body { padding: 1.75rem; }

/* ── DUOLINGO-STYLE QUIZ (Una Pregunta a la Vez) ─────────────────── */
.duolingo-container {
    max-width: 780px;
    margin: 0 auto;
}

.duolingo-progress-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.duolingo-progress-bar {
    flex-grow: 1;
    height: 12px;
    background: var(--gray-200);
    border-radius: 10px;
    overflow: hidden;
}

.duolingo-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--orange), var(--orange-dark));
    border-radius: 10px;
    transition: width .35s ease-out;
}

.duolingo-card {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 2.25rem;
    box-shadow: var(--shadow-md);
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    animation: fadeInRight .3s ease forwards;
}

.duolingo-q-header {
    margin-bottom: 1.5rem;
}

.duolingo-q-badge {
    display: inline-block;
    background: var(--orange-xlight);
    color: var(--orange-dark);
    border: 1px solid var(--orange-light);
    padding: .3rem .85rem;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 700;
    margin-bottom: .75rem;
}

.duolingo-q-text {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.5;
}

.duolingo-options {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    margin-bottom: 2rem;
}

.duolingo-option-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--gray-800);
    font-size: .95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s ease;
    text-align: left;
    width: 100%;
}

.duolingo-option-btn:hover {
    border-color: var(--orange-light);
    background: var(--orange-xlight);
    transform: translateX(4px);
}

.duolingo-option-btn.selected {
    border-color: var(--orange);
    background: var(--orange-xlight);
    box-shadow: 0 0 0 3px rgba(249,115,22,.15);
    font-weight: 700;
    color: var(--orange-dark);
}

.duolingo-option-letter {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: var(--gray-100);
    color: var(--gray-700);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800;
    font-size: .85rem;
    flex-shrink: 0;
}

.duolingo-option-btn.selected .duolingo-option-letter {
    background: var(--orange);
    color: white;
}

.duolingo-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

/* ── Health / Checkboxes ────────────────────────────────────────── */
.check-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.check-option {
    display: flex;
    align-items: center;
    gap: .4rem;
    cursor: pointer;
}

.check-option input[type="radio"],
.check-option input[type="checkbox"] {
    accent-color: var(--orange);
    width: 1.1rem; height: 1.1rem;
    cursor: pointer;
}

/* ── Documents Upload ───────────────────────────────────────────── */
.doc-upload-item {
    background: var(--gray-50);
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
}

.doc-upload-item:hover {
    border-color: var(--orange);
    background: var(--orange-xlight);
}

.doc-upload-item.uploaded {
    border-color: #86efac;
    background: #f0fdf4;
}

.doc-icon {
    width: 48px; height: 48px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    background: var(--gray-200);
    color: var(--gray-500);
}

.doc-upload-item.uploaded .doc-icon { background: #bbf7d0; color: #15803d; }

.doc-upload-item input[type="file"] {
    position: absolute; inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%; height: 100%;
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .section-body { padding: 1rem; }
    .duolingo-card { padding: 1.5rem; }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(16px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes spin { to { transform: rotate(360deg); } }
.spinner-icon { animation: spin .8s linear infinite; display: inline-block; }

/* ── Document Preview Thumbnail ─────────────────────────────────── */
.doc-preview-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 2px solid #86efac;
    flex-shrink: 0;
    z-index: 1;
    pointer-events: none;
}

.doc-status { color: var(--gray-500); }
.doc-upload-item.uploaded .doc-status { color: #16a34a; font-weight: 600; }
