* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Montserrat', sans-serif; background: #0B0E14; color: #F2F5F9; overflow-x: hidden; }

/* FONDO PRINCIPAL */
#bg-canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; background: #0B0E14; }

/* CANVAS FLOTANTE (Para los modelos de las tarjetas) */
#floating-3d-canvas {
  position: absolute; top: 0; left: 0; width: 100%; height: 120px;
  pointer-events: none; z-index: 10; display: none;
}

/* LOADER */
#loader { position: fixed; inset: 0; background: #0B0E14; z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: opacity 0.5s; }
#loader.hidden { opacity: 0; pointer-events: none; }
.logo { font-size: 3rem; font-weight: 800; letter-spacing: 0.1em; color: #00AEEF; margin-bottom: 2rem; }
.logo span { color: #E31C1C; }
.bar { width: 200px; height: 4px; background: rgba(0,174,239,0.2); border-radius: 2px; overflow: hidden; }
.fill { height: 100%; width: 0; background: #00AEEF; animation: load 1.5s forwards; }
@keyframes load { to { width: 100%; } }
.txt { font-size: 0.8rem; color: #8A94A6; margin-top: 1rem; letter-spacing: 0.2em; }

/* NAVBAR */
.nav { position: fixed; top: 0; left: 0; right: 0; padding: 1.2rem 5%; display: flex; justify-content: space-between; align-items: center; z-index: 100; background: rgba(11,14,20,0.9); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255,255,255,0.05); }
.nav-logo { font-size: 1.5rem; font-weight: 800; color: #00AEEF; }
.nav-logo span { color: #E31C1C; }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { color: #8A94A6; text-decoration: none; font-weight: 600; font-size: 0.85rem; transition: color 0.3s; }
.nav-links a:hover { color: #00AEEF; }

/* SECCIONES */
.section { min-height: 100vh; padding: 8rem 5% 5rem; display: flex; flex-direction: column; justify-content: center; }
.section-header { margin-bottom: 3rem; max-width: 800px; }
.section-tag { color: #00AEEF; font-weight: 700; font-size: 0.8rem; letter-spacing: 0.1em; margin-bottom: 1rem; display: block; }
.section-title { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.1; margin-bottom: 1rem; }
.section-desc { color: #8A94A6; font-size: 1.1rem; line-height: 1.6; }

/* FRANJAS */
.light-section { background: #FAFAFA; color: #1A1D20; border-top: 4px solid #00AEEF; border-bottom: 4px solid #00AEEF; }
.light-section .section-tag { color: #E31C1C; }
.light-section .section-title { color: #1A1D20; }
.light-section .section-desc { color: #555; }
.dark-section { background: transparent; }

/* GRADIENTE */
.gradient { background: linear-gradient(90deg, #00AEEF, #FFD100, #E31C1C); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* HERO */
.badge { display: inline-block; padding: 0.5rem 1rem; border: 1px solid #00AEEF; border-radius: 50px; color: #00AEEF; font-size: 0.8rem; font-weight: 700; margin-bottom: 1.5rem; }
.hero-title { font-size: clamp(3rem, 8vw, 6rem); font-weight: 800; line-height: 1; margin-bottom: 1.5rem; }
.hero-subtitle { color: #8A94A6; font-size: 1.2rem; max-width: 600px; margin-bottom: 2.5rem; line-height: 1.6; font-weight: 300; }
.hero-cta { display: flex; gap: 1rem; margin-bottom: 4rem; flex-wrap: wrap; }

/* BOTONES */
.btn { padding: 1rem 2rem; border-radius: 6px; font-weight: 700; font-size: 0.9rem; cursor: pointer; border: none; transition: transform 0.3s; }
.btn:hover { transform: translateY(-3px); }
.btn-primary { background: linear-gradient(135deg, #00AEEF, #0066ff); color: white; box-shadow: 0 10px 20px rgba(0,174,239,0.3); }
.btn-secondary { background: transparent; border: 1px solid #00AEEF; color: #00AEEF; }

/* ESTADÍSTICAS */
.hero-stats { display: flex; gap: 4rem; flex-wrap: wrap; }
.stat-num { font-size: 3rem; font-weight: 800; color: #00AEEF; line-height: 1; }
.stat-label { font-size: 0.85rem; color: #8A94A6; text-transform: uppercase; letter-spacing: 0.1em; margin-top: 0.5rem; }

/* TARJETAS */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }

.card { 
  position: relative; 
  padding: 120px 2rem 2rem 2rem; /* Espacio superior para el modelo 3D */
  border-radius: 12px; 
  transition: transform 0.3s, box-shadow 0.3s; 
  cursor: pointer;
  text-align: center;
}
.service-card { background: #FFF; border: 1px solid #EEE; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.service-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,174,239,0.15); border-color: #00AEEF; }
.product-card { background: rgba(26,29,32,0.8); border: 1px solid rgba(255,255,255,0.1); }
.product-card:hover { transform: translateY(-5px); border-color: #00AEEF; }

.card h3, .card h4 { font-size: 1.2rem; font-weight: 700; margin-bottom: 1rem; }
.service-card h3 { color: #1A1D20; }
.product-card h4 { color: #FFF; }
.card p { font-size: 0.95rem; line-height: 1.6; color: #666; }
.product-card p { color: #8A94A6; }

.glass-card { padding: 2rem; background: rgba(26,29,32,0.5); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; }
.glass-card h3 { color: #00AEEF; margin-bottom: 1rem; }
.glass-card p { color: #8A94A6; }

/* CONTACTO */
.contact-container { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; }
.contact-info h3 { font-size: 1.5rem; margin-bottom: 1rem; }
.contact-info p { color: #555; margin-bottom: 2rem; }
.contact-item { margin-bottom: 1rem; color: #555; font-weight: 600; }
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.contact-form input, .contact-form textarea { padding: 1rem; border: 1px solid #CCC; border-radius: 6px; font-family: inherit; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: #00AEEF; }

/* FOOTER */
.footer { padding: 3rem; text-align: center; border-top: 1px solid rgba(255,255,255,0.1); background: #0B0E14; color: #8A94A6; }
.footer-logo { font-size: 1.5rem; font-weight: 800; color: #00AEEF; margin-bottom: 1rem; }
.footer-logo span { color: #E31C1C; }

/* WIDGETS FLOTANTES */
.whatsapp-float { position: fixed; bottom: 30px; left: 30px; width: 60px; height: 60px; background: #25D366; color: white; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 2rem; text-decoration: none; box-shadow: 0 10px 20px rgba(37,211,102,0.3); z-index: 1000; }
.chat-toggle { position: fixed; bottom: 30px; right: 30px; width: 60px; height: 60px; background: #00AEEF; color: white; border: none; border-radius: 50%; font-size: 1.5rem; cursor: pointer; box-shadow: 0 10px 20px rgba(0,174,239,0.3); z-index: 1000; }
.chat-widget { position: fixed; bottom: 100px; right: 30px; width: 350px; height: 500px; background: #1A1D20; border: 1px solid #00AEEF; border-radius: 12px; display: flex; flex-direction: column; z-index: 1000; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.chat-widget.open { opacity: 1; pointer-events: auto; }
.chat-header { padding: 1rem; background: rgba(0,174,239,0.1); display: flex; justify-content: space-between; color: #FFF; font-weight: bold; }
.chat-header button { background: none; border: none; color: #FFF; font-size: 1.5rem; cursor: pointer; }
.chat-body { flex: 1; padding: 1rem; overflow-y: auto; display: flex; flex-direction: column; gap: 1rem; }
.message { padding: 0.8rem 1rem; border-radius: 8px; font-size: 0.9rem; max-width: 80%; }
.message.bot { background: #2A2E33; color: #FFF; align-self: flex-start; }
.message.user { background: #00AEEF; color: #FFF; align-self: flex-end; }
.chat-input-area { padding: 1rem; display: flex; gap: 0.5rem; border-top: 1px solid rgba(255,255,255,0.1); }
.chat-input-area input { flex: 1; padding: 0.8rem; border-radius: 6px; border: none; background: #0B0E14; color: #FFF; }
.chat-input-area button { padding: 0 1rem; background: #00AEEF; color: white; border: none; border-radius: 6px; cursor: pointer; }

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .section { padding: 6rem 5% 4rem; }
  .hero-stats { gap: 1.5rem; justify-content: space-between; width: 100%; }
  .stat-num { font-size: 2rem; }
  .stat-label { font-size: 0.7rem; }
  .contact-container { grid-template-columns: 1fr; gap: 2rem; }
  .chat-widget { width: calc(100% - 40px); right: 20px; }
  .hero-cta { flex-direction: column; }
  .btn { width: 100%; }
  .card { padding: 100px 1.5rem 1.5rem 1.5rem; }
}

/* Ocultar el canvas flotante de PC por defecto */
#floating-3d-canvas {
  position: absolute; top: 0; left: 0; width: 100%; height: 120px;
  pointer-events: none; z-index: 10; display: none;
}

/* Animación CSS para los modelos estáticos del celular */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
