/* NAVBAR PREMIUM - AHORA ANCLADO A LA DERECHA PARA EFECTO PÍLDORA */
.navbar { 
    position: fixed; 
    top: 0; 
    right: 0; 
    width: 100%; 
    max-width: 100vw; 
    height: var(--menu-height, 80px); 
    background: var(--glass-bg, rgba(10, 12, 15, 0.6)); 
    backdrop-filter: blur(15px); 
    -webkit-backdrop-filter: blur(15px); 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 0 5%; 
    z-index: 1000; 
    border-bottom: 1px solid rgba(0, 168, 255, 0.1); 
    transition: max-width 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
                height 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
                top 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
                border-radius 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
                right 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                padding 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                background 0.6s ease;
}

@media (min-width: 1024px) {
    .navbar.scrolled {
        height: var(--menu-height-scrolled, 60px);
        width: max-content; 
        right: 4%;
        top: 15px;
        border-radius: 50px;
        padding: 0 1.5rem 0 2rem; 
        background: rgba(10, 12, 15, 0.95);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
        border: 1px solid rgba(0, 168, 255, 0.2);
    }
}

/* ==========================================================================
   TEXTO DESTACADO (MEJORA PROGRESIVA: SÓLIDO EN MÓVIL / GRADIENTE EN DESKTOP)
   ========================================================================== */
.text-gradient {
    color: var(--tech-blue, #00a8ff) !important;
    background: none !important;
    -webkit-text-fill-color: var(--tech-blue, #00a8ff) !important;
    display: inline-block;
    padding: 0;
    margin: 0;
}

@media (min-width: 1024px) {
    .text-gradient {
        background: linear-gradient(135deg, #ffffff 0%, var(--tech-blue, #00a8ff) 100%) !important;
        -webkit-background-clip: text !important;
        background-clip: text !important;
        -webkit-text-fill-color: transparent !important;
        color: transparent !important; 
        padding: 0 6px !important; 
        line-height: 1.1;
    }
}

/* ==========================================================================
   LOGO VECTORIAL: ANIMACIONES DE ENTRADA Y REFINAMIENTO DE TRANSICIÓN
   ========================================================================== */
@keyframes logoEntrance {
    0% { opacity: 0; transform: scale(0.9) translateY(-10px); filter: blur(5px); }
    100% { opacity: 1; transform: scale(1) translateY(0) blur(0px); }
}

.logo-wrapper { 
    display: flex;
    align-items: center;
    height: 32px; 
    width: auto; 
    min-width: 140px;
    text-decoration: none;
    position: relative; 
    z-index: 1002;
    animation: logoEntrance 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
                filter 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
                left 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo-wrapper:hover {
    transform: translateY(-2px) scale(1.02);
    filter: brightness(1.1);
}

.logo-wrapper:active { transform: translateY(1px) scale(0.99); }

@media (min-width: 768px) { .logo-wrapper { height: 42px; min-width: 190px; } }

.main-logo-svg { position: absolute; top: 0; left: 0; height: 100%; width: 190px; flex-shrink: 0; overflow: visible; }

.logo-text { 
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
                visibility 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); 
    transform-origin: left;
}

.power-glow { opacity: 0; transition: opacity 0.4s ease; }
.logo-wrapper:hover .power-glow { opacity: 1 !important; }

.power-symbol { 
    transform: translate(100px, 21.5px) rotate(0deg);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); 
    transform-origin: 0 0; 
    will-change: transform;
}

/* COMPORTAMIENTO DEL LOGO AL HACER SCROLL (DESKTOP) */
@media (min-width: 1024px) {
    .navbar.scrolled .logo-wrapper { min-width: 44px !important; width: 44px !important; margin-right: 2rem; }
    .navbar.scrolled .logo-text { opacity: 0; visibility: hidden; transform: translateX(-30px); pointer-events: none; }
    .navbar.scrolled .power-symbol { transform: translate(22px, 21.5px) rotate(360deg); }
    .navbar.scrolled .power-glow { opacity: 0.6 !important; }
}

/* ==========================================================================
   MENU TOGGLE (HAMBURGER TECH) Y NAVEGACIÓN
   ========================================================================== */
.menu-toggle {
    display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end;
    width: 32px; height: 22px; background: transparent; border: none; cursor: pointer; z-index: 1005;
}

.menu-toggle span {
    height: 2px; 
    background-color: var(--tech-blue, #00a8ff) !important; 
    box-shadow: 0 0 8px rgba(0, 168, 255, 0.6); 
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Asimetría Tech */
.menu-toggle span:nth-child(1) { width: 100%; }
.menu-toggle span:nth-child(2) { width: 65%; } 
.menu-toggle span:nth-child(3) { width: 100%; }

/* Transformación a "X" en Neón Cyan */
.menu-toggle.open span:nth-child(1) { transform: translateY(10px) rotate(45deg); width: 100%; background-color: var(--tech-blue, #00a8ff) !important; box-shadow: 0 0 12px rgba(0, 168, 255, 0.8); }
.menu-toggle.open span:nth-child(2) { opacity: 0; transform: translateX(10px); }
.menu-toggle.open span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); width: 100%; background-color: var(--tech-blue, #00a8ff) !important; box-shadow: 0 0 12px rgba(0, 168, 255, 0.8); }

/* NAVEGACIÓN MÓVIL (TARJETA FLOTANTE WIDGET) */
.nav-links { 
    position: fixed; 
    top: 85px; 
    right: 5%; 
    width: 90%; 
    height: auto; 
    padding: 2.5rem 0;
    border-radius: 20px;
    background: rgba(12, 14, 18, 0.96); 
    backdrop-filter: blur(25px); 
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(0, 168, 255, 0.15);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2rem; list-style: none; 
    box-shadow: 0 25px 50px rgba(0,0,0,0.8); 
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-links.active { 
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.nav-links a { text-decoration: none; color: var(--text-color, #ffffff); font-size: 1.3rem; font-weight: 600; position: relative; }

/* RESETEO DE NAVEGACIÓN A DESKTOP (BLINDADO) */
@media (min-width: 1024px) {
    .menu-toggle { display: none; }
    .nav-links { 
        position: static; display: flex; flex-direction: row; height: auto; width: auto; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none;
        gap: 2rem; transition: none; box-shadow: none; right: auto; flex: unset; justify-content: flex-end; z-index: 1005; 
        opacity: 1; visibility: visible; transform: none; border: none; padding: 0; border-radius: 0;
    }
    .nav-links a { font-size: 0.95rem; opacity: 0.7; transition: all 0.3s ease; letter-spacing: 0.3px; }
    .nav-links a::after {
        content: ''; position: absolute; bottom: -4px; left: 50%; width: 0%; height: 1px;
        background: var(--tech-blue, #00a8ff); transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), left 0.3s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: 0 0 8px rgba(0, 168, 255, 0.6);
    }
    .nav-links a:hover, .nav-links a.active-link { opacity: 1; color: #fff; text-shadow: 0 0 10px rgba(255,255,255,0.2); }
    .nav-links a:hover::after, .nav-links a.active-link::after { width: 100%; left: 0; }
    .nav-cta-item { margin-left: 0.5rem; }
}

@keyframes pulseCtaMenu {
    0% { box-shadow: 0 0 15px rgba(0, 168, 255, 0.3); }
    50% { box-shadow: 0 0 30px rgba(0, 168, 255, 0.7); }
    100% { box-shadow: 0 0 15px rgba(0, 168, 255, 0.3); }
}

@media (min-width: 1024px) {
    .nav-links .nav-cta-item a {
        display: flex; align-items: center; gap: 8px; padding: 0.7rem 1.6rem; font-size: 0.85rem; font-family: 'Fira Code', Consolas, monospace; border-radius: 6px; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); position: relative; overflow: hidden; animation: pulseCtaMenu 2.5s infinite ease-in-out; z-index: 1;
    }
    .nav-links .nav-cta-item a::after { display: none; }
    .nav-links .nav-cta-item a::before {
        content: ''; position: absolute; top: 0; left: -150%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); transform: skewX(-20deg); transition: none; pointer-events: none;
    }
    .nav-links .nav-cta-item a:hover::before { left: 150%; transition: left 0.8s cubic-bezier(0.19, 1, 0.22, 1); }
    .nav-links .nav-cta-item a:hover { transform: scale(1.05); background-color: #00b8ff; box-shadow: 0 10px 25px rgba(0, 168, 255, 0.6); text-shadow: none; }
}

/* ==========================================================================
   MOTOR HÍBRIDO BARAJA/FLOW (DESKTOP VS MOBILE)
   ========================================================================== */
section { 
    width: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; box-sizing: border-box;
    background-color: #0a0a0c !important; border-top: 1px solid rgba(255, 255, 255, 0.08); transition: filter 0.1s linear; overflow: hidden; scroll-margin-top: 75px;
}

@media (min-width: 1024px) {
    section {
        position: sticky !important; top: 0 !important; min-height: 100vh; padding: 130px 5% 60px; 
        border-top-left-radius: 40px; border-top-right-radius: 40px; box-shadow: 0 -15px 40px rgba(0, 0, 0, 0.6); 
    }
    #inicio { z-index: 1; padding-top: 210px; padding-bottom: 100px; background-color: transparent !important; box-shadow: none !important; border: none !important; }
    #soluciones { z-index: 2; }
    #ai-native { z-index: 3; }
    #casos { z-index: 4; }
    #contacto { z-index: 5; }

    #inicio .hero-container { transform: translateY(-70px); }
    #ai-native .ai-layout { transform: translateY(-40px); }
    #casos .section-header { transform: translateY(-30px); }
    #casos .projects-grid { transform: translateY(-60px); }
    .terminal-form-wrapper { margin-top: -50px; }
    #casos .card-offset { margin-top: 0px; } 
}

/* ==========================================================================
   AJUSTES MILIMÉTRICOS Y NAVEGACIÓN EN MÓVIL
   ========================================================================== */
@media (max-width: 1023px) {
    section {
        position: relative !important; top: auto !important; min-height: auto; padding: 90px 6% 70px; border-radius: 0; box-shadow: none;
    }
    
    section#inicio { 
        padding-top: 150px; padding-bottom: 70px; height: auto !important; min-height: 100vh !important; background-color: transparent !important; border: none !important; 
    }
    
    #inicio .hero-container, #ai-native .ai-layout, #casos .section-header, #casos .projects-grid { transform: translateY(0); }
    .terminal-form-wrapper { margin-top: 0; }

    /* LOGO Y NAVEGACIÓN EN MÓVIL */
    .navbar { padding: 0 !important; justify-content: center !important; }
    .logo-wrapper { position: absolute !important; left: 5% !important; transform: scale(1) !important; transform-origin: left center !important; margin: 0 !important; }
    .navbar.scrolled { height: 54px !important; background: rgba(10, 12, 15, 0.98); box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5); }
    .navbar.scrolled .logo-wrapper { left: 50% !important; transform: translateX(-50%) scale(0.85) !important; transform-origin: center center !important; }
    .menu-toggle { position: absolute !important; right: 5%; top: 50%; transform: translateY(-50%); opacity: 1; transition: opacity 0.3s ease; }
}

.container { max-width: 1100px; margin: 0 auto; width: 100%; }
.section-header { margin-bottom: 3.5rem; }

/* ==========================================================================
   HERO TRUST BAND & MARQUESINAS
   ========================================================================== */
.hero-cta { margin-top: 3.5rem; display: flex; justify-content: center; }

#inicio .trust-band {
    position: absolute; bottom: 25px; left: 0; right: 0; margin: 0 auto; width: 90%; max-width: 800px; z-index: 10; text-align: center; 
}

.trust-band p {
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.trust-band .neon-highlight {
    color: var(--tech-blue, #00a8ff);
    font-weight: 700;
    text-shadow: 0 0 10px rgba(0, 168, 255, 0.4);
}

.marquee-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    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;
    width: max-content;
    gap: 3.5rem;
}

.vip-track { animation: scrollMarquee 35s linear infinite; }
.regular-track { animation: scrollMarquee 45s linear infinite reverse; opacity: 0.6; }

.marquee-track span {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    color: #ffffff;
    opacity: 0.7;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.regular-track span { font-size: 0.95rem; font-weight: 600; }

.marquee-track span:hover {
    opacity: 1;
    color: var(--tech-blue, #00a8ff);
    text-shadow: 0 0 15px rgba(0, 168, 255, 0.5);
}

@keyframes scrollMarquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@media (max-width: 1023px) {
    #inicio .trust-band { position: relative !important; bottom: auto !important; margin-top: 4.5rem !important; width: 100% !important; max-width: 100% !important; }
    .marquee-wrapper { gap: 1.5rem !important; overflow: visible !important; padding-bottom: 15px !important; }
}

/* ==========================================================================
   SECCIÓN PORTAFOLIO WEB
   ========================================================================== */
#casos .projects-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; align-items: stretch; 
}
#casos .project-card {
    display: flex; flex-direction: column; height: 100%; transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
#casos .project-info { flex-grow: 1; display: flex; flex-direction: column; }
#casos .project-actions { margin-top: auto; }
#casos .project-info h3 { text-align: center; }
#casos .section-desc, #casos .project-info p { text-align: justify; }
#casos .project-card:hover { transform: translateY(-5px); box-shadow: 0 12px 30px rgba(0, 168, 255, 0.25); }

/* ==========================================================================
   COMMAND CENTER B2B FORM
   ========================================================================== */
.terminal-window {
    background: rgba(10, 12, 15, 0.8); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; overflow: hidden; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 0 25px 60px rgba(0,0,0,0.6);
}
.terminal-body { padding: 1.5rem 3rem 1.8rem; } 
.terminal-prompt { display: block; color: rgba(255, 255, 255, 0.5); font-family: 'Fira Code', monospace; font-size: 0.85rem; margin-bottom: 0.5rem; font-weight: 400; letter-spacing: 0.5px; }
.chip-group { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chip input { display: none; }
.chip-text { display: inline-flex; align-items: center; padding: 0.6rem 1.2rem; background: transparent; border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 6px; color: #a0a0a0; font-family: 'Inter', sans-serif; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.chip input:checked + .chip-text { background: rgba(0, 168, 255, 0.1); border-color: var(--tech-blue, #00a8ff); color: #fff; box-shadow: 0 0 15px rgba(0, 168, 255, 0.2); }
.chip:hover .chip-text { border-color: rgba(0, 168, 255, 0.5); color: #fff; transform: translateY(-2px); }
.input-terminal-wrapper { display: flex; align-items: center; background: rgba(0, 0, 0, 0.3); border-bottom: 1px solid rgba(255, 255, 255, 0.2); padding: 0.6rem 1.2rem; border-radius: 4px 4px 0 0; transition: all 0.3s ease; }
.input-terminal-wrapper:focus-within { border-bottom-color: var(--tech-blue, #00a8ff); background: rgba(0, 168, 255, 0.05); }
.minimal-prompt { color: var(--tech-blue, #00a8ff); font-family: 'Fira Code', monospace; font-weight: 800; font-size: 1.2rem; margin-right: 1rem; }
.terminal-input { background: transparent; border: none; color: #fff; font-family: 'Inter', sans-serif; font-size: 1rem; width: 100%; outline: none; }
.terminal-input::placeholder { color: rgba(255, 255, 255, 0.2); font-weight: 400; }
.mt-4 { margin-top: 0.8rem; } .mt-5 { margin-top: 1.2rem; } 
.cyber-btn-primary { background: var(--tech-blue, #00a8ff); color: #0a0a0c; border: none; padding: 1rem 2rem; font-family: 'Inter', sans-serif; font-weight: 800; font-size: 1rem; border-radius: 6px; cursor: pointer; width: 100%; transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); text-transform: uppercase; letter-spacing: 1px; position: relative; overflow: hidden; }
.cyber-btn-primary:hover { background: #fff; box-shadow: 0 0 30px rgba(0, 168, 255, 0.4); transform: translateY(-2px); }

@media (max-width: 768px) {
    .terminal-body { padding: 1.2rem; }
    .chip-group { flex-direction: column; }
    .chip-text { width: 100%; justify-content: center; }
}

/* ==========================================================================
   FOOTER PREMIUM B2B WITH GLASSMORPHISM
   ========================================================================== */
.site-footer { background: rgba(5, 5, 5, 0.65) !important; backdrop-filter: blur(20px) !important; -webkit-backdrop-filter: blur(20px) !important; border-top: 1px solid rgba(0, 168, 255, 0.15) !important; box-shadow: 0 -10px 40px rgba(0, 168, 255, 0.08) !important; padding: 3.5rem 5% 1.8rem !important; position: relative; z-index: 10; color: #888; font-family: 'Inter', sans-serif; }
.site-footer .footer-grid { display: grid !important; grid-template-columns: 1.2fr 1fr 1fr !important; gap: 2.5rem !important; margin-bottom: 2.5rem !important; }
.footer-brand { display: flex; flex-direction: column; }
.footer-tagline { font-size: 0.95rem; line-height: 1.6; margin-bottom: 1.5rem; }
.footer-social-column { display: flex; flex-direction: column; }
.footer-social { display: flex !important; gap: 0.7rem !important; flex-wrap: wrap !important; }
.social-icon { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1); border-radius: 50%; color: #fff; transition: all 0.3s ease; text-decoration: none; }
.social-icon:hover { background: var(--tech-blue, #00a8ff); border-color: var(--tech-blue, #00a8ff); transform: translateY(-3px); }
.social-icon svg { width: 18px; height: 18px; }
.site-footer .footer-heading { font-family: 'Fira Code', monospace; font-size: 1.05rem !important; color: var(--tech-blue, #00a8ff) !important; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 1.2rem; font-weight: 700 !important; text-shadow: 0 0 12px rgba(0, 168, 255, 0.4); }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 1rem; }
.footer-links a { color: #888; text-decoration: none; font-size: 0.95rem; transition: color 0.3s ease; }
.footer-links a:hover { color: var(--tech-blue, #00a8ff); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.05); padding-top: 2rem; display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; flex-wrap: wrap; gap: 1rem; }
.copyright { color: rgba(255,255,255,0.4); margin: 0; }
.location-tag { color: var(--tech-blue, #00a8ff); font-family: 'Fira Code', monospace; margin: 0; }

@media (max-width: 768px) {
    .site-footer { padding: 2.5rem 6% 1.5rem !important; }
    .site-footer .footer-grid { grid-template-columns: 1fr !important; gap: 2.5rem !important; text-align: center; }
    .footer-social { justify-content: center !important; }
    .footer-bottom { flex-direction: column; text-align: center; }
}