/* ============================================================
   MikroTik Chile — hoja de estilos
   Tokens, tipografía fluida, layout y componentes.
   ============================================================ */

/* ---------- Fuentes self-host ---------- */
@font-face {
  font-family: "Geist";
  src: url("/static/fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/static/fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --ink: #252e3d;
  --ink-soft: rgba(37, 46, 61, .72);
  --muted: #6b7280;
  --bg: #ffffff;
  --bg-soft: #f3f6f5;
  --bg-soft-2: #fafafa;
  --line: rgba(37, 46, 61, .10);
  --green: #2e9f7d;
  --green-ink: #1f7d61;
  --green-soft: #ecfdf5;
  --red: #e31033;
  --wa: #25d366;

  --radius: 16px;
  --radius-lg: 24px;
  --maxw: 1180px;
  --gap: clamp(1rem, 3vw, 2rem);
  --section-y: clamp(3.5rem, 8vw, 7rem);
  --shadow: 0 12px 40px rgba(37, 46, 61, .09);
  --shadow-sm: 0 4px 16px rgba(37, 46, 61, .07);

  --font: "Geist", "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  /* Offset al saltar a un ancla del menú. Escala inverso al padding-top de las
     secciones (var --section-y = clamp 56→112px) para dejar un hueco CONSTANTE de
     ~60px bajo el header (~68px) en cualquier ancho, en vez de los ~127px que
     dejaba el valor fijo de 84px (quedaba "muy arriba" en desktop). */
  scroll-padding-top: clamp(16px, calc(128px - 8vw), 72px);
  -webkit-text-size-adjust: 100%;
  /* Bloqueo de zoom por gestos (pinch + doble-tap) en touch; deja scroll vertical/horizontal */
  touch-action: pan-x pan-y;
}
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: clamp(1rem, .96rem + .2vw, 1.06rem);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0; font-weight: 600; }
p { margin: 0 0 1rem; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2rem); }
.container.narrow { max-width: 820px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff;
  padding: .6rem 1rem; border-radius: 0 0 8px 0; z-index: 200;
}
.skip-link:focus { left: 0; }

/* ---------- Tipografía de sección ---------- */
.section { padding-block: var(--section-y); }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .8rem; font-weight: 600; letter-spacing: .02em; color: var(--green-ink);
  margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.eyebrow.center { justify-content: center; }
.section-title { font-size: clamp(1.6rem, 1rem + 2.6vw, 2.5rem); max-width: 22ch; text-wrap: balance; letter-spacing: -.4px; }
.section-title.center { margin-inline: auto; text-align: center; }
.section-lead { color: var(--ink-soft); max-width: 60ch; margin-top: 1rem; font-size: 1.05rem; }
.section-lead.center { margin-inline: auto; }
/* Quiebres de línea limpios: sin viudas ni palabras cortas colgando a fin de línea */
.section-lead, .lp-hero-sub, .check-list li, .faq-answer p, .lp-final-body, .lp-scarcity { text-wrap: pretty; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.4rem; border-radius: 999px; font-weight: 600; font-size: .95rem;
  border: 1px solid transparent;
  transition: transform .25s cubic-bezier(.4, 0, .2, 1), background-color .25s ease, box-shadow .25s ease, border-color .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); transition-duration: .05s; }
.btn-lg { padding: 1rem 1.7rem; font-size: 1rem; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #2c3749; box-shadow: 0 10px 24px rgba(37, 46, 61, .3); }
.btn-wa { background: var(--wa); color: #06311c; }
.btn-wa:hover { background: #2bdd6e; box-shadow: 0 10px 26px rgba(37, 211, 102, .4); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--bg-soft); border-color: rgba(37, 46, 61, .18); box-shadow: var(--shadow-sm); }
.btn-ghost-light { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .25); color: #fff; }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .42); }

/* ---------- WhatsApp ---------- */
.btn-wa svg, .wa-link svg, .wa-fab svg { flex-shrink: 0; }
.btn-wa svg { width: 1.35em; height: 1.35em; }
/* Enlace secundario "o conversa por WhatsApp" (bajo el CTA del hero) */
.wa-link { display: inline-flex; align-items: center; gap: .45rem; color: var(--green-ink); font-weight: 600; font-size: .95rem; }
.wa-link svg { width: 1.25em; height: 1.25em; color: var(--wa); }
.wa-link:hover { color: var(--green); }
.contact-actions { margin-top: 1.6rem; }
/* Botón flotante de WhatsApp (todas las páginas) */
.wa-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 200;
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--wa); color: #06311c; padding: .7rem 1.05rem .7rem .85rem;
  border-radius: 999px; font-weight: 600; font-size: .95rem;
  box-shadow: 0 8px 24px rgba(37, 211, 102, .45);
  transition: transform .2s ease, box-shadow .2s ease;
}
.wa-fab:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(37, 211, 102, .55); }
.wa-fab svg { width: 26px; height: 26px; }
@media (max-width: 640px) {
  .wa-fab { right: 14px; bottom: 14px; padding: .8rem; }
  .wa-fab-label { display: none; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 600; }
.brand-logo { border-radius: 7px; }
.brand-name { font-size: 1.05rem; letter-spacing: -.02em; }
.main-nav { display: flex; align-items: center; }
.nav-links { display: flex; align-items: center; gap: 1.6rem; }
.nav-links a:not(.btn) { font-size: .94rem; color: var(--ink-soft); transition: color .2s; }
.nav-links a:not(.btn):hover { color: var(--ink); }
.nav-cta a { color: #fff; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: .4rem; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: .3s; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(1.25rem, 3vw, 2.5rem) var(--section-y); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: stretch; }
.hero-title { font-size: clamp(2.2rem, 1rem + 3.9vw, 3.85rem); font-weight: 600; line-height: 1.14; letter-spacing: -1.7px; text-wrap: balance; }
.hero-title span { display: block; }
.hero-title em { font-style: italic; }
.hero-sub { color: var(--ink-soft); font-size: 1.125rem; font-weight: 300; line-height: 1.6; margin: 1.4rem 0 2rem; max-width: 46ch; }
.hero-sub p { margin: 0 0 1rem; }
.hero-sub p:last-child { margin-bottom: 0; }
.hero-sub strong { font-weight: 600; color: var(--ink); }
.hero-actions { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.hero-actions .btn-lg { font-size: 1.125rem; font-weight: 300; }
.btn-arrow { display: inline-flex; align-items: center; justify-content: center; width: 1.7em; height: 1.7em; border-radius: 50%; background: rgba(255, 255, 255, .16); font-size: .8em; flex-shrink: 0; }
.hero-rating { display: flex; flex-wrap: wrap; align-items: center; column-gap: .7rem; row-gap: .4rem; }
.hero-rating-score { display: flex; flex-direction: column; }
.hero-rating .stars { color: #f5a623; font-size: .95rem; letter-spacing: 2px; line-height: 1; margin-bottom: .2rem; }
.hero-rating strong { font-size: 1rem; font-weight: 500; line-height: 1.2; }
.hero-rating-note { flex-basis: 100%; font-size: 1rem; font-weight: 300; line-height: 1.45; }
.avatars { display: flex; }
.avatars img {
  width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff; margin-left: -10px;
  object-fit: cover; box-shadow: var(--shadow-sm);
}
.avatars img:first-child { margin-left: 0; }

.hero-panel {
  position: relative; height: 100%; min-height: 360px; background: var(--bg-soft);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
/* display:contents hace que el <picture> sea transparente al layout (el <img> participa directo) */
.hero-panel picture { display: contents; }
.hero-panel img { width: 100%; height: 100%; object-fit: cover; object-position: center; border-radius: var(--radius-lg); }
.badge {
  position: absolute; background: rgba(255, 255, 255, .9); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: 12px; padding: .55rem .8rem; font-size: 1rem;
  font-weight: 300; box-shadow: var(--shadow-sm); max-width: 12rem; line-height: 1.4;
}
.badge b { display: block; color: var(--ink); font-size: 1.75rem; font-weight: 500; line-height: 1; margin-bottom: .15rem; }
.badge-top { top: 8%; right: -6%; }
.badge-mid { top: 38%; left: -7%; padding-left: 1.9rem; }
.badge-mid::before { content: "✓"; position: absolute; left: .7rem; color: var(--green); font-weight: 700; }
.badge-stat { bottom: 22%; left: -5%; }
.badge-bot { bottom: 6%; right: -4%; }
/* Incentivo de conversión: solo existe en mobile (ver @640) */
.badge-go { display: none; bottom: 8px; right: 8px; }

/* ---------- Nosotros / stats ---------- */
.about-grid { display: grid; grid-template-columns: 3fr 2fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.about-media img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); margin-top: 3rem; }
.stat-card { background: var(--bg-soft); border-radius: var(--radius); padding: 1.6rem; border: 1px solid var(--line); }
.stat-value { font-size: clamp(2rem, 1.4rem + 2vw, 2.8rem); font-weight: 600; color: var(--ink); letter-spacing: -.03em; }
.stat-label { font-weight: 600; margin-top: .4rem; }
.stat-desc { color: var(--muted); font-size: .9rem; margin: .5rem 0 0; }

/* ---------- Expertise ---------- */
.section-expertise { background: var(--bg-soft-2); }
.expertise-grid {
  display: grid; grid-template-columns: 1fr 1.1fr;
  grid-template-areas: "media copy" "clients copy";
  column-gap: clamp(2rem, 5vw, 4rem); row-gap: clamp(1.6rem, 4vw, 2.4rem);
  align-items: start;
}
.expertise-media { grid-area: media; }
.expertise-copy { grid-area: copy; }
.expertise-clients { grid-area: clients; align-self: start; }
.expertise-media img { border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.check-list { display: grid; gap: .9rem; margin-top: 1.6rem; }
.check-list li { position: relative; padding-left: 2rem; color: var(--ink-soft); }
.check-list li strong { color: var(--ink); }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: -1px; width: 1.4rem; height: 1.4rem;
  display: grid; place-items: center; background: var(--green-soft); color: var(--green-ink);
  border-radius: 6px; font-size: .8rem; font-weight: 700;
}
.clients-heading { text-align: center; color: var(--muted); font-size: .9rem; margin-bottom: 1.5rem; }
.clients-row { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(1.4rem, 4vw, 2.6rem); }
.client-logo { height: 32px; width: auto; object-fit: contain; }
/* Clientes dentro de la columna izquierda de Expertise (alineados a la izquierda, con línea) */
.expertise-clients .clients-heading { display: flex; align-items: center; gap: 1rem; text-align: left; margin-bottom: 1.2rem; }
.expertise-clients .clients-heading::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.expertise-clients .clients-row { justify-content: flex-start; }

/* ---------- Casos ---------- */
.cases-carousel { margin-top: 2.5rem; overflow: hidden; }
.cases-track { display: flex; transition: transform .5s cubic-bezier(.4, 0, .2, 1); }
.case-card {
  flex: 0 0 100%; display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center; padding: .3rem;
}
.case-media { position: relative; }
.case-media img { border-radius: var(--radius-lg); box-shadow: var(--shadow); aspect-ratio: 4/5; object-fit: cover; width: 100%; }
.case-tag {
  position: absolute; left: 1rem; bottom: 1rem; right: 1rem; background: rgba(37, 46, 61, .82);
  backdrop-filter: blur(6px); color: #fff; border-radius: 12px; padding: .7rem .9rem; font-size: .82rem;
}
.case-tag strong { display: block; font-size: .98rem; }
.case-body h3 { font-size: clamp(1.3rem, 1rem + 1.4vw, 1.8rem); }
.case-body p { color: var(--ink-soft); margin: 1rem 0 1.6rem; }
.case-metrics { display: flex; gap: 2.5rem; flex-wrap: wrap; }
.metric-value { display: block; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); font-weight: 600; }
.metric-label { color: var(--muted); font-size: .85rem; max-width: 16ch; }
.carousel-controls { display: flex; align-items: center; justify-content: center; gap: 1.2rem; margin-top: 2rem; }
.carousel-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: #fff;
  font-size: 1.3rem; color: var(--ink); display: grid; place-items: center; transition: .2s;
}
.carousel-btn:hover { background: var(--ink); color: #fff; }
.carousel-dots { display: flex; gap: .5rem; }
.carousel-dots button { width: 8px; height: 8px; border-radius: 50%; border: 0; background: var(--line); padding: 0; }
.carousel-dots button.active { background: var(--green); width: 22px; border-radius: 99px; }

/* ---------- Servicios ---------- */
.services-list { display: grid; gap: 1.5rem; margin-top: 2.8rem; }
.service-card {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 3vw, 2.4rem); overflow: hidden;
}
.service-card:nth-child(even) .service-media { order: -1; }
.service-copy h3 { font-size: clamp(1.2rem, 1rem + 1vw, 1.55rem); }
.service-copy p { color: var(--ink-soft); margin: .9rem 0 1.3rem; font-size: .98rem; }
.service-tags { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.tags-label { color: var(--muted); font-size: .85rem; margin-right: .2rem; }
.tag { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .35rem .8rem; font-size: .8rem; font-weight: 500; }
.service-link { display: inline-flex; gap: .4rem; margin-top: 1.2rem; color: var(--green-ink); font-weight: 600; font-size: .92rem; }
.service-link:hover { gap: .7rem; }
.service-media img { border-radius: var(--radius); box-shadow: var(--shadow-sm); aspect-ratio: 3/2; object-fit: cover; width: 100%; }

/* ---------- Tecnologías ---------- */
.section-tech { background: var(--bg-soft-2); }

/* Bloque "próximo curso" (home Certificaciones + /cursos) — ver _course_card.html */
.sub-course-wrap { padding: 1.75rem 0 0; }
.section-course-top { padding: 1.4rem 0 0.25rem; }
.section-course-top .course-card { margin-top: 0; }

/* Páginas de retorno de pago de Flow (/pago-exitoso, /pago-fallido) */
.pago-result { min-height: 58vh; display: grid; place-content: center; text-align: center; }
.pago-inner { max-width: 620px; }
.pago-badge { width: 66px; height: 66px; border-radius: 50%; display: grid; place-content: center;
  font: 700 2rem/1 "Geist", sans-serif; margin: 0 auto 1.5rem; }
.pago-badge-ok { background: var(--green-soft); color: var(--green-ink); }
.pago-badge-fail { background: #fdecec; color: #c0392b; }
.pago-result .section-title, .pago-result .section-lead { margin-inline: auto; }
.pago-actions { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }
@media (max-width: 560px) { .pago-actions { flex-direction: column; } .pago-actions .btn { width: 100%; } }
.course-card { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center;
  max-width: 940px; margin: 1.75rem auto 0; padding: 1.6rem 1.9rem; background: #fff;
  border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 16px;
  box-shadow: 0 8px 28px rgba(37, 46, 61, .08); text-align: left; }
.course-badge { display: inline-block; font: 600 .72rem/1 "Inter", sans-serif; letter-spacing: .04em;
  text-transform: uppercase; color: var(--green-ink); background: var(--green-soft);
  padding: .42rem .7rem; border-radius: 999px; margin-bottom: .9rem; }
.course-card-title { font: 600 1.4rem/1.2 "Geist", sans-serif; color: var(--ink); margin: 0 0 .3rem; }
.course-card-sub { color: var(--ink-soft); margin: 0 0 1.1rem; font-size: .96rem; max-width: 48ch; }
.course-meta { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .7rem 1.6rem; }
.course-meta li { display: flex; flex-direction: column; gap: .12rem; }
.course-meta-label { color: var(--muted); font: 600 .67rem/1 "Inter", sans-serif; letter-spacing: .05em; text-transform: uppercase; }
.course-meta-value { color: var(--ink); font-weight: 500; font-size: .93rem; }
.course-card-aside { text-align: center; min-width: 205px; padding-left: 2rem; border-left: 1px solid var(--line); }
.course-price-value { font: 700 1.9rem/1 "Geist", sans-serif; color: var(--ink); }
.course-price-unit { font-size: .9rem; color: var(--ink-soft); font-weight: 600; }
.course-price-note { display: block; font-size: .78rem; color: var(--muted); margin-top: .2rem; }
.course-pay { font-size: .82rem; color: var(--green-ink); font-weight: 500; margin: .7rem 0 1rem; }
.course-card-aside .btn { width: 100%; justify-content: center; }
.course-cta2 { margin-top: .55rem; }
@media (max-width: 720px) {
  .course-card { grid-template-columns: 1fr; gap: 1.25rem; padding: 1.4rem; }
  .course-meta { grid-template-columns: 1fr 1fr; }
  .course-card-aside { text-align: left; min-width: 0; padding-left: 0; border-left: 0;
    border-top: 1px solid var(--line); padding-top: 1.25rem; }
}
.tech-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; margin-top: 2.8rem; }
.tech-card { position: relative; display: flex; flex-direction: column; gap: .25rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; transition: transform .2s, box-shadow .2s, border-color .2s; }
.tech-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); border-color: rgba(46, 159, 125, .4); }
.tech-eyebrow { font-size: .74rem; color: var(--green-ink); font-weight: 600; }
.tech-name { font-weight: 600; font-size: 1.08rem; padding-right: 1.4rem; }
.tech-go { position: absolute; right: 1.2rem; top: 1.2rem; color: var(--muted); transition: transform .2s, color .2s; }
.tech-card:hover .tech-go { transform: translateX(3px); color: var(--green-ink); }

/* ---------- Proceso ---------- */
.section-process { background: var(--bg-soft-2); }
.process-steps { max-width: 760px; margin: 3rem auto 0; display: grid; gap: 2.2rem; position: relative; }
.process-step { display: grid; grid-template-columns: 64px 1fr; gap: 1.4rem; align-items: start; position: relative; }
.process-num { font-size: 2rem; font-weight: 700; color: var(--green); line-height: 1; }
.process-step:not(:last-child)::before {
  content: ""; position: absolute; left: 31px; top: 3rem; bottom: -2.2rem; width: 2px; background: var(--line);
}
.process-content h3 { font-size: 1.2rem; }
.process-content p { color: var(--ink-soft); margin-top: .6rem; }

/* ---------- Comparativa ---------- */
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 3rem; }
.compare-card { border-radius: var(--radius-lg); padding: clamp(1.6rem, 3vw, 2.4rem); }
.compare-card h3 { text-align: center; margin-bottom: 1.5rem; font-size: 1.25rem; }
.compare-card ul { display: grid; gap: 1rem; }
.compare-card li { position: relative; padding-left: 2rem; }
.compare-others { background: var(--bg-soft); border: 1px solid var(--line); }
.compare-others li { color: var(--muted); }
.compare-others li.x::before { content: "✕"; position: absolute; left: 0; color: var(--red); font-weight: 700; }
.compare-us { background: var(--ink); color: #fff; box-shadow: var(--shadow); }
.compare-us li.check::before { content: "✓"; position: absolute; left: 0; color: #4ad8a8; font-weight: 700; }

/* ---------- FAQ ---------- */
.section-faq { background: var(--bg-soft); }
.faq-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.faq-intro .btn { margin-top: 1.6rem; }
.faq-list { display: grid; gap: .8rem; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 0 1.3rem; transition: box-shadow .2s; }
.faq-item[open] { box-shadow: var(--shadow-sm); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 1.15rem 2rem 1.15rem 0; font-weight: 600; position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "›"; position: absolute; right: .2rem; top: 50%; transform: translateY(-50%) rotate(90deg);
  transition: transform .25s; font-size: 1.3rem; color: var(--muted);
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(-90deg); }
.faq-answer { padding-bottom: 1.2rem; color: var(--ink-soft); }
.faq-answer p { margin: 0; }

/* ---------- Contacto ---------- */
.section-contact { background: var(--ink); color: #fff; padding-block: clamp(2.5rem, 5vw, 4.25rem); }
.section-contact .eyebrow { color: #8be3c4; }
.section-contact .section-lead { color: rgba(255, 255, 255, .72); }
.contact-direct { margin-top: 1.6rem; font-weight: 500; }
.contact-direct a { color: #8be3c4; }
.contact-direct a:hover { text-decoration: underline; }
/* Sección contacto/agenda: una sola columna centrada — texto arriba, calendario ancho abajo.
   El ancho (~920px) hace que Cal.com muestre el mes + las horas LADO A LADO (cuadrado, no vertical). */
.contact-book-grid { display: grid; grid-template-columns: 1fr; gap: clamp(2rem, 4vw, 3rem); justify-items: center; text-align: center; }
.contact-book-copy { max-width: 680px; }
.contact-book-grid .eyebrow { justify-content: center; }
.contact-book-grid .section-lead { margin-inline: auto; }
.contact-book-grid .book-points { display: inline-grid; text-align: left; }
.contact-book-grid .contact-actions { display: flex; justify-content: center; }
.contact-book-copy .section-title { font-size: clamp(1.6rem, 1rem + 2vw, 2.3rem); }
.contact-book-copy .section-lead { font-size: 1.02rem; margin-top: .9rem; }
.book-points { display: grid; gap: .7rem; margin: 1.5rem 0 0; }
.book-points li { position: relative; padding-left: 1.9rem; color: rgba(255, 255, 255, .82); font-size: .97rem; }
.book-points li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--green); font-weight: 700; }
/* Calendario Cal.com: tarjeta blanca, cuadrada (mes + horas lado a lado), centrada y compacta.
   zoom encoge TODO el widget (celdas, textos) para que no se vea gigante. */
.booking-embed { width: 100%; max-width: 880px; margin-inline: auto; zoom: .82; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); background: #fff; }
.booking-embed #cal-inline { width: 100%; min-width: 300px; }
.booking-embed iframe { width: 100%; border: 0; display: block; }
/* Móvil: calendario inline acotado en altura con scroll interno → la página queda corta y compacta
   (el listado de horas hace scroll dentro de la tarjeta, no estira toda la página). */
@media (max-width: 640px) {
  .booking-embed { zoom: 1; max-height: 70vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .contact-actions { flex-direction: column; align-items: center; gap: .8rem; }
  .contact-actions .btn { width: 100%; max-width: 400px; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-soft-2); border-top: 1px solid var(--line); padding-top: clamp(2.5rem, 5vw, 4rem); }
.footer-grid { display: grid; grid-template-columns: 1.5fr .9fr .9fr 1.9fr minmax(min-content, 1.25fr); gap: clamp(1.5rem, 3vw, 2.5rem); }
.footer-tagline { color: var(--muted); font-size: .9rem; margin: 1rem 0 1.2rem; max-width: 28ch; }
.footer-social { display: flex; gap: .6rem; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff;
  transition: transform .25s cubic-bezier(.4, 0, .2, 1), background-color .25s ease, box-shadow .25s ease;
}
.footer-social a svg { width: 18px; height: 18px; display: block; }
.footer-social a:hover { background: var(--green); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(46, 159, 125, .35); }
.footer-col h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 1rem; font-weight: 600; }
.footer-col ul { display: grid; gap: .6rem; }
.footer-col-tech ul { display: block; columns: 2; column-gap: 1.4rem; }
.footer-col-tech li { margin-bottom: .6rem; break-inside: avoid; }
.footer-col a { color: var(--ink-soft); font-size: .92rem; transition: color .2s ease; }
.footer-col a:hover { color: var(--ink); }
.footer-contact a { white-space: nowrap; }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 2.5rem; padding-block: 1.5rem; }
.footer-bottom p { margin: 0; color: var(--muted); font-size: .85rem; }


/* ---------- Páginas secundarias ---------- */
.sub-hero { padding-block: clamp(2rem, 5vw, 3.5rem) var(--section-y); background: var(--bg-soft-2); }
.sub-hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 1rem; }
.breadcrumb a:hover { color: var(--ink); }
.sub-title { font-size: clamp(2rem, 1.3rem + 3vw, 3.2rem); text-wrap: balance; letter-spacing: -.6px; }
.sub-lead { color: var(--ink-soft); font-size: 1.12rem; margin: 1.3rem 0 2rem; max-width: 48ch; }
.sub-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.sub-actions.center { justify-content: center; }
.sub-hero-media img { border-radius: var(--radius-lg); box-shadow: var(--shadow); aspect-ratio: 3/2; object-fit: cover; width: 100%; }
.sub-block { margin-bottom: 2.5rem; }
.sub-block:last-child { margin-bottom: 0; }
.sub-block h2 { font-size: clamp(1.4rem, 1.1rem + 1.4vw, 1.9rem); margin-bottom: .8rem; }
.sub-block p { color: var(--ink-soft); }
/* Contenido técnico ampliado (P1-7): subtítulos, listas y bloques de código */
.sub-block h3 { font-size: 1.15rem; margin: 1.7rem 0 .6rem; }
.sub-block .sub-list { margin: 1rem 0 1.2rem 1.15rem; color: var(--ink-soft); }
.sub-block .sub-list li { margin: .45rem 0; }
.sub-block .code-block {
  background: #1b2433; color: #d6e2f0; border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 12px; padding: 1rem 1.15rem; margin: 1.1rem 0; overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.sub-block .code-block code {
  font-family: ui-monospace, "Cascadia Code", "Fira Code", Consolas, monospace;
  font-size: .85rem; line-height: 1.6; white-space: pre; color: inherit;
}
.sub-features { background: var(--bg-soft); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; }
.feature-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.feature-card h3 { font-size: 1.08rem; margin-bottom: .5rem; }
.feature-card p { color: var(--ink-soft); font-size: .92rem; margin: 0; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 2.5rem; }
.related-card {
  display: flex; flex-direction: column; gap: .3rem; background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.4rem 2.8rem 1.4rem 1.5rem; transition: .2s; position: relative;
}
.related-card:hover { background: #fff; box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.related-eyebrow { font-size: .78rem; color: var(--green-ink); font-weight: 600; }
.related-title { font-weight: 600; font-size: 1.1rem; }
.related-go { position: absolute; right: 1.4rem; top: 1.4rem; color: var(--muted); }
.sub-cta { background: var(--ink); color: #fff; }
.sub-cta-inner { text-align: center; max-width: 720px; margin-inline: auto; }
.sub-cta-inner h2 { font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.2rem); margin-bottom: 1.8rem; overflow-wrap: anywhere; text-wrap: balance; }
.sub-cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
/* 404: centra el contenido en la primera pantalla (el footer queda bajo el fold) */
.section-404 { min-height: calc(100svh - 68px); display: grid; place-content: center; padding-block: clamp(4rem, 12vw, 8rem); }

/* ---------- Animaciones de entrada ---------- */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px) {
  .hero-grid, .about-grid, .expertise-grid, .case-card, .service-card,
  .faq-grid, .contact-book-grid, .sub-hero-grid { grid-template-columns: 1fr; }
  .service-card:nth-child(even) .service-media { order: 0; }
  .expertise-grid { grid-template-areas: "media" "copy" "clients"; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .hero-panel { margin-top: 1rem; height: auto; min-height: 0; aspect-ratio: 3 / 4; max-width: 440px; margin-inline: auto; }
  .badge-top { right: 2%; } .badge-mid { left: 2%; } .badge-stat { left: 2%; } .badge-bot { right: 2%; }
  .case-media img { max-width: 360px; }
}

@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    gap: 0; background: #fff; border-bottom: 1px solid var(--line); padding: .5rem 1.1rem 1.2rem;
    box-shadow: var(--shadow); clip-path: inset(0 0 100% 0); transition: clip-path .3s ease; pointer-events: none;
  }
  .nav-links.open { clip-path: inset(0 0 0 0); pointer-events: auto; }
  .nav-links li { padding: .35rem 0; }
  .nav-links a { display: block; padding: .5rem 0; }
  .nav-cta a { display: inline-flex; margin-top: .5rem; }
  .compare-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .case-metrics { gap: 1.5rem; }
  .hero-actions { gap: 1rem; }

  /* Anti-desborde: en móvil ningún botón es nowrap (la raíz de los recortes a 320-360px)
     y los CTA no deben fijar el ancho mínimo de las columnas de grid/flex */
  .btn { white-space: normal; text-align: center; min-width: 0; text-wrap: balance; }
  .hero-grid > *, .faq-grid > * { min-width: 0; }
  /* A 1.125rem el CTA del hero quiebra en 2 líneas a 390px; a 1rem cabe en una */
  .hero-actions .btn-lg { width: 100%; max-width: 380px; font-size: 1rem; }

  /* Hero móvil — orden: título → descripción → imagen horizontal (burbujas DENTRO)
     → CTA → rating. display:contents disuelve las 2 columnas para poder intercalar
     la imagen entre la descripción y el botón. */
  .hero { padding-top: 1rem; }
  /* Título fluido en mobile: 35.7px@320 → 39px@430 (llena mejor el ancho sin romper líneas) */
  .hero-title { font-size: clamp(2.2rem, 1.45rem + 3.9vw, 2.45rem); line-height: 1.15; order: 1; }
  .hero-sub { margin: 1rem 0 1.25rem; order: 2; }
  /* Subtítulo corto en mobile: la cola "— con MikroTik como pilar…" solo se ve en desktop */
  .hero-sub-extra { display: none; }
  .hero-grid { display: flex; flex-direction: column; gap: 0; }
  .hero-copy, .hero-visual { display: contents; }
  .hero-panel { order: 3; }
  .hero-actions { order: 4; }
  /* Imagen horizontal en proporción natural, con las burbujas superpuestas */
  .hero-panel {
    aspect-ratio: auto; min-height: 0; height: auto; max-width: 440px; width: 100%;
    margin: 0 auto 1.4rem; background: none; box-shadow: none;
  }
  .hero-panel img { height: auto; box-shadow: var(--shadow); }
  .badge { font-size: .78rem; padding: .45rem .6rem .5rem; line-height: 1.3; max-width: 9.5rem; }
  .badge b { font-size: 1.1rem; margin-bottom: .1rem; }
  /* Diagonal: certificación arriba-derecha (la antena queda libre) y 30 min abajo-izquierda.
     width:min-content encoge la caja al ancho real del texto quebrado (sin franja blanca) */
  .badge-top { top: 8px; right: 8px; left: auto; text-align: right; width: min-content; }
  .badge-mid, .badge-bot, .badge-stat { display: none; }
  .badge-go { display: block; bottom: 8px; left: 8px; right: auto; }

  /* Tecnologías: 2 columnas (las 13 tarjetas dejan de ocupar ~1400px de scroll) */
  .tech-grid { grid-template-columns: repeat(2, 1fr); gap: .7rem; }
  .tech-card { padding: .9rem 1rem; min-width: 0; }
  .tech-name { font-size: .98rem; hyphens: auto; }
  .tech-go { right: .9rem; top: .9rem; }

  /* Proceso: número arriba y texto a ancho completo (sin columna angosta) */
  .process-step { grid-template-columns: 1fr; gap: .4rem; }
  .process-num { font-size: 1.5rem; }
  .process-step:not(:last-child)::before { display: none; }

  /* Footer compacto: hereda las 2 columnas del breakpoint 980px;
     tecnologías y contacto pasan a ancho completo */
  .footer-grid { gap: 1.6rem 1.2rem; }
  .footer-col ul { gap: .45rem; }
  .footer-col-tech, .footer-contact { grid-column: 1 / -1; }
  .footer-contact ul { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .cases-track { transition: none; }
  .btn:hover { transform: none; }
  /* Marquee de logos: estático, una sola copia centrada y con wrap */
  .lp-marquee-track { animation: none; width: auto; justify-content: center; }
  .lp-marquee-track .lp-clients-row { flex-wrap: wrap; padding-right: 0; }
  .lp-marquee-track .lp-clients-row + .lp-clients-row { display: none; }
}

/* ============================================================
   Landing de conversión /agenda (tráfico pago) — leak-free.
   Reutiliza componentes del sitio; solo agrega el layout propio.
   ============================================================ */
/* Blindaje anti-scroll lateral: va en <html> (controla la barra del viewport; clip en body
   no siempre se propaga al viewport). clip no rompe el header sticky, a diferencia de hidden. */
html.lp, body.lp { overflow-x: clip; }

/* Botón CTA primario (verde de marca) — sirve sobre claro y sobre oscuro */
.btn-cta { background: var(--green); color: #fff; }
.btn-cta:hover { background: var(--green-ink); box-shadow: 0 10px 26px rgba(46, 159, 125, .42); }

/* Header mínimo */
.lp-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .85); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.lp-header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.lp-header .brand { color: var(--ink); }

/* Hero oscuro centrado (eco del anuncio) */
.lp-hero { background: var(--ink); color: #fff; padding-block: clamp(3rem, 7vw, 5.5rem); text-align: center; }
.lp-hero-inner { max-width: 900px; margin-inline: auto; }
.lp-eyebrow {
  display: inline-flex; align-items: center; gap: .5rem; margin-bottom: 1.4rem;
  font-size: .82rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: #8be3c4;
}
.lp-eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.lp-hero-title {
  font-size: clamp(2.1rem, 1rem + 4.2vw, 3.85rem); font-weight: 600; line-height: 1.12;
  letter-spacing: -1.7px; text-wrap: balance; margin: 0;
}
.lp-hero-title em { font-style: italic; color: #8be3c4; }
.lp-hero-sub {
  color: rgba(255, 255, 255, .78); font-size: clamp(1.05rem, .92rem + .6vw, 1.2rem);
  font-weight: 300; line-height: 1.6; max-width: 60ch; margin: 1.5rem auto 2rem;
}
.lp-hero-cta { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.lp-scarcity { display: inline-flex; align-items: center; gap: .5rem; font-size: .86rem; font-weight: 500; color: #ffd27a; }
.lp-scarcity::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #ffb547; box-shadow: 0 0 0 4px rgba(255, 181, 71, .18); }
.lp-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem 1.7rem; list-style: none; padding: 0; margin: 2.6rem 0 0; }
.lp-trust li { position: relative; padding-left: 1.5rem; font-size: .88rem; color: rgba(255, 255, 255, .72); }
.lp-trust li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--green); font-weight: 700; }

/* Fondos alternados: hero(oscuro) → oferta(claro) → calendario(oscuro) → prueba(suave) → faq(claro) → final(oscuro) */
.lp-section-offer { background: var(--bg); }
.lp-section-authority { background: var(--bg-soft); }
.lp-section-faq { background: var(--bg); }

.lp-inline-cta { display: flex; margin-top: 2rem; }
.lp-final-body { color: rgba(255, 255, 255, .76); max-width: 620px; margin: -.8rem auto 1.8rem; }

/* Resultados compactos (reemplazan el carrusel largo de casos) */
.lp-results-heading { text-align: center; color: var(--ink-soft); font-weight: 500; margin: clamp(2.5rem, 5vw, 3.5rem) 0 1.3rem; }
.lp-results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.lp-result { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem 1.2rem; text-align: center; }
.lp-result-value { display: block; font-size: clamp(1.9rem, 1.2rem + 1.8vw, 2.5rem); font-weight: 600; letter-spacing: -1px; color: var(--ink); }
.lp-result-label { display: block; color: var(--ink-soft); font-size: .92rem; margin-top: .3rem; }
.lp-result-client { display: block; color: var(--muted); font-size: .76rem; margin-top: .6rem; text-transform: uppercase; letter-spacing: .05em; }

/* Logos de clientes (dentro de la sección de prueba) */
.lp-clients-caption { font-size: 1rem; color: var(--ink-soft); font-weight: 500; max-width: 34ch; margin: clamp(2.5rem, 5vw, 3.5rem) auto 1.4rem; text-wrap: balance; }
.lp-clients-row { justify-content: center; gap: clamp(1.6rem, 5vw, 3rem); row-gap: 1.2rem; margin-top: 0; }
/* Marquee de logos: en desktop riel estático centrado (la copia duplicada se oculta);
   en mobile gira en loop infinito — ver el bloque @640 */
.lp-clients-marquee { overflow: hidden; }
.lp-marquee-track { display: flex; justify-content: center; }
.lp-marquee-track .lp-clients-row + .lp-clients-row { display: none; }
@keyframes lp-logos { to { transform: translateX(-50%); } }

/* Footer mínimo */
.lp-footer { background: var(--ink); color: rgba(255, 255, 255, .7); padding-block: 1.4rem; font-size: .88rem; }
.lp-footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .6rem; }
.lp-footer a { color: #8be3c4; }
.lp-footer a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  /* Hero: ocupa exactamente el primer viewport — la sección siguiente
     solo aparece al scrollear (64px = alto del lp-header sticky) */
  .lp-hero {
    padding-block: 2rem 2.5rem;
    min-height: calc(100svh - 64px);
    display: flex; flex-direction: column; justify-content: center;
  }
  .lp-hero-sub { margin: 1.1rem auto 1.5rem; }
  .lp-hero-cta { width: 100%; gap: .85rem; }
  /* min-width:0 + white-space normal: que el CTA nunca desborde a 320px */
  .lp-hero-cta .btn, .lp-inline-cta .btn { width: 100%; max-width: 380px; min-width: 0; white-space: normal; }
  /* Trust strip: columna centrada con los ✓ perfectamente alineados (bloque fit-content) */
  .lp-trust {
    flex-direction: column; align-items: flex-start; gap: .7rem;
    width: fit-content; max-width: 100%; margin: 1.6rem auto 0;
  }
  .lp-trust li { text-align: left; }
  /* CTAs de sección: ancho cómodo y centrado, consistente con el hero */
  .lp-inline-cta { justify-content: center; }
  /* Resultados: una columna en móvil (cards completas y legibles) */
  .lp-results { grid-template-columns: 1fr; }
  /* Logos de clientes: más grandes, girando en marquee infinito (2 copias del riel,
     -50% = exactamente una copia porque cada riel lleva padding-right = gap) */
  .lp-section-authority .client-logo { height: 39px; }
  .lp-marquee-track { justify-content: flex-start; width: max-content; animation: lp-logos 22s linear infinite; }
  .lp-marquee-track .lp-clients-row { flex-wrap: nowrap; gap: 2.4rem; padding-right: 2.4rem; }
  .lp-marquee-track .lp-clients-row + .lp-clients-row { display: flex; }
  .lp-footer-inner { justify-content: center; text-align: center; }
}

/* Teléfonos muy angostos: el CTA del hero de /agenda debe quedar dentro del fold */
@media (max-width: 360px) {
  .lp-hero { padding-block: 1.9rem 2.3rem; }
  .lp-eyebrow { margin-bottom: .9rem; }
  .lp-hero-sub { margin: .9rem auto 1.2rem; }
  /* Si eyebrow/escasez quiebran a 2 líneas, el punto decorativo queda flotando: fuera */
  .lp-eyebrow::before, .lp-scarcity::before { display: none; }
  .lp-scarcity { box-shadow: none; }
}

/* ---------- Estilos para Botón Flotante de WhatsApp ---------- */
.wa-fab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #25d366;
  color: white;
  padding: 12px 20px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  z-index: 9999;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.wa-fab:hover {
  background-color: #128c7e;
  transform: scale(1.05);
  color: white;
}

.wa-fab svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

@media (max-width: 768px) {
  .wa-fab-label {
    display: none;
  }
  .wa-fab {
    padding: 15px;
    bottom: 15px;
    right: 15px;
  }
}
