/* ==========================================================================
   GLOBAL VARIABLES & RESETS
   ========================================================================== */
:root {
    /* Paleta de Colores basada en el diseño de Figma */
    --c-primary: #000064;    /* Azul Marino Profundo (Títulos, Textos Principales) */
    --c-accent: #008dff;     /* Azul Claro (Resaltados, Botones) */
    --c-secondary: #29b6f6;  /* Cyan (Bordes, Textos Alternativos) */
    --c-text-gray: #707070;  /* Gris Oscuro (Textos secundarios) */
    --c-text-light: #222222; /* Negro suave */
    --c-white: #ffffff;      /* Blanco */
    --c-bg-footer: #f5f5f5;  /* Gris Claro (Fondo Footer) */
    
    /* Variables de UI */
    --border-radius-btn: 21px;
    --border-radius-input: 21px;
    --border-radius-card: 14px;
    
    /* Tipografía */
    --font-family: 'IBM Plex Sans', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--c-primary);
    background-color: var(--c-white);
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.header {
    background-color: var(--c-white);
    height: 73px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo-img {
    height: 25px;
    width: auto;
    flex-shrink: 0;
}

.menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    margin-right: 20px;
}

.menu-icon-img {
    height: 18px; /* Reducido al 60% de 30px */
    width: auto;
}

.nav-list {
    display: flex;
    gap: 20px;
    margin-right: 20px;
}

.nav-list a {
    font-weight: 500;
    color: var(--c-primary);
    transition: color 0.3s;
}

.nav-list a:hover {
    color: var(--c-accent);
}

/* Mobile Nav */
@media (max-width: 768px) {
    .menu-btn { display: block; }
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--c-white);
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }
    .nav.active { display: block; }
    .nav-list {
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        margin-right: 0;
    }
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
    text-align: center;
    padding: 40px 20px 20px;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 45.5px;
    font-weight: 600;
    font-style: italic;
    color: var(--c-primary);
    line-height: 1.1;
    margin-bottom: 30px;
}

.text-accent {
    color: var(--c-accent);
}

.text-secondary {
    color: var(--c-secondary);
}

.italic {
    font-style: italic;
}

.hero-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
}

.logo-img-large {
    height: 42px;
    width: auto;
    flex-shrink: 0;
}

.hero-subtitle {
    font-size: 16.3px;
    font-weight: 600;
    font-style: italic;
    color: var(--c-primary);
    margin-top: 10px;
}

/* ==========================================================================
   FORMULARIO SECTION
   ========================================================================== */
.formulario-section {
    max-width: 400px;
    margin: 30px auto 50px;
    padding: 0 20px;
}

.loan-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 20px;
    font-weight: 600;
    color: var(--c-primary);
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="email"] {
    width: 100%;
    height: 52px;
    border: 2px solid var(--c-secondary);
    border-radius: var(--border-radius-input);
    padding: 0 20px;
    font-family: var(--font-family);
    font-size: 14px;
    color: var(--c-primary);
    background: transparent;
}

.form-hint {
    font-size: 12px;
    font-weight: 300;
    color: var(--c-primary);
    margin-left: 10px;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--c-accent);
}

.form-actions {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.btn-submit {
    width: 212px; /* Tamaño según Figma */
    height: 52px;
    border-radius: var(--border-radius-btn);
    background: linear-gradient(184deg, rgba(51, 25, 154, 0.4) 10%, rgba(129, 64, 195, 0.4) 66%);
    color: rgba(255, 255, 255, 0.2); /* Opacidad según diseño para estado desactivado */
    font-size: 26px;
    font-weight: 700;
    border: 3px solid rgba(41, 182, 246, 0.4);
    cursor: not-allowed;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-submit:not(:disabled) {
    background: linear-gradient(184deg, rgb(51, 25, 154) 10%, rgb(129, 64, 195) 66%);
    color: var(--c-white);
    border-color: var(--c-secondary);
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.btn-submit.loading {
    font-size: 18px; /* Tamaño reducido para textos largos de estado */
}

/* ==========================================================================
   INSTRUCCIONES SECTION (Features & Steps)
   ========================================================================== */
.instrucciones-section {
    max-width: 800px;
    margin: 0 auto 50px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Features List */
.features-list {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px; /* Reducción a 1/4 */
    width: fit-content;
    margin: 0 auto 12px auto; /* Centrado del bloque y reducción de margen inferior */
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 2px 0; /* Reducción drástica del espaciado vertical */
    background: transparent;
}

.feature-icon {
    width: 35px;
    height: 35px;
    flex-shrink: 0;
}

.feature-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--c-text-light);
}

/* Steps */
.steps-container {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 40px; /* Margen antes de la sección pasos */
}

.steps-title {
    text-align: center;
    font-size: 33px;
    font-weight: 500;
    color: var(--c-primary);
    line-height: 1.1;
    margin-bottom: 20px;
}

.step-card {
    background-color: var(--c-white);
    border: 1px solid rgba(112, 112, 112, 0.3);
    border-radius: var(--border-radius-card);
    height: 55px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0px 4.3px 4.3px rgba(0,0,0,0.19); /* Sombra según Figma */
    gap: 15px;
}

.step-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.step-label {
    color: var(--c-secondary);
    font-size: 16.2px;
    font-weight: 600;
    margin-right: 5px;
}

.step-text {
    font-size: 12px;
    color: var(--c-text-gray);
    font-weight: 500;
}

/* ==========================================================================
   REQUISITOS SECTION
   ========================================================================== */
.requisitos-section {
    max-width: 400px;
    margin: 0 auto 50px;
    padding: 0 20px;
}

.requisitos-card {
    position: relative;
    padding: 30px 25px;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* overflow: hidden;  REMOVED to allow image overlap */
}

.requisitos-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(212deg, rgb(89, 44, 195) 0%, rgb(0, 0, 100) 100%);
    border-radius: 0 115px 0 35px; /* Superior-izq e inferior-der a 90 grados (0px) */
    z-index: 1;
}

.requisitos-content {
    position: relative;
    z-index: 2;
    width: 60%;
}

.requisitos-title {
    font-size: 28.3px;
    font-weight: 700;
    color: var(--c-white);
    margin-bottom: 15px;
}

.requisitos-list {
    color: var(--c-white);
    font-size: 11.8px;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.requisitos-image-container {
    position: absolute;
    bottom: 0;
    right: -20px;
    height: 115%; /* Higher than the card to pop out */
    z-index: 3; /* Above content and background */
    pointer-events: none;
}

.requisitos-img {
    height: 100%;
    width: auto;
    object-fit: cover;
}

@media (min-width: 768px) {
    .requisitos-section { max-width: 800px; }
    .requisitos-card { padding: 50px; }
    .requisitos-title { font-size: 36px; }
    .requisitos-content { width: 50%; }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
    background-color: var(--c-bg-footer);
    padding: 60px 20px 80px; /* Increased bottom padding to ensure no cutoff */
    color: var(--c-text-gray);
    width: 100%; /* Ensure full width */
}

.footer-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 30px;
}

.footer-logo {
    display: flex;
    flex-direction: row; /* En la misma línea */
    align-items: center;
    justify-content: center;
    gap: 25px;
    margin-bottom: 10px;
    width: 100%;
}

.logo-img-footer {
    height: 26px; /* Reducción de ~25% (de 35px a 26px) */
    width: auto;
    flex-shrink: 0;
}

.footer-socials {
    display: flex;
    gap: 15px;
    align-items: center;
}

.footer-socials img {
    width: 24px;
    height: 24px;
}

.footer-address {
    font-size: 11.8px;
    max-width: 400px;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-title {
    font-size: 14.3px;
    color: var(--c-secondary);
    font-weight: 500;
}

.contact-methods {
    display: flex;
    gap: 30px;
    justify-content: center;
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    font-size: 11px;
}

.contact-item img {
    width: 28px;
    height: 28px;
}

.footer-divider {
    width: 100%;
    height: 1px;
    background-color: #cecdcd;
}

.footer-legal-text {
    font-size: 10.6px;
    color: var(--c-primary);
    font-weight: 300;
    max-width: 600px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    font-size: 11.2px;
    color: var(--c-primary);
    text-decoration: underline;
}

@media (min-width: 768px) {
    .footer-links { flex-direction: row; gap: 30px; }
}

/* ==========================================================================
   INPUT VALIDATION & POPUPS
   ========================================================================== */
.input-error {
    border-color: #ff0000 !important; /* Borde rojo según figma 47-1516 */
    box-shadow: 0 0 5px rgba(255, 0, 0, 0.2);
}

/* Modal / Popup Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 50, 0.7); /* Fondo oscuro semitransparente */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
}

.modal-content {
    background-color: var(--c-white);
    width: 100%;
    max-width: 400px;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--c-primary);
    margin-bottom: 10px;
}

.modal-icon {
    width: 60px;
    height: 60px;
    margin: 10px 0;
}

.modal-message {
    font-size: 18px;
    font-weight: 600;
    color: var(--c-primary);
    line-height: 1.3;
}

.modal-small-message {
    font-size: 14px;
    font-weight: 400;
    color: var(--c-text-gray);
    line-height: 1.4;
    text-align: center;
}

.modal-small-message strong {
    color: var(--c-primary);
    font-weight: 700;
}

.modal-btn {
    width: fit-content;
    min-width: 200px;
    max-width: 100%;
    padding: 0 30px;
    height: 48px;
    border-radius: 24px;
    background: linear-gradient(184deg, rgb(51, 25, 154) 10%, rgb(129, 64, 195) 66%);
    color: var(--c-white);
    font-size: 16px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    margin-top: 15px;
    transition: transform 0.2s ease;
    white-space: nowrap;
}

.modal-btn:hover {
    transform: scale(1.02);
}
