/* Declaración de las fuentes locales (Ajustadas para la carpeta css) */
@font-face {
    font-family: 'Flexo';
    src: url('../fonts/Flexo-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Flexo';
    src: url('../fonts/Flexo-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Flexo';
    src: url('../fonts/Flexo-Demi.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

:root {
    --bcp-blue: #00297A;
    --bcp-dark-blue: #001A52;
    --bcp-orange: #ff7a00;
    --bcp-orange-hover: #e66b00;
    --bcp-light-bg: #f4f7fa;
    --bcp-text-dark: #002a7a;
    --bcp-text-muted: #616e7d;
}

body {
    margin: 0;
    font-family: 'Flexo', Arial, sans-serif;
    background-color: var(--bcp-light-bg);
    color: #333;
}

/* 1. Barra de notificación superior */
.top-promo-bar {
    background: linear-gradient(90deg, #0056ff 0%, #b200ff 100%);
    color: #fff;
    font-size: 0.8rem;
    padding: 8px 15px;
    text-align: center;
    position: relative;
    font-weight: 500;
}

    .top-promo-bar a {
        color: #fff;
        text-decoration: underline;
    }

    .top-promo-bar .close-btn {
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        cursor: pointer;
        opacity: 0.8;
        font-size: 1.1rem;
    }

/* 2. Header / Navbar principal */
header {
    background-color: #fff;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e1e6eb;
}

.logo-bcp {
    height: 24px;
}

.search-container {
    flex-grow: 1;
    margin: 0 15px;
    position: relative;
}

.search-input {
    width: 100%;
    border: 2px solid #501ddc;
    border-radius: 20px;
    padding: 4px 15px 4px 35px;
    font-size: 0.9rem;
    outline: none;
    color: #666;
    background-color: #fff;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #501ddc;
}

.menu-toggle {
    font-size: 1.4rem;
    color: #333;
    cursor: pointer;
}

/* 3. Sección Hero Azul */
.hero-section {
    background: radial-gradient(circle at 85% 30%, #ff5100 0%, var(--bcp-blue) 65%);
    color: #fff;
    padding: 20px 20px 0 20px;
    position: relative;
    overflow: hidden;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

    .hero-section h1 {
        font-size: 1.65rem;
        font-weight: bold;
        margin-bottom: 5px;
    }

    .hero-section p {
        font-size: 0.88rem;
        opacity: 0.9;
        max-width: 62%;
        margin-bottom: 15px;
        line-height: 1.3;
    }

.btn-bcp-orange {
    background-color: var(--bcp-orange);
    color: #fff;
    font-weight: bold;
    border-radius: 25px;
    padding: 9px 22px;
    border: none;
    display: inline-block;
    text-decoration: none;
    font-size: 0.88rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

    .btn-bcp-orange:hover {
        background-color: var(--bcp-orange-hover);
        color: #fff;
    }

.hero-img-container {
    position: absolute;
    right: 0;
    bottom: 0;
    text-align: right;
    margin-top: 0;
}

    .hero-img-container img {
        max-width: 155px;
        height: auto;
        vertical-align: bottom;
        display: block;
    }

/* 4. Separador breadcrumb */
.breadcrumb-sub {
    padding: 12px 20px;
    background-color: #fff;
    font-size: 0.85rem;
    color: #8c96a3;
    border-bottom: 1px solid #edf1f5;
}

/* 5. Contenedor del Simulador */
.simulator-container {
    padding: 35px 15px 20px 15px;
}

.simulator-title {
    color: var(--bcp-text-dark);
    font-weight: bold;
    font-size: 1.4rem;
    text-align: center;
    margin-bottom: 12px;
}

.simulator-subtitle {
    text-align: center;
    color: var(--bcp-text-muted);
    font-size: 0.95rem;
    margin-bottom: 25px;
    padding: 0 10px;
}

.simulator-card {
    background-color: #fff;
    border-radius: 16px;
    padding: 24px 20px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.04);
}


.form-label-custom {
    font-weight: bold;
    color: var(--bcp-text-dark);
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: block;
}

/* Selector de Moneda S/ $ */
.currency-switch {
    display: inline-flex;
    background-color: #f1f3f6;
    border-radius: 20px;
    padding: 3px;
    margin-bottom: 25px;
}

.currency-opt {
    padding: 4px 18px;
    border-radius: 18px;
    font-weight: bold;
    font-size: 0.85rem;
    cursor: pointer;
}

    .currency-opt.active {
        background-color: var(--bcp-orange);
        color: #fff;
    }

    .currency-opt.inactive {
        color: #a0aab5;
    }

/* Radio Buttons */
.loan-option-box {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #333;
}

    .loan-option-box input[type="radio"] {
        accent-color: var(--bcp-orange);
        width: 18px;
        height: 18px;
    }

/* Inputs */
.form-control-bcp {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ccd4de;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #333;
    outline: none;
    background-color: #fff;
}
/* Cuando el input NO esté mostrando el placeholder (es decir, cuando tenga texto escrito), se pone en negrita */
    .form-control-bcp:not(:placeholder-shown) {
        font-weight: bold;
        color: #333;
    }

/* Grupo Documento */
.document-group {
    display: flex;
    border: 1px solid #ccd4de;
    border-radius: 8px;
    overflow: hidden;
}

.document-select {
    border: none;
    background-color: #f8fafc;
    padding: 0 10px;
    font-size: 0.9rem;
    font-weight: bold;
    color: #333;
    outline: none;
    border-right: 1px solid #ccd4de;
    width: 85px;
}

.document-input {
    border: none;
    flex-grow: 1;
    padding: 10px 15px;
    font-size: 0.95rem;
    outline: none;
}

.legal-text {
    font-size: 0.76rem;
    color: #616e7d;
    line-height: 1.4;
}

    .legal-text a {
        color: var(--bcp-orange);
        text-decoration: underline;
    }

.btn-submit-bcp {
    background-color: var(--bcp-orange);
    color: #fff;
    font-weight: bold;
    width: 100%;
    padding: 12px;
    border-radius: 25px;
    border: none;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(255, 122, 0, 0.2);
}

.footer-disclaimer {
    font-size: 0.72rem;
    color: #8c96a3;
    text-align: center;
    line-height: 1.4;
}

.benefits-section-title {
    color: var(--bcp-text-dark);
    font-weight: bold;
    font-size: 1.25rem;
    text-align: center;
    margin-top: 30px;
    margin-bottom: 20px;
}

/* Loader Overlay */
#loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, var(--bcp-dark-blue) 0%, var(--bcp-blue) 100%);
    z-index: 9999;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-top: 5px solid var(--bcp-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loader-text {
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    text-transform: uppercase;
}
/* --- ESTILOS DEL MODAL DE APERTURA AUTOMÁTICA --- */
.modal-overlay-custom {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 26, 82, 0.55); /* Azul oscuro BCP translúcido */
    backdrop-filter: blur(4px); /* Aplica el desenfoque al fondo de la imagen */
    z-index: 10000; /* Por encima de todo, incluso del loader */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

    /* Clase activa que se añadirá con JS */
    .modal-overlay-custom.active {
        opacity: 1;
        pointer-events: auto;
    }

.modal-card-custom {
    background: linear-gradient(180deg, #ffffff 0%, #f4f7fa 100%);
    width: 100%;
    max-width: 340px;
    border-radius: 28px;
    padding: 30px 24px;
    text-align: center;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
    position: relative;
    transform: scale(0.85);
    transition: transform 0.3s ease;
}

.modal-overlay-custom.active .modal-card-custom {
    transform: scale(1);
}

/* Insignia redonda superior (Escudo) */
.modal-badge-top {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    background-color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

    .modal-badge-top img {
        width: 22px;
        height: auto;
    }

/* Contenedor de la ilustración */
.modal-illustration {
    margin-bottom: 20px;
    margin-top: 10px;
}

    .modal-illustration img {
        max-width: 170px;
        height: auto;
    }

/* Tipografía de la Alerta */
.modal-title-custom {
    color: #002a7a;
    font-weight: bold;
    font-size: 1.45rem;
    margin-bottom: 15px;
}

.modal-text-custom {
    color: #616e7d;
    font-size: 0.88rem;
    line-height: 1.45;
    margin-bottom: 25px;
    padding: 0 5px;
}

/* Botón Continuar Naranja */
.btn-modal-continue {
    background-color: #ff7a00;
    color: #fff;
    font-weight: bold;
    font-size: 0.95rem;
    border: none;
    width: 100%;
    padding: 11px;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(255, 122, 0, 0.35);
    transition: background-color 0.2s, transform 0.1s;
}

    .btn-modal-continue:active {
        transform: scale(0.98);
        background-color: #e66b00;
    }
/* Estilos para inputs con etiquetas flotantes en el borde */
.input-container-bcp {
    position: relative;
}

.fieldset-label {
    position: absolute;
    top: -10px;
    left: 12px;
    background: #fff;
    padding: 0 5px;
    font-size: 0.75rem;
    color: #8c96a3;
    z-index: 2;
    display: none; /* Se activa por JS al escribir */
}

/* Caja de resultados dinámicos */
.result-box-bcp {
    background-color: #eef3ff;
    border-radius: 12px;
    padding: 15px 18px;
    margin-bottom: 25px;
    animation: fadeInBcp 0.3s ease-in-out forwards;
}

.result-row-bcp {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #002a7a;
    margin-bottom: 8px;
}

    .result-row-bcp:last-child {
        margin-bottom: 0;
    }

    .result-row-bcp strong {
        font-size: 0.95rem;
        font-weight: bold;
    }

@keyframes fadeInBcp {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Mensaje de error para el plazo */
.error-msg-bcp {
    color: #e52421; /* Rojo de alerta BCP */
    font-size: 0.8rem;
    margin-top: 6px;
    padding-left: 2px;
    font-weight: 500;
    animation: fadeInBcp 0.2s ease-in-out forwards;
}
/* Alerta Verde de Validación de la API */
.reniec-success-box {
    background-color: #e6f9ed; /* Fondo verde claro */
    color: #198754; /* Texto verde éxito */
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.82rem;
    margin-top: 8px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: fadeInBcp 0.25s ease-in-out forwards;
}

    .reniec-success-box i {
        font-size: 0.95rem;
    }
/* Botón gris secundario para cancelar/corregir */
.btn-modal-cancel {
    background-color: #f1f3f6;
    color: #616e7d;
    font-weight: bold;
    font-size: 0.95rem;
    border: none;
    width: 100%;
    padding: 11px;
    border-radius: 25px;
    transition: background-color 0.2s;
}

    .btn-modal-cancel:active {
        background-color: #e2e5e9;
    }