/* ============================================================
   FileData — Hoja de estilos
   Estilo: SaaS moderno / minimalista corporativo
   ============================================================ */

:root {
  /* Marca — verde (logo) como principal */
  --brand-900: #173a1c;   /* verde muy oscuro: titulares/footer */
  --brand-700: #2e7d32;   /* verde oscuro */
  --brand-600: #3a9d23;   /* verde primario */
  --brand-500: #57b81e;   /* verde lima */
  --brand-100: #e7f6e0;   /* verde claro (fondos suaves) */

  --green-700: #2e7d32;
  --green-600: #3a9d23;
  --green-500: #57b81e;
  --green-100: #e7f6e0;

  /* Acento — morado (degradados) */
  --purple-700: #6d28d9;
  --purple-600: #7c3aed;
  --purple-500: #8b5cf6;
  --purple-100: #f1e9ff;

  --amber-600: #d97706;
  --amber-100: #fef3c7;

  /* Degradado de marca verde -> morado */
  --grad-brand: linear-gradient(90deg, var(--green-600), var(--purple-600));

  /* Neutros */
  --ink: #0f172a;
  --muted: #5b6b82;
  --line: #e6eaf0;
  --bg: #ffffff;
  --bg-soft: #f6f8fb;
  --white: #ffffff;

  /* Sistema */
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow: 0 10px 30px rgba(16, 24, 40, .08);
  --shadow-lg: 0 24px 60px rgba(16, 24, 40, .14);
  --container: 1140px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .4em; color: var(--brand-900); letter-spacing: -.02em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1rem; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 800px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-weight: 600; font-size: .95rem; line-height: 1;
  padding: .72rem 1.2rem; border-radius: 999px;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform .15s var(--ease), box-shadow .2s var(--ease), background .2s, color .2s, border-color .2s;
  white-space: nowrap;
}
.btn-lg { padding: .95rem 1.6rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--brand-600); color: #fff; box-shadow: 0 8px 20px rgba(58, 157, 35, .28); }
.btn-primary:hover { background: var(--brand-700); transform: translateY(-2px); box-shadow: 0 12px 26px rgba(58, 157, 35, .35); }
.btn-outline { border-color: var(--line); color: var(--brand-900); background: #fff; }
.btn-outline:hover { border-color: var(--brand-600); color: var(--brand-600); transform: translateY(-2px); }
.btn-ghost { color: var(--brand-900); background: transparent; }
.btn-ghost:hover { color: var(--brand-600); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; height: 70px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-size: 1.3rem; color: var(--brand-900); }
.brand-mark { display: inline-flex; align-items: center; }
.brand-mark img, .brand-logo { height: 42px; width: auto; display: block; }
.brand-text { font-weight: 600; letter-spacing: -.02em; }
.brand-text strong { color: var(--brand-600); font-weight: 800; }

/* Nav wrapper */
.main-nav { margin-left: auto; }
/* Backward-compat: plain <a> links (sin nav-list) */
.main-nav > a { color: var(--muted); font-weight: 500; font-size: .96rem; transition: color .2s; text-decoration: none; }
.main-nav > a:hover { color: var(--brand-900); }

/* ── Nav-list (estructura con dropdowns) ─────────────────────── */
.nav-list { display: flex; align-items: center; gap: .1rem; list-style: none; margin: 0; padding: 0; }
.nav-item { position: relative; }

.nav-link {
  display: inline-flex; align-items: center; gap: .28rem;
  padding: .4rem .72rem;
  color: var(--muted); font-weight: 500; font-size: .93rem; line-height: 1;
  border-radius: 7px; text-decoration: none; white-space: nowrap;
  transition: color .18s, background .18s;
  background: none; border: 0; cursor: pointer; font-family: inherit;
}
.nav-link:hover,
.nav-item:hover > .nav-link,
.nav-item:focus-within > .nav-link { color: var(--brand-900); background: var(--bg-soft); }

.dd-arrow { width: 13px; height: 13px; flex: none; transition: transform .22s; }
.has-dropdown:hover > .nav-link .dd-arrow,
.has-dropdown:focus-within > .nav-link .dd-arrow { transform: rotate(180deg); }

/* Dropdown panel */
.dropdown-menu {
  position: absolute; top: calc(100% + 8px);
  left: 50%; transform: translateX(-50%) translateY(-6px);
  min-width: 210px; background: #fff;
  border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.1), 0 2px 8px rgba(0,0,0,.05);
  padding: .45rem; list-style: none; margin: 0;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .18s, transform .18s, visibility 0s .18s;
  z-index: 99;
}
.has-dropdown:hover > .dropdown-menu,
.has-dropdown:focus-within > .dropdown-menu {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  transition: opacity .18s, transform .18s;
}
.dropdown-menu.dd-wide { min-width: 340px; display: grid; grid-template-columns: 1fr 1fr; }

.dropdown-item {
  display: flex; align-items: center; gap: .4rem;
  padding: .58rem .8rem; border-radius: 7px;
  color: var(--muted); font-size: .875rem; font-weight: 500;
  text-decoration: none;
  transition: color .14s, background .14s;
}
.dropdown-item:hover { color: var(--brand-900); background: var(--bg-soft); }
.dropdown-item::before { content: '·'; color: var(--brand-600); font-weight: 800; flex: none; font-size: 1.1em; }

/* ── Header CTA & hamburger ──────────────────────────────────── */
.btn-sm { padding: .4rem .9rem; font-size: .875rem; }
.header-cta { display: flex; align-items: center; gap: .6rem; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; margin-left: auto; z-index: 201; position: relative; }
.nav-toggle span { width: 24px; height: 2px; background: var(--brand-900); border-radius: 2px; transition: .25s var(--ease); display: block; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background:
    radial-gradient(900px 420px at 88% -10%, var(--purple-100), transparent 60%),
    radial-gradient(700px 360px at 5% 0%, var(--green-100), transparent 55%);
}
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 3rem; align-items: center; padding: 5rem 20px 4.5rem; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-600); background: var(--brand-100); padding: .35rem .7rem; border-radius: 999px; margin-bottom: 1rem; }
.hero-copy .lead { font-size: 1.15rem; color: var(--muted); max-width: 36ch; margin-bottom: 1.8rem; }
.grad { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 1.6rem; }
.hero-badges { list-style: none; display: flex; flex-wrap: wrap; gap: 1.2rem; padding: 0; margin: 0; }
.hero-badges li { display: inline-flex; align-items: center; gap: .4rem; color: var(--muted); font-size: .9rem; font-weight: 500; }
.i-check { width: 18px; height: 18px; color: var(--green-600); flex: none; }

.hero-visual { display: grid; place-items: center; }
.hero-card { width: 100%; max-width: 380px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 1.6rem; box-shadow: var(--shadow-lg); }
.card-float { animation: float 6s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.hc-row { display: flex; align-items: center; gap: .5rem; font-size: .9rem; font-weight: 600; color: var(--brand-900); margin: 1rem 0 .4rem; }
.hc-row:first-child { margin-top: 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-blue { background: var(--brand-600); } .dot-green { background: var(--green-600); } .dot-amber { background: var(--amber-600); }
.hc-bar { height: 8px; border-radius: 999px; background: var(--bg-soft); overflow: hidden; }
.hc-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--green-500), var(--purple-600)); }

/* ---------- Stats ---------- */
.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding: 2.4rem 20px; text-align: center; }
.stat strong { display: block; font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; color: var(--brand-600); letter-spacing: -.03em; }
.stat span { color: var(--muted); font-size: .92rem; }

/* ---------- Secciones ---------- */
.section { padding: 4.5rem 0; }
.section-alt { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 2.6rem; }
.section-head .eyebrow { margin-bottom: .8rem; }
.section-head p { color: var(--muted); font-size: 1.05rem; }

/* ---------- Servicios ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.svc-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow-sm); transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s; display: flex; flex-direction: column; }
.svc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--brand-100); }
.svc-ico { width: 50px; height: 50px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 1rem; }
.svc-ico svg { width: 26px; height: 26px; }
.ico-purple { background: var(--purple-100); color: var(--purple-600); }
.ico-green { background: var(--green-100); color: var(--green-600); }
.ico-amber { background: var(--amber-100); color: var(--amber-600); }
.svc-card p { color: var(--muted); font-size: .95rem; flex: 1; }
.svc-link { color: var(--brand-600); font-weight: 600; font-size: .92rem; margin-top: .4rem; }

/* ---------- Pasos ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; text-align: center; }
.step-num { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--brand-600); color: #fff; font-weight: 800; font-size: 1.2rem; margin-bottom: 1rem; }
.step p { color: var(--muted); font-size: .95rem; margin: 0; }

/* ---------- Logos clientes ---------- */
.logos { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; }
.logo-chip { padding: .7rem 1.3rem; background: #fff; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-weight: 600; font-size: .95rem; }

/* ---------- Testimonios ---------- */
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.testi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; margin: 0; box-shadow: var(--shadow-sm); }
.stars { color: #f5b301; letter-spacing: 2px; margin-bottom: .6rem; }
.testi blockquote { margin: 0 0 1rem; font-size: 1rem; color: var(--ink); }
.testi figcaption { color: var(--muted); font-size: .88rem; font-weight: 600; }

/* ---------- Planes ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; align-items: stretch; }
.plan { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem 1.6rem; display: flex; flex-direction: column; }
.plan-featured { border-color: var(--brand-600); box-shadow: var(--shadow); transform: translateY(-6px); }
.plan-tag { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--brand-600); color: #fff; font-size: .75rem; font-weight: 700; padding: .3rem .8rem; border-radius: 999px; }
.plan-desc { color: var(--muted); font-size: .95rem; }
.plan-feat { list-style: none; padding: 0; margin: 1rem 0 1.5rem; flex: 1; }
.plan-feat li { padding: .45rem 0 .45rem 1.6rem; position: relative; color: var(--ink); font-size: .95rem; border-top: 1px solid var(--line); }
.plan-feat li::before { content: "✓"; position: absolute; left: 0; color: var(--green-600); font-weight: 800; }

/* ---------- FAQ ---------- */
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 1.2rem; margin-bottom: .7rem; transition: box-shadow .2s; }
.faq details[open] { box-shadow: var(--shadow-sm); }
.faq summary { cursor: pointer; font-weight: 600; color: var(--brand-900); padding: 1.1rem 2rem 1.1rem 0; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--brand-600); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--muted); margin: 0; padding: 0 0 1.1rem; font-size: .96rem; }

/* ---------- CTA / Contacto ---------- */
.cta-section { background: linear-gradient(135deg, var(--green-700), var(--purple-700)); color: #fff; padding: 4.5rem 0; }
.cta-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.cta-copy h2 { color: #fff; }
.cta-copy p { color: rgba(255, 255, 255, .8); font-size: 1.05rem; }
.cta-contacts { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.cta-contacts li { padding: .35rem 0; color: rgba(255, 255, 255, .9); }
.cta-contacts a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

.cta-form { background: #fff; border-radius: 18px; padding: 1.8rem; box-shadow: var(--shadow-lg); display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field-full { grid-column: 1 / -1; }
.cta-form label { font-size: .85rem; font-weight: 600; color: var(--brand-900); }
.cta-form input, .cta-form select, .cta-form textarea {
  width: 100%; padding: .7rem .85rem; border: 1.5px solid var(--line); border-radius: 10px;
  font: inherit; font-size: .95rem; color: var(--ink); background: #fff; transition: border-color .2s, box-shadow .2s;
}
.cta-form input:focus, .cta-form select:focus, .cta-form textarea:focus { outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 3px var(--brand-100); }
.cta-form textarea { resize: vertical; }
.cta-form .btn-block { grid-column: 1 / -1; }
.form-note { grid-column: 1 / -1; font-size: .9rem; margin: 0; text-align: center; min-height: 1.2em; color: var(--green-600); }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-900); color: rgba(255, 255, 255, .75); padding: 3.5rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; }
.footer-brand .brand-text { color: #fff; font-size: 1.3rem; }
.footer-brand .brand-text strong { color: #86e05a; }
.footer-brand p { margin-top: .8rem; font-size: .92rem; max-width: 30ch; }
.footer-col h4 { color: #fff; font-size: .95rem; margin-bottom: .9rem; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: .5rem; font-size: .92rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 2.5rem; padding-top: 1.5rem; font-size: .85rem; }

/* ---------- Volver arriba ---------- */
.back-top { position: fixed; right: 22px; bottom: 22px; width: 46px; height: 46px; border-radius: 50%; background: var(--brand-600); color: #fff; display: grid; place-items: center; font-size: 1.2rem; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(10px); transition: .25s var(--ease); z-index: 90; }
.back-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* ---------- Animación de aparición ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   PÁGINAS INTERNAS (servicios)
   ============================================================ */
.page-hero { position: relative; overflow: hidden; padding: 3rem 0 2.6rem;
  background: radial-gradient(800px 360px at 90% -20%, var(--purple-100), transparent 60%),
              radial-gradient(600px 320px at 0% 0%, var(--green-100), transparent 55%); }
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 1rem; }
.breadcrumb a:hover { color: var(--brand-600); }
.breadcrumb span[aria-current] { color: var(--brand-700); font-weight: 600; }
.page-hero h1 { max-width: 20ch; }
.page-hero .lead { font-size: 1.12rem; color: var(--muted); max-width: 62ch; }
.page-hero .hero-actions { margin-top: 1.4rem; }

.prose { max-width: 760px; }
.prose > h2 { margin-top: 2.2rem; }
.prose > h3 { margin-top: 1.6rem; }
.prose p, .prose li { color: var(--ink); font-size: 1.02rem; }
.prose ul { padding-left: 0; list-style: none; margin: 1rem 0; }
.prose ul li { position: relative; padding: .35rem 0 .35rem 1.8rem; }
.prose ul li::before { content: "✓"; position: absolute; left: 0; color: var(--green-600); font-weight: 800; }

.benefit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.benefit { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm); }
.benefit .svc-ico { margin-bottom: .8rem; }
.benefit h3 { font-size: 1.05rem; }
.benefit p { color: var(--muted); font-size: .95rem; margin: 0; }

.cta-band { background: linear-gradient(135deg, var(--green-700), var(--purple-700)); color: #fff; border-radius: var(--radius); padding: 2.6rem; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.85); max-width: 52ch; margin: 0 auto 1.4rem; }
.cta-band .btn-outline { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.55); color: #fff; }
.cta-band .btn-outline:hover { background: #fff; color: var(--brand-700); border-color: #fff; }

.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }

/* ---------- Blog / artículos ---------- */
.post-meta { color: var(--muted); font-size: .9rem; margin-bottom: .4rem; }
.post-tag { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--purple-600); background: var(--purple-100); padding: .25rem .6rem; border-radius: 999px; margin-bottom: .8rem; }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.blog-card { display: flex; flex-direction: column; }
.blog-card .post-tag { align-self: flex-start; }
.blog-card h3 { font-size: 1.08rem; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; padding-top: 3.5rem; }
  .hero-visual { order: -1; }
  .cards-grid, .testi-grid, .plans, .benefit-grid, .related-grid { grid-template-columns: repeat(2, 1fr); }
  .cta-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .main-nav, .header-cta { display: none; }
  .nav-toggle { display: flex; }

  /* CRÍTICO: backdrop-filter en .site-header crea un nuevo containing block
     para position:fixed, haciendo que el panel quede dentro del header (70px).
     Solución: aplicar nav-open al <body> y anular backdrop-filter en ese estado. */
  body.nav-open { overflow: hidden; }
  body.nav-open .site-header {
    position: fixed; top: 0; left: 0; right: 0;
    backdrop-filter: none;              /* Elimina el containing block artificial */
    background: rgba(255,255,255,.98);
    z-index: 200;
  }

  /* Panel de nav — ahora sí se posiciona contra el viewport */
  body.nav-open .main-nav {
    display: flex; flex-direction: column;
    position: fixed; top: 70px; left: 0; right: 0; bottom: 0;
    background: #fff; overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 199;
    border-top: 1px solid var(--line);
    box-shadow: 0 8px 40px rgba(0,0,0,.08);
  }

  /* Lista vertical */
  body.nav-open .nav-list { flex-direction: column; align-items: stretch; gap: 0; }

  body.nav-open .nav-link {
    padding: 1rem 20px; border-radius: 0; font-size: 1rem;
    justify-content: space-between; width: 100%;
    border-bottom: 1px solid var(--line); color: var(--brand-900);
  }
  body.nav-open .nav-link:hover { background: var(--bg-soft); }

  /* Accordion en móvil (no dropdown absoluto) */
  body.nav-open .dropdown-menu {
    position: static; transform: none;
    opacity: 1; visibility: visible; pointer-events: auto;
    box-shadow: none; border: none; border-radius: 0;
    padding: 0; display: none; min-width: 0; grid-template-columns: 1fr;
    background: var(--bg-soft);
  }
  body.nav-open .has-dropdown.is-open > .dropdown-menu { display: block; }
  body.nav-open .has-dropdown.is-open > .nav-link .dd-arrow { transform: rotate(180deg); }
  body.nav-open .dropdown-item {
    padding: .8rem 20px .8rem 38px; border-radius: 0; font-size: .95rem;
    border-bottom: 1px solid var(--line);
  }
  body.nav-open .dropdown-item::before { display: none; }

  /* CTA al final */
  body.nav-open .header-cta {
    display: flex; flex-direction: column; gap: .8rem;
    padding: 1.5rem 20px; margin-top: auto;
    border-top: 2px solid var(--bg-soft);
  }
  body.nav-open .header-cta .btn { width: 100%; justify-content: center; }

  /* Backward-compat para enlaces simples sin nav-list */
  body.nav-open .main-nav > a {
    padding: .9rem 20px; border-bottom: 1px solid var(--line);
    display: block; color: var(--brand-900);
  }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  .steps { grid-template-columns: 1fr; }
  .plan-featured { transform: none; }
}

@media (max-width: 520px) {
  .cards-grid, .testi-grid, .plans, .cta-form, .footer-grid, .benefit-grid, .related-grid { grid-template-columns: 1fr; }
  .section { padding: 3.2rem 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   Hero Slideshow (carrusel de servicios)
   ============================================================ */
.hero-slider {
  position: relative; width: 100%; max-width: 540px;
  aspect-ratio: 4 / 3; border-radius: 22px; overflow: hidden;
  background: #0f172a;
  box-shadow: 0 36px 70px rgba(2,32,12,.20), 0 12px 28px rgba(0,0,0,.12), 0 0 0 1px rgba(0,0,0,.04);
  isolation: isolate;
}
.hero-slider::before {
  content: ""; position: absolute; inset: auto -28px -28px auto;
  width: 70%; height: 70%; z-index: -1; border-radius: 30px;
  background: radial-gradient(circle at 70% 70%, rgba(34,197,94,.45), transparent 70%);
  filter: blur(8px);
}
.hs-track { position: absolute; inset: 0; }
.hs-slide { position: absolute; inset: 0; opacity: 0; z-index: 0; transition: opacity .9s ease; display: block; text-decoration: none; }
.hs-slide.active { opacity: 1; z-index: 1; }
.hs-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
@keyframes hsKenBurns { from { transform: scale(1); } to { transform: scale(1.09); } }
.hs-slide.active img { animation: hsKenBurns 7s ease-in-out infinite alternate; }
.hs-cap {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; flex-direction: column; gap: 2px; padding: 40px 18px 16px;
  background: linear-gradient(to top, rgba(3,18,8,.82) 0%, rgba(3,18,8,.35) 55%, transparent 100%); color: #fff;
}
.hs-cap-title { font-weight: 700; font-size: 1.02rem; line-height: 1.25; }
.hs-cap-sub { font-size: .85rem; opacity: .85; }
.hs-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 42px; height: 42px; border: none; border-radius: 50%;
  background: rgba(255,255,255,.92); color: #14532d; font-size: 26px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 14px rgba(0,0,0,.28); opacity: .85; transition: opacity .15s, transform .15s, background .15s;
}
.hs-arrow:hover { opacity: 1; background: #fff; transform: translateY(-50%) scale(1.08); }
.hs-prev { left: 12px; } .hs-next { right: 12px; }
.hs-dots { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 4; display: flex; gap: 7px; }
.hs-dot { width: 8px; height: 8px; padding: 0; border: none; border-radius: 5px; cursor: pointer; background: rgba(255,255,255,.5); transition: width .3s, background .2s; }
.hs-dot.active { width: 26px; background: #fff; }
.hs-dot:hover:not(.active) { background: rgba(255,255,255,.8); }
.hero-slider-empty { display: grid; place-items: center; background: linear-gradient(135deg,#e8f5e9,#f1f5f9); }
.hs-empty { color: var(--muted,#64748b); font-size: .9rem; text-align: center; padding: 24px; }

@media (max-width: 760px) {
  .hero-visual { order: 0; }
  .hero-slider { max-width: 100%; aspect-ratio: 16 / 11; }
  .hs-arrow { width: 36px; height: 36px; font-size: 22px; opacity: .92; }
}
