:root {
    --azul: #003B6F;
    --azul2: #005FAF;
    --amarillo: #FDBA21;
    --naranja: #F7941D;
    --fondo: #EEF4F9;
    --texto: #1E293B;
    --muted: #64748B;
    --borde: #CBD5E1;
}

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

body {
    font-family: Inter, Arial, sans-serif;
    background: var(--fondo);
    color: var(--texto)
}

.hero {
    min-height: 390px;
    background: linear-gradient(90deg, rgb(0 59 111 / .96) 0%, rgb(0 95 175 / .88) 56%, rgb(0 59 111 / .20) 100%), url(https://formulario.medicos.cr/from_matricula_etica/public/assets/img/banner_formulario.jpg);
    background-size: cover;
    background-position: center right;
    color: #fff;
    padding: 90px 8vw 120px;
    display: flex;
    align-items: center
}

.hero-content {
    max-width: 760px
}

.hero h1 {
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.04;
    font-weight: 900;
    letter-spacing: -.04em;
    margin-bottom: 16px
}

.hero h1 span {
    color: var(--amarillo);
    display: block
}

.hero p {
    max-width: 720px;
    font-size: 20px;
    line-height: 1.65;
    color: rgb(255 255 255 / .94);
    margin-bottom: 32px
}

.hero-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap
}

.meta-card {
    min-width: 10px;
    border: 1px solid rgb(255 255 255 / .24);
    background: rgb(255 255 255 / .13);
    backdrop-filter: blur(8px);
    border-radius: 18px;
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.meta-card small {
    display: block;
    color: rgb(255 255 255 / .78);
    margin-bottom: 8px;
    font-size: 13px
}

.meta-card strong {
    font-size: 16px;
    line-height: 1.3
}

.form-wrap {
    max-width: 1120px;
    margin: -62px auto 70px;
    padding: 0 22px;
    position: relative;
    z-index: 5
}

.form-card {
    background: #fff;
    border: 1px solid #D9E5F1;
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 22px 55px rgb(0 59 111 / .10)
}

.form-title {
    padding: 32px 40px;
    border-bottom: 1px solid #E2E8F0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: linear-gradient(180deg, #fff, #FBFDFF)
}

.form-title h2 {
    color: var(--azul);
    font-size: 28px;
    margin-bottom: 6px;
    letter-spacing: -.02em
}

.form-title p {
    color: var(--muted);
    font-size: 15px
}

.status-badge {
    padding: 10px 14px;
    border-radius: 999px;
    background: #EEF7FF;
    color: var(--azul);
    font-weight: 800;
    white-space: nowrap;
    font-size: 13px
}

.section {
    padding: 36px 40px;
    border-bottom: 1px solid #E2E8F0
}

.section:last-of-type {
    border-bottom: none
}

.section-head {
    margin-bottom: 24px
}

.section-head h3 {
    color: var(--azul);
    font-size: 22px;
    margin-bottom: 6px
}

.section-head p {
    color: var(--muted);
    font-size: 15px
}

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

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px
}

.full {
    grid-column: 1/-1
}

.field {
    display: flex;
    flex-direction: column;
    gap: 9px
}

label {
    color: #24364D;
    font-size: 14px;
    font-weight: 800
}

.req {
    color: var(--naranja)
}

input,
select,
textarea {
    width: 100%;
    min-height: 54px;
    border: 1.5px solid var(--borde);
    border-radius: 15px;
    padding: 0 16px;
    font-size: 15px;
    color: var(--texto);
    background: #fff;
    transition: .18s ease;
    font-family: inherit
}

textarea {
    min-height: 96px;
    resize: vertical;
    padding: 15px 16px
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--azul2);
    box-shadow: 0 0 0 4px rgb(0 95 175 / .12)
}

input[readonly] {
    background: #F8FAFC;
    color: #64748B;
    font-weight: 700
}

.help {
    font-size: 13px;
    color: #64748B;
    line-height: 1.45
}

.radio-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px
}

.radio-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    border: 1.5px solid #D6E3F1;
    border-radius: 16px;
    background: #F8FBFF;
    cursor: pointer;
    font-weight: 700;
    color: #2C405A
}

.radio-card input {
    width: 18px;
    min-height: auto;
    height: 18px;
    accent-color: var(--azul)
}

.document-notice {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #F8FBFF;
    border: 1px solid #D9E8F7;
    border-radius: 18px;
    padding: 18px 22px;
    margin-bottom: 18px;
    min-height: 88px
}

.document-notice[hidden] {
    display: none !important
}

.document-notice__icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #005FAF, #003B6F);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
    margin: 0;
    padding: 0;
    flex-shrink: 0
}

.document-notice__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px
}

.document-notice__content strong {
    display: block;
    color: #003B6F;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.3;
    margin: 0
}

.document-notice__content p {
    margin: 0;
    color: #52677F;
    font-size: 15px;
    line-height: 1.5
}

.upload-box {
    border: 2px dashed #BFD2E5;
    border-radius: 18px;
    padding: 22px;
    background: #F8FBFF;
    text-align: center;
    color: #64748B
}

.upload-box input {
    border: none;
    box-shadow: none;
    padding: 0;
    min-height: auto;
    border-radius: 0;
    margin-top: 14px
}

.terms {
    background: #F8FBFF;
    border: 1px solid #D6E3F1;
    border-radius: 18px;
    padding: 22px
}

.terms-importante {
    color: #1E293B;
    font-size: 14px;
    margin-bottom: 10px
}

.terms--datos {
    background: #F0F7FF;
    border-color: #C5D9EF
}

.terms ul {
    padding-left: 22px;
    color: #40546C;
    line-height: 1.7;
    font-size: 14px
}

.check {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 16px;
    border: 1px solid #D6E3F1;
    border-radius: 16px;
    margin-top: 14px;
    background: #fff
}

.check input {
    width: 18px;
    height: 18px;
    min-height: auto;
    margin-top: 2px;
    accent-color: var(--azul);
    flex-shrink: 0
}

.check strong {
    color: var(--azul);
    display: block;
    margin-bottom: 3px
}

.check span {
    color: #52677F;
    font-size: 14px;
    line-height: 1.5
}

.actions {
    padding: 28px 40px;
    background: #F8FAFC;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    border-top: 1px solid #E2E8F0
}

.btn {
    min-height: 56px;
    padding: 0 30px;
    border-radius: 15px;
    font-weight: 900;
    font-size: 15px;
    cursor: pointer;
    border: 1px solid #fff0;
    font-family: inherit
}

.btn-secondary {
    background: #fff;
    border-color: #C9D8E8;
    color: var(--azul)
}

.btn-primary {
    background: linear-gradient(135deg, var(--azul), var(--azul2));
    color: #fff;
    box-shadow: 0 12px 25px rgb(0 59 111 / .22)
}

.hidden-jotform {
    display: none !important
}

footer {
    text-align: center;
    color: #64748B;
    padding: 0 24px 40px;
    font-size: 14px
}

@media(max-width:820px) {
    .hero {
        padding: 48px 24px 92px;
        min-height: auto
    }

    .hero p {
        font-size: 17px
    }

    .form-wrap {
        margin: -50px auto 50px
    }

    .form-title,
    .section,
    .actions {
        padding: 26px 22px
    }

    .grid,
    .grid-3,
    .radio-grid {
        grid-template-columns: 1fr
    }

    .actions {
        flex-direction: column-reverse
    }

    .btn {
        width: 100%
    }

    .status-badge {
        display: none
    }
}

.step-bar {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, #003B6F, #005FAF);
    color: #fff;
    padding: 20px 24px;
    border-radius: 20px;
    margin-bottom: 28px;
    box-shadow: 0 10px 24px rgb(0 59 111 / .14)
}

.step-number {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #fff;
    color: #003B6F;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 22px;
    flex-shrink: 0
}

.step-content {
    display: flex;
    flex-direction: column;
    gap: 4px
}

.step-title {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -.02em;
    line-height: 1.1
}

.step-content p {
    margin: 0;
    color: rgb(255 255 255 / .88);
    font-size: 14px;
    line-height: 1.5
}

.step-bar--info {
    background: linear-gradient(135deg, #F7941D, #FDBA21)
}

.step-number--info {
    color: #F7941D
}



.requisitos-section {
    background: linear-gradient(180deg, #FFFDF5, #fff)
}

@media(max-width:768px) {
    .step-bar {
        padding: 18px;
        align-items: flex-start
    }

    .step-number {
        width: 46px;
        height: 46px;
        font-size: 20px
    }

    .step-title {
        font-size: 18px
    }
}


/* Corrección visual requisitos de inscripción */
.requisitos-section {
    background: linear-gradient(180deg, #FFFDF5, #FFFFFF);
    padding: 36px 40px;
}

.requisitos-section .step-bar--info {
    background: linear-gradient(135deg, #F7941D, #FDBA21) !important;
    color: #FFFFFF;
    border-radius: 18px;
    padding: 20px 24px;
    margin-bottom: 28px;
    box-shadow: 0 14px 28px rgba(247, 148, 29, 0.18);
}

.requisitos-section .step-number--info {
    background: #FFFFFF;
    color: #F7941D !important;
    width: 52px;
    height: 52px;
    font-size: 22px;
}

.requisitos-section .step-title {
    color: #FFFFFF;
    font-size: 20px;
    font-weight: 900;
}

.requisitos-section .step-content p {
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 700;
}

.requisitos-list {
    padding-left: 26px;
    margin: 0 0 22px 0;
    color: #1E3656;
    font-size: 15px;
    line-height: 1.9;
}

.requisitos-list li {
    margin-bottom: 8px;
    padding-left: 6px;
}

.requisitos-nota {
    background: #FFFBF0;
    border: 1px solid #FDBA21;
    border-radius: 16px;
    padding: 20px 22px;
    color: #52677F;
    font-size: 14.5px;
    line-height: 1.65;
    margin-top: 0;
    margin-bottom: 28px;
}

.requisitos-nota h3 {
    color: #92400E;
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.requisitos-nota h3 svg {
    color: #F59E0B;
    flex-shrink: 0;
}

.requisitos-section>div[style*="text-align:center"] {
    text-align: center !important;
    margin-top: 20px !important;
}

.requisitos-section>div[style*="text-align:center"] p {
    font-size: 14px !important;
    color: #64748B !important;
    margin-bottom: 12px !important;
}

.hero-version {
    display: block;
    margin-top: 10px;
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.85;
    letter-spacing: 0.3px;
}

/* Caja de información/disposiciones previas */
.info-previa-card {
    background: #F3F7FA;
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 10px;
    box-shadow: inset 0 1px 3px rgba(0, 59, 111, 0.02);
}

.info-previa-card h3 {
    color: var(--azul);
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-previa-card h3 svg {
    color: var(--azul);
    flex-shrink: 0;
}

.info-previa-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-previa-list li {
    font-size: 14px;
    line-height: 1.55;
    color: var(--texto);
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.info-previa-list li strong {
    color: var(--azul);
    font-weight: 800;
    min-width: 22px;
    flex-shrink: 0;
}

.info-previa-list li span {
    color: #334155;
}

/* Estilos de validación de campos */
.field.has-error input,
.field.has-error select,
.field.has-error textarea {
    border-color: #EF4444 !important;
}

.field.has-error input:focus,
.field.has-error select:focus,
.field.has-error textarea:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15) !important;
}

.field.has-error .upload-box {
    border-color: #EF4444 !important;
    background: #FFF5F5;
}

.field.has-error .terms {
    border-color: #EF4444 !important;
    background: #FFF5F5;
}

.error-message {
    color: #EF4444;
    font-size: 13px;
    margin-top: 5px;
    font-weight: 700;
    display: block;
}

/* ==========================================================================
   PÁGINA DE AGRADECIMIENTO (gracias.html)
   ========================================================================== */

.success-body {
    min-height: 100vh;
    background:
        linear-gradient(135deg,
            rgba(0, 59, 111, 0.96),
            rgba(0, 95, 175, 0.88)),
        url('https://formulario.medicos.cr/from_matricula_etica/public/assets/img/banner_formulario.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.success-card {
    width: 100%;
    max-width: 780px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    border-radius: 28px;
    padding: 58px 55px;
    text-align: center;
    box-shadow: 0 28px 64px rgba(0, 0, 0, 0.20);
}

.success-icon {
    width: 112px;
    height: 112px;
    margin: 0 auto 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00AEEF, #005FAF);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 16px 32px rgba(0, 95, 175, 0.28);
}

.success-icon svg {
    width: 56px;
    height: 56px;
    stroke: #fff;
    stroke-width: 3;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.success-card h1 {
    color: var(--azul);
    font-size: clamp(28px, 4.5vw, 44px);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}

.success-card .subtitle {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.75;
    margin-bottom: 36px;
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
}

.success-card .divider {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--azul), var(--azul2));
    border-radius: 2px;
    margin: 0 auto 36px;
}

.success-card .info-box {
    background: #F8FBFF;
    border: 1px solid #D9E5F1;
    border-radius: 20px;
    padding: 28px 32px;
    margin-bottom: 14px;
    text-align: left;
}

.success-card .info-box h3 {
    color: var(--azul);
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.success-card .info-box h3::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--azul2);
    flex-shrink: 0;
}

.success-card .info-box ul {
    padding-left: 20px;
    color: #40546C;
    line-height: 1.85;
    font-size: 15px;
}

.success-card .info-box li {
    margin-bottom: 8px;
}

.success-card .notice-box {
    background: #FFFBF0;
    border: 1px solid var(--amarillo);
    border-radius: 16px;
    padding: 18px 22px;
    margin-bottom: 36px;
    text-align: left;
    font-size: 14px;
    color: #52677F;
    line-height: 1.65;
}

.success-card .notice-box strong {
    color: #6B4A00;
}

.success-card .buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.success-card .btn {
    min-height: 54px;
    padding: 0 30px;
    border-radius: 15px;
    border: none;
    font-size: 15px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.success-card .btn-primary {
    background: linear-gradient(135deg, var(--azul), var(--azul2));
    color: #fff;
    box-shadow: 0 12px 26px rgba(0, 59, 111, 0.22);
}

.success-card .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 32px rgba(0, 59, 111, 0.28);
}

.success-card .btn-secondary {
    background: #fff;
    border: 1.5px solid #C9D8E8;
    color: var(--azul);
}

.success-card .btn-secondary:hover {
    background: #F0F7FF;
}

.success-card .footer-text {
    margin-top: 36px;
    font-size: 13px;
    color: #94A3B8;
    line-height: 1.6;
}

@media (max-width: 640px) {
    .success-card {
        padding: 38px 24px;
    }

    .success-card .buttons {
        flex-direction: column;
    }

    .success-card .btn {
        width: 100%;
    }

    .success-card .subtitle {
        font-size: 16px;
    }

    .success-icon {
        width: 88px;
        height: 88px;
    }

    .success-icon svg {
        width: 44px;
        height: 44px;
    }
}