body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  /* Playfair Display trae números "estilo antiguo" (bajan de la línea);
     se fuerzan números alineados para cifras como +1,000 o 01 */
  font-variant-numeric: lining-nums;
}

.wrap {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.02;
  letter-spacing: -0.005em;
  font-weight: 700;
}

p { max-width: var(--measure); }

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--ink);
}
.logo-mark { width: 26px; height: 26px; flex-shrink: 0; }
.logo-img { height: 62px; width: auto; display: block; }
@media (max-width: 560px) {
  .logo-img { height: 50px; }
}

.main-nav ul { display: flex; gap: 2rem; align-items: center; }
.main-nav a {
  text-decoration: none;
  font-size: 0.95rem;
  padding-block: 0.25rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.main-nav a:hover { border-bottom-color: var(--gold-dim); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.3rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
}
.btn-primary { background: var(--panel); color: var(--bg); }
.btn-primary:hover { background: var(--ink); }
.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }

.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(3rem, 8vw, 6rem) clamp(2.5rem, 6vw, 4rem);
  border-bottom: 1px solid var(--line);
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.hero-eyebrow {
  font-size: 0.85rem;
  color: var(--teal);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
}
.hero h1 {
  font-size: var(--step-3);
  max-width: 16ch;
}
.hero h1 em {
  font-style: normal;
  color: var(--gold-dim);
}
.hero p.lede {
  margin-top: 1.25rem;
  font-size: var(--step-1);
  color: color-mix(in srgb, var(--ink) 78%, transparent);
}
.hero-actions {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.hero-figure { position: relative; }
.hero-figure svg { width: 100%; height: auto; }
.hero-figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px rgba(23, 37, 26, 0.14);
}
.curve-path {
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: draw 1.6s ease-out 0.2s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
.hero-figure figcaption {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: color-mix(in srgb, var(--ink) 55%, transparent);
}

/* ---------- Franja de cifras ---------- */
.stats { background: var(--panel); color: var(--bg); padding-block: 2.5rem; }
.stats .wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: var(--step-2);
  color: var(--gold);
}
.stat span { font-size: 0.85rem; color: color-mix(in srgb, var(--bg) 75%, transparent); }

/* ---------- Secciones genéricas ---------- */
section.block { padding-block: clamp(3rem, 7vw, 5.5rem); }
.block-head { max-width: 42rem; margin-bottom: clamp(2rem, 5vw, 3rem); }
.block-head h2 { font-size: var(--step-2); }
.block-head p { margin-top: 0.75rem; color: color-mix(in srgb, var(--ink) 70%, transparent); }

/* ---------- Servicios ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.service-card {
  background: var(--bg);
  padding: 2rem 1.75rem;
  border-left: 3px solid var(--teal);
}
.service-card:nth-child(2) { border-left-color: var(--gold-dim); }
.service-card:nth-child(3) { border-left-color: var(--panel-2); }
.service-card h3 { font-size: 1.25rem; margin-bottom: 0.6rem; }
.service-card p { font-size: 0.92rem; color: color-mix(in srgb, var(--ink) 70%, transparent); }
.service-card a,
.service-main a {
  display: inline-block;
  margin-top: 1.1rem;
  padding-bottom: 0.3rem;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 3px solid var(--gold); /* pleca naranja de marca */
  transition: color 0.2s, border-color 0.2s;
}
.service-card a:hover,
.service-main a:hover { color: var(--gold-dim); border-bottom-color: var(--gold-dim); }

/* ---------- Servicios — lista detallada (número, descripción, para quién, cifra) ---------- */
.service-list {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.service-item {
  display: grid;
  grid-template-columns: auto 1.3fr 1fr auto;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: start;
  background: var(--bg);
  padding: clamp(1.75rem, 3vw, 2.5rem) clamp(1.25rem, 3vw, 2.25rem);
  border-left: 3px solid var(--gold);
}
.service-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.25rem, 1.8rem + 2vw, 3.25rem);
  line-height: 1;
  color: var(--gold);
}
.service-main h3 { font-size: var(--step-1); margin-bottom: 0.6rem; }
.service-main p,
.service-for p { font-size: 0.95rem; color: color-mix(in srgb, var(--ink) 72%, transparent); }
.service-main .service-sub {
  margin: -0.35rem 0 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--gold);
}
.service-for h4 {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.5rem;
}
.service-stat {
  display: flex;
  flex-direction: column;
  max-width: 14rem;
  padding: 1rem 1.25rem;
  background: var(--bg-alt);
  border-radius: var(--radius-md);
}
.service-stat b {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.6rem + 1.5vw, 2.75rem);
  line-height: 1;
  color: var(--gold);
}
.service-stat span {
  margin-top: 0.4rem;
  font-size: 0.88rem;
  color: var(--ink);
}
@media (max-width: 900px) {
  .service-item { grid-template-columns: auto minmax(0, 1fr); }
  .service-for,
  .service-stat { grid-column: 2; }
}
@media (max-width: 520px) {
  .service-item { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .service-for,
  .service-stat { grid-column: auto; }
}

/* ---------- Cómo trabajamos (secuencia real → numerado) ---------- */
.steps { counter-reset: step; }
.steps ol {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-display);
  color: var(--gold-dim);
  font-size: 1rem;
  margin-bottom: 0.75rem;
}
.steps h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.steps p { font-size: 0.9rem; color: color-mix(in srgb, var(--ink) 70%, transparent); }

/* ---------- Proyectos destacados ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}
.project-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.project-thumb {
  aspect-ratio: 4/3;
  background: linear-gradient(155deg, var(--panel) 0%, var(--panel-2) 60%, var(--teal) 130%);
}
img.project-thumb {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  background: var(--panel-2);
}
.project-body { padding: 1.25rem 1.4rem 1.5rem; }
.project-body .tag { font-size: 0.78rem; color: var(--teal); }
.project-body h3 { font-size: 1.05rem; margin-block: 0.35rem 0.35rem; }
.project-body p { font-size: 0.88rem; color: color-mix(in srgb, var(--ink) 68%, transparent); }

/* ---------- CTA de contacto ---------- */
.cta-band {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(3rem, 6vw, 4.5rem);
}
.cta-band .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.cta-band h2 { font-size: var(--step-2); max-width: 20ch; }

/* ---------- Footer ---------- */
.site-footer { padding-block: 3rem 2rem; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}
.footer-grid h4 { font-size: 0.85rem; margin-bottom: 0.9rem; }
.footer-grid ul li { margin-bottom: 0.5rem; font-size: 0.88rem; }
.footer-grid a { text-decoration: none; }
.footer-grid a:hover { text-decoration: underline; }
.footer-bottom {
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: color-mix(in srgb, var(--ink) 55%, transparent);
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .main-nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .hero-figure { order: -1; }
  .stats .wrap { grid-template-columns: repeat(2, 1fr); }
  .services-grid, .projects-grid, .steps ol { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
}

:focus-visible {
  outline: 2px solid var(--gold-dim);
  outline-offset: 2px;
}

/* =========================================================
   Páginas interiores
   ========================================================= */

/* Menú móvil abierto */
@media (max-width: 900px) {
  .main-nav.is-open {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 1rem clamp(1.25rem, 4vw, 3rem) 1.5rem;
  }
  .main-nav.is-open ul { flex-direction: column; align-items: flex-start; gap: 1rem; }
}

/* Página activa en el menú */
.main-nav a[aria-current="page"]:not(.btn) { border-bottom-color: var(--gold); }

/* Encabezado de página */
.page-head {
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--line);
}
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 0.4rem; font-size: 0.82rem; color: color-mix(in srgb, var(--ink) 60%, transparent); margin-bottom: 1.25rem; }
.breadcrumbs li + li::before { content: "/"; margin-right: 0.4rem; color: var(--line); }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.page-eyebrow {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-1);
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.page-head h1 { font-size: var(--step-3); max-width: 18ch; }
.page-head .lede { margin-top: 1.1rem; font-size: var(--step-1); color: color-mix(in srgb, var(--ink) 78%, transparent); }
.text-green { color: var(--green); }
.page-head .hero-actions { margin-top: 1.75rem; }
/* Foto vertical en el encabezado (p. ej. personas): recorte 4:5 sin cortar rostros */
.hero-figure--portrait img {
  aspect-ratio: 4 / 5;
  max-height: 34rem;
  object-position: center 30%;
}
@media (max-width: 900px) {
  .hero-figure--portrait img { aspect-ratio: 4 / 3; object-position: center 30%; }
}

/* Encabezado con foto de fondo: degradado verde de marca a la izquierda para que el texto se lea */
.page-head.has-bg {
  position: relative;
  isolation: isolate;
  background-color: var(--panel-2);
  background-size: cover;
  background-position: center right;
  border-bottom: 0;
  padding-block: clamp(3.5rem, 9vw, 6.5rem);
  color: var(--bg);
}
.page-head.has-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--panel-2) 94%, transparent) 0%,
    color-mix(in srgb, var(--panel-2) 80%, transparent) 45%,
    color-mix(in srgb, var(--panel-2) 15%, transparent) 100%);
}
.page-head.has-bg .wrap > div { max-width: 40rem; }
.page-head.has-bg h1 { color: var(--bg); }
.page-head.has-bg .lede { color: color-mix(in srgb, var(--bg) 88%, transparent); }
.page-head.has-bg .breadcrumbs ol { color: color-mix(in srgb, var(--bg) 75%, transparent); }
.page-head.has-bg .breadcrumbs li + li::before { color: color-mix(in srgb, var(--bg) 45%, transparent); }
.page-head.has-bg .btn-primary { background: var(--gold); }
.page-head.has-bg .btn-primary:hover { background: var(--gold-dim); }
.page-head.has-bg .btn-ghost { border-color: color-mix(in srgb, var(--bg) 55%, transparent); color: var(--bg); }
.page-head.has-bg .btn-ghost:hover { border-color: var(--bg); }
@media (max-width: 760px) {
  .page-head.has-bg::before { background: color-mix(in srgb, var(--panel-2) 82%, transparent); }
}
.page-head.has-figure .wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }

/* Dos columnas: título a la izquierda, contenido a la derecha */
.split { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.split h2 { font-size: var(--step-2); }
.split .prose > * + * { margin-top: 1rem; }

.prose { line-height: 1.65; }
.prose h3 { font-size: 1.2rem; margin-top: 2rem; }
.prose ul { padding-left: 1.2rem; }
.prose li + li { margin-top: 0.4rem; }
.prose strong { font-weight: 600; }

/* Lista con filete */
.rule-list { border-top: 1px solid var(--line); }
.rule-list li {
  display: grid;
  grid-template-columns: 14rem 1fr;
  gap: 1.5rem;
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--line);
}
.rule-list h3 { font-size: 1.05rem; }
.rule-list p { font-size: 0.95rem; color: color-mix(in srgb, var(--ink) 72%, transparent); }

/* Tabla comparativa */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); }
.compare { width: 100%; border-collapse: collapse; font-size: 0.93rem; min-width: 34rem; }
.compare th, .compare td { text-align: left; padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { font-family: var(--font-display); font-weight: 500; background: var(--panel); color: var(--bg); }
.compare tbody th { font-weight: 500; width: 30%; }
.compare tbody tr:last-child > * { border-bottom: 0; }

/* Preguntas frecuentes */
.faq { border-top: 1px solid var(--line); max-width: 52rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding-block: 1.1rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold-dim); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 1.25rem; color: color-mix(in srgb, var(--ink) 75%, transparent); }

/* Banda oscura de texto */
.dark-band { background: var(--panel); color: var(--bg); }
.dark-band h2, .dark-band h3 { color: var(--bg); }
.dark-band p, .dark-band li { color: color-mix(in srgb, var(--bg) 80%, transparent); }
.dark-band .rule-list, .dark-band .rule-list li { border-color: var(--line-dark); }
.dark-band .rule-list p { color: color-mix(in srgb, var(--bg) 75%, transparent); }
.dark-band .rule-list h3 { color: var(--gold); }

/* Sectores */
.sector-list { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.sector-list li { border: 1px solid var(--line); border-radius: 999px; padding: 0.4rem 0.95rem; font-size: 0.9rem; background: var(--bg); }

/* Recursos */
.toc { border-left: 3px solid var(--gold); padding-left: 1.25rem; }
.toc li + li { margin-top: 0.5rem; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.guide { padding-block: clamp(2.5rem, 6vw, 4rem); border-top: 1px solid var(--line); scroll-margin-top: 5rem; }
.guide:first-of-type { border-top: 0; }
.guide .meta { font-size: 0.85rem; color: var(--teal); margin-bottom: 0.6rem; }
.guide h2 { font-size: var(--step-2); max-width: 24ch; margin-bottom: 1.5rem; }
.guide .prose { max-width: 44rem; }

/* Contacto */
.contact-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.25rem; }
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.88rem; font-weight: 500; }
.field .hint { font-size: 0.8rem; color: color-mix(in srgb, var(--ink) 58%, transparent); }
.field input, .field select, .field textarea {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 0.7rem 0.8rem;
  font-size: 0.95rem;
  width: 100%;
}
.field textarea { min-height: 7.5rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--gold-dim); outline-offset: 0; border-color: var(--gold-dim); }
.field input:user-invalid, .field select:user-invalid { border-color: #B3412E; }
.check { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.88rem; }
.check input { margin-top: 0.25rem; accent-color: var(--panel); }
.form-actions { margin-top: 1.5rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.btn[disabled] { opacity: 0.6; cursor: wait; }
.form-status { font-size: 0.92rem; }
.form-status.ok { color: var(--teal); }
.form-status.error { color: #B3412E; }

.contact-card { background: var(--panel); color: var(--bg); padding: 2rem 1.75rem; border-radius: var(--radius-md); }
.contact-card h2 { font-size: 1.3rem; color: var(--bg); margin-bottom: 1.25rem; }
.contact-card dl > div { padding-block: 0.8rem; border-top: 1px solid var(--line-dark); }
.contact-card dt { font-size: 0.8rem; color: color-mix(in srgb, var(--bg) 60%, transparent); }
.contact-card dd { margin: 0.15rem 0 0; }
.contact-card a { color: var(--bg); text-decoration-color: var(--gold); text-underline-offset: 3px; }
.contact-card .need { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line-dark); font-size: 0.9rem; color: color-mix(in srgb, var(--bg) 80%, transparent); }
.contact-card .need h3 { font-size: 1rem; color: var(--gold); margin-bottom: 0.5rem; }
.contact-card .need ul { padding-left: 1.1rem; }
/* Aviso legal */
.legal { max-width: 46rem; }
.legal h2 { font-size: 1.35rem; margin-top: 2.5rem; }
.legal p, .legal ul { margin-top: 0.8rem; }
.legal .updated { font-size: 0.88rem; color: color-mix(in srgb, var(--ink) 60%, transparent); }

@media (max-width: 900px) {
  .page-head.has-figure .wrap, .split, .contact-layout { grid-template-columns: minmax(0, 1fr); }
  .rule-list li { grid-template-columns: 1fr; gap: 0.35rem; }
}
@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.field .check { font-weight: 400; }
.field .check input { width: auto; flex: none; padding: 0; }
@media (max-width: 900px) {
  .page-head .hero-figure { order: 0; }
}

/* ---------- Botón flotante de WhatsApp (todas las páginas) ---------- */
.whatsapp-float {
  position: fixed;
  right: clamp(1rem, 2.5vw, 1.75rem);
  bottom: clamp(1rem, 2.5vw, 1.75rem);
  z-index: 60;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.whatsapp-float:hover,
.whatsapp-float:focus-visible {
  transform: scale(1.08);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}
.whatsapp-float:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
@media (max-width: 560px) {
  .whatsapp-float { width: 52px; height: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  .whatsapp-float { transition-duration: 0.01ms; }
}

/* Proyectos: 2 columnas en tablet (va al final para ganarle a la regla general de 900px) */
@media (min-width: 561px) and (max-width: 900px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================================
   Blog — listado (tarjetas + filtros) y página de nota
   ========================================================================== */
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
}
.blog-filter {
  font: inherit;
  font-size: 0.9rem;
  padding: 0.5rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.blog-filter:hover { border-color: var(--panel); }
.blog-filter[aria-pressed="true"] { background: var(--panel); border-color: var(--panel); color: var(--bg); }
.blog-filter:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.75rem;
}
.blog-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg);
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.blog-card:hover,
.blog-card:focus-visible { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(23, 37, 26, 0.12); }
.blog-card:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.blog-card[hidden] { display: none; }
.blog-card-thumb { position: relative; aspect-ratio: 3 / 2; background: var(--panel-2); }
.blog-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-card-badge {
  position: absolute;
  top: 0.9rem;
  left: 0.9rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--gold);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}
.blog-card-body { display: flex; flex-direction: column; flex: 1; padding: 1.35rem 1.4rem 1.5rem; }
.blog-card-body time { font-size: 0.8rem; color: var(--teal); }
.blog-card-body h2,
.blog-card-body h3 { font-size: 1.2rem; line-height: 1.15; margin-block: 0.45rem 0.6rem; }
.blog-card-body p { font-size: 0.9rem; color: color-mix(in srgb, var(--ink) 70%, transparent); }
.blog-card-read {
  margin-top: auto;
  padding-top: 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--gold);
}
.blog-empty { margin-top: 1.5rem; color: color-mix(in srgb, var(--ink) 65%, transparent); }

/* Página de nota */
.post-head h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.2rem); max-width: 30ch; }
.post-meta { margin-top: 1.1rem; font-size: 0.88rem; color: var(--teal); }
.post-wrap { padding-block: clamp(2rem, 4vw, 3rem) clamp(3rem, 6vw, 4.5rem); }
.post-cover img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-md);
}
.post-cover figcaption,
.post-figure figcaption { margin-top: 0.6rem; font-size: 0.82rem; color: color-mix(in srgb, var(--ink) 60%, transparent); }
.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17rem;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
  margin-top: clamp(2rem, 4vw, 3rem);
}
.post-body { max-width: 46rem; line-height: 1.7; }
.post-body > * + * { margin-top: 1.1rem; }
.post-body h2 { font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem); line-height: 1.1; margin-top: 2.75rem; scroll-margin-top: 7rem; }
.post-body h3 { font-size: 1.2rem; margin-top: 1.75rem; }
.post-body > h2:first-child { margin-top: 0; }
.post-body ul,
.post-body ol:not(.post-steps) { padding-left: 1.3rem; }
.post-body ul { list-style: disc; }
.post-body ol:not(.post-steps) { list-style: decimal; }
.post-body li + li { margin-top: 0.4rem; }
.post-body li::marker { color: var(--gold); }
.post-body a { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
.post-body strong { color: var(--ink); }

.post-note {
  padding: 1.1rem 1.35rem;
  background: var(--bg-alt);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.post-note > * + * { margin-top: 0.6rem; }
.post-note--dark { background: var(--panel); color: var(--bg); border-left-color: var(--gold); }
.post-note--dark h3 { margin-top: 0; color: var(--bg); }
.post-note--dark strong { color: var(--bg); }
.post-quote {
  padding-left: 1.35rem;
  border-left: 3px solid var(--gold);
  font-family: var(--font-display);
  font-size: var(--step-1);
  line-height: 1.3;
  color: var(--panel);
}
.post-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.post-stat { display: flex; flex-direction: column; gap: 0.35rem; padding: 1.1rem 1.2rem; background: var(--bg); }
.post-stat b { font-family: var(--font-display); font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); line-height: 1; color: var(--gold); }
.post-stat span { font-size: 0.82rem; line-height: 1.35; color: color-mix(in srgb, var(--ink) 72%, transparent); }
.post-table-wrap { border-radius: var(--radius-md); }
.post-table { font-size: 0.9rem; }
.post-steps { counter-reset: post-step; display: grid; gap: 1rem; }
.post-steps li {
  counter-increment: post-step;
  position: relative;
  padding: 1rem 1.2rem 1rem 3.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.post-steps li::before {
  content: counter(post-step);
  position: absolute;
  left: 1.1rem;
  top: 1rem;
  width: 1.75rem;
  height: 1.75rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
}
.post-steps li + li { margin-top: 0; }
.post-steps h3 { margin-top: 0; font-size: 1.05rem; }
.post-steps p { margin-top: 0.3rem; font-size: 0.95rem; }
.post-faq { max-width: none; }
.post-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.post-card { padding: 1.2rem 1.3rem; border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: var(--radius-md); }
.post-card h3 { margin-top: 0; font-size: 1.05rem; }
.post-card p { margin-top: 0.4rem; font-size: 0.92rem; }
.post-scheme { padding: 1.4rem 1.5rem; border: 1px solid var(--line); border-radius: var(--radius-md); }
.post-scheme > * + * { margin-top: 0.9rem; }
.post-scheme-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; }
.post-scheme-head h3 { margin: 0; }
.post-scheme-badge {
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--gold) 14%, transparent);
  color: var(--gold-dim);
  font-size: 0.8rem;
  font-weight: 600;
}
.post-ideal { padding: 0.8rem 1rem; background: var(--bg-alt); border-radius: var(--radius-md); font-size: 0.92rem; }
.post-checklist { padding: 1.4rem 1.5rem; background: var(--bg-alt); border-radius: var(--radius-md); }
.post-checklist h3 { margin-top: 0; }
.post-body .post-checklist ul { list-style: none; padding-left: 0; margin-top: 0.8rem; }
.post-checklist li { position: relative; padding-left: 1.6rem; }
.post-checklist li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--gold); font-weight: 700; }
.post-figure img { display: block; width: 100%; height: auto; border-radius: var(--radius-md); }

.post-aside { position: sticky; top: 7rem; display: grid; gap: 1.5rem; }
.post-toc { border-left: 3px solid var(--gold); padding-left: 1.1rem; }
.post-toc p {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.6rem;
}
.post-toc li + li { margin-top: 0.45rem; }
.post-toc a { font-size: 0.88rem; line-height: 1.35; text-decoration: none; display: block; }
.post-toc a:hover { color: var(--gold-dim); text-decoration: underline; }
.post-aside-cta { padding: 1.4rem; background: var(--panel); color: var(--bg); border-radius: var(--radius-md); }
.post-aside-title { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; line-height: 1.15; }
.post-aside-cta p + p { margin-top: 0.5rem; font-size: 0.88rem; color: color-mix(in srgb, var(--bg) 82%, transparent); }
.post-aside-cta .btn { margin-top: 1rem; background: var(--gold); border-color: var(--gold); color: #fff; }
.post-aside-cta .btn:hover { background: var(--gold-dim); }
.post-back { font-size: 0.88rem; text-decoration: none; color: var(--teal); }
.post-back:hover { text-decoration: underline; }
.post-related { background: var(--bg-alt); }
.post-related h2 { font-size: var(--step-2); color: var(--gold); margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }

@media (max-width: 900px) {
  .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* minmax(0,1fr): sin esto la tabla (min-width 34rem) ensanchaba la columna y la nota se salía de la pantalla */
  .post-layout { grid-template-columns: minmax(0, 1fr); }
  .post-aside { position: static; }
}
@media (max-width: 560px) {
  .blog-grid { grid-template-columns: 1fr; }
  .post-cards { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .blog-card { transition: none; }
  .blog-card:hover, .blog-card:focus-visible { transform: none; }
}

/* ==========================================================================
   Ajustes para celulares y tabletas (van al final para ganar a las reglas base)
   ========================================================================== */

/* Evita desplazamiento horizontal accidental por elementos animados o anchos */
html, body { overflow-x: clip; }
img, video { max-width: 100%; }
/* Palabras largas (URLs, correos, términos técnicos) no rompen el ancho */
h1, h2, h3, p, li, dd, td, th, summary { overflow-wrap: break-word; }

/* Menú móvil: enlaces con área de toque cómoda y botón a todo el ancho */
@media (max-width: 900px) {
  .main-nav.is-open {
    max-height: calc(100svh - 100%);
    overflow-y: auto;
    box-shadow: 0 12px 24px rgba(23, 37, 26, 0.08);
  }
  .main-nav.is-open ul { gap: 0; align-items: stretch; }
  .main-nav.is-open a:not(.btn) {
    display: block;
    padding-block: 0.8rem;
    border-bottom: 1px solid var(--line);
  }
  .main-nav.is-open .btn { margin-top: 1rem; justify-content: center; width: 100%; }
  .nav-toggle { min-height: 44px; }

  /* Tabla comparativa: la primera columna queda fija al deslizar */
  .compare thead th:first-child,
  .compare tbody th {
    position: sticky;
    left: 0;
    z-index: 1;
  }
  .compare thead th:first-child { background: var(--panel); }
  .compare tbody th { background: var(--bg); box-shadow: 1px 0 0 var(--line); }
  .dark-band .compare tbody th { background: var(--panel); }

  /* Lista de servicios en tableta: la cifra junto a "Para quién" */
  .service-stat { max-width: 20rem; }
}

/* Celulares */
@media (max-width: 560px) {
  /* Botones principales a todo el ancho: más fáciles de tocar */
  .hero-actions .btn,
  .cta-band .btn,
  .form-actions .btn { flex: 1 1 100%; justify-content: center; min-height: 48px; }
  .cta-band .wrap > .btn { width: 100%; }

  .page-head h1 { font-size: clamp(2rem, 8.5vw, 2.6rem); }
  .page-head .lede, .hero p.lede { font-size: 1.1rem; }

  .service-item { padding: 1.5rem 1.25rem; }
  .service-stat { max-width: none; }

  /* Footer: columnas de enlaces en 2, marca y contacto a todo el ancho */
  .footer-grid,
  .footer-grid-wide { grid-template-columns: 1fr 1fr; gap: 1.75rem 1.25rem; }
  .footer-grid > :first-child,
  .footer-grid > :last-child { grid-column: 1 / -1; }
  .footer-grid ul li { margin-bottom: 0.15rem; }
  .footer-grid ul li a { display: inline-block; padding-block: 0.4rem; }
  .footer-bottom { flex-direction: column; }

  .breadcrumbs a { display: inline-block; padding-block: 0.3rem; }

  /* Aviso de que la tabla se desliza de lado (se queda fijo a la izquierda) */
  .table-scroll::before {
    content: "Desliza para ver más →";
    display: block;
    position: sticky;
    left: 0;
    padding: 0.5rem 0.85rem;
    font-size: 0.8rem;
    color: var(--teal);
    background: var(--bg-alt);
    border-bottom: 1px solid var(--line);
  }
  .compare { font-size: 0.86rem; }
  .compare th, .compare td { padding: 0.75rem 0.85rem; }

  .post-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-steps li { padding-left: 3.1rem; }
  .post-steps li::before { left: 0.8rem; }

  .contact-card { padding: 1.5rem 1.25rem; }
  /* 16px en campos: iOS no hace zoom automático al enfocarlos */
  .field input, .field select, .field textarea { font-size: 1rem; min-height: 48px; }
  .field textarea { min-height: 8rem; }
}

/* Dispositivos táctiles: sin efectos de "levantar" tarjetas que se quedan pegados */
@media (hover: none) {
  .blog-card:hover { transform: none; box-shadow: none; }
}
