/* =========================================
   ESTILOS PREMIUM V6.2 - FIX SLIDER MÓVIL
   ========================================= */
:root { 
    --primary: #00C2FF; 
    --primary-dark: #009acb; 
    --dark: #222222; 
    --gray-text: #666666; 
    --light-bg: #F0F4F8; 
    --white: #ffffff; 
    --shadow-card: 0 15px 35px rgba(0,0,0,0.08); 
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    font-family: 'Montserrat', sans-serif; 
    color: var(--dark); 
    background: var(--white); 
    overflow-x: hidden; 
    width: 100%;
    line-height: 1.7; 
    -webkit-tap-highlight-color: transparent; 
}

/* Tipografía Adaptativa */
h1 { font-size: clamp(3rem, 6vw, 5rem); font-weight: 800; line-height: 1.1; }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 700; line-height: 1.2; }
.section-title { font-size: clamp(2rem, 4vw, 2.5rem); margin-bottom: 60px; font-weight: 700; text-align: center; }
.section-title-small { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 40px; font-weight: 600; text-align: center; color: var(--dark); }

.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* --- NAVEGACIÓN --- */
nav { display: flex; justify-content: space-between; align-items: center; padding: 15px 5%; position: fixed; width: 100%; top: 0; z-index: 2000; background: transparent; transition: all 0.4s ease; }
nav.scrolled { background: rgba(255, 255, 255, 0.98); box-shadow: 0 2px 20px rgba(0,0,0,0.05); padding: 10px 5%; }
.logo-img { height: clamp(40px, 5vw, 50px); display: block; transition: 0.3s; }
.nav-links { display: flex; gap: 25px; list-style: none; align-items: center; margin: 0; }
.nav-links a { text-decoration: none; font-weight: 600; font-size: 0.9rem; transition: 0.3s; color: white; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.nav-links a:hover { color: var(--primary); }
nav.scrolled .nav-links a { color: var(--dark); text-shadow: none; }
nav .logo-img { filter: brightness(0) invert(1); }
nav.scrolled .logo-img { filter: none; }
.nav-cta { padding: 10px 25px; background: var(--primary); color: white !important; border-radius: 50px; font-weight: 600 !important; box-shadow: 0 5px 15px rgba(0, 194, 255, 0.3); text-shadow: none !important; }
.menu-btn { display: none; font-size: 1.5rem; cursor: pointer; color: white; z-index: 2001; }
nav.scrolled .menu-btn { color: var(--dark); }

/* --- HERO SECTION --- */
header.hero { 
    min-height: 100vh; 
    height: auto; 
    width: 100%; 
    padding: 160px 5% 60px; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    position: relative; 
    background-image: url('../../assets/imgs/GIF_PAG\ WEB.gif'); 
    background-size: cover; 
    background-position: center; 
    background-attachment: fixed; 
}
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to bottom, rgba(0,0,0,0.8), rgba(0,0,0,0.4)); z-index: 1; }
.hero-content { width: 100%; max-width: 1200px; text-align: center; position: relative; z-index: 2; margin: 0 auto; }
.hero-text h1 { margin-bottom: 20px; color: white; letter-spacing: 2px; }
.blue-glow { color: var(--primary); text-shadow: 0 0 25px rgba(0, 194, 255, 0.9); }
.hero-desc { font-size: clamp(1rem, 2vw, 1.3rem); color: #f0f0f0; margin-bottom: 40px; max-width: 800px; margin-left: auto; margin-right: auto; font-weight: 500; }
.slider-instruction { display: inline-flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.15); backdrop-filter: blur(5px); padding: 8px 25px; border-radius: 30px; border: 1px solid rgba(255,255,255,0.3); font-size: 0.9rem; color: white; font-weight: 600; margin-bottom: 40px; }
.scroll-down-indicator { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); color: white; font-size: 2rem; animation: bounce 2s infinite; z-index: 2; }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% {transform: translateY(0) translateX(-50%);} 40% {transform: translateY(-10px) translateX(-50%);} 60% {transform: translateY(-5px) translateX(-50%);} }

/* --- SLIDER BEFORE/AFTER --- */
.slider-wrapper-outer { width: 100%; max-width: 900px; margin: 0 auto; border-radius: 20px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,0.5); border: 4px solid rgba(255,255,255,0.3); }
.comparison-slider { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; touch-action: none; cursor: crosshair; }
.comparison-slider img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; user-select: none; }
.image-base { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.image-overlay { position: absolute; top: 0; left: 0; width: 50%; height: 100%; overflow: hidden; border-right: 3px solid white; will-change: width; }
.comparison-slider .image-overlay img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; object-position: left center; }
.slider-handle { position: absolute; top: 0; left: 50%; width: 50px; height: 100%; transform: translateX(-50%); display: flex; align-items: center; justify-content: center; pointer-events: none; z-index: 10; }
.handle-line { position: absolute; width: 2px; height: 100%; background: white; box-shadow: 0 0 10px rgba(0,0,0,0.5); }
.handle-circle { width: 50px; height: 50px; background: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: 1.2rem; box-shadow: 0 2px 10px rgba(0,0,0,0.2); z-index: 2; transition: transform 0.2s ease; }
.comparison-slider:active .handle-circle { transform: scale(1.1); }

/* --- NOSOTROS --- */
.about-section { padding: 100px 5%; background: #f8fbff; }
.container-flex { display: flex; align-items: center; justify-content: center; gap: 60px; max-width: 1200px; margin: 0 auto; flex-wrap: wrap; }
.about-visual { flex: 1; min-width: 300px; position: relative; }
.about-img-real { width: 100%; border-radius: 20px; box-shadow: var(--shadow-card); }
.experience-badge { position: absolute; top: -20px; left: -20px; background: var(--primary); color: white; padding: 20px; border-radius: 15px; text-align: center; box-shadow: 0 10px 20px rgba(0,194,255,0.3); }
.experience-badge .years { display: block; font-weight: 800; font-size: 1.2rem; }
.about-text { flex: 1; min-width: 300px; }
.subtitle { font-size: 0.9rem; letter-spacing: 2px; color: var(--primary); font-weight: 700; text-transform: uppercase; }
.about-text p { color: var(--gray-text); margin-bottom: 20px; line-height: 1.8; }
.stats-row { display: flex; gap: 40px; border-top: 2px solid #e1e8ef; padding-top: 25px; margin-top: 30px; }
.stat strong { display: block; font-size: 2.2rem; color: var(--dark); }

/* --- BENEFICIOS --- */
.benefits { padding: 100px 5%; background: white; text-align: center; }
.benefits-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; max-width: 1200px; margin: 50px auto 0; }
.benefit-card { background: white; padding: 40px 30px; border-radius: 20px; box-shadow: 0 10px 40px rgba(0,0,0,0.05); transition: 0.3s; border: 1px solid #f0f0f0; border-bottom: 4px solid transparent; }
.benefit-card:hover { transform: translateY(-10px); box-shadow: 0 20px 50px rgba(0,0,0,0.1); }
.blue-hover:hover { border-color: #2196f3; } .green-hover:hover { border-color: #4caf50; } .cyan-hover:hover { border-color: #00bcd4; } .orange-hover:hover { border-color: #ff9800; } .purple-hover:hover { border-color: #9c27b0; } .red-hover:hover { border-color: #f44336; }

.icon-box { width: 70px; height: 70px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; font-size: 1.8rem; transition: 0.3s; }

.color-blue { background-color: #e3f2fd !important; } .color-blue i { color: #2196f3 !important; text-shadow: 0 0 15px rgba(33, 150, 243, 0.4); } 
.color-green { background-color: #e8f5e9 !important; } .color-green i { color: #4caf50 !important; text-shadow: 0 0 15px rgba(76, 175, 80, 0.4); } 
.color-cyan { background-color: #e0f7fa !important; } .color-cyan i { color: #00bcd4 !important; text-shadow: 0 0 15px rgba(0, 188, 212, 0.4); } 
.color-orange { background-color: #fff3e0 !important; } .color-orange i { color: #ff9800 !important; text-shadow: 0 0 15px rgba(255, 152, 0, 0.4); } 
.color-purple { background-color: #f3e5f5 !important; } .color-purple i { color: #9c27b0 !important; text-shadow: 0 0 15px rgba(156, 39, 176, 0.4); } 
.color-red { background-color: #ffebee !important; } .color-red i { color: #f44336 !important; text-shadow: 0 0 15px rgba(244, 67, 54, 0.4); }

.benefit-card h3 { font-size: 1.3rem; margin-bottom: 15px; } 
.benefit-card p { font-size: 0.95rem; color: var(--gray-text); line-height: 1.6; }

/* --- PRODUCTOS --- */
.products { padding: 100px 5%; background: #f9fafb; text-align: center; }
.products-wrapper { display: flex; flex-wrap: wrap; justify-content: center; gap: 40px; max-width: 1100px; margin: 0 auto; }
.product-clean-card { background: white; border-radius: 25px; padding: 40px; width: 380px; box-shadow: var(--shadow-card); text-align: left; display: flex; flex-direction: column; height: 100%; transition: 0.3s; }
.product-clean-card:hover { transform: translateY(-10px); }
.prod-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.prod-number { font-size: 2.5rem; font-weight: 800; color: var(--primary); opacity: 0.2; }
.prod-header h3 { font-size: 1.6rem; color: var(--dark); font-weight: 700; }
.prod-img-box { width: 100%; height: 220px; border-radius: 15px; overflow: hidden; margin-bottom: 25px; }
.prod-img-box img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.prod-desc { margin-bottom: 30px; flex-grow: 1; }
.prod-desc p { color: var(--gray-text); line-height: 1.6; }
.prod-action { margin-top: auto; text-align: center; }
.btn-elegant { display: block; width: 100%; padding: 12px 0; border: 2px solid #eee; border-radius: 50px; text-decoration: none; color: var(--dark); font-weight: 600; transition: 0.3s; }
.btn-elegant:hover { border-color: var(--primary); background: var(--primary); color: white; }

/* --- HOLOGRAMAS --- */
.projection-holo { padding: 100px 5%; background: #0a0a0a; color: white; text-align: center; }
.holo-title { font-size: 3rem; margin-bottom: 40px; }
.neon-blue { color: var(--primary); text-shadow: 0 0 20px rgba(0,194,255,0.5); }
.holo-grid-centered { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; margin-top: 30px; }
.holo-card { border: 1px solid rgba(0, 194, 255, 0.3); box-shadow: 0 0 20px rgba(0, 194, 255, 0.1); }

/* --- CARRUSEL PROYECTOS --- */
.gallery-section { padding: 100px 5%; background: #fff; text-align: center; overflow: hidden; }
.carousel-wrapper { position: relative; max-width: 1400px; margin: 0 auto; }
.carousel-container { display: flex; gap: 30px; overflow-x: auto; scroll-behavior: smooth; padding: 20px 10px; width: 100%; scrollbar-width: none; -ms-overflow-style: none; }
.carousel-container::-webkit-scrollbar { display: none; }

.project-card { flex: 0 0 auto; position: relative; border-radius: 20px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.15); transition: 0.3s; height: 450px; background: #000; }
.project-card:hover { transform: scale(1.02); z-index: 2; box-shadow: 0 20px 50px rgba(0,0,0,0.25); }
.landscape { width: 700px; } 
.portrait { width: 300px; }
.clean-video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; opacity: 0.8; transition: 0.3s; }
.project-card:hover .clean-video { opacity: 1; }
.card-info { position: absolute; bottom: 0; left: 0; width: 100%; padding: 30px 20px; background: linear-gradient(to top, rgba(0,0,0,0.9), transparent); color: white; text-align: left; opacity: 0; transition: 0.3s; pointer-events: none; }
.project-card:hover .card-info { opacity: 1; }
.card-info h4 { font-size: 1.4rem; margin-bottom: 5px; }

.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); background: white; border: none; width: 50px; height: 50px; border-radius: 50%; box-shadow: 0 5px 15px rgba(0,0,0,0.3); cursor: pointer; color: var(--dark); font-size: 1.2rem; transition: 0.3s; z-index: 10; display: block; }
.carousel-btn:hover { background: var(--primary); color: white; }
.prev-btn { left: 10px; }
.next-btn { right: 10px; }

/* --- MARCAS INFINITO --- */
.brands-section { padding: 60px 0 100px; background: #fafafa; border-top: 1px solid #eaeaea; overflow: hidden; }
.marquee-wrapper { position: relative; width: 100%; display: flex; overflow: hidden; mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); }
.marquee-track { display: flex; align-items: center; width: max-content; animation: scrollMarquee 30s linear infinite; }
.marquee-track:hover { animation-play-state: paused; }
.brand-item { margin: 0 40px; position: relative; cursor: help; display: flex; align-items: center; justify-content: center; width: 120px; height: 80px; }
.brand-item img { max-width: 100%; max-height: 100%; object-fit: contain; filter: grayscale(100%) opacity(0.5); transition: all 0.4s ease; }
.brand-item:hover img { filter: grayscale(0%) opacity(1); transform: scale(1.05); }
.brand-item::after { content: attr(data-info); position: absolute; bottom: -30px; left: 50%; transform: translateX(-50%); background: var(--dark); color: white; padding: 4px 10px; border-radius: 4px; font-size: 0.75rem; white-space: nowrap; opacity: 0; pointer-events: none; transition: 0.3s; }
.brand-item:hover::after { opacity: 1; bottom: -25px; }
@keyframes scrollMarquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* Footer */
footer { padding: 80px 20px 40px; background: white; text-align: center; border-top: 1px solid #eee; }
.social-icons-row { display: flex !important; justify-content: center !important; gap: 20px; margin-bottom: 30px; }
.s-link { width: 50px; height: 50px; background: #f0f4f8; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--dark); font-size: 1.3rem; text-decoration: none; transition: 0.3s; }
.s-link:hover { background: var(--primary); color: white; transform: translateY(-5px); }
.copy { color: #888; font-size: 0.85rem; }

/* Z-Index seguro para evitar conflicto con el menú móvil */
.wsp-btn { position: fixed; bottom: 30px; right: 30px; width: 60px; height: 60px; background: #25d366; color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 32px; box-shadow: 0 5px 15px rgba(0,0,0,0.2); z-index: 1990; text-decoration: none; transition: 0.3s; }
.wsp-btn:hover { transform: scale(1.1); }

/* =========================================
   MEDIA QUERIES (ADAPTACIÓN CELULAR)
   ========================================= */
@media (max-width: 992px) {
    .container-flex { flex-direction: column; }
    .about-visual, .about-text { width: 100%; }
    .product-clean-card { width: 100%; max-width: 400px; }
}

@media (max-width: 768px) {
    header.hero { background-attachment: scroll; min-height: 100vh; padding-top: 140px; justify-content: flex-start; }
    
    .menu-btn { display: block; }
    .nav-links { position: absolute; top: 0; right: 0; background: white; height: 100vh; width: 85vw; max-width: 320px; flex-direction: column; justify-content: center; box-shadow: -5px 0 20px rgba(0,0,0,0.1); transform: translateX(100%); transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
    .nav-links.active { transform: translateX(0); }
    .nav-links a { color: var(--dark); margin: 15px 0; font-size: 1.2rem; text-shadow: none; }
    nav .logo-img { filter: brightness(0) invert(1); }
    nav.scrolled .logo-img { filter: none; }
    
    /* SOLUCIÓN EXACTA DEL SLIDER PARA MÓVIL */
    .slider-wrapper-outer { width: 100%; margin-top: 20px; aspect-ratio: auto; } /* Quitamos la forma cuadrada del borde */
    .comparison-slider { aspect-ratio: 4 / 3; } /* El contenedor de imágenes manda sobre la altura */
    
    .carousel-btn { display: none; }
    .landscape, .portrait { width: 85vw !important; max-width: 350px; }
    .project-card { height: auto; aspect-ratio: 9/16; }
    
    .card-info { opacity: 1; padding-top: 60px; background: linear-gradient(to top, rgba(0,0,0,0.95) 20%, rgba(0,0,0,0.6), transparent); }
    .clean-video { opacity: 1; }
    
    .holo-grid-centered { flex-direction: column; align-items: center; }
    .stats-row { flex-direction: column; gap: 20px; text-align: center; }
}

@media (hover: none) {
    .brand-item img { filter: grayscale(0%) opacity(1); } 
    .brand-item::after { display: none; } 
    header.hero { background-attachment: scroll; }
}