/* ============================================================
   FONTANERÍA EN CANTABRIA — hoja de estilos base
   Mobile-first. Sin frameworks. Variables = tokens del diseño
   de referencia aprobado.
   ============================================================ */

:root {
  --navy: #0B2540;
  --navy-dark: #071A2F;
  --orange: #F5820A;
  --orange-dark: #DA7000;
  --whatsapp: #1DA851;
  --whatsapp-dark: #178A42;
  --text: #16283A;
  --text-muted: #4A6076;
  --border: #E4EAF0;
  --bg-alt: #F4F8FB;
  --white: #FFFFFF;
  --star: #FFC13B;
  --font-head: 'Archivo', system-ui, sans-serif;
  --font-body: 'Source Sans 3', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  font-size: 17px;
  line-height: 1.55;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 800; color: var(--navy); margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
summary::-webkit-details-marker { display: none; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.wrap--narrow { max-width: 820px; margin: 0 auto; padding: 0 20px; }

.eyebrow {
  font-family: var(--font-head); font-weight: 800; font-size: 14px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--orange);
}
.section-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 30px; }
.section-head h2 { font-size: clamp(26px, 5vw, 38px); }
.section-lead { color: var(--text-muted); max-width: 60ch; }
.section-head--dark h2 { color: var(--white); }
.section-head-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; margin-bottom: 30px; }
.section-head-row h2 { font-size: clamp(26px, 5vw, 38px); }
.estrella, .resenas__contador .estrella { color: var(--star); }
.resenas__contador { font-weight: 700; color: var(--navy); }

/* ---------- Botones ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  text-decoration: none; font-weight: 800; border-radius: 12px;
  min-height: 56px; padding: 10px 22px; font-family: var(--font-head);
}
.btn--call { background: var(--orange); color: var(--white); box-shadow: 0 4px 14px rgba(245,130,10,0.35); }
.btn--call:hover { background: var(--orange-dark); }
.btn--whatsapp { background: var(--whatsapp); color: var(--white); font-family: var(--font-body); font-weight: 700; }
.btn--whatsapp:hover { background: var(--whatsapp-dark); }
.btn--lg { font-size: clamp(20px, 5vw, 26px); min-height: 66px; width: 100%; max-width: 460px; }
.btn--whatsapp.btn--lg { font-size: 18px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: var(--white);
  border-bottom: 1px solid var(--border); box-shadow: 0 1px 8px rgba(11,37,64,0.05);
}
.site-header__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 20px; }
.site-header__logo img { height: 72px; width: auto; }
.site-header__nav { display: none; gap: 22px; font-weight: 700; }
.site-header__nav a { text-decoration: none; }
.site-header__nav a:hover { color: var(--orange); }
.site-header__call { display: none; font-size: 18px; white-space: nowrap; min-height: 44px; padding: 8px 18px; }
.site-header__mobile-nav { position: relative; margin-left: auto; }
.site-header__mobile-nav summary {
  cursor: pointer; list-style: none; font-size: 24px; line-height: 1;
  padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border);
}
.site-header__mobile-nav nav {
  position: absolute; right: 0; top: calc(100% + 8px); background: var(--white);
  border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 10px 26px rgba(11,37,64,0.12);
  padding: 10px; display: flex; flex-direction: column; gap: 4px; min-width: 180px;
}
.site-header__mobile-nav nav a { text-decoration: none; font-weight: 700; padding: 10px 12px; border-radius: 8px; min-height: 44px; display: flex; align-items: center; }
.site-header__mobile-nav nav a:hover { background: var(--bg-alt); }

@media (min-width: 900px) {
  .site-header__nav { display: flex; }
  .site-header__call { display: flex; }
  .site-header__mobile-nav { display: none; }
}

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; min-height: 520px; display: flex; align-items: center; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; z-index: 0; }
.hero__overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(102deg, rgba(9,30,53,0.95) 0%, rgba(10,33,58,0.88) 36%, rgba(11,37,64,0.55) 66%, rgba(11,37,64,0.28) 100%);
}
.hero__content { position: relative; z-index: 2; padding: 36px 20px; display: flex; flex-direction: column; gap: 16px; color: var(--white); }
.badge {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  background: rgba(34,197,94,0.16); border: 1px solid rgba(47,214,116,0.55);
  color: #B6F2CE; font-size: 14.5px; font-weight: 700; padding: 7px 14px; border-radius: 999px;
}
.badge__dot { width: 9px; height: 9px; border-radius: 50%; background: #2FD674; box-shadow: 0 0 0 4px rgba(47,214,116,0.3); flex-shrink: 0; }
.hero h1 { color: var(--white); font-size: clamp(30px, 7.5vw, 54px); line-height: 1.06; max-width: 18ch; text-shadow: 0 2px 18px rgba(0,0,0,0.35); }
.hero__subtitle { margin: 0; font-size: clamp(16px, 4.2vw, 20px); color: #DCE7F1; max-width: 55ch; text-shadow: 0 1px 10px rgba(0,0,0,0.4); }
.hero__ctas { display: flex; flex-direction: column; gap: 10px; max-width: 460px; }
.hero__microcopy { font-size: 14.5px; color: #B7C8D9; text-align: center; }
.hero__promesas { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 15px; font-weight: 600; color: #DCE7F1; margin-top: 2px; }
.hero__promesas li::before { content: '✓ '; color: var(--star); }

/* ---------- Cabecera simple (hub, legales) ---------- */
.page-header { background: var(--navy); padding: 48px 20px 40px; }
.page-header__content { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.page-header h1 { color: var(--white); font-size: clamp(28px, 6vw, 42px); max-width: 20ch; }
.page-header__intro { color: #C7D6E4; font-size: 17px; max-width: 65ch; margin: 0; }

/* ---------- Franja de confianza ---------- */
.confianza { background: var(--navy); color: var(--white); padding: 18px 20px; border-top: 3px solid var(--orange); }
.confianza__row { display: flex; flex-wrap: wrap; gap: 14px 34px; justify-content: center; align-items: center; }
.confianza__item { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15.5px; color: var(--star); }
.confianza__item svg { flex-shrink: 0; }

/* ---------- Servicios ---------- */
.servicios {
  padding: 56px 20px; background: var(--white);
  background-image: radial-gradient(rgba(11,37,64,0.045) 1px, transparent 1.4px);
  background-size: 22px 22px;
}
.servicios__grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 640px) { .servicios__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) {
  .servicios__grid { grid-template-columns: repeat(3, 1fr); }
  /* Si el último elemento queda solo en su fila (nº de tarjetas ≡ 1 mod 3,
     como con las 7 actuales), lo centramos en la columna del medio. */
  .servicios__grid > .servicio-card:last-child:nth-child(3n+1) { grid-column: 2; }
}
.servicio-card {
  background: var(--white); border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden; box-shadow: 0 6px 22px rgba(11,37,64,0.07);
}
.servicio-card__img { width: 100%; height: 172px; object-fit: cover; }
.servicio-card__body { padding: 0 22px 22px; display: flex; flex-direction: column; gap: 10px; }
.servicio-card__icon {
  display: flex; align-items: center; justify-content: center; width: 52px; height: 52px;
  border-radius: 12px; background: #FFF1E0; color: var(--orange); margin-top: -26px;
  border: 3px solid var(--white); box-shadow: 0 4px 10px rgba(11,37,64,0.12);
}
.servicio-card h3 { font-size: 20px; }
.servicio-card p { color: var(--text-muted); font-size: 16.5px; }

/* ---------- Quiénes somos ---------- */
.empresa { padding: 48px 20px; background: var(--white); }
.empresa__texto { display: flex; flex-direction: column; gap: 14px; }
.empresa__texto p { color: var(--text-muted); font-size: 16.5px; }
.empresa--frase { padding: 32px 20px; background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.empresa--frase p { color: var(--navy); font-size: 17px; font-weight: 700; text-align: center; max-width: 70ch; margin: 0 auto; }

/* ---------- Cómo trabajamos ---------- */
.como-trabajamos { padding: 56px 20px; background: var(--navy); color: var(--white); }
.como-trabajamos__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 36px; align-items: center; }
.como-trabajamos__pasos { display: flex; flex-direction: column; gap: 22px; }
.como-trabajamos__foto { width: 100%; height: 340px; object-fit: cover; border-radius: 16px; box-shadow: 0 18px 40px rgba(0,0,0,0.35); }
.paso { display: flex; gap: 16px; align-items: flex-start; }
.paso__num { font-family: var(--font-head); font-weight: 900; font-size: 28px; color: var(--orange); line-height: 1; flex-shrink: 0; width: 40px; }
.paso h3 { color: var(--white); font-size: 19px; margin-bottom: 4px; }
.paso p { color: #C7D6E4; font-size: 16.5px; }
.paso__sep { height: 1px; background: rgba(255,255,255,0.12); }

/* ---------- Cobertura ---------- */
.cobertura { padding: 56px 20px; background: var(--bg-alt); border-bottom: 1px solid var(--border); }
.cobertura__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 28px; align-items: start; }
.mapa-cobertura { background: var(--white); border: 1px solid var(--border); border-radius: 16px; padding: 14px; box-shadow: 0 8px 26px rgba(11,37,64,0.08); }
.mapa-cobertura svg { width: 100%; height: auto; display: block; }
.mapa-pin { cursor: pointer; }
.mapa-pin:hover text { text-decoration: underline; }
.cobertura__lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; align-content: start; }
.cobertura__link {
  display: flex; align-items: center; text-decoration: none; background: var(--white);
  border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; min-height: 52px;
  font-weight: 700; color: var(--navy); box-shadow: 0 2px 8px rgba(11,37,64,0.04);
}
.cobertura__link:hover { border-color: var(--orange); }
.cobertura__link--todas { color: var(--orange); grid-column: 1 / -1; justify-content: center; }

/* ---------- Reseñas ---------- */
.resenas { padding: 56px 20px; background: var(--white); }
.resenas__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.resena-card {
  margin: 0; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 14px;
  padding: 22px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 6px 22px rgba(11,37,64,0.06);
}
.resena-card__estrellas { color: var(--star); font-size: 16px; letter-spacing: 2px; }
.resena-card blockquote { margin: 0; font-size: 16.5px; color: var(--text); }
.resena-card figcaption { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; color: var(--text-muted); }
.resena-card__avatar {
  display: flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border-radius: 50%; background: var(--navy); color: var(--white); font-family: var(--font-head); flex-shrink: 0;
}

/* ---------- FAQ ---------- */
.faq { padding: 56px 20px; background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.faq h2 { font-size: clamp(26px, 5vw, 38px); margin-bottom: 20px; }
.faq-item { border-bottom: 1px solid #DCE6EE; padding: 6px 0; }
.faq-item summary {
  cursor: pointer; font-weight: 700; font-size: 17.5px; color: var(--navy); padding: 14px 0;
  min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.faq-item__icon { color: var(--orange); font-size: 22px; flex-shrink: 0; }
.faq-item[open] .faq-item__icon { transform: rotate(45deg); }
.faq-item p { margin: 0 0 16px; color: var(--text-muted); }

/* ---------- Zona: info + barrios ---------- */
.zona-info { padding: 56px 20px; background: var(--white); }
.zona-info__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px; }
.zona-info__grid h2 { font-size: clamp(24px, 4.5vw, 32px); margin-bottom: 12px; }
.zona-info__grid p { color: var(--text-muted); }
.zona-info__barrios h3 { font-family: var(--font-head); font-size: 16px; color: var(--navy); margin-bottom: 10px; }
.zona-info__barrios ul { display: flex; flex-wrap: wrap; gap: 8px; }
.zona-info__barrios li { background: var(--bg-alt); border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; font-size: 15px; color: var(--text-muted); }

/* ---------- Zonas vecinas ---------- */
.zonas-vecinas { padding: 40px 20px 56px; background: var(--bg-alt); border-top: 1px solid var(--border); }
.zonas-vecinas h2 { font-size: clamp(22px, 4vw, 28px); margin-bottom: 18px; }
.zonas-vecinas__lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }

/* ---------- Cierre CTA ---------- */
.cta-final { position: relative; overflow: hidden; background: var(--navy); color: var(--white); padding: 60px 20px; }
.cta-final__inner { position: relative; max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.cta-final h2 { color: var(--white); font-size: clamp(26px, 6vw, 40px); }
.cta-final p { color: #C7D6E4; font-size: 18px; }
.cta-final__microcopy { font-size: 15px; color: #8FA6BC; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-dark); color: #8FA6BC; padding: 32px 20px; font-size: 15.5px; }
.site-footer__row { display: flex; flex-wrap: wrap; gap: 20px 32px; justify-content: space-between; align-items: flex-start; }
.site-footer__brand { display: flex; flex-direction: column; gap: 6px; }
.site-footer__nombre { font-family: var(--font-head); font-weight: 800; font-size: 17px; color: var(--white); }
.site-footer__brand a { color: #C7D6E4; text-decoration: none; }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer__nav a { color: #C7D6E4; text-decoration: underline; }
.site-footer__bottom {
  margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; align-items: center; font-size: 14px;
}
.site-footer__bottom nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.site-footer__bottom a { color: #8FA6BC; text-decoration: underline; }

/* ---------- Texto SEO de servicios ---------- */
.texto-servicios { padding: 8px 20px 48px; background: var(--white); }
.texto-servicios p { color: var(--text-muted); font-size: 16px; margin-bottom: 14px; }
.texto-servicios p:last-child { margin-bottom: 0; }

/* ---------- Presupuesto (sección + página) ---------- */
.presupuesto { padding: 56px 20px; background: var(--bg-alt); border-top: 1px solid var(--border); }
.presupuesto--pagina { border-top: none; padding-top: 8px; }
.presupuesto__inner h2 { font-size: clamp(24px, 4.5vw, 32px); margin-bottom: 10px; }
.presupuesto__inner > p { color: var(--text-muted); margin-bottom: 22px; }
.presupuesto__form { display: flex; flex-direction: column; gap: 14px; background: var(--white); border: 1px solid var(--border); border-radius: 16px; padding: 24px; box-shadow: 0 8px 26px rgba(11,37,64,0.06); }
.presupuesto__campo { display: flex; flex-direction: column; gap: 6px; font-size: 15px; font-weight: 700; color: var(--navy); }
.presupuesto__campo input, .presupuesto__campo textarea {
  font-family: var(--font-body); font-size: 16px; padding: 12px 14px; border: 1px solid #B9C9D6;
  border-radius: 10px; color: var(--text); background: var(--white); resize: vertical;
}
.presupuesto__honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.presupuesto__consentimiento { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; color: var(--text-muted); font-weight: 400; }
.presupuesto__consentimiento input { margin-top: 4px; flex-shrink: 0; }
.presupuesto__consentimiento a { color: var(--navy); font-weight: 700; }

/* ---------- Hub /zonas/ ---------- */
.hub-mapa { padding: 40px 20px 0; background: var(--bg-alt); }
.hub-listado { padding: 40px 20px 56px; background: var(--bg-alt); }
.zonas-grupo { margin-bottom: 36px; }
.zonas-grupo:last-child { margin-bottom: 0; }
.zonas-grupo h2 { font-size: clamp(22px, 4vw, 28px); margin-bottom: 16px; }
.zonas-grupo__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.zona-card { background: var(--white); border: 1px solid var(--border); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 4px 14px rgba(11,37,64,0.05); }
.zona-card h3 { font-size: 19px; }
.zona-card h3 a { text-decoration: none; color: var(--navy); }
.zona-card h3 a:hover { color: var(--orange); }
.zona-card p { color: var(--text-muted); font-size: 15.5px; flex-grow: 1; }
.zona-card__link { color: var(--orange); font-weight: 700; text-decoration: none; font-size: 15px; }
.zona-card__link:hover { text-decoration: underline; }

/* ---------- Transparencia sin cifras (urgencias) ---------- */
.transparencia { background: var(--navy); color: var(--white); padding: 18px 20px; border-top: 3px solid var(--orange); }
.transparencia__row { display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: center; align-items: center; }
.transparencia__item { font-weight: 700; font-size: 15.5px; color: var(--star); }

/* ---------- Urgencias rápidas (4 averías, sin foto) ---------- */
.urgencias-rapidas { padding: 48px 20px; background: var(--white); }
.urgencias-rapidas h2 { font-size: clamp(24px, 4.5vw, 32px); margin-bottom: 22px; text-align: center; }
.urgencias-rapidas__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; max-width: 900px; margin: 0 auto; }
.urgencia-chip {
  display: flex; align-items: center; gap: 12px; background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px 18px; font-weight: 700; color: var(--navy); font-size: 16px;
}
.urgencia-chip__icon { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: #FFF1E0; color: var(--orange); flex-shrink: 0; }

/* ---------- Aviso útil (urgencias) ---------- */
.aviso-util { padding: 28px 20px; background: #FFF7E8; border-top: 1px solid #F3DDAA; border-bottom: 1px solid #F3DDAA; }
.aviso-util__box { display: flex; gap: 14px; align-items: flex-start; max-width: 780px; margin: 0 auto; }
.aviso-util__icon { font-size: 26px; flex-shrink: 0; line-height: 1; }
.aviso-util h2 { font-size: 19px; margin-bottom: 4px; }
.aviso-util p { color: var(--text-muted); }

/* ---------- Legales ---------- */
.legal-content { padding: 40px 20px 56px; }
.legal-content h2 { font-size: 22px; margin: 32px 0 10px; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content p, .legal-content li { color: var(--text-muted); font-size: 16px; }
.legal-content ul { list-style: disc; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.legal-content .placeholder { color: #B04A00; background: #FFF3E0; padding: 2px 6px; border-radius: 4px; font-weight: 700; }

/* ---------- Barra fija de llamada (móvil) ---------- */
.call-spacer { height: 76px; }
.call-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100; display: flex; gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--white);
  box-shadow: 0 -4px 16px rgba(7,26,47,0.18);
}
.call-bar__call { flex: 3; font-size: 18px; }
.call-bar__wa { flex: 2; font-size: 16px; }

@media (min-width: 900px) {
  .call-spacer, .call-bar { display: none; }
}
