/* =================================================== */
/* === 3. HERO CAROUSEL (REFACTORIZADO FINAL) ====== */
/* =================================================== */

#hero-carousel-section {
    position: relative;
    width: 100%;
    height: 100vh;
    background-color: var(--color-fondo-oscuro);
}

.hero-carousel,
.hero-carousel .swiper-slide {
    width: 100%;
    height: 100%;
}

.hero-carousel .slide-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease;
}

.swiper-slide-active .slide-background {
    opacity: 0.5;
    /* La imagen activa se hace visible */
}

/* === IMÁGENES DE FONDO PARA CADA SLIDE === */
.hero-carousel .swiper-slide:nth-child(1) .slide-background {
    background-image: url('../../../assets/img/carrusel-hero/puerta-garaje-madera-y-puerta-peatonal-mayer-lima-6.webp');
}

.hero-carousel .swiper-slide:nth-child(2) .slide-background {
    background-image: url('../../../assets/img/carrusel-hero/porton-batiente-doble-hoja-madera-playa-mayer-peru-5.webp');
}

.hero-carousel .swiper-slide:nth-child(3) .slide-background {
    background-image: url('../../../assets/img/carrusel-hero/puerta-garaje-seccional-negra-automatica-mayer-lima-2.webp');
}


.hero-slide-grid {
    display: grid;
    grid-template-columns: 1fr;
    height: 100%;
    align-items: end;
    max-width: 90%;
    margin: 0 auto;
    width: 100%;
    padding: 0 20px 160px 20px;
    position: relative;
    z-index: 2;
}

.hero-text-content {
    color: var(--color-texto-claro);
    text-align: left;
}

.hero-text-content h1,
.hero-text-content p {
    max-width: 55%;
    /* Ancho del texto como en el diseño original */
    margin-left: 0;
    text-align: left;
}

/* === PAGINACIÓN PERSONALIZADA (POSICIONADA ABSOLUTAMENTE) === */
.hero-pagination-container {
    position: absolute;
    right: 5%;
    top: 75%;
    transform: translateY(-50%);
    z-index: 10;
}

.hero-custom-pagination {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.hero-custom-pagination .pagination-item {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

.hero-custom-pagination .pagination-item.active {
    color: #fff;
}

.hero-custom-pagination .bullet-number {
    font-family: var(--fuente-titulos);
    font-weight: 700;
    font-size: 1.8rem;
}

.hero-custom-pagination .bullet-line {
    width: 2px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
}

.hero-custom-pagination .bullet-line .bullet-progress {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 0;
    background-color: #fff;
}

.hero-custom-pagination .pagination-item.active .bullet-line .bullet-progress {
    height: 100%;
    transition: height 0.4s ease;
}

/* === ANIMACIONES DE TEXTO === */
@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-text-content h1,
.hero-text-content p,
.hero-text-content .banner-buttons-container {
    opacity: 0;
}

.swiper-slide-active .hero-text-content h1 {
    animation: slideInFromLeft 0.8s 0.3s forwards cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.swiper-slide-active .hero-text-content p {
    animation: slideInFromLeft 0.8s 0.5s forwards cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.swiper-slide-active .hero-text-content .banner-buttons-container {
    animation: slideInFromLeft 0.8s 0.7s forwards cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* === BOTONES DEL HERO === */
#hero-carousel-section .banner-buttons-container a[role="button"] {
    display: inline-block;
    background-color: var(--color-primario-vivo);
    color: var(--color-texto-claro);
    padding: 15px 40px;
    font-family: var(--fuente-titulos);
    font-weight: 700;
    text-decoration: none;
    text-transform: lowercase;
    border-radius: 4px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

#hero-carousel-section .banner-buttons-container a[role="button"]:hover {
    background-color: #ff0834;
    transform: translateY(-3px);
}

/* === ESTILOS RESPONSIVOS PARA MÓVILES === */
@media (max-width: 768px) {
    .hero-slide-grid {
        padding-bottom: 120px;
        /* Más espacio para el texto y el botón */
    }

    .hero-text-content h1,
    .hero-text-content p {
        max-width: 100%;
        /* Ocupar todo el ancho en móvil */
    }

    .hero-text-content h1 {
        font-size: 2.2rem;
    }

    .hero-pagination-container {
        top: auto;
        bottom: 40px;
        left: 50%;
        transform: translateX(-50%);
        justify-content: center;
    }

    .hero-custom-pagination {
        flex-direction: row;
        gap: 20px;
    }

    .hero-custom-pagination .pagination-item {
        flex-direction: column;
        gap: 10px;
    }

    .hero-custom-pagination .bullet-line {
        width: 60px;
        height: 2px;
    }

    .hero-custom-pagination .bullet-line .bullet-progress {
        width: 0;
        height: 100%;
    }

    .hero-custom-pagination .pagination-item.active .bullet-line .bullet-progress {
        width: 100%;
        height: 100%;
        transition: width 0.4s ease;
    }
}