/* ═════════════════════════════════════════════════════════════
   COLDENHEAT v2.0 — capa de mejoras sobre styles.css
   Se carga DESPUÉS de styles.css en todas las páginas. No cambia la
   identidad (tinta / blanco / dorado, Archivo + Inter + JetBrains Mono):
   solo afina la cabecera, el pie, el botón flotante, los sellos de
   confianza y la línea de tiempo "What happens next".
   ═════════════════════════════════════════════════════════════ */

/* ─── Base: foco visible y fotos WebP ─────────────────────────── */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}
/* <picture> no debe crear una caja propia: así la <img> de adentro conserva
   exactamente el mismo tamaño y posición que tenía antes. */
picture { display: contents; }

/* Foto del dueño en el hero del inicio: WebP si el navegador lo admite. */
.hero .hero-img-frame {
  background-image: image-set(
    url("jose-luis-coldenheat.webp") type("image/webp"),
    url("jose-luis-coldenheat.jpg") type("image/jpeg")
  );
}

/* ═════════════════════════════════════════════════════════════
   CABECERA FIJA — el teléfono de emergencia siempre a la vista
   ═════════════════════════════════════════════════════════════ */
/* ARREGLO: la cabecera ya era "sticky" pero NUNCA se quedaba fija. html y body
   tenían overflow-x:hidden a la vez, y eso convierte al body en su propia caja
   de scroll: el sticky se pegaba al body, no a la ventana.
   Arreglo para TODOS los navegadores (también iPhone viejos):
   - html sin overflow -> el overflow-x:hidden del body pasa a la ventana y el
     body deja de ser caja de scroll. El sticky vuelve a pegarse a la ventana.
   - Donde exista `clip` (navegadores actuales) se usa en el body: recorta lo
     que se sale por los lados sin crear ninguna caja de scroll. */
html:root { overflow-x: visible; }
html body { overflow-x: hidden; }
@supports (overflow-x: clip) {
  html:root, html body { overflow-x: clip; }
}

/* ─── Teléfono: secciones en una sola columna ─────────────────────
   Muchas secciones (páginas de ciudad, servicios, etc.) traen sus columnas
   escritas dentro del HTML (style="grid-template-columns:1fr 1fr"), sin
   ninguna regla para pantallas chicas: en el celular quedaban 2 ó 3 columnas
   apretadas que se salían de la pantalla. Aquí se apilan en una columna. */
@media (max-width: 767px) {
  main [style*="grid-template-columns"]:not([style*="auto-fit"]):not([style*="auto 1fr auto"]) {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }
  main [style*="padding-top:60px"] { padding-top: 0 !important; }
  /* Reseñas: la nota y el botón "Leave a Review" bajan a dos renglones. */
  .rating-hero { flex-wrap: wrap; row-gap: 16px; }
  .rating-hero > [style*="margin-left:auto"] { margin-left: 0 !important; align-items: flex-start !important; }
  /* Por qué nosotros: la columna no puede ser más ancha que la pantalla. */
  .third-tech-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .third-tech-grid > * { min-width: 0; overflow-wrap: anywhere; }
  /* Frases subrayadas en dorado (.ul): en styles.css no se pueden partir
     (nowrap). En español son más largas y se salían de la pantalla. */
  .ul { white-space: normal; max-width: 100%; }
}
@media (min-width: 480px) and (max-width: 767px) {
  main [style*="grid-template-columns:repeat(3"],
  main [style*="grid-template-columns: repeat(3"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
  }
}
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background-color .25s var(--ease), box-shadow .25s var(--ease);
}
.nav-inner { transition: height .25s var(--ease); }
.nav.is-scrolled {
  background: rgba(251, 250, 247, 0.94);
  box-shadow: 0 10px 30px -18px rgba(10, 14, 26, 0.35);
}
.nav.is-scrolled .nav-inner { height: 58px; }

/* Botón de llamada de la cabecera: rojo de emergencia, número grande y una
   marca "24/7" con punto verde — dice que la línea está abierta AHORA. */
.nav .nav-cta.nav-cta-v2 {
  gap: 10px;
  padding: 7px 16px 7px 7px;
  background: var(--red);
  color: #fff;
  box-shadow: 0 6px 18px -8px rgba(226, 75, 74, 0.65);
}
.nav .nav-cta.nav-cta-v2:hover {
  background: #C93C3B;
  box-shadow: 0 10px 22px -8px rgba(226, 75, 74, 0.7);
}
.nav-cta-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 100px;
  background: rgba(10, 14, 26, 0.22);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.nav-cta-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #4ADE80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7);
  animation: v2-live 2s ease-out infinite;
}
@keyframes v2-live {
  0%   { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7); }
  70%  { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}
.nav-cta-ico { width: 14px; height: 14px; flex-shrink: 0; }
.nav-cta-num {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.nav-links a { white-space: nowrap; }
/* Laptops chicas (1024–1279): el menú completo + el botón no caben a lo ancho.
   Se compactan los enlaces y se quita lo decorativo; el número queda. */
@media (min-width: 1024px) and (max-width: 1279px) {
  .nav .nav-inner { gap: 14px; }
  .nav-links { gap: 0; }
  .nav-links a { padding: 8px 10px; }
  .lang-switch { margin-right: 0; }
  .lang-switch .lang-word { display: none; }
  .nav-cta-ico { display: none; }
}

/* Teléfono: el número NO se esconde. Se compacta todo lo demás. */
@media (max-width: 640px) {
  .nav .nav-inner { gap: 10px; }
  .brand-logo { height: 30px; }
  .lang-switch { margin-right: 0; }
}
@media (max-width: 480px) {
  .nav .nav-inner { gap: 8px; }
  .brand-logo { height: 28px; }
  .nav-toggle, .lang-switch { width: 40px; height: 40px; }
  .lang-switch { padding: 0; justify-content: center; min-width: 40px; flex-shrink: 0; }
  .nav .nav-cta.nav-cta-v2 { padding: 9px 13px; gap: 7px; }
  .nav-cta-live { padding: 0; background: none; font-size: 0; gap: 0; }
  .nav-cta-ico { display: none; }
  .nav-cta-num { font-size: 13.5px; }
}
@media (max-width: 380px) {
  .nav-cta-live { display: none; }
}
@media (max-width: 360px) {
  .brand-logo { height: 24px; }
  .nav-cta-num { font-size: 12.5px; }
}

/* ═════════════════════════════════════════════════════════════
   BOTÓN FLOTANTE (solo móvil) — llamar con un toque
   ═════════════════════════════════════════════════════════════ */
.fab {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 95;
  display: flex;
  align-items: center;
  gap: 10px;
}
@media (min-width: 768px) { .fab { display: none; } }

.fab-call {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 58px;
  padding: 0 24px 0 20px;
  border-radius: 100px;
  background: var(--red);
  color: #fff;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.015em;
  box-shadow: 0 14px 30px -10px rgba(226, 75, 74, 0.75), 0 2px 6px rgba(10, 14, 26, 0.2);
  transition: transform .15s var(--ease);
}
.fab-call:active { transform: scale(0.96); }
.fab-call svg { width: 20px; height: 20px; flex-shrink: 0; }
.fab-call small {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-top: 1px;
}
.fab-call-text { line-height: 1.05; }
/* Anillo que late: atrae la vista sin mover el botón. */
.fab-call::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(226, 75, 74, 0.55);
  animation: v2-ring 2.4s ease-out infinite;
  pointer-events: none;
}
@keyframes v2-ring {
  0%   { box-shadow: 0 0 0 0 rgba(226, 75, 74, 0.55); }
  70%  { box-shadow: 0 0 0 14px rgba(226, 75, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(226, 75, 74, 0); }
}

.fab-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px; height: 50px;
  border-radius: 50%;
  background: rgba(10, 14, 26, 0.92);
  color: #fff;
  box-shadow: 0 10px 24px -8px rgba(10, 14, 26, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.fab-wa svg { width: 22px; height: 22px; }
.fab-wa:active { transform: scale(0.95); }

/* El botón "Contact Us" del formulario (Flusso) vive en la misma esquina.
   En móvil se apila ENCIMA del botón de llamar, en vez de taparlo. */
@media (max-width: 767px) {
  #flusso-widget-btn {
    right: 16px !important;
    left: auto !important;
    bottom: calc(86px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* ═════════════════════════════════════════════════════════════
   SELLOS DE CONFIANZA — debajo de "Get Free Estimate" en el hero
   ═════════════════════════════════════════════════════════════ */
.trust-badges {
  margin: 22px 0 6px;
}
.trust-badges-label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 10px;
}
.trust-badges ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 26px;
}
.trust-badges img {
  height: 30px;
  width: auto;
  filter: grayscale(1);
  opacity: 0.55;
  transition: opacity .2s var(--ease), filter .2s var(--ease);
}
.trust-badges li:hover img { opacity: 0.9; }
.trust-badges img.is-square { height: 38px; }
@media (max-width: 480px) {
  .trust-badges ul { gap: 10px 16px; }
  .trust-badges img { height: 22px; }
  .trust-badges img.is-square { height: 30px; }
  /* El 5º sello (Daikin) no cabe en un renglón; sigue visible en la franja de marcas. */
  .trust-badges li:nth-child(n+5) { display: none; }
}

/* ─── Franja de marcas (portada): logos reales en gris, color al pasar ── */
.brands-track-logos { gap: 8px 0; }
.brands-track-logos .brand-logo-item {
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 26px;
}
.brand-logo-img {
  height: 30px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.6;
  transition: filter .25s var(--ease), opacity .25s var(--ease);
}
.brand-logo-img.is-square { height: 44px; }
.brand-logo-item:hover .brand-logo-img { filter: none; opacity: 1; }
.brand-more {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone);
}
@media (max-width: 768px) {
  .brands-track-logos .brand-logo-item { height: 48px; padding: 0 14px; border-right: 0; }
  .brand-logo-img { height: 22px; max-width: 110px; }
  .brand-logo-img.is-square { height: 34px; }
  .brand-more { width: 100%; text-align: center; border-right: 0; padding-top: 6px; }
}

/* ═════════════════════════════════════════════════════════════
   WHAT HAPPENS NEXT — línea de tiempo de 4 pasos
   Escritorio: horizontal, con una línea que une los puntos.
   Móvil y tablet: vertical, la línea baja por la izquierda.
   ═════════════════════════════════════════════════════════════ */
.steps-grid.steps-timeline {
  position: relative;
  list-style: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.steps-timeline::before {
  content: '';
  position: absolute;
  top: 23px;
  left: 24px;
  right: calc((100% - 84px) / 4 - 24px);
  height: 2px;
  background: linear-gradient(90deg, var(--gold) 0%, rgba(201,154,61,0.35) 60%, var(--red) 100%);
  border-radius: 2px;
}
.steps-timeline .step-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}
.steps-timeline .step-card:hover { transform: none; box-shadow: none; }
.steps-timeline .step-card::after { display: none; }
.step-node {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--gold);
  font-family: var(--display);
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 0 0 6px var(--offwhite);
  margin-bottom: 22px;
  transition: transform .2s var(--ease), background-color .2s var(--ease);
}
.steps-timeline .step-card:hover .step-node { transform: scale(1.06); background: var(--navy); }
.steps-timeline .step-card:last-child .step-node { background: var(--red); color: #fff; }
.steps-timeline .step-num {
  font-size: 10.5px;
  color: var(--stone);
  margin-bottom: 10px;
}
.steps-timeline .step-title { font-size: 19px; }
.steps-timeline .step-desc { font-size: 14.5px; max-width: 30ch; }

@media (max-width: 900px) {
  .steps-grid.steps-timeline {
    grid-template-columns: 1fr;
    gap: 0;
    max-width: 560px;
    margin: 0 auto;
  }
  .steps-timeline::before {
    top: 24px; bottom: 24px;
    left: 23px; right: auto;
    width: 2px; height: auto;
    background: linear-gradient(180deg, var(--gold) 0%, rgba(201,154,61,0.35) 60%, var(--red) 100%);
  }
  .steps-timeline .step-card {
    position: relative;
    padding: 0 0 30px 72px;
    min-height: 48px;
  }
  .steps-timeline .step-card:last-child { padding-bottom: 0; }
  .step-node { position: absolute; left: 0; top: 0; margin: 0; }
  .steps-timeline .step-num { padding-top: 4px; }
  .steps-timeline .step-desc { max-width: none; }
}

/* ─── Foto del dueño (portada "What happens next" y artículo) ─── */
.owner-photo { margin: 0 auto 40px; max-width: 880px; }
.owner-photo img {
  width: 100%;
  height: auto;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
}
.owner-photo figcaption {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--slate);
  text-align: center;
}
.owner-photo-article { margin: 32px 0 36px; max-width: none; }
.owner-photo-article figcaption { text-align: left; }

/* ═════════════════════════════════════════════════════════════
   ZONAS — pastillas de ciudad del inicio (arregla la fila rota)
   ═════════════════════════════════════════════════════════════ */
.area-cities .city-pill { justify-content: flex-start; }

/* ═════════════════════════════════════════════════════════════
   PIE DE PÁGINA v2 — con todas las páginas de ciudad enlazadas
   ═════════════════════════════════════════════════════════════ */
.footer-v2 .footer-top {
  grid-template-columns: 1fr;
  gap: 40px;
}
@media (min-width: 640px) {
  .footer-v2 .footer-top { grid-template-columns: repeat(2, 1fr); }
  .footer-v2 .footer-brandcol,
  .footer-v2 .footer-areas { grid-column: 1 / -1; }
}
@media (min-width: 1100px) {
  .footer-v2 .footer-top {
    grid-template-columns: 1.1fr 0.8fr 0.75fr 2.1fr 1fr;
    gap: 36px;
  }
  .footer-v2 .footer-brandcol,
  .footer-v2 .footer-areas { grid-column: auto; }
}
.footer-v2 .footer-brand { display: inline-block; }
.footer-v2 .footer-brand:hover { opacity: .85; }

.footer-rating {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 10px 16px 10px 12px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  transition: border-color .2s var(--ease);
}
.footer-rating:hover { border-color: rgba(201,154,61,0.55); }
.footer-rating-num {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.04em;
  line-height: 1;
}
.footer-rating-stars { color: #FAC775; font-size: 13px; letter-spacing: 2px; display: block; }
.footer-rating-label {
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}

.footer-areas-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 480px) {
  .footer-areas-grid { grid-template-columns: 1.7fr 1fr; }
}
.footer-county-name {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.footer-county + .footer-county { margin-top: 18px; }
.footer-city-list a { white-space: nowrap; }
.footer-city-list.cols-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}

.footer-emergency {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: rgba(226, 75, 74, 0.12);
  border: 1px solid rgba(226, 75, 74, 0.35);
  color: #fff;
  transition: background-color .2s var(--ease);
}
.footer-emergency:hover { background: rgba(226, 75, 74, 0.2); }
.footer-emergency-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #FFB4B3;
}
.footer-emergency-num {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.footer-v2 .footer-bottom-links { flex-wrap: wrap; }
