/* ==========================================
   HERO FULLSCREEN - AUTO-PLAY + MOBILE CASCADE
   ========================================== */
.home-hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000000;
}

/* --- Fondo --- */
.hero-bg-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-bg-wrapper picture,
.hero-bg-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.25);
}

/* --- Estructura del Slider --- */
.hero-slider-container {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
}

.hero-slider-track {
    position: relative;
    width: 100%;
    height: 100%;
}

/* SLIDES SUPERPUESTOS */
.hero-slide-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.4s cubic-bezier(0.25, 1, 0.5, 1), 
                visibility 1.4s;
    pointer-events: none;
}

.hero-slide-item.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 2;
}

.hero-slide-item.exit {
    opacity: 0;
    visibility: visible;
    transition: opacity 1.4s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 1;
}

.hero-slide-content {
    position: relative;
    height: 100vh;
    width: 100%;
    max-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* CAPAS Y PARALLAX SUAVE */
.slide-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    transition: transform 0.45s cubic-bezier(0.1, 1, 0.1, 1);
    will-change: transform;
}

.layer-title  { z-index: 1; }
.layer-center { z-index: 2; }
.layer-phrase { z-index: 3; }

.slide-layer img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

/* ==========================================
   ANIMACIÓN EN CASCADA EN MÓVIL (SÓLO 1er SLIDE)
   ========================================== */
@media (max-width: 767px) {
    .home-hero-section,
    .hero-slider-container,
    .hero-slide-item,
    .hero-slide-content {
        height: 100vh;
    }

    /* Animación de entrada secuencial de abajo hacia arriba */
    .hero-slide-item.initial-first-slide .layer-title img {
        animation: fadeInUpMobile 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
    }

    .hero-slide-item.initial-first-slide .layer-center img {
        animation: fadeInUpMobile 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both;
    }

    .hero-slide-item.initial-first-slide .layer-phrase img {
        animation: fadeInUpMobile 0.9s cubic-bezier(0.16, 1, 0.3, 1) 1.0s both;
    }
}

/* Keyframes de desplazamiento vertical hacia arriba */
@keyframes fadeInUpMobile {
    0% {
        opacity: 0;
        transform: translate3d(0, 45px, 0);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}