/* =========================================
   ESTILOS EXCLUSIVOS: HERO SLIDER PREMIUM
   ========================================= */

/* 1. Fondo Imponente, Tecnológico y ESPACIO ABIERTO */
.hero-premium-bg {
    background: radial-gradient(circle at 60% 50%, #004b87 0%, #0e1828 60%, #060b14 100%) !important;
    position: relative;
    
    /* ABRIMOS EL ESPACIO: Arriba hasta el navbar, abajo hasta los círculos */
    padding-top: 80px !important; 
    padding-bottom: 160px !important; 
}

/* ¡LA CLAVE DEL PROBLEMA DE LOS CORTES! */
/* Eliminamos la "guillotina" de Bootstrap que cortaba las antenas y sombras */
.hero-slider-container,
.hero-slider-container .carousel-inner,
.hero-slider-container .carousel-item {
    overflow: visible !important; 
}

/* Prevenimos que la animación genere scroll horizontal en la página */
body {
    overflow-x: hidden !important;
}

/* Halo de luz místico detrás del producto */
.hero-glow-bg {
    position: absolute;
    top: 50%;
    right: 10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 114, 206, 0.4) 0%, transparent 70%);
    transform: translateY(-50%);
    z-index: 0;
    filter: blur(50px);
}

/* 2. Tamaños de texto controlados */
.hero-title-main {
    font-size: clamp(2.2rem, 3.5vw, 3rem);
    line-height: 1.15;
    font-weight: 700;
    margin-bottom: 1rem;
    max-width: 95%; 
}

.hero-desc-main {
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.5;
    margin-bottom: 1.5rem;
    max-width: 90%;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =========================================
   3. PRODUCTOS 3D IMPONENTES (Ya no se cortan)
   ========================================= */
.clean-product-img {
    width: auto;
    object-fit: contain;
    position: relative;
    z-index: 2;
}

/* --- GPS --- */
.imposing-gps {
    max-height: 620px;
    filter: drop-shadow(0 25px 35px rgba(0, 0, 0, 0.5));
    animation: floatGps 5s ease-in-out infinite;
}
@keyframes floatGps {
    0% { transform: translateY(0) scale(1.1); filter: drop-shadow(0 25px 35px rgba(0, 0, 0, 0.5)); }
    50% { transform: translateY(-15px) scale(1.1); filter: drop-shadow(0 35px 45px rgba(0, 0, 0, 0.3)); }
    100% { transform: translateY(0) scale(1.1); filter: drop-shadow(0 25px 35px rgba(0, 0, 0, 0.5)); }
}

/* --- ROUTER (Rotado y con sombras profundas) --- */
.imposing-router {
    max-height: 360px; 
    animation: floatRouter 5s ease-in-out infinite;
}
@keyframes floatRouter {
    0% { transform: perspective(1000px) rotateY(-18deg) rotateX(5deg) scale(1.2) translateY(0); filter: drop-shadow(-25px 25px 35px rgba(0, 0, 0, 0.6)); }
    50% { transform: perspective(1000px) rotateY(-18deg) rotateX(5deg) scale(1.2) translateY(-15px); filter: drop-shadow(-25px 35px 45px rgba(0, 0, 0, 0.4)); }
    100% { transform: perspective(1000px) rotateY(-18deg) rotateX(5deg) scale(1.2) translateY(0); filter: drop-shadow(-25px 25px 35px rgba(0, 0, 0, 0.6)); }
}

/* --- CERRADURA (Rotada para verse volumétrica) --- */
.imposing-lock {
    max-height: 360px;
    animation: floatLock 5s ease-in-out infinite;
}
@keyframes floatLock {
    0% { transform: perspective(1000px) rotateY(-20deg) scale(1.15) translateY(0); filter: drop-shadow(-20px 20px 30px rgba(0, 0, 0, 0.6)); }
    50% { transform: perspective(1000px) rotateY(-20deg) scale(1.15) translateY(-15px); filter: drop-shadow(-20px 35px 40px rgba(0, 0, 0, 0.4)); }
    100% { transform: perspective(1000px) rotateY(-20deg) scale(1.15) translateY(0); filter: drop-shadow(-20px 20px 30px rgba(0, 0, 0, 0.6)); }
}

/* --- TV BOX --- */
.imposing-tvbox {
    max-height: 365px;
    animation: floatTvBox 5s ease-in-out infinite;
}
@keyframes floatTvBox {
    0% { transform: perspective(1000px) rotateY(10deg) scale(1.15) translateY(0); filter: drop-shadow(15px 25px 35px rgba(0, 0, 0, 0.5)); }
    50% { transform: perspective(1000px) rotateY(10deg) scale(1.15) translateY(-15px); filter: drop-shadow(15px 35px 45px rgba(0, 0, 0, 0.3)); }
    100% { transform: perspective(1000px) rotateY(10deg) scale(1.15) translateY(0); filter: drop-shadow(15px 25px 35px rgba(0, 0, 0, 0.5)); }
}

/* =========================================
   4. PUNTOS DE NAVEGACIÓN
   ========================================= */
.custom-hero-indicators {
    /* Empujamos los puntos hacia abajo para que respiren del texto y las imágenes */
    bottom: -60px !important; 
    margin-bottom: 0 !important;
}

.custom-hero-indicators [data-bs-target] {
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    background-color: transparent !important;
    border: 2px solid rgba(255, 255, 255, 0.6) !important;
    margin: 0 6px !important;
    opacity: 1 !important;
    transition: all 0.3s ease !important;
}

.custom-hero-indicators .active {
    background-color: #ff6f00 !important;
    border-color: #ff6f00 !important;
    transform: scale(1.15);
}

/* =========================================
   5. ANIMACIÓN PROFESIONAL (Entrada y Salida)
   ========================================= */
.hero-text-animate {
    transform: translateX(-80px); 
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.3s ease-out;
}

.hero-img-animate {
    transform: translateX(80px); 
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.3s ease-out;
}

.carousel-item.active .hero-text-animate,
.carousel-item.active .hero-img-animate {
    transform: translateX(0);
    opacity: 1;
    transition: transform 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.1) 0.1s, opacity 0.6s ease-out 0.1s;
}


/* =========================================
   EFECTO TECNOLÓGICO DE FONDO (CYBER GRID)
   ========================================= */

/* Creamos la malla digital semitransparente sobre el fondo azul */
.hero-premium-bg::before {
    content: "";
    position: absolute;
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0;
    
    /* Dibuja las líneas de la cuadrícula tecnológica (muy finas y transparentes) */
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 45px 45px; /* Tamaño de los cuadros */
    
    z-index: 0; /* Asegura que quede por detrás del texto y los productos */
    pointer-events: none; /* No interfiere si el usuario hace clic */
    
    /* Máscara radial: Hace que la cuadrícula brille en el centro y se desvanezca en los bordes */
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 75%);
    mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 75%);
    
    /* Animación continua y fluida */
    animation: techGridMove 20s linear infinite;
}

/* Animación: Mueve la malla suavemente en diagonal como un radar activo */
@keyframes techGridMove {
    0% { background-position: 0 0; }
    100% { background-position: 45px 45px; }
}

/* =========================================
   EFECTO RESPLANDOR PERFECTO (SIN SOMBRAS FANTASMA)
   ========================================= */

.hero-img-animate {
    position: relative;
}

.hero-img-animate::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    
    /* El haz de luz: Lo animaremos moviendo el fondo, no la caja */
    background: linear-gradient(115deg, transparent 0%, rgba(255,255,255,0) 30%, rgba(255,255,255,0.85) 50%, rgba(255,255,255,0) 70%, transparent 100%);
    background-size: 200% 100%;
    background-repeat: no-repeat;
    
    z-index: 10;
    pointer-events: none;
    
    /* La máscara recorta la luz para que solo brille dentro del producto */
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
}

/* Animación del haz de luz (pasa rápido y luego espera) */
@keyframes resplandorAutomatico {
    0% { background-position: -200% 0; }
    40% { background-position: 200% 0; }
    100% { background-position: 200% 0; } /* Se queda oculto el resto del tiempo */
}

/* 
   CLONAMOS LAS ANIMACIONES DE FLOTADO PERO "SIN SOMBRAS"
   Así la máscara persigue al producto perfectamente, pero no genera fantasmas grises.
*/
@keyframes floatGpsMask {
    0%, 100% { transform: translateY(0) scale(1.1); }
    50% { transform: translateY(-15px) scale(1.1); }
}
@keyframes floatRouterMask {
    0%, 100% { transform: perspective(1000px) rotateY(-18deg) rotateX(5deg) scale(1.2) translateY(0); }
    50% { transform: perspective(1000px) rotateY(-18deg) rotateX(5deg) scale(1.2) translateY(-15px); }
}
@keyframes floatLockMask {
    0%, 100% { transform: perspective(1000px) rotateY(-20deg) scale(1.15) translateY(0); }
    50% { transform: perspective(1000px) rotateY(-20deg) scale(1.15) translateY(-15px); }
}
@keyframes floatTvBoxMask {
    0%, 100% { transform: perspective(1000px) rotateY(10deg) scale(1.15) translateY(0); }
    50% { transform: perspective(1000px) rotateY(10deg) scale(1.15) translateY(-15px); }
}

/* APLICAMOS LAS MÁSCARAS EXACTAS PARA CADA PRODUCTO */
.carousel-item:nth-child(1) .hero-img-animate::after {
    -webkit-mask-image: url('../images/gps.png');
    mask-image: url('../images/gps.png');
    animation: resplandorAutomatico 4s infinite ease-in-out, floatGpsMask 5s ease-in-out infinite;
}
.carousel-item:nth-child(2) .hero-img-animate::after {
    -webkit-mask-image: url('../images/router.png');
    mask-image: url('../images/router.png');
    animation: resplandorAutomatico 4s infinite ease-in-out, floatRouterMask 5s ease-in-out infinite;
}
.carousel-item:nth-child(3) .hero-img-animate::after {
    -webkit-mask-image: url('../images/cerradura.png');
    mask-image: url('../images/cerradura.png');
    animation: resplandorAutomatico 4s infinite ease-in-out, floatLockMask 5s ease-in-out infinite;
}
.carousel-item:nth-child(4) .hero-img-animate::after {
    -webkit-mask-image: url('../images/tvbox.png');
    mask-image: url('../images/tvbox.png');
    animation: resplandorAutomatico 4s infinite ease-in-out, floatTvBoxMask 5s ease-in-out infinite;
}