/* --- Estructura y Scroll Snap --- */
html, body {
    margin: 0;
    padding: 0;
    overflow: hidden;
}

#main-container {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

.snap-section {
    scroll-snap-align: start;
    height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* --- Fuentes y Colores --- */
body {
    font-family: 'Avenir', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
    background-color: #FFFFFF;
    color: #0A0A0A;
}
.text-custom-blue { color: #3E3CFF; }
.border-custom-dark { border-color: #0A0A0A; }

/* --- Animación de Cursor --- */
.blinking-cursor {
    font-weight: 100;
    animation: blink 1s step-end infinite;
}
@keyframes blink {
    from, to { color: transparent; }
    50% { color: #3E3CFF; }
}

/* --- Interlineado --- */
.leading-extra-loose { line-height: 1.6; }

/* --- Estilos para la Sección de Proceso Fija --- */
.process-content-group {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.image-wrapper, .text-wrapper h3, .text-wrapper p {
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.process-content-group .image-wrapper { opacity: 0; transform: scale(0.9); }
.process-content-group .text-wrapper h3,
.process-content-group .text-wrapper p { opacity: 0; transform: translateY(20px); }

.process-content-group.active { pointer-events: auto; }
.process-content-group.active .image-wrapper { opacity: 1; transform: scale(1); }
.process-content-group.active .text-wrapper h3 { opacity: 1; transform: translateY(0); transition-delay: 0.1s; }
.process-content-group.active .text-wrapper p { opacity: 1; transform: translateY(0); transition-delay: 0.2s; }

#identificar-image { width: 200px; height: 200px; object-fit: contain; }
#formar-image { width: 90%; max-width: 500px; height: auto; object-fit: contain; }
#desarrollar-image { width: 90%; max-width: 450px; height: auto; object-fit: contain; }

/* --- Carrusel de Logos --- */
.logo-carousel {
    display: flex;
    width: max-content;
    animation: scroll 60s linear infinite;
}
.logo-carousel img {
    height: 30px; /* Logos más pequeños en móvil */
    margin: 0 30px;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: filter 0.3s, opacity 0.3s;
}
.logo-carousel-container:hover .logo-carousel {
    animation-play-state: paused;
}
.logo-carousel img:hover {
    filter: grayscale(0%);
    opacity: 1;
}
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --- Estilos del Formulario Modal --- */
#contact-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 10, 0.7);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
#contact-modal.visible {
    opacity: 1;
    pointer-events: auto;
}
#modal-content {
    background-color: #f4f4f4;
    color: #333;
    width: 100%;
    max-width: 600px;
    height: 100%;
    padding: 2rem;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
#contact-modal.visible #modal-content {
    transform: translateX(0);
}

/* --- Mensaje de confirmación (toast) --- */
#success-toast {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translate(-50%, -20px);
    z-index: 60;
    background: #fff;
    border: 2px solid #0A0A0A;
    padding: 0.85rem 1.75rem;
    border-radius: 9999px;
    font-weight: 500;
    font-size: 0.9rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
    text-align: center;
    max-width: 90vw;
}
#success-toast.visible {
    opacity: 1;
    transform: translate(-50%, 0);
}
#success-toast.error {
    border-color: #e93d3d;
    color: #e93d3d;
}

/* --- Validación de campos obligatorios --- */
#modal-content input:invalid.touched,
#modal-content select:invalid.touched,
#modal-content textarea:invalid.touched {
    border-bottom-color: var(--red-error, #e93d3d);
}

/* Media queries para pantallas más grandes */
@media (min-width: 640px) {
    .snap-section { padding: 2rem; }
    .logo-carousel img { height: 40px; margin: 0 40px; }
    #identificar-image { width: 250px; height: 250px; }
    #formar-image { max-width: 600px; }
    #desarrollar-image { max-width: 500px; }
}
