/* =========================================
   HOME: HERO SECTION & GLITCH
   ========================================= */
.hero-section {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0b0c10;
    overflow: hidden;
}

#video-bg {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover; z-index: 0;
}

@media (max-width: 768px) {
    #video-bg {
        display: block !important;
    }
    .hero-section {
        background: #0b0c10 linear-gradient(180deg, rgba(0,0,0,0.8) 0%, rgba(11,12,16,1) 100%);
    }

    /* 1. Romper la rigidez del contenedor del glitch */
    .glitch-container {
        position: relative !important; /* Devuelve el elemento al flujo natural */
        height: auto !important;       /* Permite que la caja crezca según el texto */
        min-height: max-content;
        margin-bottom: 30px !important; /* Separa físicamente el bloque del H2 */
    }

    /* 2. Ajustar el comportamiento del H1 largo */
    .hero-title {
        position: relative !important;
        display: block !important;
        height: auto !important;
        line-height: 1.35 !important;  /* Evita que las propias líneas del H1 se encimen */
    }

    /* 3. Asegurar la posición del H2 */
    .hero-subtitle-restored {
        position: relative !important;
        display: block !important;
        margin-top: 0 !important;      /* Elimina márgenes negativos heredados de PC */
    }
}

.video-overlay {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
    background: rgba(0, 0, 0, 0.6);
}

.hero-content { z-index: 2; }

/* Texto Restaurado H1 */
.hero-subtitle-restored {
    font-family: var(--font-display) !important; 
    font-size: 1.3rem !important;
    font-weight: 600 !important;
    opacity: 0.9;
    line-height: 1.5;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .hero-subtitle-restored { font-size: 0.9rem !important; }
}

/* Glitch */
.glitch-container { display: inline-block; }

.cyber-glitch {
    font-size: 3.5rem;
    font-weight: 900;
    color: #fff;
    font-family: var(--font-display);
    position: relative;
    text-transform: uppercase;
}

.cyber-glitch::before,
.cyber-glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%; opacity: 0.8;
}

.cyber-glitch::before {
    color: #ff00c1; z-index: -1;
    animation: glitch-shift-1 2.5s infinite linear alternate-reverse;
}

.cyber-glitch::after {
    color: #00fff9; z-index: -2;
    animation: glitch-shift-2 3s infinite linear alternate-reverse;
}

@keyframes glitch-shift-1 {
    0% { transform: translate(-2px, 1px); }
    10% { transform: translate(2px, -1px); }
    20% { transform: translate(-2px, 2px); }
    30% { transform: translate(2px, -2px); }
    40% { transform: translate(-2px, 1px); }
    50% { transform: translate(2px, -1px); }
    60% { transform: translate(-2px, 2px); }
    70% { transform: translate(2px, -2px); }
    80% { transform: translate(-2px, 1px); }
    90% { transform: translate(2px, -1px); }
    100% { transform: translate(-2px, 2px); }
}

@keyframes glitch-shift-2 {
    0% { transform: translate(2px, -1px); }
    10% { transform: translate(-2px, 2px); }
    20% { transform: translate(2px, -2px); }
    30% { transform: translate(-2px, 1px); }
    40% { transform: translate(2px, -1px); }
    50% { transform: translate(-2px, 2px); }
    60% { transform: translate(2px, -2px); }
    70% { transform: translate(-2px, 1px); }
    80% { transform: translate(2px, -1px); }
    90% { transform: translate(-2px, 2px); }
    100% { transform: translate(2px, -2px); }
}

@media (max-width: 768px) { .hero-title { font-size: 2rem; } }

/* =========================================
   HOME: GLASSMORPHISM CARDS
   ========================================= */
.tech-card {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
    padding: 2.5rem;
    height: 100%;
    position: relative;
    overflow: hidden;
    transition: transform 0.1s;
    transform-style: preserve-3d;
}

.tech-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 30px rgba(102, 252, 241, 0.1);
}

.tech-card h4 { color: #fff; margin-bottom: 1rem; }
.tech-card p { color: var(--secondary); font-size: 0.95rem; line-height: 1.6; }

.icon-box {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    transform: translateZ(20px); 
}

/* =========================================
   HOME: SHOP SECTION
   ========================================= */
.product-card {
    background: #121212; border: 1px solid #333;
    transition: all 0.3s; position: relative;
}

.product-img { height: 250px; width: 100%; overflow: hidden; position: relative; }
.product-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.product-card:hover .product-img img { transform: scale(1.1); }

.product-img .overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.3s;
}
.product-card:hover .product-img .overlay { opacity: 1; }

.product-info { padding: 1.5rem; text-align: center; }
.product-info h5 { color: white; font-size: 1.1rem; margin-bottom: 0.5rem; }
.product-info .price { color: var(--accent); font-weight: bold; }

/* =========================================
   HOME: ESTADISTICAS
   ========================================= */
.stat-box {
    background: transparent;
    border: none;
    padding: 1rem;
    position: relative;
    border-right: 1px solid rgba(102, 252, 241, 0.1); 
}

.col-md-4:last-child .stat-box { border-right: none; }

@media (max-width: 768px) {
    .stat-box { border-right: none; border-bottom: 1px solid rgba(102, 252, 241, 0.1); padding-bottom: 1rem; }
    .col-md-4:last-child .stat-box { border-bottom: none; }
}

.neon-text {
    color: #fff;
    text-shadow: 0 0 10px var(--accent);
    font-size: 2.5rem; 
    font-weight: 200; 
    margin-bottom: 0.2rem;
}

/* =========================================
   HOME: PLANIFICAR VISITA Y MAPA
   ========================================= */
.location-card {
    background: rgba(11, 12, 16, 0.95);
    border: 1px solid #333;
    box-shadow: 0 0 30px rgba(0,0,0,0.8);
}

.map-main-container {
    height: 100%; min-height: 500px;
    border: 1px solid var(--accent); border-radius: 4px;
    overflow: hidden; position: relative;
    box-shadow: 0 0 20px rgba(102, 252, 241, 0.15);
}

.contact-icon-box {
    width: 50px; height: 50px;
    background: rgba(102, 252, 241, 0.1); border: 1px solid var(--accent);
    color: var(--accent); display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; margin-right: 1rem;
}

/* =========================================
   DESACTIVAR ANIMACION MÓVIL (LCP/TBT Hack)
   ========================================= */
@media (max-width: 768px) {
  .hero-title::before, .hero-title::after { display: none !important; animation: none !important; }
  .hero-title { animation: none !important; text-shadow: none !important; }
  .cyber-glitch::before, .cyber-glitch::after { display: none !important; animation: none !important; }
}

/* =========================================
   DESTRUCCCION TOTAL DE GLITCH MOBILE
   ========================================= */
@media (max-width: 768px) {
  .hero-title, .cyber-glitch, h2[data-text] {
    animation: none !important;
    text-shadow: none !important;
    clip-path: none !important;
  }
  .hero-title::before, .hero-title::after, .cyber-glitch::before, .cyber-glitch::after {
    display: none !important;
    content: none !important;
    animation: none !important;
  }
}

/* =========================================
   MOBILE HERO BACKGROUND WITH OVERLAY
   ========================================= */
@media (max-width: 768px) {
    body header#inicio.hero-section {
        background-image: linear-gradient(rgba(11, 12, 16, 0.60), rgba(11, 12, 16, 0.85)), url('../img/hero-mobile.webp') !important;
        background-size: cover !important;
        background-position: center center !important;
        background-repeat: no-repeat !important;
    }
}

/* =========================================
   MARQUEE CORPORATIVO B2B
   ========================================= */
.corporate-clients-marquee {
    width: 100%;
    /* Aseguramos que el fondo sea el void negro del ecosistema */
    background-color: var(--bg-void, #030407); 
}

.marquee-wrapper {
    display: flex;
    overflow: hidden;
    user-select: none;
    white-space: nowrap;
    width: 100%;
}

.marquee-track {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    /* Ajusta el tiempo (40s) para hacerlo más rápido o más lento */
    animation: scroll-marquee 40s linear infinite;
}

/* Al pasar el mouse, la animación se pausa para que puedan leer */
.marquee-wrapper:hover .marquee-track {
    animation-play-state: paused;
}

.marquee-item {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #adb5bd;
    padding: 10px 40px;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.marquee-item:hover {
    color: #ffffff;
}

.marquee-item i {
    opacity: 0.5;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.marquee-item:hover i {
    opacity: 1;
    color: #66fcf1 !important; /* Tu color accent */
}

/* Clases auxiliares para los gradientes */
.w-15 {
    width: 15%;
}

/* Keyframes para el loop continuo */
@keyframes scroll-marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        /* Desplaza exactamente la mitad del contenedor (la Lista 1 entera) */
        transform: translateX(-50%);
    }
}

/* =========================================
   THUMBNAILS VIDEOS DE YOUTUBE (SMALLER)
   ========================================= */
.video-thumb {
    position: relative;
    min-width: 140px;
    height: 79px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
    transition: filter 0.3s;
}

.video-thumb:hover {
    border-color: #00ff88;
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.video-thumb:hover img {
    filter: brightness(1);
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.1rem;
    opacity: 0;
    transition: opacity 0.3s;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.video-thumb:hover .play-overlay {
    opacity: 1;
}

.video-carousel::-webkit-scrollbar {
    height: 4px;
}

.video-carousel::-webkit-scrollbar-track {
    background: #000;
}

.video-carousel::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 2px;
}

.video-carousel::-webkit-scrollbar-thumb:hover {
    background: #00ff88;
}

/* =========================================
   MARQUEE DE OPINIONES DE GOOGLE MAPS
   ========================================= */
.reviews-marquee-wrapper {
    overflow: hidden; /* Oculta las tarjetas que salen de la pantalla */
    width: 100%;
    position: relative;
    padding: 30px 0;
    /* Degradado sutil a los costados para efecto de desvanecimiento "fade" high-tech */
    mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}

.reviews-track {
    display: flex;
    gap: 25px;
    width: max-content;
    /* Ejecuta la animación: 120 segundos, velocidad constante, infinito */
    animation: scrollMarquee 120s linear infinite;
}

/* Detener el movimiento cuando el cliente pasa el mouse por encima para leer bien */
.reviews-marquee-wrapper:hover .reviews-track {
    animation-play-state: paused;
}

.review-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0px; /* Estilo cyber */
    padding: 25px;
    width: 350px; /* Ancho fijo para mantener la simetría en el carrusel */
    flex-shrink: 0; /* Evita que las tarjetas se deformen o compriman */
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.review-card:hover {
    border-color: #66fcf1;
    background: rgba(102, 252, 241, 0.02);
    box-shadow: 0 10px 30px rgba(102, 252, 241, 0.08);
}

/* REGLA DE ANIMACIÓN: Mueve el track exactamente el 50% (la mitad exacta del ancho total) 
   para volver a empezar el bucle sin saltos visuales */
@keyframes scrollMarquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

