/* ── VARIABLES ── */
:root {
  --bg: #080c10;
  --surface: #0e141c;
  --card: #121a24;
  --accent: #00e5a0;
  --accent2: #ff6b35;
  --muted: #3a4a5c;
  --text: #d4dfe8;
  --text-dim: #6a7f94;
  --white: #f0f6ff;
  --mono: 'DM Mono', monospace;
}

/* ── BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Syne', sans-serif;
  overflow-x: hidden;
}

/* ── GRAIN OVERLAY ── */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 999;
  opacity: .5;
}

/* ── NAV ── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.2rem 4rem;
  background: rgba(8,12,16,.85);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(0,229,160,.08);
}
.nav-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.7rem;
  letter-spacing: .1em;
  color: var(--white);
  text-decoration: none;
}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links a {
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .15em;
  color: var(--text-dim);
  text-decoration: none;
  text-transform: uppercase;
  transition: color .2s;
}
.nav-links a:hover { color: var(--accent); }
.lang-selector {
  font-family: var(--mono);
  font-size: .65rem;
  color: var(--text-dim);
  letter-spacing: .1em;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.lang-selector a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color .2s;
}
.lang-selector a.active, .lang-selector a:hover {
  color: var(--accent);
}
.lang-flag {
  display: inline-block;
  vertical-align: middle;
  margin-right: 4px;
  border-radius: 2px;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.lang-selector a:hover .lang-flag, .lang-selector a.active .lang-flag {
  opacity: 1;
}
.nav-cta {
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: .6rem 1.4rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  text-decoration: none;
  transition: all .2s;
}
.nav-cta:hover { background: var(--accent); color: var(--bg); }

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 8rem 4rem 5rem;
  position: relative;
  overflow: hidden;
}
.hero-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,229,160,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,160,.04) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridShift 20s linear infinite;
}
@keyframes gridShift {
  from { background-position: 0 0; }
  to { background-position: 60px 60px; }
}
.hero-glow {
  position: absolute;
  width: 700px; height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,229,160,.12) 0%, transparent 70%);
  top: -200px; right: -200px;
  animation: pulseGlow 6s ease-in-out infinite alternate;
}
@keyframes pulseGlow {
  from { transform: scale(1); opacity: .7; }
  to { transform: scale(1.15); opacity: 1; }
}
.hero-tag {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .25em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  animation: fadeUp .8s ease forwards;
  opacity: 0;
}
.hero-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(5rem, 12vw, 11rem);
  line-height: .92;
  color: var(--white);
  letter-spacing: -.01em;
  animation: fadeUp .8s .15s ease forwards;
  opacity: 0;
}
.hero-title .outline {
  -webkit-text-stroke: 2px var(--white);
  color: transparent;
}
.hero-title .accent-word { color: var(--accent); }
.hero-sub {
  max-width: 520px;
  margin-top: 2rem;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-dim);
  animation: fadeUp .8s .3s ease forwards;
  opacity: 0;
}
.hero-actions {
  display: flex; align-items: center; gap: 1.5rem;
  margin-top: 2.8rem;
  animation: fadeUp .8s .45s ease forwards;
  opacity: 0;
}
.btn-primary {
  background: var(--accent);
  color: var(--bg);
  font-family: var(--mono);
  font-size: .8rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  padding: .9rem 2.2rem;
  text-decoration: none;
  font-weight: 600;
  transition: all .25s;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}
.btn-primary:hover { background: #00ffb3; transform: translateY(-2px); }
.btn-secondary {
  font-family: var(--mono);
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  display: flex; align-items: center; gap: .5rem;
  transition: color .2s;
}
.btn-secondary:hover { color: var(--white); }
.btn-secondary::after { content: '↓'; font-size: 1rem; }

.hero-stats {
  display: flex; gap: 3rem;
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(255,255,255,.06);
  animation: fadeUp .8s .6s ease forwards;
  opacity: 0;
}
.stat-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.8rem;
  color: var(--accent);
  line-height: 1;
}
.stat-label {
  font-family: var(--mono);
  font-size: .7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-top: .3rem;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── SECTION SHARED ── */
section { padding: 7rem 4rem; }
.section-tag {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .25em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: .8rem;
}
.section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--white);
  line-height: 1;
  margin-bottom: 1rem;
}

/* ── SERVICES ── */
.services { background: var(--surface); }
.services-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 4rem;
  flex-wrap: wrap; gap: 1.5rem;
}
.services-desc {
  max-width: 420px;
  color: var(--text-dim);
  line-height: 1.7;
  font-size: .95rem;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5px;
  background: var(--muted);
}
.service-card {
  background: var(--card);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  transition: background .25s;
  cursor: default;
}
.service-card::before {
  content: '';
  position: absolute; bottom: 0; left: 0;
  width: 100%; height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s ease;
}
.service-card:hover { background: #161f2c; }
.service-card:hover::before { transform: scaleX(1); }
.service-icon {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  display: block;
}
.service-num {
  font-family: var(--mono);
  font-size: .65rem;
  color: var(--muted);
  position: absolute; top: 1.5rem; right: 1.5rem;
  letter-spacing: .1em;
}
.service-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: .8rem;
  letter-spacing: -.01em;
}
.service-desc {
  font-size: .85rem;
  color: var(--text-dim);
  line-height: 1.65;
}
.service-tags {
  display: flex; flex-wrap: wrap; gap: .4rem;
  margin-top: 1.5rem;
}
.tag {
  font-family: var(--mono);
  font-size: .65rem;
  padding: .25rem .6rem;
  background: rgba(0,229,160,.08);
  color: var(--accent);
  border: 1px solid rgba(0,229,160,.2);
  letter-spacing: .08em;
}

/* ── PORTFOLIO ── */
.portfolio-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 4rem;
  flex-wrap: wrap; gap: 1.5rem;
}
.portfolio-filter {
  display: flex; gap: .5rem;
}
.filter-btn {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .4rem 1rem;
  border: 1px solid var(--muted);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: all .2s;
}
.filter-btn.active, .filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0,229,160,.06);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
}
.project-card {
  background: var(--card);
  border: 1px solid rgba(255,255,255,.05);
  overflow: hidden;
  position: relative;
  transition: border-color .3s, transform .3s;
  cursor: pointer;
}
.project-card:hover {
  border-color: rgba(0,229,160,.3);
  transform: translateY(-4px);
}
.project-card.wide { grid-column: span 7; }
.project-card.narrow { grid-column: span 5; }
.project-card.full { grid-column: span 12; }
.project-card.half { grid-column: span 6; }

.project-thumb {
  height: 220px;
  position: relative;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.project-thumb .thumb-bg {
  position: absolute; inset: 0;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.project-thumb::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(14,20,28,0.2), rgba(14,20,28,0.8));
  z-index: 1;
}
.project-card:hover .thumb-bg {
  transform: scale(1.1);
}
.project-thumb .thumb-content {
  position: relative; z-index: 2;
  text-align: center;
}
.project-thumb .thumb-url {
  font-family: var(--mono);
  font-size: .75rem;
  color: rgba(255,255,255,.35);
  letter-spacing: .08em;
}
.project-thumb .thumb-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.5rem;
  color: rgba(255,255,255,.85);
  letter-spacing: .05em;
}
.project-thumb .thumb-icon { font-size: 3rem; opacity: .7; }

/* Project color themes */
.theme-green .thumb-bg { background: linear-gradient(135deg, #0a1a10 0%, #0d2a1a 100%); }
.theme-green .thumb-logo { color: #00e5a0; }
.theme-blue .thumb-bg { background: linear-gradient(135deg, #080e1c 0%, #0d1830 100%); }
.theme-blue .thumb-logo { color: #4db8ff; }
.theme-orange .thumb-bg { background: linear-gradient(135deg, #1a0e06 0%, #2a1208 100%); }
.theme-orange .thumb-logo { color: #ff6b35; }
.theme-purple .thumb-bg { background: linear-gradient(135deg, #0e0812 0%, #1a0e24 100%); }
.theme-purple .thumb-logo { color: #b57bee; }
.theme-teal .thumb-bg { background: linear-gradient(135deg, #061518 0%, #0a2226 100%); }
.theme-teal .thumb-logo { color: #4ecdc4; }
.theme-red .thumb-bg { background: linear-gradient(135deg, #180608 0%, #280a0c 100%); }
.theme-red .thumb-logo { color: #ff4d6d; }
.theme-gold .thumb-bg { background: linear-gradient(135deg, #14100a 0%, #221a0c 100%); }
.theme-gold .thumb-logo { color: #f0a500; }
.theme-indigo .thumb-bg { background: linear-gradient(135deg, #08061a 0%, #130e2e 100%); }
.theme-indigo .thumb-logo { color: #9f7aea; }

.project-body { padding: 1.8rem; }
.project-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: .8rem;
}
.project-category {
  font-family: var(--mono);
  font-size: .65rem;
  color: var(--accent);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.project-year {
  font-family: var(--mono);
  font-size: .65rem;
  color: var(--text-dim);
}
.project-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: .5rem;
  letter-spacing: -.01em;
}
.project-desc {
  font-size: .83rem;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 1.2rem;
}
.project-stack {
  display: flex; flex-wrap: wrap; gap: .35rem;
}
.stack-item {
  font-family: var(--mono);
  font-size: .62rem;
  color: var(--text-dim);
  padding: .2rem .5rem;
  border: 1px solid var(--muted);
  letter-spacing: .06em;
}
.project-link {
  display: inline-flex; align-items: center; gap: .4rem;
  margin-top: 1.2rem;
  font-family: var(--mono);
  font-size: .68rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: gap .2s;
}
.project-link:hover { gap: .7rem; }

/* ── TECH STACK STRIP ── */
.tech-strip {
  background: var(--surface);
  padding: 3rem 4rem;
  border-top: 1px solid rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(255,255,255,.04);
  overflow: hidden;
}
.tech-scroll {
  display: flex; gap: 4rem;
  animation: scrollTech 25s linear infinite;
  width: max-content;
}
@keyframes scrollTech {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.tech-item {
  display: flex; align-items: center; gap: .7rem;
  font-family: var(--mono);
  font-size: .75rem;
  color: var(--text-dim);
  letter-spacing: .1em;
  white-space: nowrap;
  text-transform: uppercase;
}
.tech-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }

/* ── PROCESS ── */
.process { background: var(--bg); }
.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 4rem;
  border: 1px solid rgba(255,255,255,.06);
}
.step {
  padding: 2.5rem;
  border-right: 1px solid rgba(255,255,255,.06);
  position: relative;
}
.step:last-child { border-right: none; }
.step-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 4rem;
  color: rgba(0,229,160,.28);
  line-height: 1;
  margin-bottom: 1rem;
}
.step-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: .7rem;
}
.step-desc {
  font-size: .82rem;
  color: var(--text-dim);
  line-height: 1.65;
}

/* ── CONTACT ── */
.contact {
  background: var(--surface);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 0;
  min-height: 60vh;
}
.contact-left {
  padding: 7rem 4rem;
  border-right: 1px solid rgba(255,255,255,.05);
  display: flex; flex-direction: column; justify-content: center;
}
.contact-big {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3rem, 6vw, 5.5rem);
  color: var(--white);
  line-height: .95;
  margin: 1.5rem 0 2rem;
}
.contact-big .highlight { color: var(--accent); }
.contact-info { margin-top: 2.5rem; display: flex; flex-direction: column; gap: 1rem; }
.contact-item {
  display: flex; align-items: center; gap: 1rem;
  font-family: var(--mono);
  font-size: .8rem;
  color: var(--text-dim);
  letter-spacing: .05em;
}
.contact-link {
  color: inherit;
  text-decoration: none;
  transition: color .3s, transform .2s;
  display: inline-block;
}
.contact-link:hover {
  color: var(--accent);
  transform: translateX(4px);
}
.contact-item-icon {
  width: 36px; height: 36px;
  border: 1px solid var(--muted);
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem;
}
.contact-right {
  padding: 7rem 4rem;
  display: flex; flex-direction: column; justify-content: center;
}
.form-field { margin-bottom: 1.5rem; }
.form-label {
  display: block;
  font-family: var(--mono);
  font-size: .65rem;
  color: var(--text-dim);
  letter-spacing: .2em;
  text-transform: uppercase;
  margin-bottom: .5rem;
}
.form-input {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--muted);
  color: var(--white);
  font-family: var(--mono);
  font-size: .85rem;
  padding: .9rem 1rem;
  outline: none;
  transition: border-color .2s;
  resize: none;
}
.form-input:focus { border-color: var(--accent); }
.form-input::placeholder { color: var(--muted); }
.submit-btn {
  width: 100%;
  background: var(--accent);
  color: var(--bg);
  border: none;
  font-family: var(--mono);
  font-size: .8rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  padding: 1rem;
  cursor: pointer;
  font-weight: 600;
  transition: all .25s;
  margin-top: .5rem;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}
.submit-btn:hover { background: #00ffb3; }

/* ── VISITOR ANALYTICS ── */
.analytics-section {
    background: var(--bg);
    padding: 5rem 4rem;
}
.analytics-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}
.analytics-card {
    background: var(--card);
    border: 1px solid rgba(255,255,255,.05);
    padding: 2rem;
    border-radius: 4px;
}
.analytics-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}
.analytics-header h3 {
    font-size: 1.2rem;
    color: var(--white);
    font-weight: 700;
}
.map-container {
    width: 100%;
    height: 400px;
    background: rgba(255,255,255,.02);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}
.stats-list {
    list-style: none;
}
.stat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255,255,255,.05);
}
.stat-item:last-child {
    border-bottom: none;
}
.country-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.flag-icon {
    width: 24px;
    height: 16px;
    object-fit: cover;
}
.stat-value {
    font-family: var(--mono);
    color: var(--accent);
    font-weight: 600;
}
.chart-container {
    width: 100%;
    height: 300px;
    margin-top: 2rem;
}
.analytics-summary {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,.1);
    font-size: 0.85rem;
    color: var(--text-dim);
}
.analytics-summary span {
    color: var(--white);
    font-weight: 600;
}

@media (max-width: 900px) {
    .analytics-container {
        grid-template-columns: 1fr;
    }
    .analytics-section {
        padding: 5rem 1.5rem;
    }
}

/* ── FOOTER ── */
footer {
  padding: 2rem 4rem;
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,.05);
  flex-wrap: wrap; gap: 1rem;
}
.footer-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.3rem;
  color: var(--text-dim);
  letter-spacing: .1em;
}
.footer-logo span { color: var(--accent); }
.footer-copy {
  font-family: var(--mono);
  font-size: .68rem;
  color: var(--text-dim);
  letter-spacing: .08em;
}
.footer-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: .75rem;
}
.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover {
  color: #00e5a0;
}
.footer-links span {
  color: rgba(255,255,255,.2);
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--muted); }

/* ── BOTÓN FLOTANTE ASISTENTE IA — Superior Derecha ── */
.ai-float-trigger {
  position: fixed;
  top: 80px;
  right: 30px;
  z-index: 9999;
}

/* ── BOTONES FLOTANTES DE NAVEGACIÓN ── */
.floating-nav-buttons {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}
.float-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: #00e5a0;
  color: #0e141c;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 229, 160, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.float-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 229, 160, 0.6);
}

/* ── ASISTENTE IA ── */
.ai-btn {
  background: #00e5a0 !important;
  color: #0e141c !important;
  margin-bottom: 5px;
  position: relative;
}
.ai-icon { font-size: 1.4rem; }
.ai-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0,229,160,0.4);
  animation: pulse-ai 2s infinite;
  z-index: -1;
}
@keyframes pulse-ai {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

.ai-chat-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 18, 0.85);
  backdrop-filter: blur(8px);
  z-index: 9997;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}
.ai-chat-overlay.active {
  opacity: 1;
  visibility: visible;
}

.ai-chat-window {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -45%) scale(0.95);
  width: 450px;
  max-width: 90vw;
  height: 600px;
  max-height: 80vh;
  background: #161c24;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8);
  display: flex;
  flex-direction: column;
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.ai-chat-window.active {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  visibility: visible;
}
.ai-chat-header {
  padding: 1.2rem;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 16px 16px 0 0;
}
.ai-chat-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--white);
  font-weight: 600;
}
.status-dot {
  width: 8px;
  height: 8px;
  background: #00e5a0;
  border-radius: 50%;
  box-shadow: 0 0 10px #00e5a0;
}
.close-chat {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}
.ai-chat-messages {
  flex: 1;
  padding: 1.2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ai-msg {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 85%;
}
.ai-msg.bot {
  background: rgba(255,255,255,0.05);
  color: var(--white);
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}
.ai-msg.user {
  background: var(--accent);
  color: #0e141c;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
  font-weight: 500;
}
.ai-chat-input-area {
  padding: 1.2rem;
  display: flex;
  gap: 10px;
  background: rgba(255,255,255,0.02);
  border-radius: 0 0 16px 16px;
}
.ai-chat-input-area input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--white);
  font-size: 0.9rem;
  outline: none;
}
.ai-chat-input-area input:focus {
  border-color: var(--accent);
}
.send-btn {
  background: var(--accent);
  color: #0e141c;
  border: none;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s;
}
.send-btn:hover { transform: scale(1.05); }

/* Ajuste móvil */
@media (max-width: 480px) {
  .ai-chat-window {
    width: 95vw;
    height: 70vh;
  }
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .navbar { padding: 1rem 1.5rem; }
  .nav-links, .nav-cta { display: none; }
  section, .contact-left, .contact-right { padding: 5rem 1.5rem; }
  .hero { padding: 7rem 1.5rem 4rem; }
  .services-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .project-card.wide, .project-card.narrow,
  .project-card.full, .project-card.half { grid-column: span 1; }
  .process-steps { grid-template-columns: 1fr 1fr; }
  .step { border-bottom: 1px solid rgba(255,255,255,.06); }
  .contact { grid-template-columns: 1fr; }
  .contact-left { border-right: none; border-bottom: 1px solid rgba(255,255,255,.05); }
  .hero-stats { flex-wrap: wrap; gap: 1.5rem; }
  .services-header, .portfolio-header { flex-direction: column; align-items: flex-start; }
  
  /* Botones flotantes en móvil - Forzar visibilidad y alineación */
  .floating-nav-buttons {
    bottom: 15px !important;
    right: 10px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 10000 !important;
  }
  .ai-float-trigger {
    top: auto !important;
    bottom: 120px !important;
    right: 10px !important;
    z-index: 10000 !important;
  }
  .float-btn {
    width: 42px !important;
    height: 42px !important;
    font-size: 1rem !important;
  }
}
