:root {
    --naranja: #ff850a;
    --azul1: #003773;
    --azul2: #014a8a;
    --azul3: #015e93;
    --azul4: #01276b;
    --blanco: #fff;
}

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

body {
    font-family: "Poppins", sans-serif;
    color: var(--azul4);
    background-color: var(--blanco);
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255,255,255,0.95);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 3rem;
    z-index: 100;
    transition: background 0.3s;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--azul1);
}

    .logo span {
        color: var(--naranja);
    }

    .logoi {
        width: 45px;
        height: 45px;
        object-fit: contain;
    }

.navbar ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.navbar a {
    text-decoration: none;
    color: var(--azul2);
    font-weight: 500;
    transition: color 0.3s;
}

    .navbar a:hover {
        color: var(--naranja);
    }

.btn-cta {
    background: var(--naranja);
    font-size: 1.2rem;
    color: var(--blanco);
    border: none;
    padding: 0.7rem 1.3rem;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

    .btn-cta:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 15px rgba(255,133,10,0.3);
    }

/* Hero */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--blanco);
    overflow: hidden;
    z-index: 0;
}

/* Video de fondo */
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

/* Capa semitransparente para legibilidad */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(1, 39, 107, 0.8), rgba(1, 94, 147, 0.92));
    z-index: -2;
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40%;
    height: 80%;
    filter: blur(80px);
    opacity: 0.45;
    z-index: -1;
    pointer-events: none;
}

.hero::before {
    left: -10%;
    background: radial-gradient(circle, rgba( 0, 0, 0, 0.2));
}

.hero::after {
    right: -10%;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.2));
}

.hero-content {
    position: relative;
    padding: 3.5rem 4rem;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba( 255, 255, 255, 0.15);
    border-radius: 25px;
    box-shadow: 0 20px 45px rgba( 0, 0, 0, 0.25);
    animation: floatCard 6s ease-in-out infinite;
}

@keyframes floatCard {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0px); }
}

.hero-content:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba( 0, 0, 0, 0.35);
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}

.typing {
    white-space: nowrap;
    overflow: hidden;
    border-right: 3px solid var(--naranja);
    animation: typing 4s steps(36, end) forwards, blink 0.7s step-end infinite alternate;
}

@keyframes typing {
    0% { width: 0; }
    40% { width: 50%; }
    100% { width: 100%; }
}

@keyframes blink {
    from { border-color: transparent; }
    to { border-color: var(--naranja); }
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 768px) {
    .hero-video {
        display: none;
    }

    .overlay {
        background: linear-gradient(135deg, var(--azul4), var(--azul3));
    }
}

.btn-primary {
    background: var(--naranja);
    color: var(--blanco);
    border: none;
    padding: 1.3rem 2.3rem;
    border-radius: 10px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

    .btn-primary:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(255,133,10,0.3);
    }

/* Secciones */
section {
    padding: 8rem 3rem;
}

/* Servicios */
.servicios {
    background: #f8f9fb;
    text-align: center;
}

    .servicios h2 {
        margin-bottom: 3rem;
        color: var(--azul1);
    }

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--blanco);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    padding: 2rem;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 2px solid var(--azul3);
}

    .card:hover {
        transform: translateY(-6px);
        box-shadow: 0 8px 25px rgba(1, 94, 147, 0.6);
    }

.btn-servicio {
    margin-top: 1rem;
    background: var(--naranja);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: .3s ease;
}

    .btn-servicio:hover {
        background: var(--azul3);
    }

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.55);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    backdrop-filter: blur(4px);
    z-index: 99999;
}

    .modal.active {
        display: flex;
    }

.modal-content {
    background: #fff;
    max-width: 700px;
    overflow-y: auto;
    max-height: 85vh;
    width: 100%;
    padding: 2rem;
    border-radius: 18px;
    position: relative;
    animation: modalFade .3s ease;
    border-top: 5px solid var(--naranja);
    box-shadow: 0 0 35px rgba(0,0,0,0.25);
}

    /* Scroll suave y elegante */
    .modal-content::-webkit-scrollbar {
        width: 8px;
    }

    .modal-content::-webkit-scrollbar-thumb {
        background: var(--azul3);
        border-radius: 10px;
    }


@keyframes modalFade {
    from {
        transform: scale(.85);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.modal-close {
    position: absolute;
    right: 12px;
    top: 12px;
    background: var(--naranja);
    color: white;
    padding: 5px 12px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}

.btn-sol {
    background: var(--naranja);
    color: var(--blanco);
    border: none;
    padding: 1rem 2rem;
    border-radius: 15px;
    font-size: 1rem;
    cursor: pointer;
    margin-left: 12rem;
    margin-top: 1.2rem;
    object-position: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-sol:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(255,133,10,0.3);
    }

.modal-list {
    margin-top: 1rem;
    padding-left: 1.2rem;
}

    .modal-list li {
        margin-bottom: .4rem;
        font-weight: 500;
    }

@media (max-width: 480px) {
    .modal-content {
        padding: 1.2rem;
    }
}

/* Nosotros */
.nosotros {
    background: linear-gradient(135deg, var(--azul2), var(--azul3));
    color: var(--blanco);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: left;
}

    .nosotros .content {
        max-width: 700px;
    }

.btn-secondary {
    background: transparent;
    border: 2px solid var(--naranja);
    color: var(--blanco);
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    margin-top: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

    .btn-secondary:hover {
        background: var(--naranja);
        color: var(--blanco);
    }


/* Página Solicitar Crédito */
.solicitar-body {
    background: #f8f9fb;
    color: var(--azul4);
    font-family: "Poppins", sans-serif;
}

/* Hero de Solicitar Crédito */
.solicitar-hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--blanco);
    overflow: hidden;
}

    /* Video de fondo */
    .solicitar-hero .hero-video {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        z-index: -2;
    }

    /* Capa semitransparente */
    .solicitar-hero .overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(180deg, rgba(1, 39, 107, 0.8), rgba(1, 94, 147, 0.92));
        z-index: -1;
    }

/* Contenido */
.solicitar-hero-content {
    max-width: 700px;
    padding: 2rem;
    z-index: 1;
}

    .solicitar-hero-content h1 {
        font-size: 2.8rem;
        margin-bottom: 1rem;
        margin-top: 2px;
        text-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
    }

    .solicitar-hero-content p {
        font-size: 1.2rem;
        opacity: 0.9;
        color: rgba(255, 255, 255, 0.9);
    }

    .solicitar-hero-content .btn-primary {
        position: relative;
        background: transparent;
        color: var(--blanco);
        border: 2px solid var(--naranja);
        overflow: hidden;
        z-index: 1;
        padding: 1.3rem 2.3rem;
        border-radius: 10px;
        font-size: 1.2rem;
        font-weight: 600;
        cursor: pointer;
        margin-top: 2rem;
        transition: color 0.3s ease, box-shadow 0.3s;
    }

    /* Pseudo-elemento que simula el "agua" */

    .solicitar-hero-content .btn-primary::before {
        content: "";
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%) scaleY(0);
        width: 120%;
        height: 120%;
        background: var(--naranja);
        border-radius: 10%;
        z-index: -1;
        transition: all 0.6s ease-out;
    }

    /* hover la ola sube y llena el boton */

    .solicitar-hero-content .btn-primary:hover::before {
        top:  0;
        transform: translateX(-50%) scaleY(1);
    }

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255,133,10,0.3);
    color: var(--blanco);
}


    /* Versión móvil */
    @media (max-width: 768px) {
        .solicitar-hero {
            height: 80vh;
        }

            .solicitar-hero .hero-video {
                display: none;
            }

            .solicitar-hero .overlay {
                background: linear-gradient(135deg, var(--azul4), var(--azul3));
            }

        .solicitar-hero-content h1 {
            font-size: 2rem;
        }
    }

.formulario {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    justify-content: center;
    padding: 6rem 2rem;
    background: linear-gradient(-135deg, var(--naranja), var(--azul1), var(--azul3), var(--naranja));
    background-size: 400% 400%;
    animation: gradientBG 12s ease infinite;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.form-header::before,
.form-header::after {
    content: "";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40%;
    height: 80%;
    filter: blur(80px);
    opacity: 0.45;
    z-index: -1;
    pointer-events: none;
}

.form-header::before {
    left: -10%;
    background: radial-gradient(circle, rgba(255,133,10,0.55), transparent 70%);
}

.form-header::after {
    right: -10%;
    background: radial-gradient(circle, rgba(0,90,255,0.45), transparent 70%);
}

.form-header {
    position: relative;
    max-width: 750px;
    background: rgba(255, 255, 255, 0.10);
    padding: 1.8rem 2.2rem;
    border-radius: 15px;
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
    animation: floatCard 3.5s ease-in-out infinite;
}

.form-header h2 {
    font-size: 1.8rem;
    color: var(--blanco);
    line-height: 1.4;
    font-weight: 600;
}

.form-creditos {
    background: var(--blanco);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 6px 25px rgba(0,0,0,0.9);
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 1.3rem;
    margin-top: 0.5rem;
}

    .form-creditos label {
        font-weight: 600;
        color: var(--azul2);
    }

    .form-creditos input,
    .form-creditos select {
        padding: 0.8rem;
        border-radius: 8px;
        border: 1px solid var(--azul3);
        font-size: 1rem;
    }

        .form-creditos input:focus,
        .form-creditos select:focus {
            outline: none;
            border-color: var(--naranja);
            box-shadow: 0 0 6px rgba(255,133,10,0.4);
        }

    .form-creditos button {
        align-self: center;
        margin-top: 1rem;
    }

/* aviso de recaptcha */
.recaptcha-notice {
    margin-top: 18px;
    font-size: 0.75rem;
    color: rgba( 0, 0, 0, 0.65);
    line-height: 1.6;
    opacity: 0.75;
    text-align: center;
    max-width: 420px;
}

    .recaptcha-notice a {
        color: var(--azul1);
        text-decoration: none;
        font-weight: 500;
        transition: all 0.3s ease;
    }

        .recaptcha-notice a:hover {
            color: var(--naranja);
            text-shadow: 0 0 8px var(--naranja);
        }

.fa-shield-halved {
    color: var(--naranja);
}

/* Footer */
.footer {
    background: var(--azul4);
    color: var(--blanco);
    text-align: center;
    padding: 4rem 2rem;
}

    .footer a {
        text-decoration: none;
        color: var(--blanco);
        display: inline-block;
        margin: 1rem 0;
    }

    .footer h3 {
        margin-bottom: 1.5rem;
        font-weight: 600;
        color: var(--blanco);
    }

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

    .social-icons a {
        color: var(--blanco);
        font-size: 1.5rem;
        transition: transform 0.3s ease, color 0.3s ease;
        position: relative;
    }

        /* Efecto hover: movimiento + brillo */
        .social-icons a:hover {
            transform: translateY(-4px) scale(1.1);
            color: var(--naranja);
            text-shadow: 0 0 10px rgba(255, 133, 10, 0.6);
        }

.copy {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-top: 2rem;
}

/* Responsivo */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 0.8rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    section {
        padding: 4rem 2rem;
    }
}


/* CHATBOT NEXPRO */
.chatbot-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 320px;
    height: 450px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 200;
    transform: scale(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease;
}

/* Header */
.chatbot-header {
    background: linear-gradient(135deg, var(--azul3), var(--azul1));
    color: var(--blanco);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1rem;
}

.chatbot-logo {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.chatbot-title {
    font-weight: 600;
    font-size: 1.1rem;
    flex: 1;
    margin-left: 0.5rem;
}

.chatbot-close {
    background: none;
    border: none;
    color: var(--blanco);
    font-size: 1.2rem;
    cursor: pointer;
}

/* Cuerpo del chat */
.chatbot-body {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background: #f9f9fb;
}

.chatbot-message {
    margin-bottom: 1rem;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    max-width: 85%;
    font-size: 0.95rem;
    line-height: 1.3;
}

    .chatbot-message.bot {
        background: linear-gradient(135deg, #005f9e, #0077c8);
        color: #ffffff;
        padding: 16px 18px;
        border-radius: 14px;
        max-width: 320px;
        font-size: 14.5px;
        line-height: 1.5;
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
        align-self: flex-start;
    }

    .chatbot-message.user {
        background: var(--naranja);
        color: var(--blanco);
        align-self: flex-end;
    }

/* Input */
.chatbot-input {
    display: flex;
    border-top: 1px solid #ddd;
}

    .chatbot-input input {
        flex: 1;
        border: none;
        padding: 0.8rem;
        font-size: 0.9rem;
    }

    .chatbot-input button {
        background: var(--naranja);
        border: none;
        color: var(--blanco);
        padding: 0 1rem;
        cursor: pointer;
        transition: background 0.3s;
    }

        .chatbot-input button:hover {
            background: var(--azul3);
        }

/* Botón flotante */
.chatbot-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 55px;
    height: 55px;
    background: var(--naranja);
    color: var(--blanco);
    border: none;
    border-radius: 50%;
    box-shadow: 0 6px 20px rgba(255, 133, 10, 0.4);
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s ease;
    z-index: 150;
}

    .chatbot-toggle:hover {
        transform: scale(1.1);
    }

/* Mostrar chat */
.chatbot-container.active {
    transform: scale(1);
}

/* NexPro typing */
/* NexPro typing */
.chat-typing {
    display: flex;
    gap: 4px;
}

.chat-typing-dot {
    width: 7px;
    height: 7px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    animation: chatBlink 1s infinite;
}

@keyframes chatBlink {
    0% {
        opacity: .2;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: .2;
    }
}

/* Contenedor del menú rápido */
.quick-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* Botones del menú rápido */
.quick-btn {
    background: rgba(255,255,255,1);
    color: var(--azul2);
    border: 1px solid rgba(255,255,255,0.25);
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(1, 47, 99, 0.2);
    backdrop-filter: blur(8px)
}

    /* Hover */
    .quick-btn:hover {
        background: var(--azul3);
        color: var(--blanco);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(1, 47, 99, 0.3);
    }

    /* Activo (click) */
    .quick-btn:active {
        transform: scale(0.96);
    }

/* Links de contacto */
.chatbot-message.bot a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    transition: background 0.25s ease, transform 0.15s ease;
}

    /* Hover fino */
    .chatbot-message.bot a:hover {
        background: rgba(255, 255, 255, 0.28);
        transform: translateY(-1px);
    }

/* Emojis un poco más alineados */
.chatbot-message.bot br + br {
    margin-bottom: 6px;
}

/* --- MENÚ HAMBURGUESA --- */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--azul2);
}

.cta-mobile {
    display: none;
}

/* --- MOBILE --- */
@media (max-width: 820px) {

    /* Navbar compacta */
    .navbar {
        padding: 1rem 1.5rem;
    }

    /* Ocultar imagen del logo */
    .logo {
        display: none;
    }

    /* Mostrar hamburguesa */
    .menu-toggle {
        display: block;
        z-index: 200;
    }

    /* Muestra el botón CTA móvil */
    .cta-mobile {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0.7rem 1.4rem;
        font-size: 0.95rem;
        font-weight: 600;
        border-radius: 50px;
        background: var(--naranja);
        color: white;
        margin-left: auto;
        margin-right: 1rem;
        z-index: 200;
    }

    /* Menu oculto por defecto */
    nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(255,255,255,0.97);
        backdrop-filter: blur(5px);
        padding: 1.5rem 0;
        display: none;
        box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    }

        nav.active {
            display: block;
            animation: fadeMenu .3s ease;
        }

    @keyframes fadeMenu {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 1.2rem;
    }

    .btn-cta {
        display: none; /* Ocultamos CTA para que solo quede btn-primary */
    }

    /* HERO: mostrar btn-primary correctamente */
    .btn-primary {
        display: inline-block;
    }

    /* Video oculto en móviles */
    .hero-video {
        display: none !important;
    }

    /* Fondo sólido alternativo */
    .overlay {
        background: linear-gradient(135deg, var(--azul4), var(--azul3)) !important;
    }
}

/* Ocultar badge flotante de reCAPTCHA */
.grecaptcha-badge {
    visibility: hidden !important;
    opacity: 0 !important;
}

/* ===== FIX HERO MOBILE ===== */
@media (max-width: 768px) {

    .hero {
        height: auto;
        min-height: 100vh;
        padding: 6rem 1.5rem 3rem;
        align-items: center;
    }

    .hero-content {
        width: 100%;
        max-width: 100%;
        padding: 2rem 1.5rem;
        border-radius: 18px;
        animation: none; /* menos circo, más claridad */
    }

    .hero h1 {
        font-size: 1.8rem;
        line-height: 1.2;
        white-space: normal; /* rompe el typing raro */
        border-right: none;
        animation: none;
    }

    .typing {
        white-space: normal;
        border-right: none;
        animation: none;
    }

    .hero p {
        font-size: 1rem;
        line-height: 1.5;
        margin-bottom: 1.5rem;
    }

    .btn-primary {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
    }
}