/* =====================================================================
   Klimatick — Sistema de diseño
   Climatización en Marbella y Cádiz
   ===================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  /* Marca */
  --brand:        #0e6ca0;
  --brand-dark:   #0a5279;
  --brand-light:  #2a7fc1;
  --brand-soft:   #e7f2f9;
  --accent:       #ff5000;
  --accent-dark:  #e04600;

  /* Superficies */
  --ink:          #0f172a;
  --ink-2:        #111827;
  --topbar:       #1d1d1d;
  --surface:      #ffffff;
  --surface-alt:  #f6f9fc;
  --line:         #e3ebf2;
  --line-dark:    rgba(255, 255, 255, .1);

  /* Texto */
  --text:         #1a2b3c;
  --text-muted:   #6b7f93;
  --text-invert:  #ffffff;
  --text-invert-muted: #9ca3af;

  /* Tipografía */
  --font: 'Segoe UI', -apple-system, BlinkMacSystemFont, system-ui, Roboto,
          'Helvetica Neue', Arial, sans-serif;

  /* Métricas */
  --wrap: 1200px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 10px rgba(15, 23, 42, .06);
  --shadow:    0 14px 40px rgba(15, 23, 42, .1);
  --shadow-lg: 0 28px 60px rgba(15, 23, 42, .16);
  --header-h: 74px;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--surface);
  overflow-x: hidden;
}

img, video, svg { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--brand-dark); }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; font-weight: 700; color: var(--text); }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.05rem, 1.4vw, 1.25rem); }
p  { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }

:focus-visible { outline: 3px solid var(--brand-light); outline-offset: 2px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--brand); color: #fff; padding: .75rem 1.25rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- 3. Utilidades de layout ---------- */
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section--alt { background: var(--surface-alt); }
.section--dark { background: var(--ink); color: var(--text-invert); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--text-invert); }
.section--dark p { color: var(--text-invert-muted); }

.section-head { max-width: 680px; margin: 0 auto clamp(2rem, 4vw, 3.25rem); text-align: center; }
.section-head p { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 0; }
.section--dark .section-head p { color: var(--text-invert-muted); }

.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--brand); margin-bottom: .75rem;
}
.section--dark .eyebrow { color: #60a5fa; }

.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- 4. Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .85rem 1.6rem; border: 2px solid transparent; border-radius: 999px;
  font-size: .95rem; font-weight: 700; line-height: 1; cursor: pointer;
  text-align: center; transition: transform .2s ease, background .2s ease,
              border-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 1.05em; height: 1.05em; flex-shrink: 0; }

.btn--primary { background: var(--brand); color: #fff; box-shadow: 0 8px 22px rgba(14, 108, 160, .3); }
.btn--primary:hover { background: var(--brand-dark); color: #fff; }

.btn--accent { background: var(--accent); color: #fff; box-shadow: 0 8px 22px rgba(255, 80, 0, .3); }
.btn--accent:hover { background: var(--accent-dark); color: #fff; }

.btn--outline { border-color: var(--brand); color: var(--brand); background: transparent; }
.btn--outline:hover { background: var(--brand); color: #fff; }

.btn--ghost { border-color: rgba(255, 255, 255, .35); color: #fff; background: rgba(255, 255, 255, .08); }
.btn--ghost:hover { background: rgba(255, 255, 255, .18); border-color: #fff; color: #fff; }

.btn--whatsapp { background: #25d366; color: #fff; }
.btn--whatsapp:hover { background: #1db954; color: #fff; }

.btn--sm { padding: .6rem 1.15rem; font-size: .85rem; }
.btn--lg { padding: 1.05rem 2.1rem; font-size: 1.02rem; }

/* ---------- 5. Barra superior ---------- */
.topbar {
  background: var(--topbar); color: #cfd6dd; font-size: .8rem;
  padding: .5rem 0; border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.topbar .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.75rem; }
.topbar a { color: #cfd6dd; }
.topbar a:hover { color: #fff; }
.topbar-item { display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap; }
.topbar-item svg { width: 14px; height: 14px; opacity: .75; flex-shrink: 0; }
.topbar-right { margin-left: auto; }

/* ---------- 6. Cabecera / navegación ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; background: #fff;
  border-bottom: 1px solid var(--line); transition: box-shadow .25s ease;
}
.site-header.is-stuck { box-shadow: var(--shadow-sm); }
.site-header .wrap {
  display: flex; align-items: center; gap: 1.25rem; min-height: var(--header-h);
}
.logo img { height: 38px; width: auto; }

.nav { margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.nav-list > li { position: relative; }
.nav-list a {
  display: block; padding: .6rem .85rem; border-radius: 8px;
  font-size: .93rem; font-weight: 600; color: var(--brand); white-space: nowrap;
}
.nav-list a:hover, .nav-list a:focus-visible { background: var(--brand-soft); }
.nav-list a[aria-current="page"] { color: var(--accent); }

.has-sub > a::after {
  content: ''; display: inline-block; width: .42em; height: .42em; margin-left: .45em;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.submenu {
  position: absolute; top: calc(100% + .35rem); left: 0; min-width: 270px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: .5rem; list-style: none; margin: 0;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.has-sub:hover > .submenu,
.has-sub:focus-within > .submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.submenu a { padding: .6rem .8rem; font-weight: 500; white-space: nowrap; }

.header-cta { display: flex; align-items: center; gap: .6rem; }

.nav-toggle {
  display: none; width: 44px; height: 44px; margin-left: auto; padding: 0;
  background: transparent; border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
}
.nav-toggle span {
  display: block; width: 20px; height: 2px; margin: 4px auto; border-radius: 2px;
  background: var(--brand); transition: transform .25s ease, opacity .25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- 7. Hero ---------- */
.hero {
  position: relative; display: flex; align-items: center;
  min-height: clamp(560px, 80vh, 780px); padding: clamp(3rem, 7vw, 5.5rem) 0;
  background: var(--ink) center / cover no-repeat;
  color: #fff; overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(8, 17, 32, .9) 0%, rgba(8, 17, 32, .72) 45%, rgba(8, 17, 32, .35) 100%);
}
.hero > .wrap { position: relative; z-index: 1; }
.hero h1, .hero h2, .hero h3 { color: #fff; }
.hero p { color: rgba(255, 255, 255, .85); }

.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero-copy { max-width: 620px; }
.hero-lead { font-size: 1.06rem; max-width: 52ch; margin-bottom: 1.75rem; }

.badge {
  display: inline-flex; align-items: center; gap: .5rem; margin-bottom: 1.25rem;
  padding: .45rem 1rem; border-radius: 999px; background: rgba(14, 108, 160, .85);
  border: 1px solid rgba(96, 165, 250, .5);
  font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #fff;
}
.badge::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%; background: #7dd3fc;
  box-shadow: 0 0 0 0 rgba(125, 211, 252, .7); animation: pulse 2.2s infinite;
}
@keyframes pulse {
  70%  { box-shadow: 0 0 0 9px rgba(125, 211, 252, 0); }
  100% { box-shadow: 0 0 0 0 rgba(125, 211, 252, 0); }
}

.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.hero-phone { display: flex; align-items: center; gap: .85rem; }
.hero-phone svg { width: 40px; height: 40px; padding: 10px; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #7dd3fc; }
.hero-phone strong { display: block; font-size: 1.35rem; color: #fff; letter-spacing: .02em; }
.hero-phone small { color: rgba(255, 255, 255, .65); font-size: .8rem; }

/* Tarjetas de estadísticas */
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.stat-card {
  padding: 1.75rem 1.5rem; border-radius: var(--radius-lg); text-align: center;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: transform .3s ease, background .3s ease;
}
.stat-card:hover { transform: translateY(-4px); background: rgba(255, 255, 255, .12); }
.stat-value { font-size: clamp(2rem, 3.6vw, 2.9rem); font-weight: 700; line-height: 1; color: #fff; }
.stat-label { margin-top: .6rem; font-size: .82rem; color: rgba(255, 255, 255, .7); }

/* Cinta de confianza */
.trust-strip { background: var(--ink-2); border-top: 1px solid var(--line-dark); padding: 1.5rem 0; }
.trust-strip .wrap { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
.trust-item { display: flex; align-items: center; gap: .7rem; color: #e5e7eb; font-size: .82rem;
  font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.trust-item svg { width: 22px; height: 22px; color: #60a5fa; flex-shrink: 0; }

/* ---------- 8. Tarjetas ---------- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.9rem 1.6rem; height: 100%;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.card p { color: var(--text-muted); font-size: .95rem; margin-bottom: 0; }
.card h3 { margin-bottom: .55rem; }

.card-icon {
  display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 1.15rem;
  border-radius: 14px; background: var(--brand-soft); color: var(--brand);
}
.card-icon svg { width: 26px; height: 26px; }

.card--feature { background: var(--brand); border-color: var(--brand); color: #fff; }
.card--feature h3, .card--feature p { color: #fff; }
.card--feature p { opacity: .9; }
.card--feature .card-icon { background: rgba(255, 255, 255, .18); color: #fff; }
.card--feature .card-link { color: #fff; }

.card-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.15rem 0 0; padding: 0; list-style: none; }
.card-tags li {
  padding: .3rem .75rem; border-radius: 999px; font-size: .75rem; font-weight: 600;
  background: rgba(255, 255, 255, .18); color: #fff;
}
.card-link { display: inline-flex; align-items: center; gap: .4rem; margin-top: 1.15rem; font-weight: 700; font-size: .9rem; }
.card-link::after { content: '→'; transition: transform .2s ease; }
.card-link:hover::after { transform: translateX(4px); }

/* Tarjetas sobre fondo oscuro */
.section--dark .card {
  background: rgba(255, 255, 255, .05); border-color: var(--line-dark); color: #fff;
}
.section--dark .card:hover { background: rgba(255, 255, 255, .1); box-shadow: var(--shadow-lg); }
.section--dark .card p { color: rgba(255, 255, 255, .68); }
.section--dark .card-icon { background: rgba(96, 165, 250, .18); color: #7dd3fc; }

/* ---------- 9. Bloques de texto + imagen ---------- */
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split--reverse .split-media { order: -1; }
.split-media img, .split-media video {
  width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow); object-fit: cover;
}
.split-copy p { color: var(--text-muted); }
.section--dark .split-copy p { color: var(--text-invert-muted); }

.check-list { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: .9rem; }
.check-list li { display: flex; gap: .8rem; align-items: flex-start; font-size: .96rem; }
.check-list li::before {
  content: '✓'; flex-shrink: 0; display: grid; place-items: center;
  width: 24px; height: 24px; border-radius: 50%; margin-top: .1rem;
  background: var(--brand-soft); color: var(--brand); font-size: .8rem; font-weight: 700;
}
.section--dark .check-list li::before { background: rgba(96, 165, 250, .2); color: #7dd3fc; }
.check-list strong { display: block; }
.check-list span { color: var(--text-muted); font-size: .9rem; }
.section--dark .check-list span { color: var(--text-invert-muted); }

/* ---------- 10. Zona de actuación ---------- */
.zone-box {
  background: var(--ink-2); border-radius: var(--radius-lg); padding: 1.9rem 1.6rem;
  color: #fff; max-width: 580px; width: 100%;
}
.zone-box h2 { font-size: 1.32rem; color: #fff; margin-bottom: .4rem; }
.zone-box > p { font-size: .88rem; color: var(--text-invert-muted); margin-bottom: 1.25rem; }
.zone-pills { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.15rem; padding: 0; list-style: none; }
.zone-pill {
  padding: .38rem .9rem; border-radius: 20px; font-size: .82rem; font-weight: 500;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12);
  color: #d1d5db; cursor: pointer; transition: all .2s ease; user-select: none;
}
.zone-pill:hover, .zone-pill.is-active {
  background: rgba(59, 130, 246, .28); border-color: rgba(99, 160, 255, .65); color: #93c5fd;
}
.zone-foot { text-align: center; font-size: .7rem; color: #4b5563; letter-spacing: .4px; padding-top: .5rem; }
.zone-map { border-radius: 12px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .07); line-height: 0; }
.zone-map svg { width: 100%; height: auto; }
.zone-dots text {
  font-family: var(--font); font-size: 11px; font-weight: 700;
  fill: #e2e8f0; text-anchor: middle;
}

/* ---------- 11. Marquesina ---------- */
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 2.5rem; width: max-content; animation: marquee 26s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { font-size: 1.05rem; font-weight: 700; color: var(--text-muted); white-space: nowrap; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- 12. Galería de proyectos ---------- */
.project-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.project {
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 1rem; padding: 1.25rem; overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease, background .3s ease;
}
.project:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); background: rgba(255, 255, 255, .12); }
.project img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 1rem; margin-bottom: 1rem;
  filter: grayscale(100%); transition: filter .5s ease, transform .5s ease;
}
.project:hover img { filter: grayscale(0); transform: scale(1.02); }
.project h3 { margin: 0 0 .25rem; font-size: 1rem; color: #fff; }
.project p { margin: 0; font-size: .78rem; opacity: .65; color: #fff; }

/* ---------- 13. Pasos del proceso ---------- */
.steps { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; }
.steps::before {
  content: ''; position: absolute; top: 32px; left: 10%; right: 10%;
  height: 1px; background: #d0dce8; z-index: 0;
}
.section--dark .steps::before { background: rgba(255, 255, 255, .14); }
.step { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 .5rem; }
.step-num {
  position: relative; display: grid; place-items: center;
  width: 64px; height: 64px; margin-bottom: 1.1rem; border-radius: 50%;
  background: var(--brand-light); color: #fff; font-size: 1.4rem; font-weight: 700;
  box-shadow: 0 4px 16px rgba(42, 127, 193, .3);
  transition: transform .3s ease, box-shadow .3s ease, background .3s ease;
}
.step-num::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--brand-light); opacity: 0; transform: scale(1);
  transition: opacity .3s ease, transform .4s ease;
}
.step:hover .step-num { background: #1e5f9a; transform: scale(1.15); box-shadow: 0 8px 28px rgba(42, 127, 193, .5); }
.step:hover .step-num::after { opacity: 1; transform: scale(1.45); }
.step h3 { font-size: 1rem; margin-bottom: .6rem; }
.step p { font-size: .86rem; color: var(--text-muted); line-height: 1.65; max-width: 210px; margin: 0; }

/* ---------- 14. Contadores ---------- */
.counter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; text-align: center; }
.counter-value { font-size: clamp(2.2rem, 4vw, 3.1rem); font-weight: 700; line-height: 1; color: var(--brand); }
.section--dark .counter-value { color: #7dd3fc; }
.counter-label { margin-top: .5rem; font-size: .85rem; color: var(--text-muted); }
.section--dark .counter-label { color: var(--text-invert-muted); }

/* ---------- 15. FAQ ---------- */
.faq { max-width: 860px; margin-inline: auto; display: grid; gap: .75rem; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.faq-item[open] { border-color: var(--brand-light); box-shadow: var(--shadow-sm); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.15rem 1.4rem; font-weight: 700; font-size: 1rem; cursor: pointer; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; flex-shrink: 0; display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%; background: var(--brand-soft);
  color: var(--brand); font-size: 1.25rem; font-weight: 400; line-height: 1;
  transition: transform .25s ease;
}
.faq-item[open] summary::after { content: '−'; transform: rotate(180deg); }
.faq-answer { padding: 0 1.4rem 1.3rem; color: var(--text-muted); font-size: .96rem; }
.faq-answer p:last-child { margin-bottom: 0; }

/* ---------- 16. CTA ---------- */
.cta {
  background: linear-gradient(115deg, var(--brand-dark) 0%, var(--brand) 55%, var(--brand-light) 100%);
  color: #fff; text-align: center;
}
.cta h2 { color: #fff; }
.cta p { color: rgba(255, 255, 255, .88); max-width: 54ch; margin-inline: auto; }
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: 2rem; }

/* ---------- 17. Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact-list { display: grid; gap: 1.1rem; margin: 2rem 0 0; padding: 0; list-style: none; }
.contact-item { display: flex; gap: 1rem; align-items: flex-start; }
.contact-item .card-icon { margin-bottom: 0; width: 46px; height: 46px; flex-shrink: 0; }
.contact-item h3 { font-size: .95rem; margin-bottom: .15rem; }
.contact-item a, .contact-item span { color: var(--text-muted); font-size: .95rem; }
.section--dark .contact-item a, .section--dark .contact-item span { color: var(--text-invert-muted); }
.section--dark .contact-item a:hover { color: #fff; }

.form-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 3vw, 2.4rem); box-shadow: var(--shadow);
}
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.field { display: grid; gap: .4rem; margin-bottom: 1rem; }
.field label { font-size: .86rem; font-weight: 700; color: var(--text); }
.field .req { color: var(--accent); }
.field input, .field select, .field textarea {
  width: 100%; padding: .8rem 1rem; font: inherit; font-size: .95rem; color: var(--text);
  background: var(--surface-alt); border: 1px solid var(--line); border-radius: 10px;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; background: #fff; border-color: var(--brand-light);
  box-shadow: 0 0 0 3px rgba(42, 127, 193, .15);
}
.field textarea { min-height: 130px; resize: vertical; }
.field-error { color: #dc2626; font-size: .8rem; min-height: 1em; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #dc2626; }

.field-check { display: flex; gap: .65rem; align-items: flex-start; margin-bottom: 1.25rem; font-size: .86rem; color: var(--text-muted); }
.field-check input { width: 18px; height: 18px; margin-top: .15rem; flex-shrink: 0; accent-color: var(--brand); }

.form-status { margin-top: 1rem; padding: .9rem 1.1rem; border-radius: 10px; font-size: .9rem; display: none; }
.form-status.is-ok    { display: block; background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.form-status.is-error { display: block; background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* ---------- 18. Blog ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.75rem; }
.post-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden; height: 100%;
  transition: transform .3s ease, box-shadow .3s ease;
}
.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.post-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.post-card-body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.post-meta { font-size: .78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: .6rem; }
.post-card h2 { font-size: 1.15rem; margin-bottom: .6rem; }
.post-card h2 a { color: var(--text); }
.post-card h2 a:hover { color: var(--brand); }
.post-card p { font-size: .92rem; color: var(--text-muted); flex: 1; }

.page-hero {
  background: linear-gradient(115deg, var(--ink) 0%, #16233c 100%);
  color: #fff; padding: clamp(3rem, 6vw, 5rem) 0; text-align: center;
}
.page-hero h1 { color: #fff; margin-bottom: .6rem; }
.page-hero p { color: rgba(255, 255, 255, .8); max-width: 60ch; margin-inline: auto; margin-bottom: 0; }

.breadcrumb { font-size: .82rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.breadcrumb a { color: var(--brand); }

/* Contenido de artículos y páginas legales */
.prose { max-width: 780px; margin-inline: auto; }
.prose h2 { font-size: 1.6rem; margin-top: 2.5rem; }
.prose h3 { font-size: 1.2rem; margin-top: 1.9rem; }
.prose p, .prose li { color: #35485c; }
.prose ul, .prose ol { display: grid; gap: .4rem; margin-bottom: 1.5rem; }
.prose img { border-radius: var(--radius); margin: 2rem 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.75rem 0; font-size: .92rem; }
.prose th, .prose td { padding: .7rem .9rem; border: 1px solid var(--line); text-align: left; }
.prose th { background: var(--surface-alt); font-weight: 700; }
.prose blockquote {
  margin: 1.75rem 0; padding: 1rem 1.4rem; border-left: 4px solid var(--brand-light);
  background: var(--surface-alt); border-radius: 0 var(--radius) var(--radius) 0; color: var(--text-muted);
}

/* ---------- 19. Pie de página ---------- */
.site-footer { background: var(--ink); color: var(--text-invert-muted); padding: clamp(3rem, 6vw, 4.5rem) 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2.5rem; }
.site-footer h3 { font-size: .92rem; color: #fff; margin-bottom: 1.1rem; letter-spacing: .06em; text-transform: uppercase; }
.site-footer p { font-size: .92rem; }
.site-footer img { height: 34px; width: auto; margin-bottom: 1.1rem; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.footer-links a { color: var(--text-invert-muted); font-size: .92rem; }
.footer-links a:hover { color: #fff; }
.footer-social { display: flex; gap: .6rem; margin-top: 1.25rem; }
.footer-social a {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255, 255, 255, .08); color: #fff; transition: background .2s ease;
}
.footer-social a:hover { background: var(--brand); }
.footer-social svg { width: 17px; height: 17px; }
.footer-bottom {
  margin-top: 3rem; padding: 1.35rem 0; border-top: 1px solid var(--line-dark);
  font-size: .82rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between;
}

/* ---------- 20. Botón flotante de WhatsApp ---------- */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: #25d366; color: #fff; box-shadow: 0 8px 26px rgba(37, 211, 102, .45);
  transition: transform .25s ease, background .25s ease;
}
.wa-float:hover { transform: scale(1.08); background: #00d34d; color: #fff; }
.wa-float svg { width: 30px; height: 30px; }

/* ---------- 21. Banner de cookies ---------- */
.cookie-banner {
  position: fixed; left: 20px; bottom: 20px; z-index: 120; max-width: 380px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 1.4rem; display: none;
}
.cookie-banner.is-visible { display: block; }
.cookie-banner h3 { font-size: 1rem; margin-bottom: .5rem; }
.cookie-banner p { font-size: .82rem; color: var(--text-muted); margin-bottom: 1rem; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: .5rem; }

/* ---------- 22. Animaciones de entrada ---------- */
/* Solo ocultamos el contenido si el JS ha arrancado: sin JS (o si algo
   falla) todo se ve igualmente. La clase `js` la pone un script en <head>. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- 23. Responsive ---------- */
@media (max-width: 1080px) {
  .grid-4, .project-grid, .counter-grid, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps::before { display: none; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto; margin: 0; background: #fff;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    max-height: calc(100vh - var(--header-h)); overflow-y: auto; z-index: 99;
    transform: translateY(-120%); transition: transform .3s ease; visibility: hidden;
  }
  .nav.is-open { transform: translateY(0); visibility: visible; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; padding: .75rem 1.25rem 1.25rem; }
  .nav-list a { padding: .8rem .5rem; border-radius: 0; border-bottom: 1px solid var(--line); }
  .submenu {
    position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none;
    border: 0; border-radius: 0; padding: 0 0 0 1rem; min-width: 0; display: none;
  }
  .has-sub.is-open > .submenu { display: block; }
  .header-cta .btn--outline { display: none; }

  .hero-grid, .split, .contact-grid { grid-template-columns: 1fr; }
  .split--reverse .split-media { order: 0; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust-strip .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar-item--hide-sm { display: none; }
}

@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4, .project-grid, .counter-grid, .steps,
  .post-grid, .footer-grid, .form-row, .trust-strip .wrap { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-card { padding: 1.25rem 1rem; }
  .hero { min-height: auto; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .topbar .wrap { justify-content: center; }
  .topbar-right { margin-left: 0; }
  .cookie-banner { left: 12px; right: 12px; bottom: 12px; max-width: none; }
  .footer-bottom { justify-content: center; text-align: center; }
  .steps { gap: 2rem; }
  .step p { max-width: none; }
}

/* ---------- 24. Impresión ---------- */
@media print {
  .site-header, .topbar, .wa-float, .cookie-banner, .cta, .site-footer { display: none !important; }
  body { color: #000; }
}

/* =====================================================================
   25. Componentes de landing y conversión
   ===================================================================== */

/* ---------- Migas de pan ---------- */
.crumbs { font-size: .8rem; color: rgba(255, 255, 255, .7); margin-bottom: 1.5rem; }
.crumbs a { color: rgba(255, 255, 255, .9); text-decoration: underline; text-underline-offset: 3px; }
.crumbs a:hover { color: #fff; }
.crumbs span { opacity: .6; margin: 0 .15rem; }
.page-hero .crumbs { margin-bottom: 1.25rem; }
.section .crumbs, .prose .crumbs { color: var(--text-muted); }
.section .crumbs a { color: var(--brand); }

/* ---------- Héroe de landing (con formulario) ---------- */
.hero--landing { min-height: auto; padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(3rem, 6vw, 4.5rem); }
.hero--landing::after {
  background: linear-gradient(105deg, rgba(8, 17, 32, .95) 0%, rgba(8, 17, 32, .88) 50%, rgba(8, 17, 32, .7) 100%);
}
.hero-grid--form { grid-template-columns: 1.05fr .95fr; align-items: start; gap: clamp(2rem, 4vw, 3.5rem); }
.hero-grid--form .hero-copy { max-width: 620px; padding-top: .5rem; }
.hero--landing h1 { font-size: clamp(1.9rem, 3.4vw, 2.85rem); }
.hero-form { position: relative; }

/* ---------- Lista de confianza ---------- */
.trust-list {
  display: flex; flex-wrap: wrap; gap: .6rem 1.4rem;
  list-style: none; margin: 0 0 1.75rem; padding: 0;
}
.trust-list li {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .84rem; font-weight: 600; color: rgba(255, 255, 255, .88);
}
.trust-list svg { width: 16px; height: 16px; color: #7dd3fc; flex-shrink: 0; }
.trust-list--center { justify-content: center; margin-bottom: 0; margin-top: 1.75rem; }

/* ---------- Mega menú de servicios ---------- */
.submenu--mega {
  min-width: 620px; padding: 1rem; left: 50%; transform: translate(-50%, 8px);
  display: grid; gap: .5rem;
}
.has-sub:hover > .submenu--mega,
.has-sub:focus-within > .submenu--mega { transform: translate(-50%, 0); }
.mega-list {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .15rem; list-style: none; margin: 0; padding: 0;
}
.mega-list a {
  display: flex; gap: .75rem; align-items: flex-start;
  padding: .7rem .75rem; border-radius: 10px; white-space: normal;
}
.mega-ico {
  display: grid; place-items: center; flex-shrink: 0;
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--brand-soft); color: var(--brand);
}
.mega-ico svg { width: 17px; height: 17px; }
.mega-list strong { display: block; font-size: .9rem; font-weight: 700; color: var(--text); }
.mega-list small { display: block; font-size: .78rem; line-height: 1.45; color: var(--text-muted); font-weight: 400; }
.mega-list a:hover strong { color: var(--brand); }
.mega-foot { margin: 0; padding-top: .5rem; border-top: 1px solid var(--line); text-align: center; }
.mega-foot a { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 700; padding: .5rem; }
.mega-foot svg { width: 14px; height: 14px; }

/* ---------- Submenú de zonas en columnas ---------- */
.submenu--cols {
  min-width: 420px; display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .1rem;
}
.submenu--cols .submenu-all { grid-column: 1 / -1; border-top: 1px solid var(--line); margin-top: .35rem; padding-top: .35rem; }
.submenu--cols .submenu-all a { font-weight: 700; color: var(--brand); }

/* ---------- Tarjetas de zona ---------- */
.zone-card {
  display: block; padding: 1.5rem 1.35rem; height: 100%;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.zone-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.zone-card__ico {
  display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 1rem;
  border-radius: 12px; background: var(--brand-soft); color: var(--brand);
}
.zone-card__ico svg { width: 21px; height: 21px; }
.zone-card h3 { font-size: 1.05rem; margin-bottom: .3rem; color: var(--text); }
.zone-card:hover h3 { color: var(--brand); }
.zone-card p { margin: 0; font-size: .85rem; color: var(--text-muted); }

/* ---------- Chips de zonas cercanas ---------- */
.nearby { margin-top: clamp(2.5rem, 5vw, 3.5rem); padding-top: 2rem; border-top: 1px solid var(--line); }
.nearby h3 { font-size: 1rem; margin-bottom: 1rem; }
.chips { display: flex; flex-wrap: wrap; gap: .6rem; }
.chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1rem; border-radius: 999px; font-size: .88rem; font-weight: 600;
  background: #fff; border: 1px solid var(--line); color: var(--brand);
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.chip:hover { background: var(--brand); border-color: var(--brand); color: #fff; transform: translateY(-2px); }
.chip svg { width: 15px; height: 15px; }
.chip--all { background: var(--brand-soft); border-color: transparent; }

/* ---------- Sección de conversión ---------- */
.section--convert { background: var(--surface-alt); border-top: 1px solid var(--line); }
.contact-direct { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

/* ---------- Formulario: variantes y detalles ---------- */
.form-title { font-size: 1.25rem; margin-bottom: .35rem; }
.form-sub { font-size: .88rem; color: var(--text-muted); margin-bottom: 1.25rem; }
.form-card--compact { padding: 1.5rem; box-shadow: var(--shadow-lg); }
.form-card--compact .field { margin-bottom: .75rem; }
.form-card--compact .form-title { font-size: 1.15rem; }
.hero-form .form-card { border: 0; }

.form-submit { width: 100%; margin-top: .25rem; }
.form-legal { margin: .75rem 0 0; font-size: .76rem; color: var(--text-muted); text-align: center; }

/* Campos trampa: fuera de pantalla, nunca visibles ni enfocables */
.hp-field {
  position: absolute !important; left: -9999px !important; top: auto !important;
  width: 1px; height: 1px; overflow: hidden;
}

/* ---------- CTA móvil dentro del menú ---------- */
.nav-cta-mobile { display: none; }

/* ---------- Barra fija de contacto (móvil) ---------- */
.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
  display: none; background: #fff; border-top: 1px solid var(--line);
  box-shadow: 0 -4px 20px rgba(15, 23, 42, .1);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.mobile-bar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .2rem; padding: .6rem .25rem; font-size: .72rem; font-weight: 700;
  color: var(--brand); text-align: center;
}
.mobile-bar svg { width: 20px; height: 20px; }
.mobile-bar a + a { border-left: 1px solid var(--line); }
.mobile-bar__cta { background: var(--accent); color: #fff !important; border-left-color: var(--accent) !important; }

/* ---------- Pie: contacto directo ---------- */
.footer-contact { display: grid; gap: .5rem; margin: 1.25rem 0 0; }
.footer-contact a { display: inline-flex; align-items: center; gap: .5rem; color: #fff; font-size: .92rem; font-weight: 600; }
.footer-contact a:hover { color: #7dd3fc; }
.footer-contact svg { width: 15px; height: 15px; color: #7dd3fc; flex-shrink: 0; }
.footer-links--2col { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* =====================================================================
   26. Responsive de los componentes nuevos
   ===================================================================== */
@media (max-width: 1080px) {
  .submenu--mega { min-width: 520px; }
  .mega-list { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .hero-grid--form { grid-template-columns: 1fr; }
  .hero-grid--form .hero-copy { max-width: none; }
  .hero-form { margin-top: .5rem; }

  .submenu--mega, .submenu--cols {
    position: static; min-width: 0; transform: none; display: none;
    padding: 0 0 0 1rem; box-shadow: none; border: 0; border-radius: 0;
  }
  .has-sub.is-open > .submenu--mega,
  .has-sub.is-open > .submenu--cols { display: block; }
  .submenu--cols { display: none; }
  .has-sub.is-open > .submenu--cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mega-list a { padding: .65rem .25rem; }
  .mega-list small { display: none; }

  .nav-cta-mobile {
    display: grid; gap: .6rem; padding: 0 1.25rem 1.5rem;
  }
  .nav-cta-mobile .btn { width: 100%; }

  .mobile-bar { display: flex; }
  body { padding-bottom: 64px; }
  .wa-float { bottom: 78px; right: 14px; width: 48px; height: 48px; }
  .wa-float svg { width: 25px; height: 25px; }
  .cookie-banner { bottom: 76px; }
}

@media (max-width: 640px) {
  .trust-list { gap: .5rem 1rem; }
  .trust-list li { font-size: .78rem; }
  .footer-links--2col { grid-template-columns: 1fr; }
  .contact-direct .btn { width: 100%; }
  .form-card--compact { padding: 1.25rem; }
  .crumbs { font-size: .75rem; }
}


/* =====================================================================
   27. Correcciones
   ===================================================================== */

/* Los contadores dentro de una columna de .split no caben en 4 columnas:
   entre 900 y 1080 px se solapaban los números. Van siempre en 2x2. */
.split .counter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem 1rem; }
.split .counter-value { font-size: clamp(1.8rem, 2.6vw, 2.6rem); }

/* El número y su sufijo nunca se parten ni se montan */
.counter-value, .stat-value {
  display: flex; align-items: baseline; justify-content: center;
  gap: .1em; white-space: nowrap; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.counter-grid > div, .stat-card { min-width: 0; }
.counter-label, .stat-label { overflow-wrap: break-word; hyphens: auto; }

@media (max-width: 420px) {
  .stat-value { font-size: clamp(1.5rem, 8vw, 2rem); }
  .stat-label { font-size: .74rem; }
}

/* =====================================================================
   28. Logo con su proporción real (633 × 155)
   ===================================================================== */
.logo img, .site-footer img {
  aspect-ratio: 633 / 155;
  object-fit: contain;
  width: auto;
}
.logo img { height: 38px; }
.site-footer img { height: 34px; }

/* =====================================================================
   29. Banner de cookies conforme al RGPD
   ===================================================================== */
.cookie-banner {
  position: fixed; left: 20px; bottom: 20px; right: auto;
  z-index: 200; width: min(100% - 2.5rem, 380px);
  max-height: calc(100vh - 40px); overflow-y: auto;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
  padding: 1.35rem; display: block;
  animation: cookie-in .35s ease both;
}
@keyframes cookie-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.cookie-banner[hidden] { display: none; }

.cookie-banner h2 { font-size: 1.02rem; margin-bottom: .45rem; }
.cookie-banner h3 { font-size: 1rem; margin-bottom: 1rem; }
.cookie-banner p { font-size: .8rem; line-height: 1.55; color: var(--text-muted); margin-bottom: 1rem; }

/* Aceptar y rechazar con el mismo peso visual: lo exige el RGPD */
.cookie-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.cookie-actions .btn { width: 100%; min-width: 0; padding-inline: .6rem; }
.cookie-actions .btn--outline { grid-column: 1 / -1; }

.cookie-panel { border-top: 1px solid var(--line); margin-top: 1.25rem; padding-top: 1.25rem; }
.cookie-panel[hidden] { display: none; }

.cookie-cat {
  display: flex; gap: .7rem; align-items: flex-start;
  padding: .7rem; margin-bottom: .5rem;
  background: var(--surface-alt); border: 1px solid var(--line); border-radius: 12px;
  cursor: pointer; transition: border-color .2s ease;
}
.cookie-cat:hover { border-color: var(--brand-light); }
.cookie-cat input { width: 18px; height: 18px; margin-top: .15rem; flex-shrink: 0; accent-color: var(--brand); }
.cookie-cat input:disabled { opacity: .55; cursor: not-allowed; }
.cookie-cat strong { display: block; font-size: .88rem; margin-bottom: .15rem; }
.cookie-cat small { display: block; font-size: .78rem; line-height: 1.5; color: var(--text-muted); }

/* Botón con aspecto de enlace, para el pie */
.link-btn {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; font-size: .92rem; color: var(--text-invert-muted);
  text-align: left; text-decoration: underline; text-underline-offset: 3px;
}
.link-btn:hover { color: #fff; }

@media (max-width: 900px) {
  /* Por encima de la barra fija de contacto, para no taparla */
  .cookie-banner { bottom: 76px; }
}

@media (max-width: 640px) {
  .cookie-banner {
    left: 10px; right: 10px; bottom: 74px;
    width: auto; max-height: 72vh;
    padding: 1.15rem;
  }
  .cookie-actions { grid-template-columns: 1fr 1fr; }
}
