@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

/* ── Reset & base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --azul-oscuro:   #0a1535;
    --azul-medio:    #0e2060;
    --azul-claro:    #1a3a8f;
    --azul-acento:   #2563eb;
    --blanco:        #ffffff;
    --gris-texto:    #cbd5e1;
    --gris-borde:    rgba(255,255,255,0.15);
    --input-bg:      rgba(255,255,255,0.07);
    --pill-border:   rgba(255,255,255,0.3);
    --btn-bg:        #f1f5f9;
    --btn-text:      #0a1535;
}

html, body {
    min-height: 100vh;
    font-family: 'Montserrat', 'Segoe UI', system-ui, sans-serif;
    color: var(--blanco);
    overflow-x: hidden;
}

#jd-splash,
#jd-no-miembro,
#jd-gracias,
#jd-gracias-no-miembro {
    background-image: url('../Img/Fondo.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* ── Pantallas ────────────────────────────────────────────────── */
.jd-pantalla        { display: none; }
.jd-pantalla.activa { display: flex; }

/* ══════════════════════════════════════════════════════
   SPLASH
══════════════════════════════════════════════════════ */
#jd-splash {
    min-height: 100vh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
#jd-splash::before,
#jd-splash::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: .22;
    pointer-events: none;
}
#jd-splash::before {
    width: 500px; height: 500px;
    background: #3b5fd4;
    bottom: -100px; left: -100px;
}
#jd-splash::after {
    width: 300px; height: 300px;
    background: #7c3aed;
    top: 10%; right: 5%;
}

.jd-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
    font-size: 13px;
    letter-spacing: 3px;
    font-weight: 700;
    opacity: .9;
    position: relative;
    text-transform: uppercase;
}
.jd-logo img { height: 26px; }

.jd-titulo {
    position: relative;
    margin-bottom: 32px;
    line-height: 1.1;
}
.jd-titulo .t1 {
    font-size: clamp(20px, 3.5vw, 34px);
    font-weight: 300;
    letter-spacing: 7px;
    text-transform: uppercase;
}
.jd-titulo .t2 {
    font-size: clamp(36px, 7vw, 66px);
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.jd-titulo .t3 {
    font-size: clamp(11px, 1.8vw, 15px);
    letter-spacing: 6px;
    text-transform: uppercase;
    opacity: .65;
    margin-top: 8px;
}

.jd-intro {
    max-width: 680px;
    text-align: justify;
    text-align-last: left;
    hyphens: auto;
    -webkit-hyphens: auto;
    font-size: 13.5px;
    line-height: 1.8;
    color: var(--gris-texto);
    margin-bottom: 40px;
    position: relative;
}

/* Pregunta membresía */
.jd-membresia-label {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}
.jd-membresia-row {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: center;
    margin-bottom: 28px;
}
.jd-chk-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    padding: 9px 24px;
    border: 2px solid var(--pill-border);
    border-radius: 8px;
    transition: border-color .2s, background .2s;
    user-select: none;
}
.jd-chk-option input[type="checkbox"] {
    width: 17px; height: 17px;
    accent-color: var(--azul-acento);
}
.jd-chk-option.sel {
    border-color: var(--azul-acento);
    background: rgba(37,99,235,0.18);
}

/* Correo splash */
.jd-correo-wrap {
    width: 100%;
    max-width: 500px;
    margin-bottom: 32px;
    position: relative;
}
.jd-correo-wrap label {
    display: block;
    font-size: 13px;
    color: var(--gris-texto);
    margin-bottom: 10px;
}
.jd-input-linea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.35);
    color: var(--blanco);
    font-size: 15px;
    padding: 8px 4px;
    outline: none;
    font-family: inherit;
    transition: border-color .2s;
}
.jd-input-linea::placeholder { color: rgba(255,255,255,0.3); }
.jd-input-linea:focus        { border-bottom-color: var(--azul-acento); }

/* Botón principal */
.jd-btn {
    background: var(--btn-bg);
    color: var(--btn-text);
    border: none;
    border-radius: 8px;
    padding: 14px 48px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .5px;
    cursor: pointer;
    font-family: inherit;
    transition: opacity .2s, transform .1s;
}
.jd-btn:hover    { opacity: .88; transform: translateY(-1px); }
.jd-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.jd-error {
    color: #fca5a5;
    font-size: 13px;
    margin-bottom: 16px;
}

/* ══════════════════════════════════════════════════════
   NO MIEMBRO
══════════════════════════════════════════════════════ */
#jd-no-miembro {
    min-height: 100vh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}
.jd-year-row {
    display: flex;
    gap: 48px;
    justify-content: center;
    margin-top: 10px;
    font-size: 13px;
    letter-spacing: 3px;
    opacity: .55;
}

/* ══════════════════════════════════════════════════════
   CUESTIONARIO
══════════════════════════════════════════════════════ */
#jd-cuestionario {
    flex-direction: column;
    min-height: 100vh;
}

/* Header sticky */
.jd-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10,21,53,0.96);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 28px;
    border-bottom: 1px solid var(--gris-borde);
}
.jd-header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    letter-spacing: 2.5px;
    font-weight: 700;
    opacity: .85;
    text-transform: uppercase;
}
.jd-header-logo img { height: 22px; }
.jd-header-right {
    font-size: 10px;
    text-align: right;
    line-height: 1.5;
    opacity: .65;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.jd-header-right strong {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1px;
    display: block;
}

/* Barra de progreso */
.jd-progress {
    display: flex;
    gap: 6px;
    padding: 18px 28px 0;
}
.jd-seg {
    flex: 1;
    height: 4px;
    border-radius: 4px;
    background: rgba(255,255,255,0.13);
    transition: background .4s;
}
.jd-seg.done   { background: var(--azul-acento); }
.jd-seg.active { background: var(--azul-acento); opacity: .55; }

/* Cuerpo de preguntas */
.jd-body {
    flex: 1;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 28px 24px 100px;
}

/* Bloque de pregunta */
.jd-pregunta {
    padding: 22px 0;
    border-bottom: 1px solid var(--gris-borde);
}
.jd-pregunta:last-child { border-bottom: none; }

.jd-p-texto {
    font-size: 14.5px;
    font-weight: 600;
    color: #93c5fd;
    margin-bottom: 14px;
    line-height: 1.55;
}
.jd-p-nota {
    font-size: 12px;
    color: var(--gris-texto);
    margin-top: -8px;
    margin-bottom: 12px;
    font-style: italic;
}

/* Pills */
.jd-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}
.jd-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 15px;
    border: 1.5px solid var(--pill-border);
    border-radius: 40px;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    transition: border-color .15s, background .15s;
    user-select: none;
    color: var(--blanco);
}
.jd-pill input { display: none; }
.jd-pill:hover  { border-color: rgba(255,255,255,0.48); }
.jd-pill.checked {
    border-color: var(--azul-acento);
    background: rgba(37,99,235,0.2);
}

/* Radio lineal (rango de edad) */
.jd-radio-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}
.jd-radio-item {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    font-size: 13px;
}
.jd-radio-item input[type="radio"] { accent-color: var(--azul-acento); }

/* Select */
.jd-select {
    background: var(--input-bg);
    border: 1.5px solid var(--gris-borde);
    color: var(--blanco);
    border-radius: 8px;
    padding: 10px 36px 10px 14px;
    font-size: 13.5px;
    font-family: inherit;
    min-width: 220px;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23fff' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}
.jd-select option  { background: #0e2060; color: #fff; }
.jd-select:focus   { border-color: var(--azul-acento); }
.jd-select.full    { width: 100%; }

/* Grid 2 columnas */
.jd-grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
@media (max-width: 600px) { .jd-grid2 { grid-template-columns: 1fr; } }

/* Input "Otro" */
.jd-otro-wrap           { display: none; margin-top: 10px; }
.jd-otro-wrap.visible   { display: block; }
.jd-input-otro {
    background: var(--input-bg);
    border: 1.5px solid var(--gris-borde);
    border-radius: 8px;
    color: var(--blanco);
    padding: 8px 14px;
    font-size: 13.5px;
    font-family: inherit;
    width: 100%;
    max-width: 420px;
    outline: none;
}
.jd-input-otro::placeholder { color: rgba(255,255,255,0.3); }
.jd-input-otro:focus         { border-color: var(--azul-acento); }

/* Footer de navegación */
.jd-footer {
    position: sticky;
    bottom: 0;
    background: rgba(10,21,53,0.96);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--gris-borde);
    padding: 14px 28px;
    display: flex;
    justify-content: flex-end;
}
#jd-gracias,
#jd-gracias-no-miembro {
    min-height: 100vh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}
.jd-check-icon {
    width: 72px; height: 72px;
    background: rgba(37,99,235,0.18);
    border: 2px solid var(--azul-acento);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin: 0 auto 24px;
}
#jd-cuestionario .jd-grid2 .jd-select {
    display: block;
    margin: 0;
    width: 100%;
}
#jd-cuestionario .jd-grid2 {
    align-items: end;
}

/* ══════════════════════════════════════════════════════
   CUESTIONARIO — tema claro
══════════════════════════════════════════════════════ */
#jd-cuestionario {
    background: #ffffff;
    color: #0a1535;
}

#jd-cuestionario .jd-progress {
    width: 100%;
    max-width: 700px;
    margin: 18px auto 0;
    padding: 0;
    display: flex;
    gap: 6px;
}

#jd-cuestionario .jd-seg {
    height: 6px;
    background: #e2e8f0;
}
#jd-cuestionario .jd-seg.done   { background: var(--azul-acento); opacity: 1; }
#jd-cuestionario .jd-seg.active { background: var(--azul-acento); opacity: .5; }

#jd-cuestionario .jd-body {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    padding: 28px 24px 100px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

#jd-cuestionario .jd-pregunta {
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
#jd-cuestionario .jd-pregunta:last-child { border-bottom: none; }

#jd-cuestionario .jd-p-texto  { color: #1e3a8a; }
#jd-cuestionario .jd-p-nota   { color: #64748b; }

#jd-cuestionario .jd-pills     { justify-content: center; }
#jd-cuestionario .jd-radio-row { justify-content: center; }

#jd-cuestionario .jd-pill {
    border-color: #cbd5e1;
    color: #0a1535;
}
#jd-cuestionario .jd-pill:hover   { border-color: var(--azul-acento); }
#jd-cuestionario .jd-pill.checked {
    border-color: var(--azul-acento);
    background: rgba(37,99,235,0.1);
    color: #0a1535;
}

#jd-cuestionario .jd-radio-item { color: #0a1535; }

#jd-cuestionario .jd-select {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0a1535;
    display: block;
    margin: 0 auto;
}
#jd-cuestionario .jd-select option { background: #fff; color: #0a1535; }
#jd-cuestionario .jd-select:focus  { border-color: var(--azul-acento); }

#jd-cuestionario .jd-grid2 {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
@media (max-width: 600px) {
    #jd-cuestionario .jd-grid2 { grid-template-columns: 1fr; }
}

#jd-cuestionario .jd-input-otro {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0a1535;
    margin: 0 auto;
}
#jd-cuestionario .jd-input-otro::placeholder { color: #94a3b8; }

#jd-cuestionario .jd-otro-wrap        { display: none; width: 100%; text-align: center; }
#jd-cuestionario .jd-otro-wrap.visible { display: block; }

#jd-cuestionario .jd-footer {
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    backdrop-filter: none;
    justify-content: center;
}

#jd-cuestionario .jd-btn {
    background: #0a1535;
    color: #ffffff;
}