﻿/* ==========================================================================
   1. SECCIÓN: PRÓXIMO PROYECTO (Banner Superior)
   ========================================================================== */
.proximo-proyecto-section {
    position: relative;
    width: 100%;
    min-height: 500px;
    display: flex;
    align-items: center;
    background-color: #f8fcff; /* Color base */
    font-family: 'Plus Jakarta Sans', sans-serif;
    overflow: hidden; /* Importante para que la imagen no se salga al animar */
}

/* La imagen ahora es un elemento posicionado */
.ppb-background-image {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(104, 189, 242, 0.92) 0%, rgba(255, 255, 255, 0) 100%), url('../Img/Contanto/ppbBG.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

.ppb-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2; /* Por encima de la imagen */
    padding-left: 1%;
    padding-right: 5%;
}

.ppb-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 800px;
}

.ppb-title {
    font-weight: 700;
    font-size: 60px;
    line-height: 76px;
    margin: 0;
    background: linear-gradient(270deg, #65A6EB 3.36%, #498BE9 15.38%, #0D4AE6 58.17%), #FFFFFF;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: #0D4AE6;
}

.ppb-subtitle {
    font-weight: 700;
    font-size: 34px;
    line-height: 43px;
    margin: 0;
    color: #000000;
}

/* ======================================================
   ANIMACIONES CORREGIDAS
   ====================================================== */

.proximo-proyecto-section [data-animate] {
    opacity: 0;
    transition: opacity 1s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, transform;
}

/* El texto viene de la izquierda */
.proximo-proyecto-section [data-animate="fade-left"] {
    transform: translateX(-60px);
}

/* La imagen de fondo viene de la derecha */
.proximo-proyecto-section [data-animate="fade-right"] {
    transform: translateX(80px); /* Un poco más de recorrido para el fondo */
}

/* Estado Final: Todo a su lugar */
.proximo-proyecto-section [data-animate].animate {
    opacity: 1;
    transform: translate(0, 0);
}

.delay-200 {
    transition-delay: 0.2s;
}

/* Responsive */
@media (max-width: 768px) {
    .proximo-proyecto-section {
        min-height: 350px;
    }

    .ppb-title {
        font-size: 40px;
        line-height: 1.2;
    }

    .ppb-subtitle {
        font-size: 24px;
    }
}


/* ======================================================
   ANIMACIONES PRÓXIMO PROYECTO (CORREGIDO)
   ====================================================== */

.proximo-proyecto-section [data-animate] {
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, transform;
}

/* Sale de la izquierda (Hacia la derecha) */
.proximo-proyecto-section [data-animate="fade-left"] {
    transform: translateX(-50px);
}

/* Sale de la derecha (Hacia la izquierda) */
.proximo-proyecto-section [data-animate="fade-right"] {
    transform: translateX(50px);
}

/* Sale de abajo (Por si lo usas en otros elementos) */
.proximo-proyecto-section [data-animate="fade-up"] {
    transform: translateY(40px);
}

/* Estado Final: Visible y en su posición original */
.proximo-proyecto-section [data-animate].animate {
    opacity: 1;
    transform: translate(0, 0);
}

/* Retraso para el subtítulo */
.delay-200 {
    transition-delay: 0.2s;
}

/* ==========================================================================
   2. SECCIÓN: RETO (Formulario + Footer de Contacto)
   ========================================================================== */
.reto-section {
    padding: 60px 20px;
    background: radial-gradient(circle at bottom,rgba(118, 199, 253, 0.44) 0%, rgba(237, 248, 248, 0.4) 60%, rgba(237, 248, 248, 1) 88%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.reto-container {
    max-width: 1000px;
    margin: 0 auto;
}

.reto-header {
    text-align: center;
    margin-bottom: 50px;
}

.reto-title {
    /* Ajusté el tamaño y fuente para que se vea más parecido a la imagen */
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 48px;
    font-weight: 800;
    color: #1F2937; /* Gris muy oscuro para "Cuéntanos" */
    margin-bottom: 10px;
}

    .reto-title .text-blue {
        /* El mismo degradado de tu otra sección */
        background: linear-gradient(90deg,rgba(13, 74, 230, 0.94) 26%, rgba(73, 139, 233, 0.63) 77%);
        /* Estas 3 líneas recortan el fondo con la forma del texto */
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        /* Fallback por si acaso */
        color: #0D4AE6;
        display: inline-block; /* A veces necesario para que el clip funcione bien */
    }

.reto-subtitle {
    font-size: 16px;
    color: #666;
    font-weight: 400;
}

/* Contenido: Visual + Formulario */
.reto-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
}

.reto-visual {
    flex: 1;
    display: flex;
    justify-content: center;
}

    .reto-visual svg {
        max-width: 30rem;
        height: auto; /* Corregido para evitar estiramientos forzados */
        max-height: 700px; /* Límite de altura seguro */
    }

.reto-form-wrapper {
    flex: 1;
    max-width: 600px;
}

.reto-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Inputs */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .form-group label {
        font-weight: 600;
        color: #496179;
        font-size: 14px;
        font-family: 'Source Sans Pro', sans-serif;
    }

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    font-size: 14px;
    background-color: #fff;
    outline: none;
    transition: border-color 0.2s;
    font-family: 'Source Sans Pro', sans-serif;
}

    .form-input::placeholder {
        color: #A0AEC0;
    }

    .form-input:focus {
        border-color: #0D4AE6;
        box-shadow: 0 0 0 3px rgba(13, 74, 230, 0.1);
    }

    .form-input.textarea {
        min-height: 120px;
        resize: vertical;
    }

.btn-enviar {
    background-color: #0D4AE6;
    color: white;
    font-weight: 400;
    padding: 16px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.3s !important;
    font-size: 16px;
    margin-top: 10px;
    width: 100%;
}

    .btn-enviar:hover {
        background-color: #0033a1;
        transition: background 0.3s !important;
        color: #FFFFFF !important; /* Aseguramos que siga blanco al hacer hover */
        transform: translateY(-2px);
        text-decoration: none !important;
    }
/* === LOGICA DE ESTADOS PARA RETO FORM === */

.btn-enviar {
    position: relative; /* Necesario para posicionar el icono absoluto */
    overflow: hidden;
    transition: all 0.4s ease !important;
}

    .btn-enviar .btn-content {
        display: inline-block;
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    /* Estado inicial del ícono SVG (Oculto) */
    .btn-enviar .success-icon {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

/* --- ESTADO: ENVIANDO --- */
.reto-form.is-submitting .btn-enviar {
    cursor: wait;
    background-color: #3d5a99; /* Azul más opaco durante carga */
    opacity: 0.8;
}

/* --- ESTADO: ÉXITO (VERDE + PALOMITA) --- */
.reto-form.is-submitted .btn-enviar {
    background-color: #28a745 !important; /* Verde éxito */
    pointer-events: none;
}

.reto-form.is-submitted .btn-content {
    opacity: 0;
    transform: translateY(10px);
}

.reto-form.is-submitted .success-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Estilo para inputs deshabilitados */
.reto-form .form-input:disabled {
    background-color: #f1f5f9;
    cursor: not-allowed;
    border-color: #e2e8f0;
}

/* -----------------------------------------------------------
   FOOTER (CORREGIDO: ALTURAS Y CENTRADO)
   ----------------------------------------------------------- */
.reto-footer {
    display: flex;
    justify-content: space-between;
    /* CORRECCIÓN 1: 'stretch' iguala la altura de las líneas divisorias */
    align-items: flex-start;
    margin-top: 50px;
    border-radius: 4px;
    background-color: transparent; /* O el color gris si lo deseas #e5e7eb */
    width: 100%;
}

.footer-column {
    flex: 1;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centra verticalmente */
    gap: 15px;
    font-family: 'Source Sans Pro', sans-serif;
}

/* Líneas divisorias */
.border-right {
    border-right: 1px solid #c8c8c8;
}

/* CORRECCIÓN 2: Centrado de la columna de en medio */
.centered-column {
    align-items: center; /* Eje vertical de la columna */
}

    /* Fuerza al contenido (icono+texto) a centrarse horizontalmente en la columna central */
    .centered-column .footer-item {
        justify-content: center;
        margin-bottom: 25px;
    }
        .centered-column .footer-item:hover {
            transform: scale(1.05) translateX(0);
            text-decoration: none !important;
        }

.footer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    /* BASE: Sin decoración */
    text-decoration: none !important;
    color: inherit;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
    .footer-item:hover {
        text-decoration: none !important; /* <--- CLAVE */
        opacity: 0.8;
        transform: translateX(5px);
        color: #0D4AE6 !important; /* Se pone azul al pasar el mouse */
    }


    .footer-item.align-start {
        align-items: flex-start;
        pointer-events: none;
    }

.icon-circle {
    width: 32px;
    height: 32px;
    background-color: #0D4AE6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
    font-size: 14px;
    pointer-events: auto;
}

.footer-text {
    font-size: 13px;
    color: #4A5568; /* Este color gris bloqueaba el azul del padre */
    font-weight: 500;
    line-height: 1.4;
    transition: color 0.3s ease; /* AGREGADO */
}
.footer-item:hover .footer-text {
    color: #0D4AE6 !important;
}
.footer-item:hover .icon-circle {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.footer-address {
    font-size: 13px;
    color: #4A5568;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    pointer-events: auto;
}
.map-link {
    color: inherit;
    text-decoration: none;
    display: block;
    margin-bottom: 4px;
    transition: color 0.2s ease;
}

    .map-link:hover {
        color: #0D4AE6; /* Se pone azul al pasar el mouse */
        text-decoration: none;
    }

.sub-address {
    opacity: 0.8;
    margin-top: 4px;
    display: block;
}

.sub-address {
    opacity: 0.8;
    margin-top: 4px;
    display: block;
}

/* Responsive Sección 2 */
@media (max-width: 992px) {
    .reto-content {
        flex-direction: column-reverse;
    }

    .reto-visual, .reto-form-wrapper {
        max-width: 100%;
        width: 100%;
    }

    .reto-footer {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px 0;
        gap: 0;
    }

    .footer-column {
        flex: 1;
        padding: 0 20px;
        display: flex;
        flex-direction: column;
        /* CAMBIO: Alinea el contenido al tope de la columna */
        justify-content: flex-start;
        gap: 15px;
        font-family: 'Source Sans Pro', sans-serif;
    }

        .footer-column:last-child {
            border-bottom: none;
        }

    /* En móvil anulamos el centrado para que todo se alinee a la izquierda */
    .centered-column {
        align-items: flex-start;
    }

        .centered-column .footer-item {
            justify-content: center;
            align-items: center;
            /* Añade un pequeño padding superior solo si el icono es más grande que el del correo */
            padding-top: 2px;
        }
}


/* ==========================================================================
   ANIMACIONES SECCIÓN RETO (GLOBALES)
   ========================================================================== */

/* Estado inicial: Invisible y transiciones suaves */
.reto-section [data-animate] {
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, transform;
}

/* 1. Fade Up (Sube desde abajo) */
.reto-section [data-animate="fade-up"] {
    transform: translateY(40px);
}

/* 2. Fade Left (Viene desde la izquierda) */
.reto-section [data-animate="fade-left"] {
    transform: translateX(-40px);
}

/* 3. Fade Right (Viene desde la derecha) */
.reto-section [data-animate="fade-right"] {
    transform: translateX(40px);
}

/* ESTADO FINAL: Visible y en su lugar original */
.reto-section [data-animate].animate {
    opacity: 1;
    transform: translate(0) scale(1);
}

/* Retraso para el footer */
.delay-200 {
    transition-delay: 0.2s;
}

/* ==========================================================================
   NUEVO: ANIMACIÓN PROGRESIVA DE CAMPOS (CASCADA)
   ========================================================================== */

/* 1. Definimos la animación: de invisible/abajo a visible/arriba */
@keyframes fadeInUpField {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 2. Aplicamos la animación a los campos, pero pausada hasta que cargue */
.reto-form .form-group,
.reto-form .btn-enviar {
    opacity: 0; /* Empiezan ocultos */
    /* fill-mode: forwards asegura que se queden visibles al terminar */
    animation: fadeInUpField 0.5s ease-out forwards;
}

    /* 3. Retrasos (Delays) para crear el efecto "uno por uno" */
    .reto-form .form-group:nth-child(1) {
        animation-delay: 0.4s;
    }
    /* Nombre */
    .reto-form .form-group:nth-child(2) {
        animation-delay: 0.5s;
    }
    /* Correo */
    .reto-form .form-group:nth-child(3) {
        animation-delay: 0.6s;
    }
    /* Teléfono */
    .reto-form .form-group:nth-child(4) {
        animation-delay: 0.7s;
    }
/* Mensaje */
.reto-form .btn-enviar {
    animation-delay: 0.8s;
}
/* Botón */


/* ==========================================================================
   NUEVO: ESTILOS DE INPUTS CON HOVER
   ========================================================================== */

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #E2E8F0; /* Borde original suave */
    border-radius: 6px;
    font-size: 14px;
    background-color: #fff;
    outline: none;
    font-family: 'Source Sans Pro', sans-serif;
    /* Esta transición hace que el cambio de color sea suave */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

    /* EFECTO HOVER: Cuando pasas el mouse */
    .form-input:hover {
        border-color: #65A6EB; /* Azul claro intermedio */
        box-shadow: 0 4px 12px rgba(13, 74, 230, 0.08); /* Sombra suave azulada */
    }

    /* EFECTO FOCUS: Cuando escribes (Mantenemos tu azul fuerte) */
    .form-input:focus {
        border-color: #0D4AE6;
        box-shadow: 0 0 0 3px rgba(13, 74, 230, 0.15);
    }

    /* Ajuste específico para el textarea */
    .form-input.textarea {
        min-height: 120px;
        resize: vertical;
    }
/* ==========================================================================
   3. SECCIÓN: TARJETAS (Talento y Equipo)
   ========================================================================== */
.te-section {
    width: 100%;
    padding: 60px 0;
    display: flex;
    justify-content: center;
    background-color: transparent;
}

.te-container {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    gap: 30px;
    align-items: stretch;
    box-sizing: border-box;
}

.te-card {
    flex: 1;
    border-radius: 24px;
    padding: 40px 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    font-family: 'Plus Jakarta Sans', sans-serif;
    box-sizing: border-box;
    min-height: 350px;
    /* AGREGADO: Transición suave para la levitación */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, background-color 0.3s ease;
    will-change: transform;
}

    /* AGREGADO: Estado Hover General (Levita) */
    .te-card:hover {
        transform: translateY(-12px) !important;
    }

.card-white {
    background: #FFFFFF;
    box-shadow: 0px 4px 30px rgba(0, 0, 0, 0.08);
}

    /* AGREGADO: Sombra al pasar el mouse en tarjeta blanca */
    .card-white:hover {
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    }

.card-blue {
    background: #D9EDFF; /* Color original */
    box-shadow: none;
}

    /* AGREGADO: Sombra y color al pasar el mouse en tarjeta azul */
    .card-blue:hover {
        background-color: #cfe8ff; /* Un poco más oscuro para feedback visual */
        box-shadow: 0 20px 40px rgba(13, 74, 230, 0.15);
    }

.te-icon-wrapper {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease; /* Para animar el icono */
}

/* AGREGADO: El icono crece un poco al hacer hover en la tarjeta */
.te-card:hover .te-icon-wrapper {
    transform: scale(1.1);
}

.te-icon-wrapper svg {
    width: 60px;
    height: 60px;
}

.te-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 38px;
    line-height: 1.2;
    margin-bottom: 15px;
    background: linear-gradient(270deg, #65A6EB 3.36%, #498BE9 15.38%, #0D4AE6 58.17%), #FFFFFF;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: #0D4AE6;
}

.te-description {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    color: #111827;
    margin-bottom: 30px;
    max-width: 90%;
}

.te-btn {
    margin-top: auto;
    padding: 14px 40px;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 16px;
    text-decoration: none !important;
    transition: all 0.3s ease;
    display: inline-block;
    min-width: 200px;
    text-align: center;
}

    .te-btn:hover {
        text-decoration: none !important;
    }

.btn-blue {
    background-color: #0D4AE6;
    color: #FFFFFF !important;
    box-shadow: 0 10px 20px rgba(13, 74, 230, 0.15);
}

    .btn-blue:hover {
        background-color: #0033a1;
        color: #FFFFFF !important;
        transform: translateY(-2px);
    }

.btn-white {
    background-color: #FFFFFF;
    color: #0D4AE6 !important;
    box-shadow: 0 10px 20px rgba(13, 74, 230, 0.05);
}

    .btn-white:hover {
        background-color: #f8f9fa;
        color: #0D4AE6 !important;
        transform: translateY(-2px);
    }

/* Responsive */
@media (max-width: 1200px) {
    .te-title {
        font-size: 32px;
    }

    .te-container {
        max-width: 100%;
        padding: 0 20px;
    }
}

@media (max-width: 992px) {
    .te-container {
        flex-direction: column;
        gap: 30px;
    }

    .te-card {
        width: 100%;
        min-height: auto;
        padding: 40px 30px;
    }
}

/* ==========================================================================
   ANIMACIONES DE ENTRADA (SCROLL)
   ========================================================================== */
.te-section [data-animate] {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, transform;
}

    .te-section [data-animate].animate {
        opacity: 1;
        transform: translateY(0);
    }

.delay-200 {
    transition-delay: 0.2s;
}
/* ==========================================================================
   ANIMACIONES CASCADA TEXTOS INTERNOS (PRO)
   ========================================================================== */

/* 1. Estado inicial de los elementos internos (Ocultos y desplazados abajo) */
.te-card .te-icon-wrapper,
.te-card .te-title,
.te-card .te-description,
.te-card .te-btn {
    opacity: 0;
    transform: translateY(20px);
    /* Transición suave para la entrada */
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* 2. Estado Final: Cuando la tarjeta ya es visible (.animate) */
.te-card.animate .te-icon-wrapper,
.te-card.animate .te-title,
.te-card.animate .te-description,
.te-card.animate .te-btn {
    opacity: 1;
    transform: translateY(0);
}

/* 3. Retrasos (Delays) para crear el efecto escalera */

/* El icono entra a los 0.2s después de la tarjeta */
.te-card.animate .te-icon-wrapper {
    transition-delay: 0.2s;
}

/* El título entra a los 0.3s */
.te-card.animate .te-title {
    transition-delay: 0.3s;
}

/* La descripción entra a los 0.4s */
.te-card.animate .te-description {
    transition-delay: 0.4s;
}

/* El botón entra al final a los 0.5s */
.te-card.animate .te-btn {
    transition-delay: 0.5s;
}