/* =========================================================
   SECCIÓN: PILARES (ROBBINS STYLE - CENTERED)
   ========================================================= */

.pillars-section {
    background-color: #ffffff;
    color: #000000;
    padding: 60px 20px;
    overflow: hidden;
}

.pillars-wrapper {
    display: flex;
    flex-direction: column;
    /* Apila Texto arriba, Imagen abajo */
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* --- TEXTO (CENTRADO MÓVIL) --- */
.pillars-text {
    width: 100%;
    text-align: center;
    /* CLAVE: Centrado estilo Robbins */
    padding: 0;
    z-index: 10;
    order: 1;
    /* Fuerza que el texto aparezca primero en móvil */
}

.pillars-header {
    display: flex;
    justify-content: center;
    /* Centrar header */
    align-items: center;
    gap: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 30px;
    color: #000;
    /* Negro puro como Robbins */
}

.dot {
    font-size: 1.5rem;
    line-height: 0;
}

.pillars-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pillars-list li {
    margin-bottom: 5px;
}

/* ENLACES (ESTILO ROBBINS) */
.pillar-link {
    text-decoration: none;
    /* Inactivo: Negro pero un poco transparente */
    color: rgba(0, 0, 0, 0.4);
    font-family: 'Montserrat', sans-serif;

    /* Tipografía grande y sólida */
    font-size: clamp(2.8rem, 6vw, 4.5rem);

    font-weight: 800;
    /* Extra Bold */
    line-height: 1.1;
    letter-spacing: -1.5px;
    display: block;
    transition: all 0.3s ease;
    cursor: pointer;

    /* Eliminar desplazamiento lateral en móvil */
    transform: translateX(0);

    /* CRÍTICO: Eliminar el efecto tap-highlight dorado del navegador */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* ESTADO ACTIVO (NEGRO PURO) */
.pillar-link.active,
.pillar-link:hover {
    color: #000000 !important;
    /* Negro Intenso - !important para sobrescribir cualquier estilo */
    transform: scale(1.05);
    /* Pequeño zoom en lugar de mover a la derecha */
}

/* Eliminar cualquier efecto de focus */
.pillar-link:focus {
    outline: none;
    color: #000000;
}

/* Eliminar tap highlight en iOS/Android */
.pillar-link:active {
    color: #000000;
    background-color: transparent;
}


/* --- IMAGEN STACK (Debajo del texto) --- */
.pillars-image-stack {
    position: relative;
    width: 100%;
    /* Altura en móvil (ajustable) */
    height: 350px;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    order: 2;
    /* Fuerza que la imagen aparezca DESPUÉS del texto en móvil */
}

.p-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.1);
    transition: opacity 0.5s ease, transform 0.8s ease;
}

.p-img.active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}


/* =========================================================
   DESKTOP (VOLVEMOS AL LAYOUT LATERAL)
   ========================================================= */
@media (min-width: 1024px) {
    .pillars-wrapper {
        display: grid;
        grid-template-columns: 1fr 1fr;
        /* Texto Izq | Imagen Der */
        align-items: center;
        gap: 80px;
    }

    /* En desktop alineamos a la izquierda */
    .pillars-text {
        text-align: left;
        order: 0;
        /* Reset order para desktop */
    }

    .pillars-header {
        justify-content: flex-start;
    }

    .pillar-link:hover,
    .pillar-link.active {
        transform: translateX(20px) scale(1);
        /* Efecto desplazamiento en PC */
    }

    .pillars-image-stack {
        height: 650px;
        /* Imagen alta */
        margin-top: 0;
        order: 0;
        /* Reset order para desktop */
    }
}