:root {
    --color-primary: #123f73;
    --color-primary-dark: #08133f;
    --color-primary-hover: #184f8b;
    --color-accent: #ffed00;
    --color-accent-soft: #fff36a;
    --color-page-bg: #f4f6f9;
    --color-surface: #ffffff;
    --color-soft-panel: #eef4fb;
    --color-text: #263238;
    --color-text-muted: #6c757d;
    --color-border: #c7d0da;

    --font-primary:
        "Stolz",
        "Helvetica Neue",
        Helvetica,
        Arial,
        sans-serif;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--color-page-bg);
    color: var(--color-text);
    font-family: var(--font-primary);
    -webkit-font-smoothing: antialiased;
}

.survey-topbar {
    height: 8px;
    background: var(--color-accent);
}

.survey-navbar {
    min-height: 68px;
    background: var(--color-primary-dark);
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
}

.survey-brand {
    display: flex;
    align-items: center;
    gap: .8rem;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
}

.survey-brand:hover {
    color: #fff;
}

.brand-separator {
    color: var(--color-accent);
}

.survey-logo {
    max-height: 44px;
    max-width: 160px;
    object-fit: contain;
}

.survey-page {
    min-height: calc(100vh - 132px);
    padding: 2rem 0 3rem;
}

.survey-footer {
    padding: 1.1rem 0;
    background: #fff;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: .9rem;
}

.survey-hero {
    background:
        linear-gradient(
            135deg,
            var(--color-primary-dark),
            var(--color-primary)
        );
    color: #fff;
    border-radius: 18px;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    box-shadow: 0 8px 28px rgba(0,0,0,.10);
}

.eyebrow {
    color: var(--color-accent);
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    font-size: .8rem;
}

.eyebrow.dark {
    color: var(--color-primary);
}

.survey-code {
    color: var(--color-primary);
    font-size: .78rem;
    font-weight: 700;
}

.survey-card {
    border: 1px solid rgba(8,19,63,.10);
    border-radius: 16px;
    height: 100%;
    box-shadow: 0 5px 20px rgba(0,0,0,.05);
}

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

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

.survey-form-shell {
    max-width: 1180px;
    margin: 0 auto;
}

.survey-form-header,
.survey-section,
.empty-state,
.submitted-card {
    background: #fff;
    border: 1px solid rgba(8,19,63,.18);
    border-radius: 18px;
    box-shadow: 0 6px 22px rgba(0,0,0,.06);
}

.survey-form-header {
    padding: 1.5rem;
    margin-bottom: 1.2rem;
    border-top: 6px solid var(--color-accent);
}

.survey-progress-wrap {
    margin-bottom: 1rem;
    color: #475467;
    font-size: .9rem;
    font-weight: 600;
}

.progress {
    height: 8px;
    background: #e6ebf2;
}

.progress-bar {
    background: var(--color-primary);
}

.survey-section {
    display: none;
    padding: clamp(1.15rem, 3vw, 2rem);
}

.survey-section.active {
    display: block;
}

.section-header {
    margin-bottom: 1.2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #c5ced8;
}

.section-counter {
    color: var(--color-primary);
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
}

.question-block {
    padding: 1.15rem 0;
    border-bottom: 1px solid #cbd3dc;
}

.question-title {
    display: block;
    margin-bottom: .65rem;
    color: var(--color-primary-dark);
    font-weight: 700;
}

.question-help {
    margin: -.25rem 0 .8rem;
    color: #667085;
    font-size: .9rem;
}

.required-mark {
    color: #b42318;
}

.choice-list {
    display: grid;
    gap: .55rem;
}

.choice-card {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    padding: .75rem .9rem;
    border: 1px solid #b8c4d1;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}

.choice-card:hover {
    border-color: rgba(18,63,115,.50);
    background: #f9fbfd;
}

.matrix-scroll {
    border: 1px solid #b8c4d1;
    border-radius: 12px;
}

.matrix-table {
    min-width: 860px;
    margin: 0;
}

.matrix-table thead th {
    background: var(--color-soft-panel);
    color: var(--color-primary-dark);
    text-align: center;
    font-size: .84rem;
    vertical-align: middle;
}

.matrix-table tbody th {
    min-width: 280px;
    background: #fff;
    font-weight: 600;
    color: #344054;
}

.matrix-option-column {
    min-width: 110px;
}

.matrix-radio {
    display: flex;
    justify-content: center;
}

.matrix-radio .form-check-input {
    margin: 0;
    width: 1.15rem;
    height: 1.15rem;
}

.matrix-mobile-note {
    margin-top: .5rem;
    color: #667085;
    font-size: .78rem;
}

.survey-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.75rem;
}

.conditional-hidden {
    display: none !important;
}

.submitted-card,
.empty-state {
    padding: clamp(1.5rem, 5vw, 3rem);
}

.submitted-check {
    width: 70px;
    height: 70px;
    margin: 0 auto 1rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
}

.submitted-form-name {
    display: inline-block;
    padding: .55rem .8rem;
    border-radius: 10px;
    background: var(--color-soft-panel);
    color: var(--color-primary-dark);
    font-weight: 600;
}

.error-detail {
    white-space: pre-wrap;
    padding: 1rem;
    border-radius: 10px;
    background: #f8f9fa;
    border: 1px solid #e4e7ec;
}

@media (max-width: 767.98px) {
    .survey-page {
        padding-top: 1rem;
    }

    .survey-actions {
        position: sticky;
        bottom: 0;
        z-index: 3;
        margin-left: -1.15rem;
        margin-right: -1.15rem;
        margin-bottom: -1.15rem;
        padding: .9rem 1.15rem;
        background: rgba(255,255,255,.96);
        border-top: 1px solid #e8ebef;
    }
}


/* =========================================================
   MAYOR CONTRASTE EN CAMPOS, BORDES Y LÍNEAS
   ========================================================= */

.form-control,
.form-select {
    border-color: #aebdcc;
    border-width: 1px;
}

.form-control:hover,
.form-select:hover {
    border-color: #8fa2b5;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 .2rem rgba(18, 63, 115, .14);
}

.question-block {
    border-bottom-color: #c5ced8;
}

.choice-card {
    border-color: #aebdcc;
}

.choice-card:hover {
    border-color: #71869a;
}

.matrix-scroll {
    border-color: #aebdcc;
}

.matrix-table > :not(caption) > * > * {
    border-color: #b8c4d1;
}

.matrix-table thead th {
    border-color: #aebdcc;
}

.survey-form-header,
.survey-section,
.empty-state,
.submitted-card {
    border-color: rgba(8, 19, 63, .18);
}


/* =========================================================
   AJUSTE VISUAL DE OPCIONES RADIO
   - Círculos más visibles
   - Preguntas 3 y 4 en distribución horizontal
   ========================================================= */

/* Círculos de selección más visibles en todas las preguntas */
.form-check-input[type="radio"] {
    width: 1.28rem;
    height: 1.28rem;
    min-width: 1.28rem;
    margin-top: .10rem;
    border: 2px solid #65788b;
    background-color: #ffffff;
    box-shadow: 0 0 0 1px rgba(8, 19, 63, .04);
    cursor: pointer;
}

.form-check-input[type="radio"]:hover {
    border-color: #123f73;
}

.form-check-input[type="radio"]:checked {
    border-color: #123f73;
    background-color: #123f73;
}

.form-check-input[type="radio"]:focus {
    border-color: #123f73;
    box-shadow: 0 0 0 .20rem rgba(18, 63, 115, .18);
}

/* Resaltar también la tarjeta que contiene la opción seleccionada */
.choice-card:has(.form-check-input[type="radio"]:checked) {
    border-color: #123f73;
    background: #f1f6fb;
    box-shadow: 0 0 0 1px rgba(18, 63, 115, .08);
}

/* Preguntas 3 y 4: opciones distribuidas horizontalmente */
.choice-list-horizontal {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
    gap: .65rem;
    align-items: stretch;
}

.choice-list-horizontal .choice-card {
    height: 100%;
    align-items: flex-start;
    margin: 0;
}

/* En matrices también se refuerza visualmente el radio */
.matrix-radio .form-check-input[type="radio"] {
    width: 1.30rem;
    height: 1.30rem;
    min-width: 1.30rem;
    border-width: 2px;
    border-color: #65788b;
}

/* En pantallas pequeñas se vuelve a una columna para conservar legibilidad */
@media (max-width: 767.98px) {
    .choice-list-horizontal {
        grid-template-columns: 1fr;
    }
}
