/* ============================================================
   M2Digital — Stylesheet
   Paleta: Azul profesional / Índigo
   ============================================================ */

/* === TOKENS === */
:root {
  --bg:      #0f1117;
  --bg2:     rgba(255,255,255,.014);
  --panel:   rgba(255,255,255,.055);
  --panel2:  rgba(255,255,255,.085);
  --text:    rgba(255,255,255,.92);
  --muted:   rgba(255,255,255,.58);
  --stroke:  rgba(255,255,255,.09);

  /* Colores de marca */
  --accent:  #1565c0;   /* azul M2Digital */
  --accent2: #cc1f1f;   /* rojo M2Digital */
  --accent-blue: #1565c0;
  --accent-red:  #cc1f1f;

  --shadow-sm: 0 4px 18px rgba(0,0,0,.20);
  --shadow-md: 0 14px 44px rgba(0,0,0,.30);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;

  --container: 1120px;
}

[data-theme="light"] {
  --bg:      #f5f6fa;
  --bg2:     rgba(0,0,0,.018);
  --panel:   rgba(0,0,0,.038);
  --panel2:  rgba(0,0,0,.062);
  --text:    rgba(12,14,22,.92);
  --muted:   rgba(12,14,22,.54);
  --stroke:  rgba(12,14,22,.088);

  --accent:  #1565c0;
  --accent2: #cc1f1f;
  --accent-blue: #1565c0;
  --accent-red:  #cc1f1f;

  --shadow-sm: 0 4px 18px rgba(0,0,0,.07);
  --shadow-md: 0 14px 44px rgba(0,0,0,.11);
}

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box }
html { scroll-behavior: smooth }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  letter-spacing: -0.01em;
  color: var(--text);
  text-rendering: geometricPrecision;
  background:
    radial-gradient(900px 500px at 10% 0%,   rgba(21,101,192,.14),  transparent 60%),
    radial-gradient(700px 400px at 88% 12%,  rgba(204,31,31,.09),   transparent 55%),
    var(--bg);
}

[data-theme="light"] body,
[data-theme="light"] {
  background:
    radial-gradient(900px 500px at 10% 0%,   rgba(21,101,192,.09),  transparent 55%),
    radial-gradient(700px 400px at 88% 12%,  rgba(204,31,31,.06),   transparent 50%),
    var(--bg);
}

a { color: inherit }
p { max-width: 74ch; hyphens: none; overflow-wrap: break-word; text-align: justify }

.container { max-width: var(--container); margin: 0 auto; padding: 0 22px }
.muted      { color: var(--muted) }
.hide-sm    { display: inline }

/* === HEADER === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--bg) 65%, transparent);
  border-bottom: 1px solid var(--stroke);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  text-decoration: none;
}

/* Ícono del logo (bicho) */
.brand-logo-wrap {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  overflow: hidden;
}
.brand-logo { width: 40px; height: auto; display: block }

/* Wordmark (letras) */
.brand-wordmark {
  display: flex;
  align-items: center;
}
.brand-wordmark img {
  height: 28px;
  width: auto;
  display: block;
}

/* Visibilidad por tema — logo ícono */
.logo-dark, .logo-light     { display: none }
html[data-theme="light"] .logo-light { display: block }
html[data-theme="light"] .logo-dark  { display: none  }
html[data-theme="dark"]  .logo-dark  { display: block }
html[data-theme="dark"]  .logo-light { display: none  }

/* Visibilidad por tema — wordmark */
.wordmark-dark, .wordmark-light { display: none }
html[data-theme="light"] .wordmark-light { display: block }
html[data-theme="light"] .wordmark-dark  { display: none  }
html[data-theme="dark"]  .wordmark-dark  { display: block }
html[data-theme="dark"]  .wordmark-light { display: none  }

/* Nav */
.nav { display: flex; align-items: center; gap: 12px; position: relative }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--stroke);
  background: var(--panel);
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  width: 18px;
  background: var(--text);
  border-radius: 2px;
}

.nav-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  text-decoration: none;
  color: color-mix(in srgb, var(--text) 78%, transparent);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: .92rem;
  font-weight: 500;
  transition: background .12s ease, color .12s ease;
}
.nav-link:hover { background: var(--panel); color: var(--text) }

.nav-cta { margin-left: 6px }

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--stroke);
  background: var(--panel);
  text-decoration: none;
  cursor: pointer;
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: -.01em;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover  { transform: translateY(-1px); box-shadow: var(--shadow-sm) }
.btn:active { transform: translateY(0); box-shadow: none }

.btn-primary {
  background: var(--accent-blue);
  border-color: transparent;
  color: #fff;
}
.btn-primary:hover {
  background: color-mix(in srgb, var(--accent-blue) 82%, #000);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--accent-blue) 38%, transparent);
}

.btn-ghost:hover { background: var(--panel2) }

.btn-whatsapp {
  background: #25d366;
  border-color: #1eb855;
  color: #fff !important;
}
.btn-whatsapp:hover {
  background: #1eb855;
  box-shadow: 0 6px 18px rgba(37,211,102,.35);
}

.theme-toggle { color: var(--text) }

/* === HERO === */
.hero {
  position: relative;
  padding: 52px 0 36px;
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: .40;
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1 }

.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr .85fr;
  gap: 28px;
  align-items: start;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 3.6vw, 48px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.accent {
  color: var(--accent-blue);
}

.lead {
  color: color-mix(in srgb, var(--text) 76%, transparent);
  font-size: 1.04rem;
  line-height: 1.72;
}

.pill {
  display: inline-flex;
  padding: 7px 13px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: var(--panel);
  color: color-mix(in srgb, var(--text) 72%, transparent);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .01em;
  margin: 0 0 18px;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0 18px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px;
  margin-top: 12px;
}
.stat {
  padding: 13px;
  border-radius: var(--radius-md);
  border: 1px solid var(--stroke);
  background: var(--panel);
}
.stat strong { display: block; font-size: .92rem; font-weight: 700 }
.stat span   { display: block; color: var(--muted); margin-top: 3px; font-size: .85rem }

/* Hero card */
.glass {
  border-radius: var(--radius-lg);
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  box-shadow: var(--shadow-md);
  padding: 20px;
}

.hero-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-logo {
  width: min(340px, 100%);
  height: auto;
  display: block;
  filter: drop-shadow(0 16px 36px rgba(0,0,0,.22));
  margin-bottom: 8px;
}

.checklist {
  margin: 0;
  padding: 0;
  list-style: none;
  color: color-mix(in srgb, var(--text) 76%, transparent);
  line-height: 1.9;
  font-size: .95rem;
  text-align: left;
  width: 100%;
}
.checklist li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 700;
  margin-right: 8px;
}

.quick-contact {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 100%;
}
.quick-contact .mini {
  text-decoration: none;
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--stroke);
  background: var(--panel);
  font-size: .88rem;
  transition: background .12s ease;
}
.quick-contact .mini:hover { background: var(--panel2) }

/* === SECTIONS === */
.section { padding: 40px 0 }
.section.alt {
  background: var(--bg2);
  border-top:    1px solid var(--stroke);
  border-bottom: 1px solid var(--stroke);
}

.section-head { margin-bottom: 18px }
.section-head h2 {
  margin: 0 0 10px;
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.section-head p {
  margin: 0;
  color: color-mix(in srgb, var(--text) 72%, transparent);
  line-height: 1.72;
  max-width: 82ch;
}

/* Section icons (Font Awesome en títulos) */
.section-icon {
  color: var(--accent);
  margin-right: 9px;
  font-size: .88em;
  opacity: .85;
}

/* === CARDS === */
.cards-3, .grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 14px;
}

.card {
  border-radius: var(--radius-md);
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--accent) 22%, var(--stroke));
}
.card h3 {
  margin: 0 0 8px;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
}
.card p { margin: 0; color: color-mix(in srgb, var(--text) 72%, transparent); line-height: 1.7 }
.card a { color: inherit; text-decoration: none }
.card a:hover { text-decoration: underline }

/* Card icon */
.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  font-size: .92rem;
  margin-bottom: 12px;
}
.card h3 .card-icon { display: flex }

/* === KPI ROW === */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 10px;
  margin-top: 10px;
}
.kpi {
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--stroke);
  background: var(--panel);
}
.kpi strong { display: block; font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em }
.kpi span   { display: block; color: var(--muted); margin-top: 4px; font-size: .88rem }

/* === SERVICES FILTER === */
.service-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 18px;
}
.chip {
  border: 1px solid var(--stroke);
  background: var(--panel);
  color: color-mix(in srgb, var(--text) 78%, transparent);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: .88rem;
  font-weight: 500;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.chip:hover  { background: var(--panel2); color: var(--text) }
.chip.active {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--stroke));
  color: var(--text);
  font-weight: 600;
}

/* === FAQ === */
.faq details {
  border: 1px solid var(--stroke);
  border-radius: var(--radius-md);
  background: var(--panel);
  padding: 13px 16px;
  margin-bottom: 9px;
}
.faq summary       { cursor: pointer; font-weight: 600; font-size: .96rem }
.faq p {
  color: color-mix(in srgb, var(--text) 72%, transparent);
  line-height: 1.7;
  margin: 10px 0 0;
}

/* === CONTACT === */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}
.contact-card, .form {
  border-radius: var(--radius-lg);
  border: 1px solid var(--stroke);
  background: var(--panel);
  padding: 20px;
  box-shadow: var(--shadow-md);
}
.contact-list {
  list-style: none;
  padding: 0; margin: 10px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.contact-list li  { display: flex; gap: 10px; align-items: center }
.contact-list a   { text-decoration: none }
.contact-list a:hover { text-decoration: underline }
.contact-ico {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  min-width: 30px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent-blue) 13%, transparent);
  color: var(--accent-blue);
  font-size: .85rem;
}

/* Forms */
.field         { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px }
label          { font-weight: 600; font-size: .9rem }
input, select, textarea {
  border-radius: var(--radius-sm);
  border: 1px solid var(--stroke);
  background: color-mix(in srgb, var(--bg) 70%, #000 30%);
  color: var(--text);
  padding: 11px 13px;
  outline: none;
  width: 100%;
  font-family: inherit;
  font-size: .95rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea { background: rgba(255,255,255,.92) }

input::placeholder, textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 75%, transparent);
}
input:focus, select:focus, textarea:focus {
  border-color: color-mix(in srgb, var(--accent) 52%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent);
}

.form-hint  { margin: 10px 0 0; color: var(--muted); font-size: .88rem; line-height: 1.6 }
.form-ok    { margin: 10px 0 0; color: #34d399; font-weight: 700 }
.form-error { margin: 10px 0 0; color: #f87171; font-weight: 700 }

.hp-field {
  position: absolute;
  left: -10000px; top: auto;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* === FOOTER === */
.site-footer {
  border-top: 3px solid var(--accent-blue);
  background: color-mix(in srgb, var(--bg) 88%, #000 12%);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.25fr .85fr .9fr;
  gap: 20px;
  padding: 36px 0;
  align-items: start;
}

.footer-col   { min-width: 0 }
.footer-title {
  margin: 6px 0 13px;
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text) 72%, transparent);
}

.footer-logo img { width: 160px; height: auto; display: block }
.footer-brand p  { margin: 10px 0 12px; line-height: 1.7; font-size: .92rem }

.footer-badges { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px }
.badge {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--panel);
  color: color-mix(in srgb, var(--text) 72%, transparent);
  font-size: .8rem;
  font-weight: 500;
}

.footer-links { display: flex; flex-direction: column; gap: 4px }
.footer-links a {
  text-decoration: none;
  color: color-mix(in srgb, var(--text) 72%, transparent);
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: .92rem;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.footer-links a:hover {
  background: var(--panel);
  border-color: var(--stroke);
  color: var(--text);
}

.footer-contact {
  list-style: none;
  padding: 0; margin: 0 0 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-contact li {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--stroke);
  background: var(--panel);
}
.footer-contact .ico        { width: 20px; text-align: center; color: var(--accent) }
.footer-contact .ico i      { font-size: 1em }
.footer-contact a           { text-decoration: none; color: color-mix(in srgb, var(--text) 82%, transparent); font-size: .9rem }
.footer-contact a:hover     { text-decoration: underline }
.footer-cta                 { width: 100%; margin-top: 6px; justify-content: center }

.footer-bottom { border-top: 1px solid var(--stroke); background: color-mix(in srgb, var(--bg) 94%, #000 6%) }
.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  font-size: .85rem;
}

/* === BREADCRUMB === */
.breadcrumb { padding: 16px 0 0 }
.breadcrumb a { color: color-mix(in srgb, var(--text) 72%, transparent); text-decoration: none }
.breadcrumb a:hover { text-decoration: underline }

/* === REVEAL ANIMATION === */
.reveal { opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s ease }
.reveal.is-visible { opacity: 1; transform: none }

/* === WHATSAPP FLOAT === */
.wa-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: #25d366;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  z-index: 9999;
  box-shadow: 0 8px 24px rgba(0,0,0,.22);
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
  outline: none;
}
.wa-float:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 12px 30px rgba(0,0,0,.26);
}
.wa-float:focus-visible {
  box-shadow: 0 0 0 4px rgba(37,211,102,.35), 0 8px 24px rgba(0,0,0,.22);
}
.wa-float i { position: relative; z-index: 1 }

/* Pulse ring */
.wa-float::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 999px;
  background: rgba(37,211,102,.22);
  animation: waPulse 2s ease-out infinite;
}
@keyframes waPulse {
  0%   { transform: scale(.92); opacity: .85 }
  70%  { transform: scale(1.32); opacity: 0 }
  100% { transform: scale(1.32); opacity: 0 }
}

/* Tooltip */
.wa-tooltip {
  position: absolute;
  right: 64px;
  bottom: 50%;
  transform: translateY(50%);
  background: rgba(10,14,24,.96);
  color: #fff;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: .82rem;
  white-space: nowrap;
  box-shadow: 0 8px 22px rgba(0,0,0,.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease;
}
.wa-tooltip::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 10px; height: 10px;
  background: rgba(10,14,24,.96);
}
.wa-float:hover .wa-tooltip,
.wa-float:focus-visible .wa-tooltip { opacity: 1 }

/* === ACCESIBILIDAD === */
::selection { background: color-mix(in srgb, var(--accent) 32%, transparent) }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 65%, transparent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* === EYEBROW === */
.eyebrow {
  display: block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

/* === HERO REDESIGN === */
.hero-content { display: flex; flex-direction: column; justify-content: center }

/* Service panel (hero aside) */
.service-panel {
  border-radius: var(--radius-lg);
  border: 1px solid var(--stroke);
  background: linear-gradient(160deg, var(--panel2), var(--panel));
  box-shadow: var(--shadow-md);
  padding: 22px;
}

.panel-label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
  max-width: none;
}

.sh-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sh-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--stroke);
  background: var(--panel);
}
.sh-item > div { display: flex; flex-direction: column; justify-content: center; min-width: 0 }
.sh-item strong { display: block; font-size: .91rem; font-weight: 600; line-height: 1.2 }
.sh-item span   { display: block; font-size: .80rem; color: var(--muted); margin-top: 2px; line-height: 1.2 }

/* ── Icon boxes: centrado con position absolute (infalible con FA) ── */
.sh-icon {
  position: relative;
  width: 38px; height: 38px;
  min-width: 38px;
  flex-shrink: 0;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--accent);
  font-size: 1rem;
}
.svc-icon {
  position: relative;
  display: block;
  width: 38px; height: 38px;
  min-width: 38px;
  border-radius: var(--radius-sm);
  background: var(--accent-blue);
  color: #fff;
  font-size: .95rem;
  margin-bottom: 12px;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent-blue) 32%, transparent);
}
.fl-icon {
  position: relative;
  width: 30px; height: 30px;
  min-width: 30px;
  flex-shrink: 0;
  margin-top: 1px;
  border-radius: 8px;
  background: var(--accent-red);
  color: #fff;
  font-size: .82rem;
  box-shadow: 0 3px 10px color-mix(in srgb, var(--accent-red) 28%, transparent);
}
.card-icon {
  position: relative;
  width: 36px; height: 36px;
  min-width: 36px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--accent-blue) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-blue) 20%, transparent);
  color: var(--accent-blue);
  font-size: .92rem;
  margin-bottom: 10px;
  display: block;
}

/* Ícono centrado con absolute — funciona con cualquier FA */
.sh-icon i, .svc-icon i, .fl-icon i, .card-icon i {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  line-height: 1;
  display: block;
}

.panel-contact {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--stroke);
}
.panel-contact a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--stroke);
  background: var(--panel);
  text-decoration: none;
  font-size: .88rem;
  color: color-mix(in srgb, var(--text) 80%, transparent);
  transition: background .12s ease, color .12s ease;
}
.panel-contact a:hover { background: var(--panel2); color: var(--text) }
.panel-contact i { color: var(--accent); width: 14px; text-align: center }

/* === STATS BAR === */
.stats-bar {
  padding: 13px 0;
}
[data-theme="light"] .stats-bar {
  background: var(--accent-blue);
}
[data-theme="dark"] .stats-bar {
  background: color-mix(in srgb, #0f1117 92%, var(--accent-blue) 8%);
  border-top: 3px solid var(--accent-blue);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .88rem;
  font-weight: 600;
  flex: 1;
  min-width: 160px;
  justify-content: center;
}
[data-theme="light"] .stat-item       { color: rgba(255,255,255,.92) }
[data-theme="light"] .stat-item i     { color: rgba(255,255,255,.85) }
[data-theme="dark"]  .stat-item       { color: var(--text) }
[data-theme="dark"]  .stat-item i     { color: var(--accent-blue) }

.stat-divider {
  width: 1px;
  height: 22px;
  flex-shrink: 0;
}
[data-theme="light"] .stat-divider { background: rgba(255,255,255,.25) }
[data-theme="dark"]  .stat-divider { background: rgba(255,255,255,.10) }

/* === SERVICES GRID === */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.svc-card {
  border-radius: var(--radius-md);
  border: 1px solid var(--stroke);
  border-top: 3px solid var(--accent);
  background: linear-gradient(160deg, var(--panel2), var(--panel));
  padding: 18px 18px;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .18s ease, border-color .18s ease;
}
.svc-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--accent) 24%, var(--stroke));
}
.svc-card h3 {
  margin: 0 0 9px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -.015em;
}
.svc-card p {
  margin: 0;
  font-size: .9rem;
  color: color-mix(in srgb, var(--text) 70%, transparent);
  line-height: 1.7;
}

.section-cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 4px;
}

/* === PROCESO === */
.process-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: 0;
  align-items: start;
  margin-top: 8px;
}

.process-step {
  background: linear-gradient(160deg, var(--panel2), var(--panel));
  border: 1px solid var(--stroke);
  border-radius: var(--radius-md);
  padding: 18px 16px;
  text-align: center;
  position: relative;
}

.process-num {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.process-icon {
  position: relative;
  width: 40px; height: 40px;
  min-width: 40px;
  margin: 0 auto 10px;
  border-radius: var(--radius-sm);
  background: var(--accent-red);
  color: #fff;
  font-size: 1.15rem;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent-red) 32%, transparent);
}
.process-icon i {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  line-height: 1;
  display: block;
}

.process-step h3 {
  margin: 0 0 8px;
  font-size: .98rem;
  font-weight: 700;
  letter-spacing: -.01em;
}
.process-step p {
  margin: 0;
  font-size: .86rem;
  color: color-mix(in srgb, var(--text) 68%, transparent);
  line-height: 1.65;
  max-width: none;
}

.process-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  margin-top: 36px;
  color: color-mix(in srgb, var(--accent) 50%, transparent);
  font-size: .9rem;
}

/* === RESPUESTA RÁPIDA === */
.response-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: center;
}

.response-content h2 { margin: 8px 0 14px }
.response-content > p { line-height: 1.75; margin: 0 }

.response-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.resp-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--stroke);
  background: linear-gradient(160deg, var(--panel2), var(--panel));
  transition: transform .15s ease, box-shadow .15s ease;
}
.resp-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.resp-card strong { display: block; font-size: .9rem; font-weight: 700 }
.resp-card span   { display: block; font-size: .80rem; color: var(--muted); margin-top: 2px }

.resp-icon {
  position: relative;
  width: 38px; height: 38px;
  min-width: 38px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--accent-red);
  color: #fff;
  font-size: .95rem;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--accent-red) 28%, transparent);
}
.resp-icon i {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  line-height: 1;
  display: block;
}

/* === WHY GRID === */
.why-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 28px;
  align-items: center;
}

.why-content h2 { margin: 8px 0 14px }
.why-content > p { margin: 0 0 24px; line-height: 1.75 }

.feature-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.feature-list li {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  font-size: .93rem;
  line-height: 1.65;
  color: color-mix(in srgb, var(--text) 82%, transparent);
  max-width: none;
}
.feature-list strong { color: var(--text) }

/* Why aside card */
.why-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--stroke);
  background: linear-gradient(160deg, var(--panel2), var(--panel));
  box-shadow: var(--shadow-md);
  padding: 24px;
}

.cap-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.cap-item {
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--stroke);
  background: var(--panel);
}
.cap-item strong { display: block; font-size: .95rem; font-weight: 700; letter-spacing: -.01em }
.cap-item span   { display: block; font-size: .82rem; color: var(--muted); margin-top: 3px }

/* === CTA BAND === */
.cta-band {
  padding: 44px 0;
  background: var(--accent-blue);
  border-top: none;
  border-bottom: none;
}

/* Modo claro: fondo azul con texto blanco */
[data-theme="light"] .cta-band { background: var(--accent-blue) }
[data-theme="light"] .cta-band,
[data-theme="light"] .cta-band * { color: #fff }
[data-theme="light"] .cta-inner > p { color: rgba(255,255,255,.82) }
[data-theme="light"] .cta-band .btn-primary {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.40);
  color: #fff;
}
[data-theme="light"] .cta-band .btn-primary:hover { background: rgba(255,255,255,.28) }
[data-theme="light"] .cta-band .btn-ghost { border-color: rgba(255,255,255,.40); color: #fff }
[data-theme="light"] .cta-band .btn-ghost:hover { background: rgba(255,255,255,.14) }

/* Modo oscuro: fondo oscuro con acento azul */
[data-theme="dark"] .cta-band {
  background: color-mix(in srgb, #0f1117 92%, var(--accent-blue) 8%);
  border-top: 3px solid var(--accent-blue);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
[data-theme="dark"] .cta-inner h2 { color: var(--text) }
[data-theme="dark"] .cta-inner > p { color: var(--muted) }
[data-theme="dark"] .cta-band .btn-primary {
  background: var(--accent-blue);
  border-color: transparent;
  color: #fff;
}
[data-theme="dark"] .cta-band .btn-primary:hover {
  background: color-mix(in srgb, var(--accent-blue) 82%, #000);
}
[data-theme="dark"] .cta-band .btn-ghost {
  border-color: rgba(255,255,255,.18);
  color: var(--text);
}
[data-theme="dark"] .cta-band .btn-ghost:hover { background: rgba(255,255,255,.07) }
.cta-inner { text-align: center }
.cta-inner h2 {
  margin: 0 0 10px;
  font-size: clamp(22px, 2.8vw, 34px);
  font-weight: 800;
  letter-spacing: -.025em;
}
.cta-inner > p {
  margin: 0 auto;
  font-size: 1rem;
  max-width: 52ch;
}

/* === DARK MODE: mejoras específicas === */
[data-theme="dark"] .service-panel,
[data-theme="dark"] .why-card {
  background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.04));
  border-color: rgba(255,255,255,.12);
}

[data-theme="dark"] .sh-item {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.10);
}

[data-theme="dark"] .panel-contact a {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.10);
  color: rgba(255,255,255,.82);
}
[data-theme="dark"] .panel-contact a:hover {
  background: rgba(255,255,255,.11);
  color: #fff;
}

[data-theme="dark"] .svc-card {
  background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.04));
  border-color: rgba(255,255,255,.10);
}

[data-theme="dark"] .process-step {
  background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.04));
  border-color: rgba(255,255,255,.10);
}

[data-theme="dark"] .resp-card {
  background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.04));
  border-color: rgba(255,255,255,.10);
}

[data-theme="dark"] .cap-item {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.10);
}

[data-theme="dark"] .footer-contact li {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.10);
}

[data-theme="dark"] .sh-icon {
  background: color-mix(in srgb, var(--accent-blue) 22%, transparent);
  border-color: color-mix(in srgb, var(--accent-blue) 35%, transparent);
}

/* ============================================================
   RESPONSIVE — mobile first, 4 breakpoints
   ============================================================ */

/* --- Tablet landscape / small desktop (≤ 1024px) --- */
@media (max-width: 1024px) {
  .hero-grid       { gap: 20px }
  .process-grid    { gap: 6px }
  .why-grid        { gap: 24px }
  .response-grid   { gap: 28px }
}

/* --- Tablet portrait (≤ 920px) --- */
@media (max-width: 920px) {
  /* Nav */
  .hide-sm    { display: none }
  .nav-toggle { display: inline-flex }
  .nav-list {
    position: absolute;
    right: 0; top: 54px;
    width: min(360px, calc(100vw - 32px));
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 10px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--stroke);
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-md);
    z-index: 100;
  }
  .nav-list.open { display: flex }
  .nav-link      { padding: 11px 12px }
  .nav-cta       { margin-left: 0 }

  /* Layout */
  .hero              { padding: 40px 0 28px }
  .hero-grid         { grid-template-columns: 1fr }
  .section           { padding: 32px 0 }
  .cta-band          { padding: 36px 0 }

  /* Grids */
  .cards-3,
  .grid-3            { grid-template-columns: 1fr 1fr }
  .kpi-row           { grid-template-columns: 1fr 1fr }
  .contact-grid      { grid-template-columns: 1fr }
  .services-grid     { grid-template-columns: 1fr 1fr }
  .why-grid          { grid-template-columns: 1fr }
  .response-grid     { grid-template-columns: 1fr }
  .response-cards    { grid-template-columns: 1fr 1fr }
  .process-grid      { grid-template-columns: 1fr 1fr; gap: 12px }
  .process-arrow     { display: none }

  /* Stats bar */
  .stat-divider      { display: none }
  .stats-row         { flex-wrap: wrap; gap: 6px; justify-content: center }
  .stat-item         { flex: 0 0 calc(50% - 3px); justify-content: center; min-width: 0 }

  /* Hover effects off on touch */
  .card:hover,
  .svc-card:hover,
  .resp-card:hover   { transform: none; box-shadow: var(--shadow-sm) }

  /* Footer */
  .footer-grid           { grid-template-columns: 1fr; padding: 24px 0 }
  .footer-logo img       { margin: 0 auto }
  .footer-title          { text-align: center }
  .footer-links          { align-items: center }
  .footer-links a        { text-align: center }
  .footer-contact li     { justify-content: center }
  .footer-badges         { justify-content: center }
  .footer-bottom-inner   { flex-direction: column; text-align: center; gap: 6px }

  /* WhatsApp */
  .wa-float { right: 14px; bottom: 14px; width: 50px; height: 50px; font-size: 23px }
}

/* --- Mobile grande (≤ 640px) --- */
@media (max-width: 640px) {
  .hero              { padding: 32px 0 24px }
  .hero h1           { font-size: clamp(24px, 7vw, 34px) }
  .hero-actions      { flex-direction: column; align-items: flex-start }
  .hero-actions .btn { width: 100%; justify-content: center }

  .cards-3,
  .grid-3            { grid-template-columns: 1fr }
  .services-grid     { grid-template-columns: 1fr }
  .process-grid      { grid-template-columns: 1fr }
  .response-cards    { grid-template-columns: 1fr }
  .cap-grid          { grid-template-columns: 1fr 1fr }
  .stats-row         { flex-direction: column; align-items: center }
  .stat-item         { flex: unset; width: 100%; justify-content: center }

  .section-head h2   { font-size: clamp(20px, 6vw, 26px) }
  .section-cta       { flex-direction: column }
  .section-cta .btn  { width: 100%; justify-content: center }

  .cta-inner h2      { font-size: clamp(18px, 5.5vw, 26px) }
  .cta-inner .hero-actions { flex-direction: column; align-items: center }
  .cta-inner .btn    { width: 100%; max-width: 280px }

  .why-card          { padding: 18px }
  .service-panel     { padding: 16px }

  /* WA tooltip arriba en móvil */
  .wa-tooltip {
    right: 50%;
    bottom: 62px;
    transform: translateX(50%);
  }
  .wa-tooltip::after {
    right: 50%; top: auto;
    bottom: -5px;
    transform: translateX(50%) rotate(45deg);
  }
  .wa-float:hover .wa-tooltip,
  .wa-float:focus-visible .wa-tooltip {
    transform: translateX(50%) translateY(-2px);
  }
}

/* --- Mobile pequeño (≤ 400px) --- */
@media (max-width: 400px) {
  .container         { padding: 0 14px }
  .hero h1           { font-size: clamp(22px, 8vw, 30px) }
  .brand-text small  { display: none }
  .cap-grid          { grid-template-columns: 1fr }
  .process-num       { font-size: .68rem }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important }
}
