/* Estilos para el Banner "Familias de Productos" v1.1 */

.families-banner {
    width: 100%;
    padding: 60px 20px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden; /* Importante para que los elementos no se salgan al animar */
}

.families-banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    margin: 50px auto 0;
    position: relative;
    flex-direction: column;
}

.text-container {
    text-align: center;
    color: white;
    z-index: 2;
}

.headline {
    font-size: clamp(2.5rem, 6vw, 4.5rem); /* Tamaño de fuente adaptable */
    font-weight: 800;
    line-height: 1.1;
    text-transform: uppercase;
    text-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin: 0;
}

/* Asegurarse de que ambos H2 tengan el color correcto */
.entry-content .text-container h2 {
    color: white;
}

.subheadline {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 20px;
}

/* --- ANIMACIONES CORREGIDAS Y PRECISAS --- */

/* 1. Propiedades comunes de la animación */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-on-scroll.is-visible {
    opacity: 1; /* Al ser visible, la opacidad siempre cambia a 1 */
}


/* 2. ESTADO INICIAL: Define DE DÓNDE viene cada elemento */

/* Headline viene desde arriba */
.headline.animate-on-scroll {
    transform: translateY(-50px);
    transition-delay: 0.1s;
}

/* Headline2 viene desde la derecha */
.headline2.animate-on-scroll {
    transform: translateX(50px);
    transition-delay: 0.2s;
}

/* Subheadline viene desde abajo */
.subheadline.animate-on-scroll {
    transform: translateY(50px);
    transition-delay: 0.3s;
}


/* 3. ESTADO FINAL: Define A DÓNDE va cada elemento (¡LA PARTE CLAVE!) */
/* Al añadir ".is-visible", creamos una regla más específica que anula el estado inicial
   y fuerza al elemento a volver a su posición original (0px de desplazamiento). */

.headline.animate-on-scroll.is-visible,
.headline2.animate-on-scroll.is-visible,
.subheadline.animate-on-scroll.is-visible {
    transform: translate(0, 0);
}


/* --- RESPONSIVE --- */
@media (max-width: 991px) {
    .text-container {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .families-banner {
        padding: 40px 15px;
    }
}