/* =====================================================
   CONFIGURACIÓN GENERAL
===================================================== */

html {
    position: relative;
    min-height: 100%;
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    color: #252a31;
    background: radial-gradient( circle at top, #ffffff 0%, #f3f5f7 42%, #e8edf1 100% );
}

.site-header {
    width: 100%;
}

.site-main {
    width: 100%;
    flex: 1;
    padding: 16px;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem #ffffff, 0 0 0 0.22rem rgba(35, 139, 94, 0.28);
}


/* =====================================================
   LOADER GLOBAL
===================================================== */

.global-loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 500ms cubic-bezier(0.4, 0, 0.2, 1), visibility 500ms linear;
}

    .global-loader.global-loader-hidden {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

.global-loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.global-loader-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.global-loader-logo {
    width: 250px;
    height: 250px;
    object-fit: contain;
    transform: scale(1);
    transform-origin: center;
    animation: logoPulse 1.8s cubic-bezier(0.45, 0, 0.55, 1) infinite;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.14));
    will-change: transform, opacity, filter;
    backface-visibility: hidden;
}

.global-loader.finish .global-loader-logo {
    animation: logoFinish 900ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.global-loader-spinner {
    width: 34px;
    height: 34px;
    border: 3px solid rgba(35, 139, 94, 0.16);
    border-top-color: #238b5e;
    border-radius: 50%;
    animation: spinnerRotate 0.8s linear infinite;
}

.global-loader-spinner,
.global-loader-text {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 350ms ease, transform 350ms ease;
}

.global-loader-text {
    color: #59636f;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.global-loader.finish .global-loader-spinner,
.global-loader.finish .global-loader-text {
    opacity: 0;
    transform: translateY(4px);
}

@keyframes logoPulse {
    0% {
        transform: scale(1);
        opacity: 0.94;
        filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.12));
    }

    50% {
        transform: scale(1.055);
        opacity: 1;
        filter: drop-shadow(0 12px 28px rgba(35, 139, 94, 0.20));
    }

    100% {
        transform: scale(1);
        opacity: 0.94;
        filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.12));
    }
}

@keyframes logoFinish {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    35% {
        transform: scale(1.06);
        opacity: 1;
    }

    100% {
        transform: scale(1.55);
        opacity: 0;
    }
}

@keyframes spinnerRotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}


/* =====================================================
   NAVBAR DE LOGOS
===================================================== */

.logos-navbar {
    width: 100%;
    background: #eef1f3;
    border-bottom: 1px solid #d7dde2;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.07);
}

.logos-navbar-container {
    width: 100%;
    max-width: 1600px;
    min-height: 72px;
    margin: 0 auto;
    padding: 8px 24px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    column-gap: 14px;
}

.navbar-logo {
    min-width: 0;
    display: flex;
    align-items: center;
}

.navbar-logo-left {
    justify-content: flex-start;
}

.navbar-logo-center {
    justify-content: center;
}

.navbar-logo-right {
    justify-content: flex-end;
}

.navbar-logo img {
    display: block;
    width: auto;
    max-width: 100%;
    height: 52px;
    object-fit: contain;
    transition: transform 220ms ease, opacity 220ms ease;
}

    .navbar-logo img:hover {
        transform: scale(1.03);
    }


/* =====================================================
   FORMULARIO POR PASOS
===================================================== */

.form-wizard-page {
    width: 100%;
    max-width: 1050px;
    margin: 0 auto;
}

.form-wizard-card {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07), 0 2px 6px rgba(15, 23, 42, 0.03);
}

.form-wizard-header {
    padding: 16px 22px 12px;
    border-bottom: 1px solid #edf0f3;
}

    .form-wizard-header h1 {
        margin: 0 0 4px;
        color: #252a31;
        font-size: 1.3rem;
        font-weight: 700;
    }

    .form-wizard-header p {
        margin: 0;
        color: #6c737f;
        font-size: 0.85rem;
    }


/* =====================================================
   INDICADOR DE PASOS
===================================================== */

.wizard-steps {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr) 44px minmax(0, 1fr);
    align-items: center;
    padding: 14px 22px;
    background: #f7f8fa;
    border-bottom: 1px solid #e7e9ed;
}

.wizard-step {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.55;
    transition: opacity 220ms ease, transform 220ms ease;
}

    .wizard-step.active,
    .wizard-step.completed {
        opacity: 1;
    }

    .wizard-step.active {
        transform: translateY(-1px);
    }

.wizard-step-number {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    background: #ffffff;
    border: 2px solid #cfd4da;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    transition: color 220ms ease, background 220ms ease, border-color 220ms ease;
}

.wizard-step.active .wizard-step-number {
    color: #ffffff;
    background: #59636f;
    border-color: #59636f;
    box-shadow: 0 5px 12px rgba(89, 99, 111, 0.22);
}

.wizard-step.completed .wizard-step-number {
    color: #ffffff;
    background: #238b5e;
    border-color: #238b5e;
}

.wizard-step-information {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

    .wizard-step-information strong {
        overflow: hidden;
        color: #303640;
        font-size: 0.8rem;
        font-weight: 700;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .wizard-step-information span {
        color: #828894;
        font-size: 0.68rem;
    }

.wizard-step-line {
    width: 100%;
    height: 2px;
    background: #dfe3e8;
    border-radius: 10px;
    transition: background 250ms ease;
}

    .wizard-step-line.completed {
        background: #238b5e;
    }


/* =====================================================
   CONTENIDO DE LOS PASOS
===================================================== */

.wizard-panel {
    display: none;
    padding: 20px 22px;
    animation: wizardPanelEnter 280ms ease both;
}

    .wizard-panel.active {
        display: block;
    }

@keyframes wizardPanelEnter {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wizard-panel-header {
    margin-bottom: 16px;
}

.wizard-panel-label {
    display: inline-flex;
    margin-bottom: 5px;
    padding: 3px 8px;
    color: #59636f;
    background: #eef0f2;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.wizard-panel-header h2 {
    margin: 0 0 3px;
    color: #282e36;
    font-size: 1.12rem;
    font-weight: 700;
}

.wizard-panel-header p {
    margin: 0;
    color: #727986;
    font-size: 0.82rem;
}


/* =====================================================
   CAMPOS
===================================================== */

.wizard-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.wizard-form-group {
    min-width: 0;
}

    .wizard-form-group .form-label {
        margin-bottom: 4px;
        color: #3e4550;
        font-size: 0.8rem;
        font-weight: 600;
    }

.required {
    color: #dc3545;
}

.wizard-input {
    min-height: 40px;
    padding: 8px 11px;
    color: #252a31;
    background: #ffffff;
    border: 1px solid #ccd1d7;
    border-radius: 8px;
    font-size: 0.86rem;
    box-shadow: none;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

    .wizard-input:focus {
        background: #ffffff;
        border-color: #7a8591;
        box-shadow: 0 0 0 3px rgba(89, 99, 111, 0.10);
    }

.invalid-feedback {
    font-size: 0.75rem;
}


/* =====================================================
   RESUMEN FINAL
===================================================== */

.wizard-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 14px;
    background: #f4faf7;
    border: 1px solid #cfe8dc;
    border-radius: 10px;
}

.wizard-summary-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: #238b5e;
    border-radius: 50%;
    font-size: 0.95rem;
    font-weight: 800;
}

.wizard-summary h3 {
    margin: 0 0 3px;
    color: #24543f;
    font-size: 0.9rem;
    font-weight: 700;
}

.wizard-summary p {
    margin: 0;
    color: #577567;
    font-size: 0.8rem;
}

.wizard-checkbox-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 13px;
    background: #f8f9fa;
    border: 1px solid #e2e5e9;
    border-radius: 8px;
    font-size: 0.82rem;
}

    .wizard-checkbox-container .invalid-feedback {
        width: 100%;
    }


/* =====================================================
   BOTONES
===================================================== */

.wizard-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 18px;
    padding-top: 15px;
    border-top: 1px solid #eceef1;
}

.wizard-actions-end {
    justify-content: flex-end;
}

.wizard-button {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 7px 15px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

    .wizard-button:hover {
        transform: translateY(-1px);
    }

    .wizard-button:active {
        transform: translateY(0);
    }

.wizard-button-primary {
    color: #ffffff;
    background: #59636f;
    border-color: #59636f;
    box-shadow: 0 5px 12px rgba(89, 99, 111, 0.18);
}

    .wizard-button-primary:hover {
        color: #ffffff;
        background: #48515c;
        border-color: #48515c;
    }

.wizard-button-secondary {
    color: #4b535e;
    background: #ffffff;
    border-color: #cdd2d8;
}

    .wizard-button-secondary:hover {
        background: #f4f5f6;
        border-color: #aeb5bd;
    }

.wizard-button-success {
    color: #ffffff;
    background: #238b5e;
    border-color: #238b5e;
    box-shadow: 0 5px 12px rgba(35, 139, 94, 0.18);
}

    .wizard-button-success:hover {
        color: #ffffff;
        background: #19764e;
        border-color: #19764e;
    }


/* =====================================================
   FOOTER
===================================================== */

.site-footer {
    width: 100%;
    margin-top: 24px;
    background: linear-gradient( 90deg, #0f6b2f 0%, #138a36 50%, #0f6b2f 100% );
    border-top: 3px solid #8dc63f;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.07);
}

.site-footer-content {
    max-width: 1400px;
    min-height: 44px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #ffffff;
    font-size: 0.8rem;
    text-align: center;
}

.site-footer strong {
    color: #ffffff;
    font-weight: 700;
}

.footer-divider {
    color: #8dc63f;
    font-size: 0.9rem;
    font-weight: 700;
}


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 992px) {
    .logos-navbar-container {
        min-height: 66px;
        padding: 7px 16px;
    }

    .navbar-logo img {
        height: 46px;
        max-width: 92%;
    }

    .site-main {
        padding: 14px;
    }
}

@media (max-width: 768px) {
    .form-wizard-card {
        border-radius: 12px;
    }

    .form-wizard-header {
        padding: 14px 16px 11px;
    }

        .form-wizard-header h1 {
            font-size: 1.16rem;
        }

    .wizard-steps {
        grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr) 20px minmax(0, 1fr);
        padding: 12px 10px;
    }

    .wizard-step {
        justify-content: center;
    }

    .wizard-step-information {
        display: none;
    }

    .wizard-step-number {
        width: 30px;
        height: 30px;
    }

    .wizard-panel {
        padding: 17px 16px;
    }

    .wizard-form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .site-footer-content {
        min-height: 42px;
        padding: 8px 12px;
        flex-wrap: wrap;
        gap: 4px 8px;
        font-size: 0.74rem;
    }
}

@media (max-width: 576px) {
    .logos-navbar-container {
        min-height: 58px;
        padding: 6px 8px;
        column-gap: 6px;
    }

    .navbar-logo img {
        height: 38px;
    }

    .site-main {
        padding: 10px 8px;
    }

    .global-loader-logo {
        width: 205px;
        height: 205px;
    }
}

@media (max-width: 480px) {
    .wizard-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .wizard-button {
        width: 100%;
    }

    .wizard-summary {
        align-items: flex-start;
    }

    .footer-divider {
        display: none;
    }
}

@media (max-width: 380px) {
    .logos-navbar-container {
        min-height: 52px;
        padding: 5px;
        column-gap: 4px;
    }

    .navbar-logo img {
        height: 32px;
    }

    .site-main {
        padding: 8px 6px;
    }

    .global-loader-logo {
        width: 175px;
        height: 175px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .global-loader-logo,
    .global-loader-spinner,
    .wizard-panel {
        animation: none;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}


.persona-summary {
    padding: 1rem 1.1rem;
    border: 1px solid #dfe3e8;
    border-radius: 12px;
    background: transparent;
}

.persona-summary-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.persona-summary-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

    .persona-summary-title > i {
        color: #198754;
        font-size: 1.15rem;
        flex-shrink: 0;
    }

.persona-summary-label {
    display: block;
    margin-bottom: 0.15rem;
    color: #6b7280;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.persona-summary-name {
    margin: 0;
    color: #1f2937;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.persona-summary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 34px;
    padding: 0.4rem 0.65rem;
    flex-shrink: 0;
    border: 1px solid #cfd4da;
    border-radius: 8px;
    background: transparent;
    color: #495057;
    font-size: 0.78rem;
    font-weight: 600;
    transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

    .persona-summary-button:hover {
        border-color: #6c757d;
        color: #212529;
        transform: translateY(-1px);
    }

.persona-summary-data {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
    margin-top: 1rem;
    padding-top: 0.9rem;
    border-top: 1px solid #e5e7eb;
}

.persona-summary-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

    .persona-summary-item > i {
        color: #6b7280;
        font-size: 1rem;
        flex-shrink: 0;
    }

.persona-summary-item-label {
    display: block;
    margin-bottom: 0.1rem;
    color: #6b7280;
    font-size: 0.76rem;
    font-weight: 600;
}

.persona-summary-item-value {
    display: block;
    color: #1f2937;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.persona-summary-category {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.95rem;
    padding-top: 0.9rem;
    border-top: 1px solid #e5e7eb;
}

    .persona-summary-category > i {
        color: #b45309;
        font-size: 1.2rem;
        flex-shrink: 0;
    }

    .persona-summary-category > div {
        display: flex;
        align-items: baseline;
        flex-wrap: wrap;
        gap: 0.25rem 0.65rem;
    }

.persona-summary-category-label {
    color: #6b7280;
    font-size: 0.78rem;
    font-weight: 600;
}

.persona-summary-category-name {
    color: #b45309;
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.3;
}

.persona-summary-category-range {
    color: #92400e;
    font-size: 0.95rem;
    font-weight: 600;
}

@media (max-width: 768px) {

    .persona-summary {
        padding: 0.9rem;
    }

    .persona-summary-header {
        flex-direction: column;
    }

    .persona-summary-button {
        width: 100%;
    }

    .persona-summary-data {
        grid-template-columns: 1fr;
        gap: 0.7rem;
    }

    .persona-summary-category > div {
        display: block;
    }

    .persona-summary-category-name,
    .persona-summary-category-range {
        display: block;
        margin-top: 0.1rem;
    }
}

/*RESUMEN SECCION 3*/
.registration-summary-card {
    margin-bottom: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid #dfe3e8;
    border-radius: 12px;
    background: transparent;
}

.registration-summary-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.registration-summary-icon {
    color: #198754;
    font-size: 1.25rem;
}

.registration-summary-label {
    display: block;
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.registration-summary-title {
    margin: 0.1rem 0 0;
    color: #1f2937;
    font-size: 1rem;
    font-weight: 700;
}

.registration-summary-divider {
    height: 1px;
    margin: 0.9rem 0;
    background: #e5e7eb;
}

.registration-summary-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.3fr;
    gap: 1rem;
}

.registration-summary-item {
    min-width: 0;
}

.registration-summary-item-label {
    display: block;
    margin-bottom: 0.2rem;
    color: #6b7280;
    font-size: 0.76rem;
    font-weight: 600;
}

.registration-summary-item-value {
    display: block;
    color: #1f2937;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.registration-summary-category-name {
    display: block;
    color: #b45309;
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.3;
}

.registration-summary-category-range {
    display: block;
    margin-top: 0.15rem;
    color: #92400e;
    font-size: 0.82rem;
    font-weight: 600;
}

.terms-link {
    color: #0d6efd;
    font-weight: 700;
    text-decoration: none;
}

    .terms-link:hover {
        text-decoration: underline;
    }

@media (max-width: 768px) {

    .registration-summary-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

/*CAMPO CEDULA RESPONSIVE*/

.cedula-search-wrapper {
    display: flex;
    width: 100%;
    gap: 0.75rem;
    align-items: stretch;
}

.cedula-input-wrapper {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
}

.cedula-input-icon {
    width: 50px;
    min-width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef1f4;
    color: #374151;
    border: 1px solid #cfd5dc;
    border-right: 0;
    border-radius: 0.55rem 0 0 0.55rem;
}

.cedula-input {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    height: 46px;
    border-radius: 0 0.55rem 0.55rem 0 !important;
}

.cedula-search-button {
    flex: 0 0 auto;
    min-width: 125px;
    min-height: 46px;
    white-space: nowrap;
}

/* Móvil */
@media (max-width: 767.98px) {

    .cedula-search-wrapper {
        flex-direction: column;
        gap: 0.7rem;
    }

    .cedula-input-wrapper {
        width: 100%;
    }

    .cedula-input {
        width: 100% !important;
        min-width: 0 !important;
    }

    .cedula-search-button {
        width: 100%;
        min-width: 0;
        min-height: 46px;
    }
}