:root {
    --sm-navy: #0b1f33;
    --sm-navy-2: #12304a;
    --sm-teal: #0f766e;
    --sm-teal-2: #14b8a6;
    --sm-teal-soft: #e6f7f5;
    --sm-ink: #1e293b;
    --sm-muted: #64748b;
    --sm-line: #d7e3ee;
    --sm-paper: #f4f8fb;
    --sm-white: #ffffff;
    --sm-danger: #b91c1c;
    --sm-shadow: 0 10px 30px rgba(11, 31, 51, 0.08);
    --font-display: "Fraunces", Georgia, serif;
    --font-title: "Outfit", "Manrope", sans-serif;
    --font-body: "Manrope", "Segoe UI", sans-serif;
}

html, body.encuesta-page {
    min-height: 100%;
    font-size: 20px;
    line-height: 1.5;
    font-family: var(--font-body);
    color: var(--sm-ink);
    background:
        radial-gradient(circle at 88% 12%, rgba(20, 184, 166, 0.22), transparent 28%),
        radial-gradient(circle at 8% 80%, rgba(11, 31, 51, 0.18), transparent 32%),
        linear-gradient(160deg, #0b1f33 0%, #12304a 48%, #0f766e 100%);
}

.encuesta-page {
    padding: 2.2rem 1rem 3rem;
}

.encuesta-shell {
    max-width: 760px;
    margin: 0 auto;
}

.encuesta-hero {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    padding: 2.4rem 2.2rem 2.1rem;
    color: #fff;
    background:
        radial-gradient(circle at 90% 10%, rgba(20, 184, 166, 0.32), transparent 34%),
        linear-gradient(125deg, #0b1f33 0%, #12304a 50%, #0f766e 100%);
    box-shadow: 0 22px 50px rgba(11, 31, 51, 0.28);
}

.encuesta-hero.is-ok {
    background:
        radial-gradient(circle at 90% 10%, rgba(20, 184, 166, 0.4), transparent 34%),
        linear-gradient(125deg, #0b1f33 0%, #0f766e 100%);
}

.encuesta-hero.is-ok .encuesta-cta {
    text-decoration: none;
}

.encuesta-kicker {
    display: inline-block;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.7rem;
}

.encuesta-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.1rem, 5vw, 3rem);
    font-weight: 600;
    margin: 0 0 0.55rem;
    line-height: 1.2;
}

.encuesta-hero p {
    max-width: 36rem;
    margin: 0 0 1.4rem;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.2rem;
    line-height: 1.55;
}

.encuesta-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 4px;
    padding: 0.85rem 1.25rem;
    background: #fff;
    color: var(--sm-navy) !important;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: none;
    text-decoration: none;
}

.encuesta-cta:hover,
.encuesta-cta:focus {
    background: #f4f8fb;
    color: var(--sm-navy) !important;
    text-decoration: none;
}

.encuesta-cta i {
    font-size: 1rem;
    color: var(--sm-teal);
}

.enc-captcha-card {
    margin-top: 1.2rem;
    background: #fff;
    border-radius: 22px;
    padding: 1.6rem 1.5rem 1.5rem;
    box-shadow: 0 18px 40px rgba(11, 31, 51, 0.16);
}

.enc-captcha-card h2 {
    font-family: var(--font-title);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--sm-navy);
    margin: 0 0 0.45rem;
}

.enc-captcha-card > p {
    margin: 0 0 1.1rem;
    color: var(--sm-muted);
    font-size: 1.05rem;
}

.enc-captcha-card .encuesta-cta {
    margin-top: 1rem;
}

.enc-captcha-card .captcha-row img {
    border: 1px solid var(--sm-line);
    background: #fff;
}

.enc-captcha-card #encCaptchaInput {
    text-transform: uppercase;
    letter-spacing: 0.28em;
    font-weight: 700;
    max-width: 20rem;
}

.encuesta-page.modal-open {
    overflow: hidden;
}

.encuesta-page .modal {
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 0 !important;
}

.encuesta-page .modal-dialog {
    width: 96%;
    max-width: 980px;
    margin: 12px auto 28px;
    transform: none !important;
}

.encuesta-page .modal-content {
    border: 0;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(11, 31, 51, 0.28);
}

.encuesta-page .modal-header {
    border: 0;
    padding: 1.35rem 1.5rem 1.15rem;
    background: linear-gradient(125deg, #0b1f33 0%, #12304a 55%, #0f766e 100%);
    color: #fff;
}

.encuesta-page .modal-header h3 {
    font-family: var(--font-title);
    font-size: 1.85rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0.15rem 0 0;
}

.encuesta-page .modal-header small {
    display: block;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.enc-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    margin-top: 1.2rem;
    padding: 0.95rem 1.1rem;
    border-radius: 14px;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.45;
    text-align: left;
}

.enc-alert.is-error {
    background: #fff1f2;
    color: #9f1239;
}

.enc-alert.is-success {
    background: #ecfdf5;
    color: #047857;
}

.enc-name-msg {
    margin: 0.45rem 0 0;
    color: #b91c1c;
    font-size: 1rem;
    font-weight: 700;
}

.enc-pick {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(7.2rem, 1fr));
    gap: 0.45rem;
}
.enc-pick-btn {
    border: 1px solid #c5d2de;
    background: #fff;
    color: #0b1f33;
    border-radius: 2px;
    padding: 0.55rem 0.4rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    cursor: pointer;
    line-height: 1.2;
    text-align: center;
}
.enc-pick-btn:hover {
    border-color: #0f766e;
    color: #0f766e;
}
.enc-pick-btn.is-on {
    background: #0b1f33;
    color: #fff;
    border-color: #0b1f33;
}
.enc-pick-empty {
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 600;
}

.enc-step-note {
    margin: 0 0 1rem;
    color: var(--sm-muted);
    font-size: 0.95rem;
}

.enc-cita-resumen {
    display: none;
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: var(--sm-teal-soft);
    color: var(--sm-navy);
    font-weight: 700;
}

.enc-cita-resumen.is-on {
    display: block;
}

.encuesta-page .form-control.is-invalid {
    border-color: #e11d48;
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.16);
}

.encuesta-page .modal-body {
    max-height: none;
    overflow: visible;
    padding: 1.4rem 1.5rem 1.2rem;
    background: var(--sm-paper);
}

.enc-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.7rem;
    margin: 0.4rem 0 0.6rem;
    padding: 1rem 1.15rem;
    background: var(--sm-white);
    border: 1px solid rgba(215, 227, 238, 0.95);
    border-radius: 16px;
    box-shadow: var(--sm-shadow);
}

.enc-video {
    overflow: hidden;
    border-radius: 16px;
    margin-bottom: 1.2rem;
    box-shadow: var(--sm-shadow);
    background: #0b1f33;
}

.enc-video iframe {
    display: block;
    width: 100%;
    height: 280px;
    border: 0;
}

.enc-section {
    background: var(--sm-white);
    border: 1px solid rgba(215, 227, 238, 0.95);
    border-radius: 16px;
    padding: 1.15rem 1.15rem 0.35rem;
    margin-bottom: 1rem;
    box-shadow: var(--sm-shadow);
}

.enc-section h4 {
    font-family: var(--font-title);
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--sm-navy);
    margin: 0 0 1rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid var(--sm-line);
}

.enc-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem 1rem;
}

.enc-grid .enc-field.full {
    grid-column: 1 / -1;
}

.enc-field {
    margin-bottom: 0.95rem;
}

.enc-field label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--sm-navy);
}

.encuesta-page .form-control {
    height: 56px;
    border-radius: 12px;
    border: 1px solid #d5e0ea;
    box-shadow: none;
    font-size: 1.15rem;
    line-height: 1.4;
    color: var(--sm-ink);
    background: #fbfdff;
}

.encuesta-page select.form-control {
    height: 56px;
}

.encuesta-page textarea.form-control {
    height: auto;
    min-height: 120px;
    padding-top: 0.75rem;
    resize: vertical;
}

.encuesta-page .form-control:focus {
    border-color: var(--sm-teal-2);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.18);
}

.enc-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.enc-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0;
    padding: 0.5rem 0.75rem;
    border: 1px solid #c5d2de;
    border-radius: 2px;
    background: #fff;
    color: var(--sm-navy);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.3;
    cursor: pointer;
}
.enc-chip:has(input:checked) {
    border-color: #0f766e;
    background: #f3faf9;
}

.enc-chip input {
    margin: 0;
    width: 1.35rem;
    height: 1.35rem;
    flex-shrink: 0;
    accent-color: var(--sm-teal);
}

.encuesta-page .btn-success,
.encuesta-page .btn-danger {
    font-size: 1.15rem;
    line-height: 1.3;
}

.encuesta-page .btn-success {
    background: #0b1f33;
    border: 1px solid #0b1f33;
    border-radius: 2px;
    padding: 0.75rem 1.2rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.encuesta-page .btn-danger {
    background: #fff;
    color: #0b1f33;
    border: 1px solid #c5d2de;
    border-radius: 2px;
    padding: 0.75rem 1.2rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.encuesta-page .btn-success:hover,
.encuesta-page .btn-danger:hover {
    opacity: 0.92;
}

.yt-modal {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(11, 31, 51, .62);
}
.yt-modal[hidden] { display: none; }
.yt-dialog {
    width: min(420px, 100%);
    background: #0b1f33;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(0,0,0,.35);
    color: #fff;
}
.yt-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
}
.yt-top strong { font-family: var(--font-display); font-weight: 550; }
.yt-close {
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    color: #fff;
    font-family: inherit;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 8px 12px;
    cursor: pointer;
}
.captcha-dialog form { padding: 6px 18px 20px; }
.captcha-copy { color: rgba(255,255,255,.78); font-size: 1rem; line-height: 1.5; margin: 0 0 14px; }
.captcha-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.captcha-row img { border-radius: 12px; background: #f4f1ea; }
.encuesta-page .enc-section .captcha-row img {
    border: 1px solid var(--sm-line);
    background: #fff;
}
.encuesta-page #encCaptchaInput {
    text-transform: uppercase;
    letter-spacing: 0.28em;
    font-weight: 700;
}
.captcha-label {
    display: block;
    color: rgba(255,255,255,.7);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.captcha-dialog input {
    width: 100%;
    border: 0;
    border-radius: 12px;
    padding: 12px 14px;
    background: #fff;
    color: #0b1f33;
    font: 700 1.1rem/1.2 var(--font-body);
    letter-spacing: .28em;
    text-transform: uppercase;
    margin-bottom: 12px;
    -webkit-text-fill-color: #0b1f33;
}
.captcha-error { color: #fecaca; font-size: 0.9rem; margin: 0 0 12px; }

@media (max-width: 767px) {
    .encuesta-hero {
        padding: 1.6rem 1.25rem;
    }
    .enc-grid {
        grid-template-columns: 1fr;
    }
    .enc-video iframe {
        height: 200px;
    }
    .enc-actions {
        flex-direction: column-reverse;
    }
    .enc-actions .btn {
        width: 100%;
    }
}
