/* JA Instalaciones & Mantenimiento: estilos compartidos (home, blog, legales, 404)
   v4: rediseño con fotos reales en primer plano, servicios por pestañas, galería con visor,
   barra de contacto fija en móvil. Movimiento: solo transform/opacity, curvas ease-out, menos de 300 ms. */

:root {
  --navy: #1B3A6B;
  --navy-dark: #132A50;
  --navy-ink: #0F2142;
  --ink: #16202C;
  --text: #2A2F36;
  --muted: #5A6270;
  --link: #2F5F96;
  --yellow: #F5B731;
  --yellow-soft: #FFF6DF;
  --wa: #168A47;          /* verde WhatsApp oscurecido: texto blanco con contraste AA */
  --wa-hover: #127A3E;
  --soft: #F4F6F9;
  --line: #E3E7EE;
  --line-strong: #CBD3DF;
  --display: 'Space Grotesk', system-ui, sans-serif;
  --body: 'Inter', system-ui, sans-serif;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --shadow: 0 1px 2px rgba(19,42,80,.06), 0 12px 32px -16px rgba(19,42,80,.28);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --nav-h: 101px;
  --z-nav: 100; --z-dock: 150; --z-float: 160;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { margin: 0; font-family: var(--body); color: var(--text); background: #FFFFFF; overflow-x: hidden; line-height: 1.6;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; }
picture { display: contents; }
a { color: var(--link); text-decoration: none; }
a, button, summary, [role="tab"] { touch-action: manipulation; }
button, .btn, .svc-tab, .dock a, .blog-filters a { -webkit-user-select: none; user-select: none; }
input, textarea, select, button { font-family: var(--body); font-size: 16px; }
::selection { background: rgba(245,183,49,.35); }
section[id], article[id], h2[id] { scroll-margin-top: calc(var(--nav-h) + 16px); }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.narrow { max-width: 780px; }
.pad { padding-top: clamp(56px, 8vw, 104px); padding-bottom: clamp(60px, 9vw, 112px); }
.bg-soft { background: var(--soft); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -0.02em; text-wrap: balance; }
p, li, figcaption, dd { text-wrap: pretty; }
h2.section-title { font-weight: 700; font-size: clamp(28px, 3.6vw, 40px); line-height: 1.1; color: var(--navy); margin: 0 0 14px; }
.lead { font-size: 17px; line-height: 1.65; max-width: 62ch; margin: 0; color: #3D4450; }

/* Foco visible solo con teclado */
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 6px; }
.hero :focus-visible, .contact-card :focus-visible, .cta-box :focus-visible, .footer :focus-visible { outline-color: var(--yellow); }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-weight: 700; font-size: 16px; line-height: 1.2;
  padding: 15px 24px; border-radius: var(--r-sm); border: 1.5px solid transparent; white-space: nowrap; cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 150ms ease, border-color 150ms ease, color 150ms ease; }
.btn:active { transform: scale(0.97); }
.btn-yellow { background: var(--yellow); color: var(--ink); }
.btn-ghost { border-color: rgba(255,255,255,.45); color: #FFFFFF; }
.btn-navy { background: var(--navy); color: #FFFFFF; }
.btn-wa { background: var(--wa); color: #FFFFFF; }
.btn svg { flex-shrink: 0; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Navegación ---------- */
.only-desktop { display: block; }
.only-mobile { display: none; }
@media (max-width: 899px) { .only-desktop { display: none; } .only-mobile { display: block; } }
@media (min-width: 900px) { #mobile-menu { display: none !important; } }
#mobile-menu[hidden] { display: none; }
.nav { position: sticky; top: 0; z-index: var(--z-nav); background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); }
.nav-inner { max-width: 1200px; margin: 0 auto; padding: 10px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: block; position: relative; width: 120px; height: 80px; overflow: hidden; flex-shrink: 0; }
.logo img { position: absolute; left: -12.5px; top: -21px; width: 145px; height: 128px; max-width: none; }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links > a.nl { color: var(--text); font-weight: 600; font-size: 15px; }
.nav-links > a.nl[aria-current="page"] { color: var(--navy); text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 2px; text-underline-offset: 7px; }
.nav-call, .nav-wa { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 14px; padding: 9px 15px; border-radius: var(--r-sm);
  font-variant-numeric: tabular-nums; transition: transform 160ms var(--ease-out), background-color 150ms ease; }
.nav-call { border: 1.5px solid var(--navy); color: var(--navy); }
.nav-wa { background: var(--wa); color: #FFFFFF; }
.nav-call:active, .nav-wa:active, .menu-btn:active { transform: scale(0.97); }
.menu-btn { background: none; border: none; padding: 10px; margin-right: -10px; cursor: pointer; border-radius: var(--r-sm); transition: transform 160ms var(--ease-out); }
.mobile-menu-inner { border-top: 1px solid var(--line); padding: 8px 24px 20px; display: flex; flex-direction: column; background: #FFFFFF; }
.mobile-menu-inner a { color: var(--ink); font-family: var(--display); font-weight: 700; font-size: 20px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.mobile-menu-inner a.m-call, .mobile-menu-inner a.m-wa { font-family: var(--body); font-size: 16px; text-align: center; border-radius: var(--r-sm); padding: 14px; margin-top: 12px; border-bottom: 0; }
.mobile-menu-inner a.m-call { border: 1.5px solid var(--navy); color: var(--navy); }
.mobile-menu-inner a.m-wa { background: var(--wa); color: #fff; }
#mobile-menu:not([hidden]) .mobile-menu-inner { transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out); }
@starting-style { #mobile-menu:not([hidden]) .mobile-menu-inner { opacity: 0; transform: translateY(-6px); } }

/* ---------- Hero (home) ---------- */
.hero { background: var(--navy-dark); color: #FFFFFF; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 5vw, 72px); align-items: center;
  padding-top: clamp(48px, 6vw, 88px); padding-bottom: clamp(56px, 7vw, 96px); }
.hero h1 { font-weight: 800; color: #FFFFFF; font-size: clamp(34px, 4.6vw, 58px); line-height: 1.04; letter-spacing: -0.03em; margin: 0 0 22px; max-width: 17ch; }
.hero-sub { color: #C9D5E8; font-size: clamp(17px, 1.6vw, 19px); line-height: 1.6; max-width: 44ch; margin: 0 0 32px; }
.hero-media { position: relative; padding: 0 0 48px 48px; }
.hero-media figure { margin: 0; }
.hm-main { aspect-ratio: 4 / 5; max-height: 600px; border-radius: var(--r-lg); overflow: hidden; background: var(--navy-ink); }
.hm-main img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; display: block; }
.hm-inset { position: absolute; left: 0; bottom: 0; width: 40%; aspect-ratio: 3 / 4; border-radius: var(--r-md); overflow: hidden;
  border: 6px solid var(--navy-dark); transform: rotate(-3deg); box-shadow: 0 20px 40px -18px rgba(0,0,0,.55); }
.hm-inset img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; display: block; }
.hm-note { position: absolute; right: 0; bottom: 8px; width: 52%; margin: 0; font-size: 13.5px; line-height: 1.4; color: #AFC0DA; padding-left: 14px; border-left: 2px solid var(--yellow); }

/* ---------- Franja de resumen ---------- */
.proof { border-bottom: 1px solid var(--line); }
.proof-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); padding-top: 44px; padding-bottom: 44px; align-items: start; }
.proof-summary h2 { font-size: 15px; letter-spacing: 0; color: var(--muted); font-family: var(--body); font-weight: 600; margin: 0 0 10px; }
.proof-summary p { margin: 0; font-size: 16.5px; line-height: 1.7; color: var(--text); }
.proof-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 22px 28px; }
.proof-list li { border-top: 2px solid var(--navy); padding-top: 12px; }
.proof-list strong { display: block; font-family: var(--display); font-size: 20px; color: var(--navy); letter-spacing: -0.01em; }
.proof-list span { display: block; font-size: 14.5px; color: var(--muted); margin-top: 2px; }

/* ---------- Servicios (pestañas) ---------- */
.svc-head { margin-bottom: 32px; }
.svc-tabs { display: flex; gap: 8px; margin: 0 0 28px; padding-bottom: 4px; }
.svc-tabs[hidden] { display: none; }
.svc-tab { flex-shrink: 0; background: #FFFFFF; border: 1.5px solid var(--line-strong); color: var(--ink); font-weight: 600; font-size: 15px;
  padding: 10px 18px; border-radius: 999px; cursor: pointer; transition: transform 160ms var(--ease-out), background-color 150ms ease, border-color 150ms ease, color 150ms ease; }
.svc-tab:active { transform: scale(0.97); }
.svc-tab[aria-selected="true"] { background: var(--navy); border-color: var(--navy); color: #FFFFFF; }
.svc-panels { display: flex; flex-direction: column; gap: 56px; }
.svc-panel { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
.svc-media { border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4 / 5; max-height: 540px; background: var(--soft); }
.svc-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.svc-body h3 { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.15; color: var(--ink); margin: 0 0 12px; }
.svc-body > p { font-size: 17px; line-height: 1.65; margin: 0 0 24px; max-width: 54ch; }
.svc-k { font-family: var(--body); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.svc-chips { list-style: none; margin: 0 0 28px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.svc-chips li { background: var(--soft); border: 1px solid var(--line); color: var(--ink); font-size: 14.5px; font-weight: 500; line-height: 1.4; padding: 8px 12px; border-radius: var(--r-sm); }
.svc-links { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--line); }
.svc-links a { display: flex; align-items: baseline; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); color: var(--navy); font-weight: 600; font-size: 15.5px; }
.svc-links a::after { content: "→"; margin-left: auto; transition: transform 200ms var(--ease-out); }
.svc-links a span { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink); background: var(--yellow); padding: 2px 7px; border-radius: 4px; flex-shrink: 0; }
.svc.is-tabs .svc-panels { display: block; }
.svc.is-tabs .svc-panel:not(.is-active) { display: none; }
.svc.is-tabs .svc-panel.is-active { animation: panel-in 240ms var(--ease-out); }
@keyframes panel-in { from { opacity: 0; transform: translateY(6px); } }

/* ---------- Cómo trabajamos ---------- */
.steps-sec { background: var(--soft); }
.steps { list-style: none; margin: 44px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.steps li { position: relative; padding-top: 68px; }
.step-n { position: absolute; top: 0; left: 0; width: 46px; height: 46px; border-radius: 999px; background: var(--yellow); color: var(--ink);
  display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 800; font-size: 20px; }
.steps li:not(:last-child)::after { content: ""; position: absolute; top: 22px; left: 62px; right: -16px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--navy) 0 10px, transparent 10px 16px); opacity: .45; }
.steps h3 { font-size: 21px; line-height: 1.2; color: var(--ink); margin: 0 0 10px; }
.steps p { font-size: 15.5px; line-height: 1.6; margin: 0; max-width: 36ch; }

/* ---------- Por qué ---------- */
.why-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.why-photo { margin: 0; }
.why-photo img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--r-lg); display: block; }
.why-photo figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; }
.why-list { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 32px; margin-top: 32px; }
.why { border-top: 2px solid var(--navy); padding-top: 14px; }
.why h3 { font-size: 19px; color: var(--ink); margin: 0 0 8px; }
.why p { font-size: 15.5px; line-height: 1.6; margin: 0; }

/* ---------- Trabajos (galería) ---------- */
.work-sec { background: var(--navy-dark); color: #FFFFFF; }
.work-sec h2.section-title { color: #FFFFFF; }
.work-sec .lead { color: #C9D5E8; }
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: clamp(150px, 15vw, 210px); grid-auto-flow: dense; gap: 12px; margin-top: 40px; }
.g-item { position: relative; margin: 0; border-radius: var(--r-md); overflow: hidden; background: var(--navy-ink); }
.g-tall { grid-row: span 2; }
.g-wide { grid-column: span 2; }
.g-item a { display: block; height: 100%; }
@media (min-width: 700px) {
  .gallery { grid-auto-flow: row; grid-template-rows: repeat(4, clamp(150px, 15vw, 210px)); }
  .g-item:nth-child(1) { grid-area: 1 / 1 / 3 / 2; }
  .g-item:nth-child(2) { grid-area: 1 / 2 / 2 / 4; }
  .g-item:nth-child(3) { grid-area: 1 / 4 / 3 / 5; }
  .g-item:nth-child(4) { grid-area: 2 / 2 / 4 / 3; }
  .g-item:nth-child(5) { grid-area: 2 / 3 / 4 / 4; }
  .g-item:nth-child(6) { grid-area: 4 / 2 / 5 / 4; }
  .g-item:nth-child(7) { grid-area: 3 / 1 / 5 / 2; }
  .g-item:nth-child(8) { grid-area: 3 / 4 / 5 / 5; }
}
.g-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 300ms var(--ease-out); }
.g-item a:focus-visible { outline: 3px solid var(--yellow); outline-offset: -3px; border-radius: var(--r-md); }
.g-item figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 14px 12px; font-size: 13.5px; line-height: 1.35; color: #FFFFFF;
  background: linear-gradient(to top, rgba(10,22,44,.85), rgba(10,22,44,0)); pointer-events: none; }

/* Visor de fotos */
.lb { padding: 0; border: 0; margin: 0; width: 100%; height: 100%; max-width: 100vw; max-height: 100dvh; background: transparent; color: #FFFFFF; overflow: hidden; }
.lb::backdrop { background: rgba(8,16,32,.92); }
.lb-inner { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 64px 72px 24px; }
.lb-img { max-width: min(100%, 1100px); max-height: calc(100dvh - 140px); object-fit: contain; border-radius: 6px; display: block;
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out); }
.lb[open] .lb-img { opacity: 1; transform: none; }
@starting-style { .lb[open] .lb-img { opacity: 0; transform: scale(0.97); } }
.lb-cap { font-size: 15px; color: #D6DEEA; text-align: center; margin: 0; }
.lb-count { font-variant-numeric: tabular-nums; color: #8FA3C4; margin-left: 8px; }
.lb button { position: absolute; width: 48px; height: 48px; border-radius: 999px; border: 0; background: rgba(255,255,255,.12); color: #FFFFFF;
  display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform 160ms var(--ease-out), background-color 150ms ease; }
.lb button:active { transform: scale(0.94); }
.lb-close { top: 12px; right: 12px; }
.lb-prev { left: 12px; top: 50%; margin-top: -24px; }
.lb-next { right: 12px; top: 50%; margin-top: -24px; }
.lb button:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }

/* ---------- Zona ---------- */
.zone-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.towns { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 4px; }
.towns li { font-family: var(--display); font-weight: 700; font-size: clamp(22px, 2.6vw, 32px); line-height: 1.25; color: var(--navy); letter-spacing: -0.02em; }
.towns li:not(:last-child)::after { content: "/"; color: var(--line-strong); font-weight: 500; margin: 0 4px 0 10px; }
.towns li:first-child { color: var(--ink); }
.towns li:first-child { background-image: linear-gradient(var(--yellow), var(--yellow)); background-repeat: no-repeat; background-size: calc(100% - 24px) .32em; background-position: 0 88%; }

/* ---------- Chips (compatibilidad) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.chips li { background: #FFFFFF; border: 1px solid var(--line); color: var(--navy); font-weight: 600; font-size: 14px; padding: 8px 16px; border-radius: 999px; }

/* ---------- FAQ ---------- */
.faq-sec { background: var(--soft); }
.faq-grid { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.faq-side { position: sticky; top: calc(var(--nav-h) + 24px); }
.faq-more { margin: 20px 0 0; font-size: 15px; color: var(--muted); }
.faq-more a { font-weight: 600; }
.faq { display: flex; flex-direction: column; border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line-strong); }
.faq summary { cursor: pointer; list-style: none; padding: 17px 40px 17px 0; position: relative; font-family: var(--display); font-weight: 700; font-size: 17px; line-height: 1.35; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; margin-top: -6px;
  background: linear-gradient(var(--navy), var(--navy)) center / 12px 2px no-repeat, linear-gradient(var(--navy), var(--navy)) center / 2px 12px no-repeat;
  transition: transform 200ms var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .a { padding: 0 0 18px; font-size: 15.5px; line-height: 1.7; max-width: 65ch; }
.faq .a p { margin: 0 0 10px; }
.faq .a p:last-child { margin: 0; }
.faq details[open] .a { animation: faq-in 220ms var(--ease-out); }
@keyframes faq-in { from { opacity: 0; transform: translateY(-4px); } }

/* ---------- Tarjetas de artículo ---------- */
.grid { display: grid; gap: 24px; }
.grid-posts { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 36px 28px; margin-top: 32px; }
.post-card { display: flex; flex-direction: column; gap: 14px; position: relative; }
.pc-media { display: block; aspect-ratio: 16 / 10; border-radius: var(--r-md); overflow: hidden; background: var(--soft); }
.pc-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 300ms var(--ease-out); }
.pc-body { display: flex; flex-direction: column; gap: 8px; }
.post-card .cat { font-size: 12.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--navy); }
.post-card h3 { font-size: 20px; line-height: 1.25; margin: 0; }
.post-card h3 a { color: var(--ink); }
.post-card h3 a::after { content: ""; position: absolute; inset: 0; } /* toda la tarjeta es clicable */
.post-card p { font-size: 15px; line-height: 1.6; margin: 0; color: #3D4450; }
.pc-meta { font-size: 13.5px; color: var(--muted); }
.blog-sec-head .lead a { font-weight: 600; white-space: nowrap; }

/* ---------- Contacto ---------- */
.contact-sec { background: #FFFFFF; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 56px); align-items: stretch; }
.contact-card { background: var(--navy); color: #FFFFFF; border-radius: var(--r-lg); padding: clamp(28px, 4vw, 44px); }
.contact-card h2 { font-size: clamp(28px, 3.4vw, 38px); line-height: 1.1; margin: 0 0 10px; color: #FFFFFF; }
.contact-lead { color: #C9D5E8; margin: 0 0 28px; font-size: 16.5px; }
.contact-list { margin: 0; display: grid; gap: 20px; }
.contact-list div { border-top: 1px solid rgba(255,255,255,.16); padding-top: 14px; }
.contact-list dt { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #9FB2D0; margin-bottom: 4px; }
.contact-list dd { margin: 0; font-size: 16px; line-height: 1.55; color: #FFFFFF; }
.contact-list a { color: #FFFFFF; text-decoration: underline; text-decoration-color: rgba(245,183,49,.7); text-underline-offset: 4px; }
.contact-list .tel { font-family: var(--display); font-size: 30px; font-weight: 700; text-decoration: none; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.form { display: flex; flex-direction: column; gap: 16px; background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(24px, 3.5vw, 36px); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: 14.5px; color: var(--ink); }
.field .opt { font-weight: 400; color: var(--muted); }
.form input, .form textarea { width: 100%; padding: 12px 14px; border-radius: var(--r-sm); border: 1.5px solid var(--line-strong); font-size: 16px; color: var(--ink); background: #FFFFFF;
  transition: border-color 150ms ease; }
.form textarea { resize: vertical; min-height: 110px; }
.form input::placeholder, .form textarea::placeholder { color: #707887; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--link); box-shadow: 0 0 0 3px rgba(47,95,150,.18); }
.form input[aria-invalid="true"] { border-color: #B42318; }
.field-err { color: #B42318; font-size: 14px; }
.field-err[hidden] { display: none; }
.form button { display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--wa); color: #FFFFFF; font-weight: 700; font-size: 16px; padding: 15px;
  border: none; border-radius: var(--r-sm); cursor: pointer; transition: transform 160ms var(--ease-out), background-color 150ms ease; }
.form button:active { transform: scale(0.97); }
.form small { font-size: 13px; color: var(--muted); line-height: 1.5; }
.form small a { color: var(--muted); text-decoration: underline; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-ink); color: #FFFFFF; padding: 56px 24px 36px; }
.footer-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; }
.footer h2 { font-size: 15px; color: #FFFFFF; margin: 0 0 12px; letter-spacing: 0; }
.footer p, .footer li { font-size: 14px; color: #C7D3E6; line-height: 1.8; margin: 0; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer a { color: #C7D3E6; }
.footer-logo { background: #FFFFFF; border-radius: var(--r-sm); padding: 6px 12px; display: inline-block; margin-bottom: 14px; }
.footer-logo .logo { width: 120px; height: 80px; }
.footer-bottom { max-width: 1200px; margin: 32px auto 0; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.14); font-size: 13px; color: #9FB2D0; }
.footer-bottom a { color: #9FB2D0; }

/* Botón flotante (escritorio) y barra fija (móvil) */
.wa-float { position: fixed; bottom: 24px; right: 24px; width: 56px; height: 56px; border-radius: 999px; background: var(--wa); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px -6px rgba(19,42,80,.45); z-index: var(--z-float); transition: transform 160ms var(--ease-out); }
.wa-float:active { transform: scale(0.94); }
.dock { display: none; }

/* ---------- Cabeceras de página (blog, legales) ---------- */
.page-head { background: var(--soft); border-bottom: 1px solid var(--line); padding: clamp(40px, 6vw, 72px) 24px clamp(36px, 5vw, 56px); }
.page-head h1 { font-weight: 800; color: var(--navy); font-size: clamp(32px, 4.6vw, 50px); line-height: 1.08; letter-spacing: -0.03em; margin: 12px 0 16px; max-width: 20ch; }
.crumbs { font-size: 13.5px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs span[aria-hidden] { margin: 0 7px; color: var(--line-strong); }
.meta { font-size: 14px; color: var(--muted); margin: 20px 0 0; line-height: 1.6; }

/* Blog: índice */
.blog-head { padding-left: 0; padding-right: 0; }
.bh-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.bh-mosaic { display: grid; grid-template-columns: 1.2fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px; height: 340px; }
.bh-mosaic div { border-radius: var(--r-md); overflow: hidden; background: #E7EBF1; }
.bh-mosaic .m1 { grid-row: span 2; }
.bh-mosaic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-body { padding-top: 32px; padding-bottom: clamp(60px, 9vw, 110px); }
.blog-filters-wrap { position: sticky; top: var(--nav-h); z-index: 5; background: rgba(255,255,255,.96); margin: 0 -24px; padding: 12px 24px; border-bottom: 1px solid var(--line); }
.blog-filters { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: none; }
.blog-filters::-webkit-scrollbar { display: none; }
.blog-filters a { display: inline-block; white-space: nowrap; border: 1.5px solid var(--line-strong); background: #FFFFFF; color: var(--navy); font-weight: 600; font-size: 14px; padding: 7px 14px;
  border-radius: 999px; transition: transform 160ms var(--ease-out), border-color 150ms ease, background-color 150ms ease; }
.blog-filters a:active { transform: scale(0.97); }
.blog-group { margin-top: 56px; scroll-margin-top: calc(var(--nav-h) + 72px); }
.bg-head h2 { font-size: clamp(24px, 2.8vw, 30px); color: var(--ink); margin: 0 0 6px; }
.bg-head p { margin: 0; color: var(--muted); font-size: 15.5px; }
.bg-head p a { font-weight: 600; white-space: nowrap; }

/* Blog: artículo */
.art-head { background: var(--soft); border-bottom: 1px solid var(--line); }
.art-head-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(28px, 5vw, 64px); align-items: center; padding-top: clamp(32px, 5vw, 64px); padding-bottom: clamp(36px, 5vw, 64px); }
.art-cat { display: inline-block; margin: 22px 0 0; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink);
  border-bottom: 3px solid var(--yellow); padding-bottom: 2px; }
.art-head h1 { font-weight: 800; color: var(--navy); font-size: clamp(30px, 4vw, 46px); line-height: 1.08; letter-spacing: -0.03em; margin: 14px 0 16px; }
.art-head .lead { font-size: 17.5px; }
.art-hero { margin: 0; }
.art-hero img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-lg); display: block; background: #E7EBF1; }
.art-hero figcaption { font-size: 13.5px; color: var(--muted); margin-top: 10px; }
.art-layout { display: grid; grid-template-columns: minmax(0, 700px) 260px; gap: clamp(40px, 6vw, 88px); justify-content: center; align-items: start;
  padding-top: clamp(36px, 5vw, 56px); padding-bottom: clamp(48px, 7vw, 80px); }
.art-aside { position: sticky; top: calc(var(--nav-h) + 24px); }
.aside-card { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.aside-k { font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--ink); margin: 0; }
.aside-card p { margin: 0; font-size: 14.5px; line-height: 1.5; }
.aside-card .btn { width: 100%; margin-top: 6px; }
.aside-tel { text-align: center; font-weight: 700; font-size: 17px; color: var(--navy); padding: 8px; border: 1.5px solid var(--navy); border-radius: var(--r-sm); font-variant-numeric: tabular-nums; }
.aside-small { font-size: 13px !important; color: var(--muted); text-align: center; }

.article { font-size: 17.5px; line-height: 1.75; color: var(--text); }
.article > * { max-width: 68ch; }
.article h2 { font-size: clamp(23px, 2.8vw, 29px); color: var(--navy); margin: 52px 0 14px; line-height: 1.2; }
.article h3 { font-size: 20px; color: var(--ink); margin: 34px 0 10px; }
.article p { margin: 0 0 20px; }
.article ul, .article ol { margin: 0 0 22px; padding-left: 24px; }
.article li { margin-bottom: 8px; }
.article ul li::marker { color: var(--navy); }
.article ol li::marker { color: var(--navy); font-weight: 700; font-family: var(--display); }
.article a { text-decoration: underline; text-decoration-color: rgba(47,95,150,.35); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.article strong { color: var(--ink); }
.article table { max-width: 100%; border-collapse: separate; border-spacing: 0; margin: 8px 0 28px; font-size: 15.5px; line-height: 1.5;
  border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; font-variant-numeric: tabular-nums; }
.article th, .article td { text-align: left; padding: 12px 14px; vertical-align: top; border-bottom: 1px solid var(--line); }
.article tr:last-child td { border-bottom: 0; }
.article thead th { background: var(--navy); color: #FFFFFF; font-weight: 700; font-family: var(--display); font-size: 15px; letter-spacing: 0; }
.article tbody tr:nth-child(even) td { background: #F8F9FB; }
.article tbody td:first-child { font-weight: 600; color: var(--ink); }
@media (min-width: 700px) { .article table { width: 100%; display: table; } }
@media (max-width: 699px) { .article table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; } .article th, .article td { min-width: 140px; } }
.article figure { margin: 8px 0 28px; }
.article figure img { width: 100%; max-height: 460px; object-fit: cover; border-radius: var(--r-md); display: block; }
.article figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }
.tldr { position: relative; background: var(--yellow-soft); border: 1px solid #F1DDA4; border-radius: var(--r-md); padding: 22px 24px 20px; margin: 0 0 36px; font-size: 17px; }
.tldr strong.t { display: inline-flex; align-items: center; gap: 8px; font-family: var(--body); font-size: 12.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink); margin-bottom: 8px; }
.tldr strong.t::before { content: ""; width: 10px; height: 14px; background: var(--ink); clip-path: polygon(60% 0, 0 58%, 45% 58%, 35% 100%, 100% 40%, 55% 40%); }
.tldr p, .tldr ul { margin: 0; }
.tldr p + p { margin-top: 10px; }
.note { background: var(--soft); border-left: 3px solid var(--navy); border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: 16px 20px; font-size: 16px; margin: 0 0 24px; }
.toc { background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 22px; margin: 0 0 36px; font-size: 15.5px; }
.toc strong { font-family: var(--display); color: var(--ink); }
.toc ol { margin: 8px 0 0; padding-left: 22px; }
.toc li { margin-bottom: 4px; }
.toc a { text-decoration: none; }
.article .faq { margin-top: 8px; }
.cta-box { background: var(--navy); color: #FFFFFF; border-radius: var(--r-lg); padding: clamp(26px, 4vw, 36px); margin: 52px 0 0;
  display: grid; gap: 20px; }
.article > .cta-box { max-width: none; }
.cta-box h2 { color: #FFFFFF; margin: 0 0 10px; font-size: clamp(22px, 2.6vw, 26px); line-height: 1.2; }
.cta-box p { color: #C9D5E8; margin: 0; font-size: 16px; line-height: 1.6; }
.cta-box a:not(.btn) { color: #FFFFFF; }
.cta-box .btn { text-decoration: none; }
.related { padding-top: 8px; padding-bottom: clamp(60px, 9vw, 110px); }
.related h2 { font-size: clamp(24px, 2.8vw, 30px); color: var(--ink); margin: 0; padding-top: 40px; border-top: 1px solid var(--line); }
.author-box { background: var(--soft); border-radius: var(--r-md); padding: 20px 22px; margin-top: 32px; font-size: 15px; line-height: 1.6; color: var(--muted); }
.article > .author-box { max-width: none; }
.author-box p { margin: 0; }
.author-box strong { color: var(--ink); }

/* ---------- Revelado al hacer scroll (solo si hay JS; sin JS todo es visible) ---------- */
.js-reveal [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 280ms var(--ease-out), transform 280ms var(--ease-out); transition-delay: var(--d, 0ms); }
.js-reveal [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Hover solo con ratón ---------- */
@media (hover: hover) and (pointer: fine) {
  a:hover { text-decoration: underline; text-underline-offset: 3px; }
  .btn:hover, .nav-call:hover, .nav-wa:hover, .post-card a:hover, .blog-filters a:hover, .svc-links a:hover, .g-item a:hover, .mobile-menu-inner a:hover, .aside-tel:hover, .art-cat:hover { text-decoration: none; }
  .btn-yellow:hover { background: #F7C24F; }
  .btn-navy:hover { background: var(--navy-dark); }
  .btn-ghost:hover { border-color: #FFFFFF; background: rgba(255,255,255,.08); }
  .btn-wa:hover, .nav-wa:hover, .form button:hover { background: var(--wa-hover); }
  .nav-call:hover, .aside-tel:hover { background: #EEF2F8; }
  .svc-tab:hover:not([aria-selected="true"]) { border-color: var(--navy); }
  .svc-links a:hover::after { transform: translateX(4px); }
  .g-item a:hover img { transform: scale(1.03); }
  .post-card:hover .pc-media img { transform: scale(1.03); }
  .post-card:hover h3 a { color: var(--navy); text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 2px; }
  .blog-filters a:hover { border-color: var(--navy); }
  .faq summary:hover { color: var(--navy); }
  .footer a:hover { color: #FFFFFF; }
  .lb button:hover { background: rgba(255,255,255,.22); }
}

/* ---------- Responsive ---------- */
@media (max-width: 999px) {
  .art-layout { grid-template-columns: minmax(0, 1fr); }
  .art-aside { display: none; }
  .faq-grid, .zone-grid { grid-template-columns: minmax(0, 1fr); }
  .faq-side { position: static; }
}
@media (max-width: 899px) {
  :root { --nav-h: 101px; }
  .hero-grid, .proof-grid, .why-grid, .contact-grid, .bh-grid, .art-head-grid { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { max-width: 16ch; }
  .hero-media { padding: 0 0 36px 28px; max-width: 560px; }
  .hm-main { aspect-ratio: 4 / 3; }
  .hm-main img { object-position: 50% 18%; }
  .hm-inset { width: 34%; }
  .hm-note { width: 56%; }
  .svc-tabs { overflow-x: auto; scrollbar-width: none; margin-left: -24px; margin-right: -24px; padding-left: 24px; padding-right: 24px; scroll-padding: 0 24px; scroll-snap-type: x proximity; }
  .svc-tabs::-webkit-scrollbar { display: none; }
  .svc-tab { scroll-snap-align: start; }
  .svc-panel { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .svc-media { aspect-ratio: 16 / 10; }
  .why-photo img { aspect-ratio: 16 / 10; }
  .bh-mosaic { height: 180px; }
  .art-hero img { aspect-ratio: 16 / 9; }
  .wa-float { display: none; }
  .dock { display: grid; grid-template-columns: 1fr 1.25fr; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-dock);
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); background: rgba(255,255,255,.97); border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px -12px rgba(19,42,80,.25); }
  .dock a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; border-radius: var(--r-sm); font-weight: 700; font-size: 16px;
    transition: transform 120ms var(--ease-out); }
  .dock a:active { transform: scale(0.97); }
  .dock-call { border: 1.5px solid var(--navy); color: var(--navy); }
  .dock-wa { background: var(--wa); color: #FFFFFF; }
  .footer { padding-bottom: calc(108px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 699px) {
  .wrap { padding-left: 18px; padding-right: 18px; }
  .nav-inner { padding-left: 18px; padding-right: 18px; }
  .svc-tabs { margin-left: -18px; margin-right: -18px; padding-left: 18px; padding-right: 18px; }
  .blog-filters-wrap { margin: 0 -18px; padding: 10px 18px; }
  .hero-ctas .btn { width: 100%; }
  .hm-note { display: none; }
  .hero-media { padding-bottom: 28px; }
  .proof-list { grid-template-columns: 1fr 1fr; gap: 18px 16px; }
  .proof-list strong { font-size: 17px; }
  .proof-list span { font-size: 13.5px; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .steps li { padding-top: 0; padding-left: 64px; min-height: 46px; }
  .steps li:not(:last-child)::after { top: 54px; bottom: -22px; left: 22px; right: auto; width: 2px; height: auto;
    background: repeating-linear-gradient(180deg, var(--navy) 0 10px, transparent 10px 16px); }
  .steps h3 { padding-top: 10px; }
  .why-list { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 150px; gap: 8px; }
  .g-item figcaption { font-size: 12.5px; padding: 24px 10px 9px; }
  .lb-inner { padding: 64px 12px 84px; }
  .lb-prev, .lb-next { top: auto; bottom: 16px; margin-top: 0; }
  .lb-prev { left: calc(50% - 60px); }
  .lb-next { right: calc(50% - 60px); }
  .lb-img { max-height: calc(100dvh - 200px); }
  .contact-list .tel { font-size: 26px; }
  .grid-posts { grid-template-columns: minmax(0, 1fr); }
  .article { font-size: 17px; }
  .tldr { padding: 18px 18px 16px; }
  .footer { padding-left: 18px; padding-right: 18px; }
}
@media (min-width: 700px) {
  .cta-box { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
  .cta-box .hero-ctas { flex-direction: column; }
  .art-layout .cta-box { grid-template-columns: minmax(0, 1fr); }
  .art-layout .cta-box .hero-ctas { flex-direction: row; }
}

/* ---------- Accesibilidad: reducir movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-property: color, background-color, border-color, opacity !important; }
  .js-reveal [data-reveal] { opacity: 1; transform: none; }
}
