/* ==========================================================================
   SL INNOVAR — High-End Modern Tech & Glassmorphism Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-dark: #070b14;
    --bg-card: rgba(13, 21, 39, 0.7);
    --bg-card-hover: rgba(18, 30, 56, 0.85);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glass-hover: rgba(0, 229, 255, 0.4);
    --cyan-neon: #00e5ff;
    --cyan-glow: rgba(0, 229, 255, 0.35);
    --blue-tech: #387eb8;
    --yellow-py: #ffd43b;
    --indigo-glow: rgba(99, 102, 241, 0.25);
}

/* Global Smooth & Modern Base */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-dark);
    color: #e2e8f0;
    overflow-x: hidden;
    selection-background-color: #00e5ff;
    selection-color: #070b14;
}

h1, h2, h3, h4, .font-display {
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    letter-spacing: -0.02em;
}

/* Custom Cyber Grid & Ambient Background */
.cyber-bg {
    background-color: #070b14;
    background-image: 
        radial-gradient(at 0% 0%, rgba(56, 126, 184, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(0, 229, 255, 0.12) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(15, 23, 42, 0.5) 0px, transparent 100%);
}

.cyber-grid-pattern {
    background-size: 40px 40px;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}

/* Ambient Glow Orbs */
.glow-orb-cyan {
    position: absolute;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.18) 0%, rgba(0, 229, 255, 0) 70%);
    border-radius: 50%;
    filter: blur(50px);
    pointer-events: none;
    z-index: 0;
    animation: float-slow 10s ease-in-out infinite alternate;
}

.glow-orb-indigo {
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.2) 0%, rgba(99, 102, 241, 0) 70%);
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    z-index: 0;
    animation: float-slow 14s ease-in-out infinite alternate-reverse;
}

@keyframes float-slow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, -30px) scale(1.1); }
}

/* Glassmorphism Classes */
.glass-nav {
    background: rgba(7, 11, 20, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-glass-hover);
    transform: translateY(-4px);
    box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.5), 0 0 24px 0 var(--cyan-glow);
}

/* Glowing Neon Buttons */
.btn-cyan-glow {
    background: linear-gradient(135deg, #00e5ff 0%, #0099ff 100%);
    color: #070b14;
    font-weight: 700;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
    transition: all 0.25s ease;
}

.btn-cyan-glow:hover {
    background: linear-gradient(135deg, #33ebff 0%, #1aa3ff 100%);
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.7);
    transform: translateY(-2px);
    color: #000;
}

.btn-glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    transition: all 0.25s ease;
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: #00e5ff;
    color: #00e5ff;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.25);
    transform: translateY(-2px);
}

/* Text Gradients */
.text-gradient-cyan {
    background: linear-gradient(135deg, #ffffff 20%, #00e5ff 80%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-white {
    background: linear-gradient(180deg, #ffffff 40%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-accent {
    background: linear-gradient(135deg, #387eb8 0%, #00e5ff 50%, #ffd43b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Badge with Pulse Dot */
.badge-pill {
    background: rgba(0, 229, 255, 0.08);
    border: 1px solid rgba(0, 229, 255, 0.25);
    color: #7dd3fc;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #00e5ff;
    border-radius: 50%;
    box-shadow: 0 0 8px #00e5ff;
    animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-ring {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.3); }
}

/* Modern Bento Grid Specifics */
.bento-icon-box {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.15) 0%, rgba(56, 126, 184, 0.2) 100%);
    border: 1px solid rgba(0, 229, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00e5ff;
    transition: all 0.3s ease;
}

.glass-card:hover .bento-icon-box {
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.3) 0%, rgba(56, 126, 184, 0.4) 100%);
    box-shadow: 0 0 18px rgba(0, 229, 255, 0.5);
    transform: scale(1.08);
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    background: rgba(11, 19, 43, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 229, 255, 0.3);
    color: #ffffff;
    padding: 14px 20px;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 229, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
    transform: translateX(0);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #070b14;
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

/* ==========================================================================
   MOBILE & RESPONSIVE DESIGN ENHANCEMENTS
   ========================================================================== */

/* Utility: Ocultar scrollbar horizontal en filtros móviles pero permitir scroll */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

/* Optimización táctil - Solo botones y elementos clickeables */
button, a, label, [role="button"], .btn-cyan-glow, .btn-glass, .btn-wa-glow, .btn-emerald-glow {
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}

/* Enhanced WhatsApp Glow Button */
.btn-wa-glow {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #ffffff !important;
    box-shadow: 0 4px 18px rgba(37, 211, 102, 0.35), 0 0 10px rgba(37, 211, 102, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-wa-glow:hover, .btn-wa-glow:active {
    background: linear-gradient(135deg, #28e16d 0%, #159e8e 100%);
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.55), 0 0 16px rgba(37, 211, 102, 0.35);
    transform: translateY(-1px);
}

/* Enhanced Emerald / Buy Direct Glow Button */
.btn-emerald-glow {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    color: #ffffff !important;
    box-shadow: 0 4px 18px rgba(16, 185, 129, 0.35), 0 0 10px rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-emerald-glow:hover, .btn-emerald-glow:active {
    background: linear-gradient(135deg, #34d399 0%, #059669 100%);
    box-shadow: 0 6px 24px rgba(16, 185, 129, 0.55), 0 0 16px rgba(16, 185, 129, 0.35);
    transform: translateY(-1px);
}

/* Inputs y textareas con soporte nativo completo para selección, focus y teclado virtual */
input, select, textarea {
    touch-action: auto !important;
    -webkit-tap-highlight-color: transparent;
    user-select: text !important;
    -webkit-user-select: text !important;
}

/* Prevenir zoom no deseado en iOS Safari cuando el usuario toca inputs */
@media (max-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="number"],
    input[type="tel"],
    input[type="password"],
    select,
    textarea {
        font-size: 16px !important;
    }

    /* Rendimiento móvil: desactivar animaciones continuas de blur pesado */
    .glow-orb-cyan,
    .glow-orb-indigo {
        animation: none !important;
        opacity: 0.15;
        filter: blur(25px);
        transform: none !important;
    }

    /* Reducir carga de renderizado de backdrop-filter en GPU móvil */
    .glass-nav {
        background: rgba(7, 11, 20, 0.94);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    .glass-card {
        background: rgba(13, 21, 39, 0.92);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
}

/* Ajustes específicos de pantalla chica */
@media (max-width: 640px) {
    .glow-orb-cyan {
        width: 220px;
        height: 220px;
    }
    .glow-orb-indigo {
        width: 240px;
        height: 240px;
    }
    
    /* Padding y margen para dispositivos con muesca o barra inferior */
    body {
        padding-bottom: env(safe-area-inset-bottom, 0);
    }

    .glass-card {
        border-radius: 1.25rem;
    }

    /* Eliminar escala de hover en móviles para evitar parpadeos táctiles */
    .glass-card:hover {
        transform: none;
    }
}
