/* ============================================================
   Zentria — Estilos principales (diseño Antigravity)
   Tema claro/oscuro · Responsive · ES/EN
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

:root {
  /* Tema claro (por defecto) */
  --bg: #fafafa;
  --bg-soft: #f4f4f5;
  --fg: #121317;
  --fg-soft: #45474d;
  --muted: #71717a;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);
  --card: #ffffff;
  --primary: #121317;
  --primary-fg: #ffffff;
  --accent: #0078c8;
  --accent-2: #00b4c8;
  --destructive: #ef4444;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-lift: 0 12px 40px -12px rgba(0,0,0,0.18);
  --radius: 14px;
  --radius-lg: 24px;
  --grid-line: rgba(0, 0, 0, 0.04);
  --orb-opacity: 0.6;
  --header-bg: rgba(250, 250, 250, 0.6);
  --header-bg-scrolled: rgba(250, 250, 250, 0.9);
  --header-border: rgba(0, 0, 0, 0.3);
  --header-border-scrolled: rgba(0, 0, 0, 0.6);
}

html.dark {
  --bg: #1a1a1f;
  --bg-soft: #232329;
  --fg: #f5f5f7;
  --fg-soft: #d4d4d8;
  --muted: #a1a1aa;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.18);
  --card: #232329;
  --primary: #f5f5f7;
  --primary-fg: #1a1a1f;
  --accent: #4cb3e8;
  --accent-2: #4cd4d4;
  --destructive: #f87171;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-lift: 0 12px 40px -12px rgba(0,0,0,0.5);
  --grid-line: rgba(255, 255, 255, 0.05);
  --orb-opacity: 0.55;
  --header-bg: rgba(26, 26, 31, 0.6);
  --header-bg-scrolled: rgba(26, 26, 31, 0.9);
  --header-border: rgba(255, 255, 255, 0.08);
  --header-border-scrolled: rgba(255, 255, 255, 0.18);
}

html, body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: clip;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  transition: background-color 0.25s ease, color 0.25s ease;
}

img, svg, video { max-width: 100%; height: auto; }
main, header, footer, section { max-width: 100%; overflow-wrap: break-word; word-wrap: break-word; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }

/* ===== Tipografía ===== */
h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; color: var(--fg); }
h1 { font-size: clamp(2rem, 7vw, 5.2rem); font-weight: 500; }
h2 { font-size: clamp(1.75rem, 4vw, 3rem); }
h3 { font-size: clamp(1.125rem, 2vw, 1.5rem); }
p { margin: 0; }

/* ===== Container ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 24px; } }
@media (min-width: 1024px) { .container { padding: 0 32px; } }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--header-border);
  transition: all 0.3s ease;
}
.site-header.scrolled {
  background: var(--header-bg-scrolled);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom-color: var(--header-border-scrolled);
  box-shadow: 0 1px 8px rgba(0,0,0,0.04);
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 56px;
  transition: height 0.3s ease;
}
.site-header.scrolled .inner { height: 48px; }
@media (min-width: 640px) {
  .site-header .inner { height: 64px; }
  .site-header.scrolled .inner { height: 56px; }
}

.logo-link { display: flex; align-items: center; gap: 8px; min-width: 0; flex-shrink: 0; }
.logo-link img { height: 24px; width: auto; max-width: 100px; object-fit: contain; }
@media (min-width: 640px) { .logo-link img { height: 32px; max-width: none; } }
.logo-link .slogan {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: -0.01em;
  border-left: 1px solid var(--border);
  padding-left: 8px;
  margin-left: 4px;
  white-space: nowrap;
}
@media (min-width: 640px) { .logo-link .slogan { font-size: 14px; padding-left: 12px; margin-left: 8px; } }

.logo-light { display: block; }
.logo-dark { display: none; }
html.dark .logo-light { display: none; }
html.dark .logo-dark { display: block; }

.nav-desktop { display: none; align-items: center; gap: 4px; }
@media (min-width: 1024px) { .nav-desktop { display: flex; } }

.actions-desktop { display: none; align-items: center; gap: 8px; }
@media (min-width: 768px) { .actions-desktop { display: flex; } }

.hamburger { display: inline-flex; padding: 8px; border-radius: 9999px; color: var(--fg-soft); flex-shrink: 0; }
.hamburger:hover { background: rgba(0,0,0,0.05); color: var(--fg); }
html.dark .hamburger:hover { background: rgba(255,255,255,0.08); }
/* CORRECCIÓN TABLET: la hamburguesa debe verse hasta 1024px (donde aparece
   el nav desktop). Antes se ocultaba a partir de 768px dejando a las
   tablets 768–1023px sin ningún tipo de navegación. */
@media (min-width: 1024px) { .hamburger { display: none; } }

/* ===== Pills (botones) ===== */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 9999px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 450;
  line-height: 1;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
  white-space: nowrap;
}
.pill-ghost { color: var(--fg-soft); background: transparent; }
.pill-ghost:hover { background: rgba(0,0,0,0.05); color: var(--fg); }
html.dark .pill-ghost:hover { background: rgba(255,255,255,0.08); }
.pill-dark { background: var(--primary); color: var(--primary-fg); }
.pill-dark:hover { filter: brightness(1.08); }
.pill-outline { border: 1px solid var(--border-strong); color: var(--fg); background: transparent; }
.pill-outline:hover { background: rgba(0,0,0,0.04); }
html.dark .pill-outline:hover { background: rgba(255,255,255,0.06); }
.pill svg { width: 16px; height: 16px; }

/* El menú móvil se renderiza FUERA del <header>: el backdrop-filter del
   header creaba un containing-block que rompía position:fixed en móviles. */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--bg);
  overflow-y: auto;
  display: none;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}
.mobile-menu.open { display: block; }
.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
}
.mobile-menu-header .logo-link img { height: 24px; max-width: 100px; }
.mobile-menu-header .logo-link .slogan { font-size: 11px; }
.mobile-menu-body { padding: 24px 16px; max-width: 448px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.mobile-menu-section-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 12px; padding-left: 8px; }
.mobile-menu-nav { display: flex; flex-direction: column; gap: 4px; }
.mobile-menu-nav a {
  display: block;
  padding: 12px 16px;
  border-radius: 9999px;
  font-size: 16px;
  font-weight: 450;
  color: var(--fg-soft);
  width: 100%;
  text-align: left;
}
.mobile-menu-nav a:hover { background: rgba(0,0,0,0.05); color: var(--fg); }
html.dark .mobile-menu-nav a:hover { background: rgba(255,255,255,0.08); }
.mobile-menu-divider { height: 1px; background: linear-gradient(to right, transparent, var(--border-strong), transparent); }
.mobile-menu-actions { display: flex; flex-direction: column; gap: 8px; }
.mobile-menu-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 9999px;
  padding: 12px 16px;
}
.mobile-menu-row span { font-size: 14px; font-weight: 500; }

/* ===== Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 80px;
}
@media (min-width: 640px) { .hero { padding: 96px 0 128px; } }
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.5;
  pointer-events: none;
}
.hero-radial-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, color-mix(in srgb, var(--fg) 8%, transparent), transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 30%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%);
  pointer-events: none;
}
.hero-orb {
  position: absolute;
  top: -128px;
  right: -10%;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(48px);
  opacity: var(--orb-opacity);
  background: conic-gradient(from 180deg at 50% 50%, color-mix(in srgb, var(--accent) 50%, transparent), color-mix(in srgb, var(--accent-2) 40%, transparent), transparent, color-mix(in srgb, var(--accent) 50%, transparent));
  animation: orb-float 9s ease-in-out infinite;
  pointer-events: none;
}
@keyframes orb-float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0, -18px, 0) scale(1.06); }
}
.hero-content { position: relative; max-width: 896px; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--header-bg);
  backdrop-filter: blur(4px);
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 24px;
}
.hero-badge .dot {
  position: relative;
  display: inline-flex;
  width: 8px;
  height: 8px;
}
.hero-badge .dot::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.6;
  animation: ping 1.5s infinite;
}
.hero-badge .dot::after {
  content: '';
  position: relative;
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
@keyframes ping {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(2); opacity: 0; }
}
.hero h1 { margin-bottom: 24px; }
.hero h1 .muted { color: var(--muted); }
.hero h1 .underline-wrap { position: relative; display: inline-block; }
.hero h1 .underline-svg {
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 100%;
  height: 12px;
  color: var(--accent);
}
.hero-subtitle {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 672px;
  margin-top: 24px;
}
@media (min-width: 640px) { .hero-subtitle { font-size: 20px; } }
.hero-subtitle strong { color: var(--fg); font-weight: 500; }
.hero-ctas {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 32px;
}
@media (min-width: 640px) { .hero-ctas { flex-direction: row; flex-wrap: wrap; align-items: center; } }
.hero-ctas .pill { justify-content: center; padding: 12px 20px; font-size: 16px; }
.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-top: 40px;
}
@media (min-width: 640px) { .hero-stats { grid-template-columns: repeat(4, 1fr); } }
.hero-stat { background: var(--bg); padding: 16px; }
@media (min-width: 640px) { .hero-stat { padding: 20px; } }
.hero-stat .k { font-size: 18px; font-weight: 500; letter-spacing: -0.02em; }
@media (min-width: 640px) { .hero-stat .k { font-size: 24px; } }
.hero-stat .v { font-size: 12px; margin-top: 4px; }
@media (min-width: 640px) { .hero-stat .v { font-size: 14px; } }
.hero-stat .sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
@media (min-width: 640px) { .hero-stat .sub { font-size: 12px; } }
.hero-fade-bottom {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 96px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}

/* ===== Sections ===== */
.section { padding: 64px 0; }
@media (min-width: 640px) { .section { padding: 112px 0; } }
.section-soft { background: var(--bg-soft); }
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--header-bg);
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 12px;
  color: var(--muted);
}
.section-eyebrow svg { width: 14px; height: 14px; }
.section-title { margin-top: 20px; }
.section-desc { font-size: 16px; color: var(--muted); line-height: 1.6; max-width: 768px; margin-top: 20px; }
@media (min-width: 640px) { .section-desc { font-size: 18px; } }
.section-heading { max-width: 768px; }
.section-heading.compact { max-width: 672px; }

/* ===== Grid de pilares ===== */
.pillars-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 40px;
}
@media (min-width: 768px) { .pillars-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
@media (min-width: 1024px) { .pillars-grid { grid-template-columns: repeat(4, 1fr); } }

/* ===== Card ===== */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
@media (min-width: 640px) { .card { padding: 32px; } }
.card-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
  border-color: var(--border-strong);
}
.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: var(--primary);
  color: var(--primary-fg);
}
.card-icon svg { width: 20px; height: 20px; }
.card-icon.accent { background: var(--accent); }
.card-title { font-size: 16px; margin-top: 20px; line-height: 1.3; }
.card-desc { font-size: 14px; color: var(--muted); line-height: 1.6; margin-top: 12px; }

/* ===== Core services (3 destacados) ===== */
.core-services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 40px;
}
@media (min-width: 1024px) { .core-services-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.core-service-card {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
@media (min-width: 640px) { .core-service-card { padding: 32px; } }
.core-service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
  border-color: var(--border-strong);
}
.core-service-halo {
  position: absolute;
  top: -64px;
  right: -64px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.2;
  transition: opacity 0.3s ease;
}
.core-service-card:hover .core-service-halo { opacity: 0.4; }
.core-service-head { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.core-service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: #fff;
}
@media (min-width: 640px) { .core-service-icon { width: 56px; height: 56px; } }
.core-service-icon svg { width: 24px; height: 24px; }
@media (min-width: 640px) { .core-service-icon svg { width: 28px; height: 28px; } }
.core-service-tag { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.core-service-title { font-size: 18px; margin-top: 20px; line-height: 1.3; }
@media (min-width: 640px) { .core-service-title { font-size: 20px; } }
.core-service-tagline { font-size: 14px; font-weight: 500; margin-top: 4px; }
.core-service-desc { font-size: 14px; color: var(--muted); line-height: 1.6; margin-top: 12px; }
.core-service-bullets { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; flex: 1; }
.core-service-bullets li { display: flex; align-items: flex-start; gap: 8px; color: var(--fg-soft); }
.core-service-bullets svg { width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0; }
.core-service-cta { margin-top: 24px; }

/* ===== All services grid ===== */
.all-services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 40px;
}
@media (min-width: 640px) { .all-services-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (min-width: 1024px) { .all-services-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .all-services-grid { grid-template-columns: repeat(5, 1fr); } }
.all-service-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: left;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.all-service-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
  border-color: var(--border-strong);
}
.all-service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--primary);
}
.all-service-icon svg { width: 20px; height: 20px; }
.all-service-head { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 8px; }
.all-service-title { font-size: 14px; font-weight: 500; }
.all-service-arrow { width: 16px; height: 16px; color: var(--muted); opacity: 0; transition: opacity 0.2s ease; }
.all-service-item:hover .all-service-arrow { opacity: 1; }
.all-service-desc { font-size: 12px; color: var(--muted); line-height: 1.6; }

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: flex-start;
}
@media (min-width: 1024px) { .about-grid { grid-template-columns: repeat(12, 1fr); gap: 48px; } }
.about-left { grid-column: span 12; }
@media (min-width: 1024px) { .about-left { grid-column: span 5; } }
.about-right { grid-column: span 12; display: flex; flex-direction: column; gap: 16px; font-size: 16px; line-height: 1.7; color: var(--muted); }
@media (min-width: 1024px) { .about-right { grid-column: span 7; } }
.about-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }
.about-stat {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
}
.about-stat .k { font-size: 24px; font-weight: 500; }
.about-stat .v { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ===== CTA banner ===== */
/* Colores fijos independientes del tema (siempre oscuro con texto blanco) */
.cta-banner {
  position: relative;
  overflow: hidden;
  background: #121317;
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
}
@media (min-width: 640px) { .cta-banner { padding: 64px; } }
.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.3;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(255,255,255,0.18), transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(0,180,200,0.18), transparent 50%);
  pointer-events: none;
}
.cta-banner > * { position: relative; }
.cta-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 12px;
  color: #ffffff;
}
.cta-badge svg { width: 14px; height: 14px; }
.cta-title { font-size: 24px; margin-top: 20px; color: #ffffff !important; }
@media (min-width: 640px) { .cta-title { font-size: 48px; } }
.cta-desc { font-size: 16px; color: rgba(255,255,255,0.7); line-height: 1.6; max-width: 768px; margin: 20px auto 0; }
@media (min-width: 640px) { .cta-desc { font-size: 18px; } }
/* CTA: botones apilados en vertical en todos los tamaños:
   1) Solicitar asesoramiento  2) Descargar dossier  3) Ver en línea  4) Teléfono */
.cta-buttons {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.cta-buttons .pill { width: 100%; padding: 14px 20px; font-size: 16px; justify-content: center; }
/* Botón principal: blanco con texto oscuro (siempre, en ambos temas) */
.cta-buttons .pill-light {
  background: #ffffff;
  color: #121317;
  border: 1px solid #ffffff;
}
.cta-buttons .pill-light:hover { opacity: 0.9; }
/* Botón secundario: borde blanco, texto blanco (siempre) */
.cta-buttons .pill-border {
  border: 1px solid rgba(255,255,255,0.4);
  color: #ffffff;
  background: transparent;
}
.cta-buttons .pill-border:hover { background: rgba(255,255,255,0.1); }
.cta-note { font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 16px; }

/* ===== Principales Soluciones (marquee) ===== */
.marquee-section { overflow: hidden; position: relative; }
.marquee-wrap { position: relative; margin-top: 40px; }
.marquee-fade-left, .marquee-fade-right {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 64px;
  z-index: 1;
  pointer-events: none;
}
@media (min-width: 640px) { .marquee-fade-left, .marquee-fade-right { width: 96px; } }
.marquee-fade-left { left: 0; background: linear-gradient(to right, var(--bg-soft), transparent); }
.marquee-fade-right { right: 0; background: linear-gradient(to left, var(--bg-soft), transparent); }
.marquee { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 80px;
  min-width: 130px;
  margin: 0 8px;
  padding: 0 16px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 16px;
}
@media (min-width: 640px) { .marquee-item { height: 96px; min-width: 200px; margin: 0 12px; padding: 0 32px; } }
.marquee-item .name { font-size: 14px; font-weight: 500; text-align: center; }
@media (min-width: 640px) { .marquee-item .name { font-size: 18px; } }
.marquee-item .type { font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-top: 4px; }
@media (min-width: 640px) { .marquee-item .type { font-size: 11px; } }

/* ===== FAQ ===== */
.faq-list {
  max-width: 768px;
  margin: 40px auto 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card);
}
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  text-align: left;
  font-size: 16px;
  font-weight: 500;
}
.faq-question:hover { background: rgba(0,0,0,0.02); }
html.dark .faq-question:hover { background: rgba(255,255,255,0.04); }
.faq-question svg { width: 20px; height: 20px; color: var(--muted); flex-shrink: 0; transition: transform 0.3s ease; }
.faq-item.open .faq-question svg { transform: rotate(180deg); }
.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.3s ease, opacity 0.3s ease;
}
.faq-item.open .faq-answer { grid-template-rows: 1fr; opacity: 1; }
.faq-answer-inner { overflow: hidden; }
.faq-answer p { padding: 0 20px 20px; font-size: 14px; color: var(--muted); line-height: 1.6; }

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: flex-start;
}
@media (min-width: 1024px) { .contact-grid { grid-template-columns: repeat(2, 1fr); gap: 48px; } }
.contact-left .eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.contact-left h2 { margin-top: 12px; }
.contact-left .desc { font-size: 16px; color: var(--muted); line-height: 1.6; max-width: 448px; margin-top: 20px; }
@media (min-width: 640px) { .contact-left .desc { font-size: 18px; } }
/* Cajas de contacto apiladas en vertical: Llámanos, Email, Respuesta y Oficina */
.contact-info-cards { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 32px; }
.contact-info-card {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  display: block;
  transition: background 0.2s ease;
}
.contact-info-card:hover { background: var(--bg-soft); }
.contact-info-card .label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.contact-info-card .value { font-size: 14px; font-weight: 500; margin-top: 2px; }

.contact-form-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 24px;
}
@media (min-width: 640px) { .contact-form-wrap { padding: 32px; } }
.contact-form-title { font-size: 16px; font-weight: 500; margin-bottom: 16px; }
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 6px; }
.form-field label .req { color: var(--destructive); }
.form-field input, .form-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--fg);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-field input:focus, .form-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}
.form-field textarea { resize: vertical; min-height: 100px; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .form-row { grid-template-columns: repeat(2, 1fr); } }
.form-error {
  background: color-mix(in srgb, var(--destructive) 10%, transparent);
  color: var(--destructive);
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 16px;
}
.form-submit { width: 100%; justify-content: center; padding: 12px; font-size: 16px; }
.form-success { text-align: center; padding: 64px 0; }
.form-success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-fg);
  margin: 0 auto;
}
.form-success-icon svg { width: 24px; height: 24px; }
.form-success h3 { font-size: 24px; margin-top: 20px; }
.form-success p { color: var(--muted); max-width: 448px; margin: 12px auto 0; font-size: 14px; }

.captcha-row { display: flex; align-items: center; gap: 12px; }
.captcha-row .question {
  font-family: monospace;
  font-size: 14px;
  background: var(--bg-soft);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.captcha-row input { max-width: 80px; }

/* ===== Footer ===== */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 56px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(6, 1fr); gap: 32px; } }
.footer-brand { grid-column: span 2; }
@media (min-width: 768px) { .footer-brand { grid-column: span 2; } }
.footer-brand img { height: 32px; }
.footer-brand p { font-size: 14px; color: var(--muted); max-width: 320px; line-height: 1.6; margin-top: 16px; }
.footer-col-title { font-size: 14px; font-weight: 500; }
.footer-col-links { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col-links a, .footer-col-links button {
  font-size: 14px;
  color: var(--muted);
  text-align: left;
  padding: 0;
  transition: color 0.2s ease;
}
.footer-col-links a:hover, .footer-col-links button:hover { color: var(--fg); }
.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
@media (min-width: 640px) { .footer-bottom { flex-direction: row; } }
.footer-bottom .copy { font-size: 12px; color: var(--muted); }
.footer-legal { display: flex; gap: 16px; }
.footer-legal button { font-size: 12px; color: var(--muted); transition: color 0.2s ease; }
.footer-legal button:hover { color: var(--fg); }

/* ===== Modales (legal + service detail) ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  padding: 0;
  animation: fade-in 0.2s ease-out;
}
@media (min-width: 640px) { .modal-overlay { padding: 16px; } }
.modal-container {
  background: var(--bg);
  width: 100%;
  height: 100%;
  overflow-y: auto;
}
@media (min-width: 640px) {
  .modal-container {
    height: auto;
    max-height: 92vh;
    max-width: 1024px;
    border-radius: var(--radius-lg);
  }
}
.modal-container.legal { max-width: 768px; }
.modal-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 95%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
@media (min-width: 640px) { .modal-header { padding: 16px 32px; } }
.modal-header h2 { font-size: 16px; }
@media (min-width: 640px) { .modal-header h2 { font-size: 18px; } }
.modal-close {
  display: inline-flex;
  padding: 8px;
  border-radius: 9999px;
  color: var(--fg-soft);
}
.modal-close:hover { background: rgba(0,0,0,0.05); }
html.dark .modal-close:hover { background: rgba(255,255,255,0.08); }
.modal-close svg { width: 16px; height: 16px; }

.modal-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  padding: 40px 16px;
}
@media (min-width: 640px) { .modal-hero { padding: 64px 32px; } }
.modal-hero-halo {
  position: absolute;
  top: -128px;
  right: -80px;
  width: 288px;
  height: 288px;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.2;
  pointer-events: none;
}
.modal-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--header-bg);
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 12px;
  color: var(--muted);
}
.modal-hero-eyebrow svg { width: 14px; height: 14px; }
.modal-hero-title-row { display: flex; align-items: flex-start; gap: 12px; margin-top: 20px; }
@media (min-width: 640px) { .modal-hero-title-row { gap: 16px; } }
.modal-hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: #fff;
  flex-shrink: 0;
}
@media (min-width: 640px) { .modal-hero-icon { width: 56px; height: 56px; } }
.modal-hero-icon svg { width: 24px; height: 24px; }
@media (min-width: 640px) { .modal-hero-icon svg { width: 28px; height: 28px; } }
.modal-hero-title { font-size: 24px; line-height: 1.1; }
@media (min-width: 640px) { .modal-hero-title { font-size: 36px; } }
@media (min-width: 1024px) { .modal-hero-title { font-size: 48px; } }
.modal-hero-tagline { font-size: 16px; font-weight: 500; margin-top: 16px; }
@media (min-width: 640px) { .modal-hero-tagline { font-size: 18px; } }
.modal-hero-desc { font-size: 14px; color: var(--muted); line-height: 1.6; max-width: 768px; margin-top: 16px; }
@media (min-width: 640px) { .modal-hero-desc { font-size: 18px; } }

.modal-body { padding: 32px 16px; max-width: 1024px; margin: 0 auto; display: flex; flex-direction: column; gap: 40px; }
@media (min-width: 640px) { .modal-body { padding: 48px 32px; gap: 48px; } }
.modal-body h2 { font-size: 20px; margin-bottom: 16px; }
@media (min-width: 640px) { .modal-body h2 { font-size: 24px; } }
.modal-body p { font-size: 14px; color: var(--muted); line-height: 1.7; margin-bottom: 12px; }
@media (min-width: 640px) { .modal-body p { font-size: 16px; } }
.modal-body h3 { font-size: 16px; margin-bottom: 8px; }
@media (min-width: 640px) { .modal-body h3 { font-size: 18px; } }

.modal-benefits { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .modal-benefits { grid-template-columns: repeat(3, 1fr); } }
.modal-benefit {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
}
.modal-benefit .k { font-size: 24px; font-weight: 500; }
@media (min-width: 640px) { .modal-benefit .k { font-size: 30px; } }
.modal-benefit .v { font-size: 14px; color: var(--muted); margin-top: 4px; }

.modal-approach { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 768px) { .modal-approach { grid-template-columns: repeat(2, 1fr); } }
.modal-approach-item { border: 1px solid var(--border); background: var(--card); border-radius: 16px; padding: 20px; }
.modal-approach-head { display: flex; align-items: center; gap: 12px; }
.modal-approach-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}
.modal-approach-item p { margin: 12px 0 0; font-size: 14px; }

.modal-modules { display: flex; flex-direction: column; gap: 12px; }
.modal-module { border: 1px solid var(--border); background: var(--card); border-radius: 16px; padding: 20px; }
.modal-module h3 { margin-bottom: 12px; }
.modal-module ul { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 6px; }
.modal-module li { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; color: var(--muted); }
.modal-module li svg { width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0; }

.modal-requirements {
  background: var(--bg-soft);
  border-radius: 16px;
  padding: 20px;
}
.modal-requirements ul { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 8px; }
.modal-requirements li { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; }
.modal-requirements li svg { width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0; }

.modal-deliverables { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 640px) { .modal-deliverables { grid-template-columns: repeat(2, 1fr); } }
.modal-deliverable {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 12px;
  padding: 12px;
  font-size: 14px;
}
.modal-deliverable svg { width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0; }

.modal-cta {
  background: var(--primary);
  color: var(--primary-fg);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
}
.modal-cta h2 { color: inherit; font-size: 20px; }
@media (min-width: 640px) { .modal-cta h2 { font-size: 30px; } }
.modal-cta p { color: rgba(255,255,255,0.7); max-width: 576px; margin: 12px auto 0; font-size: 14px; }
@media (min-width: 640px) { .modal-cta p { font-size: 16px; } }
.modal-cta .pill { margin-top: 24px; background: #fff; color: var(--primary); padding: 12px 20px; font-size: 16px; justify-content: center; }

.modal-legal-body { padding: 32px 16px; max-width: 768px; margin: 0 auto; }
@media (min-width: 640px) { .modal-legal-body { padding: 48px 32px; } }
.modal-legal-body section { margin-bottom: 32px; }
.modal-legal-updated { font-size: 12px; color: var(--muted); margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 20px;
  box-shadow: var(--shadow-lift);
  font-size: 14px;
  max-width: 360px;
  animation: toast-in 0.4s ease;
}
@keyframes toast-in { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.toast.success { border-color: #10b981; }
.toast.error { border-color: var(--destructive); }

/* ===== Dropdown (language + theme) ===== */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 160px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lift);
  overflow: hidden;
  z-index: 60;
  display: none;
}
.dropdown-menu.open { display: block; }
.dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 16px;
  font-size: 14px;
  text-align: left;
  transition: background 0.15s ease;
}
.dropdown-item:hover { background: var(--bg-soft); }
.dropdown-item.active { background: var(--bg-soft); }
.dropdown-item .check { width: 16px; height: 16px; color: var(--accent); }
.dropdown-item .lang-code { font-size: 12px; font-weight: 600; width: 24px; }

/* ===== Animaciones ===== */
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
.reveal { opacity: 0; animation: fade-up 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.reveal-1 { animation-delay: 0.05s; }
.reveal-2 { animation-delay: 0.15s; }
.reveal-3 { animation-delay: 0.25s; }
.reveal-4 { animation-delay: 0.35s; }
.reveal-5 { animation-delay: 0.45s; }

/* ===== Hidden helpers ===== */
.hidden { display: none !important; }
.icon { width: 16px; height: 16px; }
.icon-lg { width: 20px; height: 20px; }
.icon-xl { width: 24px; height: 24px; }

/* ===== Utilidades ===== */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mt-12 { margin-top: 48px; }

/* ===== Logo secreto del Aviso Legal (5 dobles clics → contador) ===== */
.legal-logo-secret {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ============================================================
   CORRECCIONES Y MEJORAS (rebuild 2026)
   ============================================================ */

/* ===== Accesibilidad: foco visible en navegación por teclado ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Enlaces de salto al contenido (solo visibles al tabular) */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 300;
  transform: translateY(-200%);
  background: var(--primary);
  color: var(--primary-fg);
  padding: 10px 18px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 500;
  transition: transform 0.2s ease;
}
.skip-link:focus { transform: translateY(0); }

/* ===== Accesibilidad: respetar prefers-reduced-motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; }
  .marquee { animation: none; }
}

/* ===== Touch targets ≥ 44px en móvil ===== */
@media (max-width: 767px) {
  .hamburger { min-width: 44px; min-height: 44px; justify-content: center; align-items: center; }
  .mobile-menu-nav a { padding: 14px 16px; }
  .faq-question { padding: 18px 16px; }
  .pill { min-height: 40px; }
  .hero-ctas .pill, .cta-buttons .pill, .form-submit { min-height: 48px; }
  .modal-close { min-width: 44px; min-height: 44px; justify-content: center; }
}

/* ===== Toast responsive ===== */
@media (max-width: 639px) {
  .toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
    padding: 14px 18px;
  }
}

/* ===== Píldoras: permitir ajuste en pantallas muy pequeñas ===== */
@media (max-width: 379px) {
  .pill { white-space: normal; }
  .hero-ctas .pill { width: 100%; }
}

/* ===== Página de error 404 ===== */
.not-found-wrap { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 64px 16px; gap: 16px; }
.not-found-code { font-size: clamp(4rem, 14vw, 7rem); font-weight: 500; letter-spacing: -0.04em; color: var(--muted); line-height: 1; }
.not-found-title { font-size: clamp(1.25rem, 4vw, 2rem); }
.not-found-desc { max-width: 448px; color: var(--muted); }

/* ============================================================
   CONTADOR DE VISITAS — panel de estadísticas (acceso con código)
   ============================================================ */
.counter-code-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  padding: 16px;
  animation: fade-in 0.2s ease-out;
}
.counter-code-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 360px;
  text-align: center;
  box-shadow: var(--shadow-lift);
}
.counter-code-box .icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--primary);
  color: var(--primary-fg);
  margin-bottom: 16px;
}
.counter-code-box .icon-wrap svg { width: 22px; height: 22px; }
.counter-code-box h2 { font-size: 20px; margin-bottom: 8px; }
.counter-code-box .desc { font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 20px; }
.counter-code-box label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 6px; text-align: left; }
.counter-code-box input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--fg);
  border-radius: 10px;
  font-size: 16px;
  letter-spacing: 0.3em;
  text-align: center;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.counter-code-box input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.counter-code-box input::placeholder { letter-spacing: normal; color: var(--muted); }
.counter-code-box .err { color: var(--destructive); font-size: 13px; font-weight: 500; margin-top: 12px; min-height: 18px; }
.counter-code-box .actions { display: flex; gap: 8px; margin-top: 16px; }
.counter-code-box .actions .pill { flex: 1; justify-content: center; padding: 12px; }

/* Panel de estadísticas */
.counter-stats-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  animation: fade-in 0.2s ease-out;
  overflow-y: auto;
  padding: 0;
}
@media (min-width: 640px) { .counter-stats-overlay { padding: 24px; align-items: center; } }
.counter-stats-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0;
  width: 100%;
  max-width: 720px;
  padding: 24px;
}
@media (min-width: 640px) { .counter-stats-box { border-radius: var(--radius-lg); padding: 32px; } }
.counter-stats-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.counter-stats-head h2 { font-size: 18px; display: flex; align-items: center; gap: 10px; }
@media (min-width: 640px) { .counter-stats-head h2 { font-size: 22px; } }
.counter-stats-head h2 svg { width: 20px; height: 20px; color: var(--accent); }
.counter-stats-sub { font-size: 13px; color: var(--muted); margin-bottom: 24px; }
.counter-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 28px; }
@media (min-width: 640px) { .counter-kpis { grid-template-columns: repeat(4, 1fr); } }
.counter-kpi {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
}
.counter-kpi .k { font-size: clamp(1.4rem, 4vw, 2rem); font-weight: 500; letter-spacing: -0.02em; }
.counter-kpi .v { font-size: 12px; color: var(--muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.04em; }
.counter-section-title { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 12px; }
.counter-rows { margin-bottom: 24px; display: flex; flex-direction: column; gap: 8px; }
.counter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
}
.counter-row .label { color: var(--fg-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.counter-row .value { font-weight: 500; flex-shrink: 0; }
.counter-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-bottom: 8px; }
.counter-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 500;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-strong);
}
.counter-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); color: var(--fg-soft); vertical-align: top; }
.counter-table tr:last-child td { border-bottom: none; }
.counter-table .num { text-align: right; }
.counter-empty { font-size: 13px; color: var(--muted); padding: 16px 0; }
.counter-loading { text-align: center; padding: 48px 0; color: var(--muted); font-size: 14px; }
.counter-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.counter-foot .hint { font-size: 11px; color: var(--muted); }
/* Tabla scrollable en móvil */
.counter-table-wrap { overflow-x: auto; max-height: 320px; overflow-y: auto; border: 1px solid var(--border); border-radius: 12px; }
.counter-table-wrap .counter-table { margin-bottom: 0; }

/* Badge de dispositivo */
.device-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 9999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  font-weight: 500;
  white-space: nowrap;
}
html.dark .device-badge { background: color-mix(in srgb, var(--accent) 18%, transparent); }
