:root {
  --primary: #2563eb;
  --secondary: #fb923c;
  --bg: #ffffff;
  --surface: #f1f5f9;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --ring: rgba(37, 99, 235, .25);
}

/* ========== Base ========== */
* {
  box-sizing: border-box
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  scroll-behavior: smooth;
}

img {
  max-width: 100%;
  display: block
}

a {
  color: var(--primary);
  text-decoration: none
}

a:hover {
  color: #1d4ed8
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 16px
}

.container.wide {
  max-width: 1280px;
}

.row {
  display: flex;
  gap: 16px
}

.row.center {
  align-items: center
}

.row.between {
  justify-content: space-between
}

.grid {
  display: grid;
  gap: 24px
}

/* ========== Botones ========== */
.btn {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: .2s
}

.btn:hover {
  transform: translateY(-1px)
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 30px -10px var(--ring)
}

.btn-primary:hover {
  background: #1d4ed8
}

.btn-outline {
  border-color: var(--primary);
  color: var(--primary);
  background: #fff
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff
}

/* ========== Texto secundario ========== */
.muted {
  color: var(--muted)
}

/* ========== Header ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #e5e7eb;
}

.site-header .container {
  padding-top: 8px;
  padding-bottom: 8px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center
}

.brand-copy strong {
  display: block;
  font-size: 1.05rem
}

.brand-copy small {
  color: var(--muted);
  font-size: .8rem
}

.brand-mark {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(37, 99, 235, .35))
}

.nav {
  display: flex;
  align-items: center;
  gap: 16px
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid #cbd5e1;
  padding: 6px 10px;
  border-radius: 10px;
  color: var(--text)
}

.nav-menu {
  display: flex;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0
}

.nav-menu a {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--text)
}

.nav-menu a:hover {
  background: rgba(37, 99, 235, .08)
}

.header-cta {
  display: flex;
  align-items: center
}

/* ========== Hero ========== */
.hero {
  padding: 72px 0;
  background: radial-gradient(80% 60% at 50% 0%, rgba(37, 99, 235, .12), transparent 60%)
}

.hero h1 {
  font-size: clamp(28px, 3.8vw, 48px);
  line-height: 1.1;
  margin: 0 0 12px
}

.hero p {
  font-size: clamp(15px, 1.5vw, 18px);
  color: var(--muted);
  max-width: 740px
}

.hero .badges {
  display: flex; gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap
}

/* ========== Secciones ========== */
.section {
  padding: 56px 0
}

.section h2 {
  font-size: clamp(22px, 2.6vw, 32px);
  margin: 0 0 10px
}

/* ========== Tarjetas ========== */
.cards {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr))
}

.card {
  background: var(--card);
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 30px -20px rgba(2, 6, 23, .12)
}

.card .body {
  padding: 16px
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem
}

.card p {
  margin: 0;
  color: var(--muted)
}

/* ========== Bloques destacados ========== */
.feature {
  padding: 16px;
  background: linear-gradient(180deg, rgba(2, 6, 23, .02), rgba(2, 6, 23, 0));
  border-radius: 16px;
  border: 1px solid #e5e7eb
}

/* ========== Listas/KPI ========== */
.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px
}

.kpis {
  grid-template-columns: repeat(4, 1fr)
}

.kpi {
  background: var(--surface);
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 18px;
  text-align: center
}

.kpi b {
  font-size: 1.4rem;
  display: block
}

/* ========== Footer ========== */
.site-footer {
  margin-top: 40px;
  padding: 32px 0;
  background: var(--surface);
  border-top: 1px solid #e5e7eb
}

.footer-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr))
}

.footer-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px
}

.legal {
  margin-top: 18px;
  border-top: 1px solid #e5e7eb;
  padding-top: 12px;
  color: var(--muted)
}

/* Botón flotante WhatsApp */
.whats-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 55px;
  height: 55px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 34px -10px rgba(37, 211, 102, .7);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  z-index: 9999;
}

.whats-fab:hover {
  background: #22c35e;
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 20px 40px -10px rgba(37, 211, 102, .8);
}

.whats-fab .whats-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, .9));
  transform: translate(0px, 1px);
  pointer-events: none;
}

/* ========== Mejora de Scroll para Especificaciones ========== */
.specs-container {
  flex-grow: 1;
  overflow-y: auto;
  margin-bottom: 12px;
  padding-right: 6px;
}

/* Personalización de la barra de desplazamiento */
.specs-container::-webkit-scrollbar {
  width: 6px;
}

.specs-container::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 10px;
}

.specs-container::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
  border: 1px solid transparent;
}

.specs-container::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* ========== CTA hero ========== */
.hero-cta {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap
}

/* ========== Tablas ========== */
.table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #e2e8f0;
  font-size: .95rem
}

.table th,
.table td {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb
}

.table th {
  background: #f8fafc;
  text-align: left
}

/* ========== Badges ========== */
.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(37, 99, 235, .10);
  border: 1px solid rgba(37, 99, 235, .35);
  color: #1e40af;
  font-size: .8rem
}

/* ========== FAQ ========== */
.faq dt {
  font-weight: 700
}

.faq dd {
  margin: 0 0 12px;
  color: var(--muted)
}

/* ========== Formulario ========== */
.contact-grid {
  grid-template-columns: 1.2fr .8fr
}

.input {
  width: 100%;
  background: var(--surface);
  border: 1px solid #cbd5e1;
  color: var(--text);
  padding: 12px 14px;
  border-radius: 12px;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}

.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 6px var(--ring);
  background: #ffffff
}

textarea.input {
  min-height: 120px;
  resize: vertical
}

.notice {
  padding: 12px 16px;
  border: 1px solid var(--primary);
  background: rgba(37, 99, 235, .06);
  border-radius: 14px;
  color: #1e3a8a
}

/* ========== Responsive ========== */
@media(max-width:900px) {
  .kpis {
    grid-template-columns: repeat(2, 1fr)
  }

  .contact-grid {
    grid-template-columns: 1fr
  }
}

@media(max-width:760px) {
  .nav-toggle {
    display: inline-block
  }

  .nav-menu {
    display: none;
    position: absolute;
    right: 16px;
    top: 64px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 12px 8px;
    flex-direction: column;
    min-width: 220px;
  }

  .nav-menu.show {
    display: flex
  }
}

/* ==== Ajuste uniforme de imágenes ==== */
.card-image {
  width: 100%;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  overflow: hidden;
}

.card-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.card-image img:hover {
  transform: scale(1.05);
}

.hero {
  position: relative;
}

.hero-mark {
  position: absolute;
  top: 5px;
  right: 65px;
  width: clamp(240px, 36vw, 480px);
  opacity: .15;
  filter: saturate(1) contrast(1.05);
  pointer-events: none;
  user-select: none;
}

@media (max-width: 760px) {
  .hero-mark {
    top: 22px;
    right: 16px;
    width: clamp(120px, 26vw, 180px);
    opacity: .18;
  }
}