/* ESTILOS ESPECÍFICOS PARA HOW WE WORK */
.highlight {
    color: #be0169;
}
/* SECCIÓN JUMBO HOWWEWORK */

.jumboWeWork {
    position: relative;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: -136px;
    padding-top: 80px;
    z-index: -1;
}

.jumboWeWork::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('IMAGES/work-jumbo.jpg'); /*  */
    background-size: cover;
    background-position: top 20% center;
    filter: blur(3px);
    transform: scale(1.05);
    animation: backgroundZoom 30s infinite alternate ease-in-out;
    z-index: -1;
}

.jumboWeWork::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    z-index: -1;
}

.jumboWeWork h1 {
    font-size: 2.5rem;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.5);
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease-out forwards 0.5s;
}

/* SECCIÓN NORMAS ISO */
.iso-section {
    padding: 80px 20px;
    background-color: #f9f9fa;
    text-align: center;
}

.iso-intro {
    max-width: 800px;
    margin: 0 auto 50px auto;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.iso-intro.animate {
    opacity: 1;
    transform: translateY(0);
}

.iso-intro h2 {
    font-size: 2.2em;
    color: #554596;
    margin-bottom: 20px;
}

.iso-intro p {
    font-size: 1.1em;
    line-height: 1.7;
    color: #554596;
}

.iso-cards-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.iso-card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
    width: 280px;
    text-align: center;
    transition: transform 1s ease, box-shadow 1s ease;
    opacity: 0;
    transform: translateY(50px);
}

.iso-card:nth-child(1) { transition-delay: 0.1s; }
.iso-card:nth-child(2) { transition-delay: 0.2s; }
.iso-card:nth-child(3) { transition-delay: 0.3s; }

.scroll-animation-parent.animate .iso-card {
    opacity: 1;
    transform: translateY(0);
}

.iso-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}
.iso-icon {
    margin-bottom: 20px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.iso-icon img {
    max-height: 100%;
    max-width: 100%;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.iso-card h3 {
    font-size: 1.4em;
    color: #005bb0;
    margin-bottom: 10px;
}

.iso-card p {
    font-size: 1em;
    color: #005bb0;
}

/* SECCIÓN INFOGRAFÍA INTERACTIVA */
.timeline-section {
    padding: 80px 20px;
    background: #fff;
    text-align: center;
    overflow: hidden;
}

.timeline-title-container {
    max-width: 800px;
    margin: 0 auto 60px auto;
}

.timeline-title-container h2 {
    font-size: 2.2em;
    color: #554596;
    margin-bottom: 15px;
}

.timeline-title-container p {
    font-size: 1.1em;
    line-height: 1.6;
    color: #6c757d;
}

.timeline-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 30px 0; /* Espacio vertical entre filas */
    max-width: 1400px;
    margin: 0 auto;
}

.timeline-step {
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 15px;
    width: 250px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    z-index: 2; /* Asegura que las cajas estén sobre las flechas */
    box-shadow: 0 5px 15px rgba(85, 69, 150, 0.20);
    opacity: 0;
    transform: scale(0.9);
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    min-height: 200px; /* Altura fija para evitar desplazamientos */
}

.scroll-animation-parent.animate .timeline-step {
    opacity: 1;
    transform: scale(1);
}

.timeline-step:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 25px rgba(85, 69, 150, 0.3);
}

.step-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.step-number {
    background: linear-gradient(45deg, #554596, #3d326b); /* Morado por defecto */
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 1.4em;
    margin: -40px auto 15px auto;
    border: 4px solid white;
    box-shadow: 0 0 0 1px #554596; /* Borde morado por defecto */
    transition: all 0.4s ease;
}

.timeline-step.active .step-number {
    background: linear-gradient(45deg, #be0169, #be0169); /* Rosa cuando está activo */
    box-shadow: 0 0 0 1px #be0169; /* Borde rosa cuando está activo */
}

.step-title {
    font-size: 1.2em;
    font-weight: bold;
    color: #554596;
    margin-bottom: 10px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-description {
    font-size: 0.9em;
    color: #554596;
    line-height: 1.5;
    flex-grow: 1; /* Ocupa el espacio disponible */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out, visibility 0.4s;
}

.timeline-step.active .step-description {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.click-indicator {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #ced4da;
    margin: 15px auto 0 auto;
    position: relative;
    transition: all 0.4s ease;
    flex-shrink: 0; /* Evita que se encoja */
}

.click-indicator::before,
.click-indicator::after {
    content: '';
    position: absolute;
    background-color: #ced4da;
    transition: all 0.4s ease;
    border-radius: 2px;
}

.click-indicator::before { width: 10px; height: 2px; left: 5px; top: 9px; }
.click-indicator::after { width: 2px; height: 10px; left: 9px; top: 5px; }

.timeline-step:hover .click-indicator { border-color: #554596; }
.timeline-step:hover .click-indicator::before,
.timeline-step:hover .click-indicator::after { background-color: #554596; }

.timeline-step.active .click-indicator { transform: rotate(135deg); border-color: #E6007E; }
.timeline-step.active .click-indicator::before,
.timeline-step.active .click-indicator::after { background-color: #E6007E; }

.timeline-arrow {
    width: 30px; /* Ancho aumentado */
    height: 30px;
    align-self: center;
    position: relative;
    animation: point-right 2.5s infinite ease-in-out;
    margin: 15px; /* Margen para separar de las cajas */
    z-index: 1;
}
.timeline-arrow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -5px;
    width: 100%;
    height: 9px; /* Más gruesa */
    background-color: #be0169; /* Color más visible */
    transform: translateY(-50%);
}
.timeline-arrow::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 5px;
    width: 14px; /* Más grande */
    height: 14px; /* Más grande */
    border-top: 6px solid #be0169;
    border-right: 6px solid #be0169;
    transform: translateY(-50%) rotate(45deg);
}

.timeline-arrow-down { display: none; }

@keyframes point-right {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(8px); }
}

/* SECCIÓN SEGURIDAD DE DATOS */
.data-security-section {
    padding: 80px 20px;
    background-color: #efedf8;
}

.data-security-container {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 50px;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.data-security-container.animate { opacity: 1; transform: translateY(0); }
.security-text-container { flex: 1; max-width: 55%; }
.security-text-container h2 { font-size: 2.2em; color: #554596; margin-bottom: 20px; }
.security-text-container p { font-size: 1.1em; line-height: 1.7; color: #554596; margin-bottom: 30px; }
.security-points { display: flex; flex-direction: column; gap: 25px; }
.security-point { display: flex; align-items: flex-start; gap: 20px; }
.security-point i { font-size: 2.5em; color: #be0169; margin-top: 5px; width: 40px; text-align: center; }
.security-point h3 { font-size: 1.3em; color: #554596; margin-bottom: 5px; }
.security-point p { font-size: 1em; margin-bottom: 0; }
.security-image-container { flex: 1; max-width: 40%; text-align: center; }
.security-img { max-width: 100%; height: auto; border-radius: 10px; }

/* MEDIA QUERIES */
@media (max-width: 1400px) {
    .timeline-container { max-width: 1200px; gap: 40px 20px; }
    .timeline-arrow { display: none; }
    .timeline-arrow-down {
        display: none; /* Se oculta por defecto y se muestra solo donde es necesario */
        width: 100%;
        height: 50px;
        position: relative;
        animation: point-down 2.5s infinite ease-in-out;
        z-index: 1;
    }
    .timeline-arrow-down::before {
        content: ''; position: absolute; top: 0; left: 50%; width: 3px; height: 100%; background-color: #c8cde0; transform: translateX(-50%);
    }
    .timeline-arrow-down::after {
        content: ''; position: absolute; bottom: 0; left: 50%; width: 14px; height: 14px; border-bottom: 3px solid #c8cde0; border-right: 3px solid #c8cde0; transform: translateX(-50%) rotate(45deg);
    }
    /* Muestra la flecha hacia abajo después del 4º elemento */
    .timeline-container > .timeline-step:nth-of-type(4) ~ .timeline-arrow-down {
        display: block;
    }
    /* Oculta la flecha después del último elemento */
     .timeline-container > .timeline-step:last-of-type ~ .timeline-arrow-down {
        display: none;
    }
}

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

@media all and (max-width: 1250px) {
    .timeline-container { gap: 40px; }
}

@media all and (max-width: 1044px) {
    .data-security-container { flex-direction: column-reverse; gap: 30px; }
    .security-text-container, .security-image-container { max-width: 100%; text-align: center; }
    .security-point { flex-direction: column; align-items: center; text-align: center; }
}

@media all and (max-width: 920px) {
    .timeline-container { flex-direction: column; gap: 50px; align-items: center; }
    .timeline-arrow-down { margin: -10px 0; }
    .timeline-container > .timeline-step:last-of-type + .timeline-arrow-down { display: none; }
}

@media all and (max-width: 768px) {
    .iso-section, .timeline-section, .data-security-section, #howWeWork { padding: 60px 15px; }
    .timeline-title-container h2, .iso-intro h2, .data-security-container h2 { font-size: 1.8em; }
    .iso-card { width: 100%; max-width: 320px; }
    .timeline-step { width: 100%; max-width: 400px; min-height: 300px; }
}
