*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --navy:   #1e3a6e;
    --navy-hover: #2a4f8c;
    --gold:   #b8860b;
    --bg:     #f0f3f9;
    --card:   #ffffff;
    --border: #dde3ee;
    --text:   #1e3a6e;
    --muted:  #8892a4;
    --prog-empty: #d4dcea;
    --radius: 14px;
    --shadow: 0 2px 12px rgba(30,58,110,.09);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── NAVBAR ────────────────────────────────────────── */
.navbar {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 200;
}
.nav-inner {
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 1.75rem;
    height: 62px;
    display: flex;
    align-items: center;
    gap: 2.5rem;
}
.nav-brand {
    font-weight: 700;
    font-size: 1rem;
    color: var(--navy);
    white-space: nowrap;
}
.nav-links {
    display: flex;
    gap: 1.75rem;
    list-style: none;
    flex: 1;
}
.nav-links li {
    font-size: .875rem;
    color: var(--muted);
    cursor: pointer;
    padding: .35rem 0;
    transition: color .2s;
}
.nav-links li:hover { color: var(--navy); }
.nav-links li.active {
    color: var(--navy);
    font-weight: 600;
    border-bottom: 2.5px solid var(--navy);
}
.nav-actions { display: flex; gap: .6rem; }
.icon-btn {
    width: 38px; height: 38px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: transparent;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--navy);
    transition: background .2s, border-color .2s;
}
.icon-btn:hover { background: var(--bg); }

/* ── MAIN ───────────────────────────────────────────── */
.main {
    flex: 1;
    padding: 1.5rem 1.25rem 100px; /* Added padding to prevent content from being hidden by the fixed footer */
}
.container {
    max-width: 660px;
    margin: 0 auto;
}

/* Step label */
.step-label {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .14em;
    color: var(--muted);
    text-transform: uppercase;
    margin-bottom: .55rem;
}

/* Step header */
.step-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}
.step-title {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--navy);
}
.step-icon {
    flex-shrink: 0;
    margin-top: .2rem;
}

/* ── PROGRESS BAR ──────────────────────────────────── */
.progress-bar {
    display: flex;
    gap: 6px;
    margin-bottom: 2rem;
}
.progress-seg {
    flex: 1;
    height: 5px;
    border-radius: 99px;
    background: var(--prog-empty);
    transition: background .4s ease;
}
.progress-seg.filled { background: var(--navy); }

/* ── VIDEO PLAYER ──────────────────────────────────── */
.video-wrapper {
    width: 100%;
    margin-bottom: 2rem;
    text-align: center;
}
.video-box {
    position: relative;
    width: 100%;
    max-width: 520px; /* Cap for desktop to keep it balanced */
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(14,30,60,.28);
    transition: all 0.3s ease;
}

.video-box iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: 0;
}

/* ── CONTENT CARD ──────────────────────────────────── */
.content-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--shadow);
}

/* ── FORM STEPS ────────────────────────────────────── */
.form-step {
    display: none;
    animation: fadeIn .4s ease-out;
}
.form-step.active {
    display: block;
}

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

.content-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: .65rem;
}
.content-card p {
    font-size: .875rem;
    line-height: 1.65;
    color: #5a6880;
    margin-bottom: 1.25rem;
}
.bullet-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .6rem .5rem;
}
.bullet-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .84rem;
    color: #445065;
}
.bullet-item::before {
    content: '';
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--navy);
    flex-shrink: 0;
}

/* ── FORM (paso 2) ─────────────────────────────────── */
.form-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--shadow);
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.form-group { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }
.form-group label { font-size: .8rem; font-weight: 600; color: var(--navy); }
.form-group input,
.form-group select {
    padding: .7rem .9rem;
    border: 1.5px solid var(--border);
    border-radius: 9px;
    font-family: inherit;
    font-size: .875rem;
    color: var(--text);
    background: var(--bg);
    transition: border-color .2s;
    outline: none;
}
.form-group input:focus,
.form-group select:focus { border-color: var(--navy); background: white; }

/* ── INFO CARD & NOTICE BANNER (paso 2) ────────────── */
.info-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}
.info-card h2 {
    font-size: 1.4rem;
    color: var(--navy);
    margin-bottom: 1rem;
    font-weight: 700;
}
.info-card p {
    font-size: .9rem;
    line-height: 1.6;
    color: #4a5568;
    margin-bottom: 1.25rem;
}

.notice-banner {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1.5rem;
    background: #fffaf0; /* Light orange bg */
    border: 1.25px solid #ed8936; /* Orange border */
    border-radius: 10px;
    max-width: 520px;
    margin: 0 auto 1.25rem;
}
.notice-icon {
    flex-shrink: 0;
    color: #ed8936;
}
.notice-content {
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

.notice-text {
    font-size: .78rem;
    line-height: 1.4;
    color: #744210;
    margin: 0 !important;
}

.info-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--navy);
    margin: 1.25rem 0 .75rem;
}

.ready-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: .65rem;
    margin-bottom: 1.5rem;
}
.ready-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .875rem;
    color: #4a5568;
}
.ready-item::before {
    content: '•';
    color: var(--navy);
    font-weight: 900;
    font-size: 1.2rem;
}

/* ── UPLOAD FORM (paso 3) ──────────────────────────── */
.user-data-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

.upload-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--shadow);
}

.drop-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: 2.5rem 1.5rem;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    cursor: pointer;
    transition: border-color .2s, background .2s;
    text-align: center;
}
.drop-zone:hover,
.drop-zone.active {
    border-color: var(--navy);
    background: #eaf0fb;
}
.drop-title {
    font-size: .95rem;
    font-weight: 600;
    color: var(--navy);
    margin-top: .35rem;
}
.drop-sub {
    font-size: .83rem;
    color: var(--muted);
}
.drop-link {
    color: var(--navy);
    text-decoration: underline;
    font-weight: 500;
}
.drop-formats {
    font-size: .73rem;
    color: var(--muted);
    margin-top: .2rem;
}

.file-list {
    list-style: none;
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.file-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .65rem .85rem;
    background: var(--bg);
    border-radius: 9px;
    border: 1px solid var(--border);
}
.file-name {
    flex: 1;
    font-size: .84rem;
    font-weight: 500;
    color: var(--navy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.file-size {
    font-size: .75rem;
    color: var(--muted);
    white-space: nowrap;
    flex-shrink: 0;
}
.file-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted);
    display: flex;
    align-items: center;
    padding: 2px;
    border-radius: 4px;
    transition: color .2s, background .2s;
    flex-shrink: 0;
}
.file-remove:hover { color: #c62828; background: #fdecea; }

/* ── PRIVACY CHECKBOX ─────────────────────────────── */
.privacy-container {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.privacy-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.privacy-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--navy);
    cursor: pointer;
    flex-shrink: 0;
}

.privacy-text {
    font-size: 0.85rem;
    color: var(--text);
    line-height: 1.4;
}

.privacy-text a {
    color: var(--navy);
    font-weight: 600;
    text-decoration: underline;
}

.privacy-text a:hover {
    color: var(--navy-hover);
}

/* ── BOTTOM NAV ─────────────────────────────────────── */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card);
    border-top: 1px solid var(--border);
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottom-inner {
    max-width: 1060px;
    margin: 0 auto;
    padding: 0.75rem 1.75rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.btn-prev {
    display: flex; align-items: center; gap: .4rem;
    font-size: .875rem; font-weight: 500;
    color: var(--navy); text-decoration: none;
    transition: opacity .2s;
    background: none;
    border: none;
    outline: none;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}
.btn-prev:hover { opacity: .7; }
.btn-prev:focus { outline: none; }
.btn-prev.disabled { color: var(--muted); pointer-events: none; }

.dots { display: flex; gap: .5rem; align-items: center; }
.dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--prog-empty);
    text-decoration: none;
    transition: background .3s, transform .2s;
    display: block;
}
.dot.active { background: var(--navy); transform: scale(1.2); }

.btn-next {
    display: flex; align-items: center; gap: .4rem;
    background: var(--navy);
    color: white;
    text-decoration: none;
    font-size: .875rem; font-weight: 600;
    padding: .7rem 1.6rem;
    border-radius: 10px;
    border: none; cursor: pointer;
    transition: background .2s, transform .15s, box-shadow .2s;
    box-shadow: 0 4px 14px rgba(30,58,110,.25);
    justify-self: end;
}
.btn-next:hover {
    background: var(--navy-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(30,58,110,.3);
}
.btn-next:active { transform: translateY(0); }
.btn-next:focus { outline: none; }

/* ── DOCUMENTS LIST (paso 3) ───────────────────────── */
.documents-list {
    margin-top: 2rem;
}
.docs-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 1rem;
}
.docs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.doc-item {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    padding: 1.15rem;
    background: var(--card);
    border-radius: var(--radius);
    border: 1.5px solid var(--border);
    box-shadow: var(--shadow);
    transition: transform .2s, border-color .2s;
}
.doc-item:hover {
    transform: translateY(-3px);
    border-color: var(--navy);
}
.doc-icon {
    width: 40px;
    height: 40px;
    background: var(--bg);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy);
    flex-shrink: 0;
}
.doc-info {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}
.doc-name {
    font-size: .9rem;
    font-weight: 600;
    color: var(--navy);
}
.doc-desc {
    font-size: .78rem;
    color: var(--muted);
    line-height: 1.4;
}

/* Documento opcional */
.doc-item.doc-optional {
    border-style: solid;
    background: #f0f9ff;
    border-color: #bae6fd;
    box-shadow: none;
}
.doc-item.doc-optional .doc-icon {
    background: white;
    border: 1px solid var(--border);
    color: var(--muted);
}
.doc-item.doc-optional .doc-name::after {
    content: 'Si aplica';
    display: inline-block;
    margin-left: .5rem;
    font-size: .6rem;
    font-weight: 700;
    text-transform: uppercase;
    background: #e0f2fe;
    color: #0369a1;
    padding: 2px 5px;
    border-radius: 4px;
    vertical-align: middle;
}

/* ── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 600px) {
    .nav-links { display: none; }
    .step-title { font-size: 1.4rem; }
    .bullet-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .docs-grid { grid-template-columns: 1fr; }
    .bottom-inner { 
        padding: 0.75rem 1rem;
        gap: 0.5rem;
    }
    .btn-next { padding: 0.65rem 1.25rem; font-size: 0.8rem; }
    .btn-prev { font-size: 0.8rem; }
    .dots { gap: 0.35rem; }
    .user-data-fields { grid-template-columns: 1fr; }
}

/* ── RESULT MODAL ───────────────────────────────────── */
.result-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(14, 30, 60, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.result-modal-overlay.visible {
    opacity: 1;
    pointer-events: all;
}
.result-modal-box {
    background: var(--card, #fff);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(14, 30, 60, 0.25);
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    transform: scale(0.92) translateY(12px);
    transition: transform 0.3s ease;
}
.result-modal-overlay.visible .result-modal-box {
    transform: scale(1) translateY(0);
}
.result-modal-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}
.success-icon { background: linear-gradient(135deg, #38a169, #48bb78); }
.error-icon   { background: linear-gradient(135deg, #e53e3e, #fc8181); }

.result-modal-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--navy, #1e3a6e);
    margin-top: 0.5rem;
}
.result-modal-msg {
    font-size: 0.9rem;
    color: var(--muted, #64748b);
    line-height: 1.6;
    margin-top: 0.25rem;
}
.result-modal-btn {
    display: inline-block;
    margin-top: 1.25rem;
    padding: 0.75rem 2.5rem;
    background: linear-gradient(135deg, var(--navy, #1e3a6e), #2d5aa0);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    font-family: inherit;
}
.result-modal-btn:hover { opacity: 0.85; }
.result-modal-btn.error-btn {
    background: linear-gradient(135deg, #e53e3e, #c53030);
}
