/* ── Tipografía autoalojada (Inter · SIL Open Font License 1.1) ──────────
   Servida desde el propio dominio: sin peticiones a Google y sin exponer la
   IP del visitante. unicode-range separa latin de latin-ext, así el navegador
   solo descarga el segundo si la página lo necesita. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/inter-400.woff2") format("woff2");
  unicode-range: U+0-FF, U+131, U+152-153, U+2BB-2BC, U+2C6, U+2DA, U+2DC, U+304, U+308, U+329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/inter-400-ext.woff2") format("woff2");
  unicode-range: U+100-2BA, U+2BD-2C5, U+2C7-2CC, U+2CE-2D7, U+2DD-2FF, U+304, U+308, U+329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/inter-600.woff2") format("woff2");
  unicode-range: U+0-FF, U+131, U+152-153, U+2BB-2BC, U+2C6, U+2DA, U+2DC, U+304, U+308, U+329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/inter-600-ext.woff2") format("woff2");
  unicode-range: U+100-2BA, U+2BD-2C5, U+2C7-2CC, U+2CE-2D7, U+2DD-2FF, U+304, U+308, U+329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/inter-700.woff2") format("woff2");
  unicode-range: U+0-FF, U+131, U+152-153, U+2BB-2BC, U+2C6, U+2DA, U+2DC, U+304, U+308, U+329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/inter-700-ext.woff2") format("woff2");
  unicode-range: U+100-2BA, U+2BD-2C5, U+2C7-2CC, U+2CE-2D7, U+2DD-2FF, U+304, U+308, U+329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ===========================================================================
   style.css — Hoja de estilos única del proyecto
   PLANTILLA. Adaptar cambiando los tokens :root (colores de estado-proyecto.md §2)
   y los ajustes visuales. No reescribir la estructura.

   Se carga desde head-common.php con versionado por filemtime:
     <link rel="stylesheet" href="/css/style.css?v=<?= @filemtime(...) ?>">

   ORDEN: 1 tokens · 2 reset/base · 3 layout · 4 componentes · 5 utilidades · 6 media queries
   Regla: los colores NUNCA en hexadecimal dentro de los componentes → var(--color-*)
   Ver: guia-construccion-web.md 1.3.2 · reglas-proyecto.md R10
   =========================================================================== */

/* ── 1. TOKENS ─────────────────────────────────────────────────────────── */
:root {
  /* Colores del proyecto — volcar desde config.php / estado-proyecto.md */
  --color-primary:       #1B3A5C;
  --color-primary-dark:  #12283F;
  --color-primary-rgb:   27, 58, 92;
  --color-secondary:     #0C8599;
  --color-secondary-rgb: 12, 133, 153;

  /* Neutros */
  --color-dark:     #12283F;
  --color-text:     #333;
  --color-muted:    #6b6b6b;
  --color-bg:       #fff;
  --color-bg-alt:   #F2F6F9;
  --color-border:   #DDE4EB;
  --white:          #fff;

  /* Medidas */
  --radius:      8px;
  --radius-lg:   14px;
  --max-width:   1180px;
  --gutter:      20px;
  --shadow-sm:   0 2px 8px rgba(0, 0, 0, .06);
  --shadow-md:   0 6px 24px rgba(0, 0, 0, .10);

  /* Tipografía */
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-heading: var(--font-body);

  /* Estados de formulario e impresión (auditoría UX) */
  --color-error:       #B42318;   /* 6,05:1 sobre --color-error-bg (medido) */
  --color-error-rgb:   180, 35, 24;
  --color-error-bg:    #FEF3F2;
  --color-error-borde: #FDA29B;
  --color-ok:          #067647;   /* 5,40:1 sobre --color-ok-bg (medido) */
  --color-ok-bg:       #ECFDF3;
  --color-ok-borde:    #ABEFC6;
  --print-tinta:       #000;
  --print-papel:       #fff;
}

/* ── 2. RESET Y BASE ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.25;
  color: var(--color-dark);
  margin: 0 0 16px;
}
h1 { font-size: clamp(28px, 5vw, 44px); font-weight: 700; }
h2 { font-size: clamp(24px, 3.6vw, 34px); font-weight: 700; }
h3 { font-size: clamp(18px, 2.4vw, 22px); font-weight: 700; }

p { margin: 0 0 16px; }

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin-bottom: 8px; }

:focus-visible { outline: 3px solid var(--color-secondary); outline-offset: 2px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--color-dark); color: var(--white); padding: 12px 20px;
}
.skip-link:focus { left: 0; }

/* ── 3. LAYOUT ─────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section { padding: 64px 0; }
.section-alt { background: var(--color-bg-alt); }
.section-dark { background: var(--color-dark); color: rgba(255, 255, 255, .88); }
.section-dark h2, .section-dark h3 { color: var(--white); }

.section-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: 10px;
}







/* ── 4. COMPONENTES ────────────────────────────────────────────────────── */

/* 4.1 Botones */
.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}
.btn-primary {
  background: var(--color-primary);
  color: var(--white);
}
.btn-primary:hover { background: var(--color-primary-dark); color: var(--white); text-decoration: none; }
.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-secondary:hover { background: var(--color-primary); color: var(--white); text-decoration: none; }

/* R10 — botones secundarios sobre fondo oscuro: una sola regla, no repetir por sección */
.hero .btn-secondary,
.process .btn-secondary,
.cta-final .btn-secondary,
.zones .btn-secondary,
.section-dark .btn-secondary { color: var(--white); border-color: rgba(255, 255, 255, .5); }
.hero .btn-secondary:hover,
.process .btn-secondary:hover,
.cta-final .btn-secondary:hover,
.zones .btn-secondary:hover,
.section-dark .btn-secondary:hover { background: rgba(255, 255, 255, .12); color: var(--white); }

/* 4.2 Header */
.header-top {
  background: var(--color-dark);
  color: rgba(255, 255, 255, .9);
  font-size: 14px;
  text-align: center;
  padding: 7px var(--gutter);
}
.header-top a { color: var(--white); font-weight: 600; }

.site-header { position: sticky; top: 0; z-index: 100; background: var(--white); box-shadow: var(--shadow-sm); }

.header-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px var(--gutter);
  display: flex;
  align-items: center;
  gap: 24px;
}
.logo { display: flex; align-items: center; font-weight: 700; font-size: 20px; color: var(--color-dark); }
.logo img { max-height: 44px; width: auto; }

.header-main nav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.header-main nav > a, .nav-link {
  color: var(--color-text);
  font-weight: 600;
  font-size: 15px;
  background: none;
  border: 0;
  padding: 6px 0;
  cursor: pointer;
  font-family: inherit;
}
.header-main nav a:hover, .nav-link:hover { color: var(--color-primary); text-decoration: none; }
.header-main nav a[aria-current="page"] { color: var(--color-primary); border-bottom: 2px solid var(--color-primary); }

/* Dropdown de servicios */
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  position: absolute; top: 100%; left: 0; min-width: 240px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 8px 0;
  display: none;
}
.nav-dropdown.open .nav-dropdown-menu { display: block; }
@media (hover: hover) and (pointer: fine) {
  .nav-dropdown:hover .nav-dropdown-menu { display: block; }
}
.nav-dropdown-menu a { display: block; padding: 10px 18px; font-size: 15px; color: var(--color-text); }
.nav-dropdown-menu a:hover { background: var(--color-bg-alt); color: var(--color-primary); text-decoration: none; }

.header-cta { padding: 10px 20px; font-size: 15px; }

/* Burger */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  background: none; border: 0; cursor: pointer;
  margin-left: auto;
}
.burger span { display: block; height: 3px; width: 26px; background: var(--color-dark); border-radius: 2px; transition: transform .2s; }

/* Menú móvil */
.mobile-nav { display: none; flex-direction: column; padding: 12px var(--gutter) 20px; border-top: 1px solid var(--color-border); background: var(--white); }
.mobile-nav.open { display: flex; }
.mobile-nav a { padding: 12px 0; font-weight: 600; color: var(--color-text); border-bottom: 1px solid var(--color-border); }
.mobile-dropdown-toggle {
  width: 100%; text-align: left; padding: 12px 0;
  background: none; border: 0; border-bottom: 1px solid var(--color-border);
  font: inherit; font-weight: 600; color: var(--color-text); cursor: pointer;
}
.mobile-dropdown-menu { display: none; padding-left: 14px; }
.mobile-dropdown-menu.open { display: block; }
.mobile-cta { margin-top: 16px; border-bottom: 0 !important; color: var(--white) !important; }

/* 4.3 Hero */
.hero {
  position: relative;
  background: var(--color-dark);
  color: rgba(255, 255, 255, .92);
  padding: 76px 0;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(0, 0, 0, .78) 40%, rgba(0, 0, 0, .35));
  z-index: 1;
}
.hero > .container { position: relative; z-index: 2; max-width: 800px; }
.hero h1 { color: var(--white); }
.hero p { font-size: 18px; margin-bottom: 28px; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }



/* 4.4 Tarjetas de servicio */






.card-link { font-weight: 700; color: var(--color-primary); }

/* 4.5 Proceso / pasos */
.process { background: var(--color-dark); color: rgba(255, 255, 255, .88); }
.process h2, .process h3 { color: var(--white); }



/* 4.6 Reseñas */
.review-card {
  background: var(--white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}





/* 4.7 FAQ acordeón */
.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-question {
  width: 100%; text-align: left;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 0;
  background: none; border: 0; cursor: pointer;
  font: inherit; font-weight: 700; font-size: 17px; color: var(--color-dark);
}
.faq-question .chevron { transition: transform .2s ease; color: var(--color-primary); }
.faq-question[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.faq-answer { display: none; padding: 0 0 18px; color: var(--color-muted); }
.faq-answer.open { display: block; }

/* 4.8 Zonas de cobertura */
.zones { background: var(--color-dark); color: rgba(255, 255, 255, .88); }
.zones h2 { color: var(--white); }
.zones-list { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; }
.zones-list li {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 100px;
  padding: 7px 16px;
  font-size: 15px;
  margin: 0;
}

/* 4.9 Breadcrumb */
.breadcrumb { padding: 14px 0; font-size: 14px; color: var(--color-muted); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.breadcrumb li { margin: 0; }
.breadcrumb li + li::before { content: "›"; margin-right: 8px; color: var(--color-muted); }

/* 4.10 CTA final */
.cta-final { background: var(--color-primary); color: var(--white); text-align: center; }
.cta-final h2 { color: var(--white); }
.cta-final .btn-primary { background: var(--white); color: var(--color-primary); }
.cta-final .btn-primary:hover { background: rgba(255, 255, 255, .9); color: var(--color-primary); }


/* 4.11 Sección de contacto compartida (includes/contact-section.php) */
.contact-section { background: var(--color-bg-alt); padding: 60px 0; }
.contact-header { text-align: center; margin-bottom: 40px; }
.contact-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: start; }

.contact-form-wrap {
  background: var(--white);
  padding: 32px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; font-weight: 600; font-size: 14px;
  margin-bottom: 6px; color: var(--color-text);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 15px;
  background: var(--white);
  transition: border-color .2s;
  box-sizing: border-box;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), .1);
}
.form-group textarea { resize: vertical; min-height: 110px; }

/* Checkbox RGPD — nativo oculto con opacity (no display:none) para no perder accesibilidad */
.form-checkbox { margin-bottom: 24px; }
.checkbox-label {
  display: flex; align-items: flex-start; gap: 10px;
  cursor: pointer; font-weight: 400; line-height: 1.4;
}
.checkbox-label input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
.checkbox-custom {
  flex-shrink: 0; width: 20px; height: 20px;
  border: 2px solid var(--color-border);
  border-radius: 4px; margin-top: 2px;
  transition: all .15s ease;
  position: relative; background: var(--white);
}
.checkbox-custom::after {
  content: ""; position: absolute; left: 5px; top: 1px;
  width: 6px; height: 11px;
  border: solid var(--white); border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) scale(0);
  transition: transform .15s ease;
}
.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
  background: var(--color-primary); border-color: var(--color-primary);
}
.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after { transform: rotate(45deg) scale(1); }
.checkbox-label input[type="checkbox"]:focus-visible + .checkbox-custom {
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), .3);
}
.checkbox-text { font-size: 13px; color: var(--color-muted); }
.checkbox-text a { color: var(--color-primary); text-decoration: underline; }

.btn-submit {
  width: 100%; padding: 14px 24px;
  font-size: 16px; font-weight: 600;
  cursor: pointer; border: none; border-radius: var(--radius);
}
.btn-submit:disabled { opacity: .6; cursor: not-allowed; }

.form-message {
  margin-top: 12px; padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 14px; font-weight: 600;
}

.contact-info-wrap { display: flex; flex-direction: column; gap: 20px; }
.contact-info-card {
  background: var(--white); padding: 24px;
  border-radius: 12px; box-shadow: var(--shadow-sm);
}
.contact-info-card h3 {
  font-size: 14px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--color-muted); margin: 0 0 12px;
}
.contact-phone {
  font-size: 24px; font-weight: 700;
  color: var(--color-primary); text-decoration: none; display: block;
}
.contact-schedule { font-size: 14px; color: var(--color-muted); margin: 8px 0 0; }
.contact-nap { font-style: normal; line-height: 1.6; font-size: 15px; }
.contact-nap strong { font-weight: 600; }
.contact-nap a { color: var(--color-primary); text-decoration: none; }

/* 4.12 Footer */
.site-footer { background: var(--color-dark); color: rgba(255, 255, 255, .75); padding: 52px 0 24px; }
.site-footer h3 { color: var(--white); font-size: 15px; text-transform: uppercase; letter-spacing: .6px; margin-bottom: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1.2fr; gap: 32px; }
.footer-col { display: flex; flex-direction: column; gap: 9px; }
.footer-col a, .footer-email { color: rgba(255, 255, 255, .75); font-size: 15px; }
.footer-col a:hover { color: var(--white); }
.footer-logo img { max-height: 46px; width: auto; }
.footer-nap { font-style: normal; font-size: 15px; line-height: 1.65; }
.footer-nap strong { color: var(--white); }
.footer-nap a { color: rgba(255, 255, 255, .75); }
.footer-bottom {
  margin-top: 36px; padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  text-align: center; font-size: 14px;
}
.footer-bottom p { margin: 0; }

/* 4.13 Cookie banner — reserva de espacio para no provocar CLS */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
  background: var(--color-dark); color: rgba(255, 255, 255, .9);
  padding: 16px var(--gutter);
  display: none;
  box-shadow: 0 -2px 16px rgba(0, 0, 0, .25);
}
.cookie-banner.show { display: block; }
.cookie-inner {
  max-width: var(--max-width); margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  font-size: 14px;
}
.cookie-inner p { margin: 0; flex: 1; min-width: 240px; }
.cookie-inner a { color: var(--color-secondary); }
.cookie-actions { display: flex; gap: 10px; }
.cookie-actions button {
  padding: 9px 18px; border-radius: var(--radius);
  font: inherit; font-weight: 600; cursor: pointer; border: 1px solid rgba(255, 255, 255, .4);
  background: transparent; color: var(--white);
}


/* ── 5. UTILIDADES ─────────────────────────────────────────────────────── */




.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── 6. MEDIA QUERIES ──────────────────────────────────────────────────── */
@media (max-width: 980px) {
  
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .header-main nav, .header-cta { display: none; }
  .burger { display: flex; }
  
  
  section { padding: 48px 0; }
  .hero { padding: 56px 0; }
}

@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .contact-form-wrap { padding: 24px; }
}

@media (max-width: 640px) {
  
  .footer-grid { grid-template-columns: 1fr; }
  
  .cookie-actions { width: 100%; }
  .cookie-actions button { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ===========================================================================
   AÑADIDOS DEL PROYECTO CERRACALAFELL
   Clases nuevas de este proyecto que la plantilla base no trae.
   =========================================================================== */

:root {
  /* I6 — #0C8599 sobre blanco da 4,35:1, insuficiente para texto normal (AA = 4,5).
     El acento se usa en fondos de botón y elementos grandes; para texto y enlaces
     sobre blanco se usa la variante oscura. */
  --color-acento-oscuro: #0A6C7D;   /* 6,08:1 blanco · 5,60:1 gris claro */
  --color-acento-claro:  #4FC3D6;   /* 7,22:1 sobre dark · 5,60:1 sobre primary */
  --color-acento-hover:  #085A68;   /* 7,86:1 con texto blanco */
  --call-bar-h: 56px;
}

/* Honeypot: fuera de pantalla pero no display:none, que algunos bots detectan */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* Barra superior */
.header-top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.header-top-claim { font-size: .86rem; }
.header-top-tel {
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
  white-space: nowrap;
}
.header-top-tel:hover { text-decoration: underline; }

/* Enlaces de texto sobre fondo claro: variante accesible del acento */
main a:not([class]), .contact-section a:not([class]) { color: var(--color-acento-oscuro); }

/* Footer */
.footer-claim {
  margin-top: 14px;
  font-size: .9rem;
  line-height: 1.6;
  opacity: .85;
  max-width: 34ch;
}
.footer-horario {
  margin-top: 10px;
  font-size: .88rem;
  opacity: .85;
}

/* Tarjeta de zonas en la sección de contacto */
.contact-zones p {
  font-size: .9rem;
  line-height: 1.8;
  color: var(--color-muted);
}

/* Logo: se declaran width/height en el HTML para evitar CLS, pero se escala
   por altura para que el header no dependa del ancho del SVG. */
.logo img { height: 44px; width: auto; display: block; }
.footer-logo img { height: 40px; width: auto; display: block; }

@media (max-width: 640px) {
  .logo img { height: 36px; }
  .header-top-claim { font-size: .78rem; }
}

/* Detalle de zonas de cobertura (home) */
.zones-detail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  margin: 36px 0 8px;
  text-align: left;
}
.zones-detail h3 { font-size: 1.05rem; margin-bottom: 8px; }
.zones-detail p { font-size: .95rem; line-height: 1.7; opacity: .9; }

/* ===========================================================================
   COMPONENTES DEL PROYECTO — añadidos en la auditoría del 21/09/2026
   El HTML usaba 56 clases sin regla. Aquí se resuelven con los tokens de la
   plantilla. Donde la plantilla ya tenía el equivalente, se hereda su regla.
   =========================================================================== */

/* El atributo hidden siempre gana, aunque una regla de autor diga display */
[hidden] { display: none !important; }

/* ── Header: el flex vive en el contenedor interior, no en .header-main ── */
.header-main { display: block; padding: 0; max-width: none; }
.header-main-inner { display: flex; align-items: center; gap: 24px; padding-top: 12px; padding-bottom: 12px; }
.nav-dropdown.open .nav-dropdown-menu { display: block; }
.nav-dropdown-toggle { display: inline-flex; align-items: center; gap: 6px; }

/* ── Botones grandes ── */
.btn-lg { padding: 15px 28px; font-size: 16px; }

/* ── Hero: imagen a sangre de fondo, como diseña la plantilla ── */
.hero-img picture, .hero-img img { display: block; width: 100%; height: 100%; }
.hero-img img { object-fit: cover; object-position: center; }
.hero-text { max-width: 680px; }
.hero-sub { color: rgba(255, 255, 255, .88); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-service { padding: 64px 0; }
.hero .section-label { color: var(--color-secondary); }
.trust-badges {
  display: flex; flex-wrap: wrap; gap: 10px 22px;
  margin: 28px 0 0; padding: 0; list-style: none;
  font-size: 15px; font-weight: 600; color: var(--white);
}
.trust-badges li { margin: 0; display: flex; align-items: center; gap: 8px; }
.trust-badges li::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-secondary); flex-shrink: 0;
}

/* ── Textos de sección ── */
.section-intro { max-width: 760px; color: var(--color-muted); font-size: 17px; margin-bottom: 36px; }
.section-dark .section-intro { color: rgba(255, 255, 255, .78); }

/* ── Tarjetas de servicio ── */
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service-card {
  background: var(--white); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: 26px;
  display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.service-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.service-card h3 { margin-bottom: 10px; }
.service-card p { color: var(--color-muted); font-size: 15px; flex: 1; }
.service-card .card-link { margin-top: 14px; }

/* ── Por qué elegirnos y ventajas ── */
.why-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.why-text img { border-radius: var(--radius-lg); margin-top: 24px; }
.why-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; }
.advantages .why-list { grid-template-columns: repeat(2, 1fr); gap: 24px 32px; }
.why-list li { margin: 0; padding-left: 20px; border-left: 3px solid var(--color-secondary); }
.why-list h3 { font-size: 17px; margin-bottom: 6px; }
.why-list p { margin: 0; color: var(--color-muted); font-size: 15px; }

/* ── Incidencias ── */
.issues-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.issues-grid > div {
  background: var(--color-bg-alt); border-radius: var(--radius-lg); padding: 22px;
}
.issues-grid h3 { font-size: 17px; margin-bottom: 8px; }
.issues-grid p { margin: 0; font-size: 15px; }

/* ── Tipos de cerradura ── */
.types-layout { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.types-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.types-list li { margin: 0; }
.types-list h3 { font-size: 16px; margin-bottom: 4px; }
.types-list p { margin: 0; font-size: 15px; color: var(--color-muted); }
.types-img img { border-radius: var(--radius-lg); }

/* ── Proceso: <ol class="steps"> con numeración generada ── */
.steps {
  list-style: none; padding: 0; margin: 0; counter-reset: paso;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 24px;
}
.steps li { counter-increment: paso; margin: 0; text-align: center; padding: 10px; }
.steps li::before {
  content: counter(paso);
  width: 46px; height: 46px; margin: 0 auto 14px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--color-secondary); color: var(--color-dark);
  font-weight: 700; font-size: 18px;
}
.steps h3 { font-size: 17px; margin-bottom: 8px; }
.steps p { margin: 0; font-size: 15px; }

/* ── Tablas de coste ── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 18px; }
.pricing-table {
  width: 100%; border-collapse: collapse; background: var(--white);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm);
  font-size: 15px;
}
.pricing-table th, .pricing-table td { padding: 14px 18px; text-align: left; vertical-align: top; }
.pricing-table thead th { background: var(--color-primary); color: var(--white); font-weight: 600; }
.pricing-table tbody tr + tr td { border-top: 1px solid var(--color-border); }
.pricing-table td:first-child { font-weight: 600; color: var(--color-dark); }
.level {
  display: inline-block; padding: 4px 12px; border-radius: 100px;
  font-size: 13px; font-weight: 700; white-space: nowrap;
}
.level-1 { background: rgba(var(--color-secondary-rgb), .12); color: var(--color-acento-oscuro); }
.level-2 { background: rgba(var(--color-primary-rgb), .10); color: var(--color-primary); }
.level-3 { background: var(--color-primary); color: var(--white); }
.pricing-note { font-size: 15px; color: var(--color-muted); max-width: 760px; }

/* ── Reseñas: mismos estilos que la plantilla, con los nombres del HTML ── */
.reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.stars { display: block; color: var(--color-secondary); font-size: 17px; letter-spacing: 2px; margin-bottom: 10px; }
.review-body { font-size: 15px; color: var(--color-text); }
.review-meta { margin: 14px 0 0; font-size: 14px; display: flex; flex-direction: column; gap: 2px; }
.review-meta time { color: var(--color-muted); font-size: 13px; }

/* ── Zonas ── */
.zones-note { margin-top: 24px; font-size: 15px; opacity: .85; }
.zones-img { margin-top: 32px; }
.zones-img img { border-radius: var(--radius-lg); }

/* ── FAQ ── */
.faq-list { max-width: 860px; }
.faq-item h3 { margin: 0; font-size: inherit; }
.faq-icon {
  flex-shrink: 0; width: 12px; height: 12px;
  border-right: 2.5px solid var(--color-primary); border-bottom: 2.5px solid var(--color-primary);
  transform: rotate(45deg); transition: transform .2s ease; margin-top: -4px;
}
.faq-question[aria-expanded="true"] .faq-icon { transform: rotate(-135deg); margin-top: 4px; }
.faq-answer p { margin: 0; }

/* ── CTA final ── */
.cta-buttons { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 24px; }
.cta-final .btn-secondary { color: var(--white); border-color: rgba(255, 255, 255, .5); }

/* ── Páginas de servicio ── */
.service-detail .container { max-width: 860px; }
.service-detail h2 { margin-bottom: 16px; }
.service-detail h3 { margin-top: 32px; margin-bottom: 10px; }
.service-figure { margin: 32px 0; }
.service-figure img { border-radius: var(--radius-lg); }

/* ── Formulario ── */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── Legales ── */
.container-narrow { max-width: 780px; }
.legal h2 { font-size: 20px; margin-top: 32px; }
.legal ul { padding-left: 20px; }
.legal-updated { font-size: 14px; color: var(--color-muted); }

/* ── 404 ── */
.error-404 { text-align: center; padding: 80px 0; }
.error-code {
  font-size: clamp(72px, 14vw, 128px); font-weight: 700; line-height: 1;
  color: var(--color-secondary); margin: 0 0 8px;
}

/* ── Responsive de los componentes del proyecto ── */
@media (max-width: 980px) {
  .service-grid, .issues-grid, .reviews-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .why-layout, .types-layout { grid-template-columns: 1fr; gap: 28px; }
  .advantages .why-list { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .service-grid, .issues-grid, .reviews-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .hero-ctas .btn-primary, .hero-ctas .btn-secondary,
  .cta-buttons .btn-primary, .cta-buttons .btn-secondary { width: 100%; text-align: center; }
  .pricing-table th, .pricing-table td { padding: 12px 14px; }
}

/* Hero: el CTA principal va en el acento oscuro (contraste AA con texto blanco,
   ~5,9:1) para que destaque sobre la foto; el azul marino se perdía en ella.
   La columna de texto se alinea con la rejilla de la página, no centrada. */
.hero .btn-primary { background: var(--color-acento-oscuro); border-color: var(--color-acento-oscuro); }
.hero .btn-primary:hover { background: var(--color-acento-hover); border-color: var(--color-acento-hover); }
.hero > .container.hero-inner { max-width: var(--max-width); }

/* Móvil: la barra superior ocupaba 3 líneas de un header fijo (~160 px de
   pantalla bloqueados). Se oculta la frase y queda solo el teléfono, que en
   móvil es el único acceso de llamada permanente (el botón del header se oculta). */
@media (max-width: 640px) {
  .header-top-claim { display: none; }
  .header-top-inner { justify-content: center; }
  .header-top-tel::before { content: "Urgencias 24 h · "; font-weight: 400; }
}

/* ===========================================================================
   AUDITORÍA DE USABILIDAD, DISEÑO Y RESPONSIVE — 21/09/2026
   Cada regla corrige un hallazgo medido. Ver estado-proyecto.md §11.
   =========================================================================== */

/* ── Menú de escritorio: visibilidad explícita, sin depender de `nav` genérico ── */
.nav-desktop { display: flex; align-items: center; gap: 22px; margin-left: auto; }
@media (max-width: 860px) { .nav-desktop { display: none; } }
/* El menú móvil NUNCA se muestra en escritorio aunque se quede con .open
   (antes, abrirlo y ensanchar la ventana dejaba los dos menús a la vez) */
@media (min-width: 861px) { .mobile-nav, .mobile-nav.open { display: none; } .burger { display: none; } }

/* ── Menú móvil: scroll propio si no cabe (en horizontal medía 387 px en 375) ── */
.mobile-nav.open {
  max-height: calc(100vh - 64px);
  max-height: calc(100dvh - 64px);
  overflow-y: auto; overscroll-behavior: contain;
}
/* Bloqueo del scroll del fondo mientras el menú está abierto */
html.menu-abierto, html.menu-abierto body { overflow: hidden; }

/* ── ROTO · H1 del 404 con contraste 1:1 (.section-dark solo aclaraba h2/h3) ── */
.section-dark h1 { color: var(--white); }

/* ── ROTO · Casilla RGPD: medía 4×21 px. `.form-group label {display:block}`
   ganaba a `.checkbox-label {display:flex}` y el span quedaba en línea ── */
.form-group.form-checkbox .checkbox-label { display: flex; align-items: flex-start; gap: 12px; font-weight: 400; font-size: 14px; }
.checkbox-custom { width: 24px; height: 24px; border-width: 2px; border-color: var(--color-muted); }
.checkbox-custom::after { left: 7px; top: 2px; }
.checkbox-label input[type="checkbox"][aria-invalid="true"] + .checkbox-custom { border-color: var(--color-error); box-shadow: 0 0 0 3px rgba(var(--color-error-rgb), .15); }

/* ── Campos a 16 px: por debajo, iOS hace zoom al enfocar ── */
.form-group input, .form-group select, .form-group textarea { font-size: 16px; min-height: 48px; }
.form-group [aria-invalid="true"] { border-color: var(--color-error); box-shadow: 0 0 0 3px rgba(var(--color-error-rgb), .15); }
.form-message.error { background: var(--color-error-bg); color: var(--color-error); border: 1px solid var(--color-error-borde); }
.form-message.ok { background: var(--color-ok-bg); color: var(--color-ok); border: 1px solid var(--color-ok-borde); }

/* ── Estados :active: en táctil no hay hover; sin respuesta al toque se repite la pulsación ── */
.btn-primary:active, .btn-secondary:active, .mobile-call:active { transform: translateY(1px) scale(.985); filter: brightness(.9); }
.card-link:active, .faq-question:active, .burger:active, .footer-col a:active { opacity: .7; }
.btn-submit:disabled, .btn-submit[disabled] { opacity: .6; cursor: not-allowed; transform: none; filter: none; }

/* ── Objetivos táctiles ≥ 44 px ── */
.card-link { display: inline-flex; align-items: center; min-height: 44px; }
.footer-col a { display: flex; align-items: center; min-height: 44px; }
.footer-col { gap: 0; }
.contact-phone { display: flex; align-items: center; min-height: 48px; }
.logo { min-height: 44px; }
.header-top-tel { display: inline-flex; align-items: center; min-height: 32px; }

/* ── Contraste de etiquetas y enlaces sobre oscuro ── */
.section-label { color: var(--color-acento-oscuro); }                       /* 6,08 / 5,60 */
.section-dark .section-label, .process .section-label, .zones .section-label,
.hero .section-label, .cta-final .section-label { color: var(--color-acento-claro); } /* 7,22 */
.cookie-inner a { color: var(--color-acento-claro); }                       /* antes 2,47 */
.site-footer a:not([class]), .footer-nap a { color: rgba(255, 255, 255, .85); }

/* ── Texto sobre la foto del hero en móvil: el degradado era débil a la derecha
   y el párrafo, a todo el ancho, bajaba a 4,15:1 en el punto más claro ── */
@media (max-width: 640px) {
  .hero::after { background: linear-gradient(180deg, rgba(0,0,0,.72), rgba(0,0,0,.62)); }
}

/* ── Medida de línea: máx. ~70 caracteres (había párrafos de 158) ── */
/* 68ch rendía ~95 caracteres en Inter (el «0» de la unidad ch es más ancho que la
   letra media) y .section-intro/.pricing-note se lo saltaban por especificidad.
   56ch ≈ 75-78 caracteres reales, medido. */
main p, main .section-intro, main .pricing-note, main .zones-note, .hero .hero-sub, .legal li { max-width: 56ch; }
.cta-final p, .error-404 p, .contact-header p { margin-left: auto; margin-right: auto; }

/* ── Anclas bajo la cabecera fija ── */
html { scroll-padding-top: 126px; }

/* ── Barra fija de llamada en móvil (servicio urgente) ─────────────────────
   Sustituye a la barra superior en móvil, cuyo teléfono medía 23 px de alto.
   Respeta el área segura del notch y reserva su hueco al final de la página. */
.mobile-call { display: none; }
@media (max-width: 640px), (max-height: 500px) and (pointer: coarse) {
  .header-top { display: none; }
  .mobile-call {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 150;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    min-height: var(--call-bar-h);
    padding: 8px 16px calc(8px + env(safe-area-inset-bottom, 0px));
    background: var(--color-acento-oscuro); color: var(--white);
    font-weight: 700; font-size: 17px; text-decoration: none;
    box-shadow: 0 -2px 14px rgba(0, 0, 0, .22);
  }
  .mobile-call:hover { color: var(--white); text-decoration: none; }
  .mobile-call-ico {
    width: 18px; height: 18px; flex-shrink: 0;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2c.3-.3.7-.4 1-.2 1.1.4 2.3.6 3.6.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1A17 17 0 0 1 3 4c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.3.2 2.5.6 3.6.1.3 0 .7-.2 1z'/%3E%3C/svg%3E") center/contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2c.3-.3.7-.4 1-.2 1.1.4 2.3.6 3.6.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1A17 17 0 0 1 3 4c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.3.2 2.5.6 3.6.1.3 0 .7-.2 1z'/%3E%3C/svg%3E") center/contain no-repeat;
  }
  body { padding-bottom: calc(var(--call-bar-h) + env(safe-area-inset-bottom, 0px)); }
  /* El banner de cookies se apila encima de la barra, compacto */
  .cookie-banner.show { bottom: calc(var(--call-bar-h) + env(safe-area-inset-bottom, 0px)); padding: 10px 16px; }
  .cookie-inner { gap: 8px; font-size: 13px; }
  .cookie-inner p { min-width: 0; flex-basis: 100%; }
  .cookie-actions { width: 100%; }
  .cookie-actions button { flex: 1; min-height: 40px; padding: 6px 12px; }
  html { scroll-padding-top: 84px; }
}

/* ── Móvil en horizontal: la cabecera deja de ser fija (se comía el 55 % de la
   pantalla con el banner). La barra de llamada sigue siempre visible. ── */
@media (max-height: 500px) and (orientation: landscape) {
  .site-header { position: relative; }
  html { scroll-padding-top: 16px; }
  .cookie-inner p { flex-basis: auto; flex: 1; }
  .cookie-actions { width: auto; }
}

/* ── Impresión: páginas legales y de servicio legibles en papel ── */
@media print {
  .site-header, .mobile-nav, .cookie-banner, .mobile-call, .contact-form-wrap,
  .hero-img, .hero-ctas, .cta-final, .burger, .skip-link, .zones-img, .service-figure { display: none !important; }
  body { padding: 0; color: var(--print-tinta); background: var(--print-papel); font-size: 11pt; }
  .hero, .section-dark, .process, .zones, .site-footer, .cta-final { background: var(--print-papel) !important; color: var(--print-tinta) !important; }
  .hero h1, .section-dark h2, .section-dark h3, .process h2, .process h3, .zones h2 { color: var(--print-tinta) !important; }
  .hero::after { display: none; }
  section { padding: 12pt 0; }
  main p { max-width: none; }
  .legal a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
  .faq-answer, .faq-answer[hidden] { display: block !important; }
  h2, h3 { break-after: avoid; } p, li { orphans: 3; widows: 3; }
}

/* Burger → aspa al abrir (la clase .is-open la pone el JS y no tenía regla) */
.burger.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Submenú móvil: los enlaces salían EN FILA (eran inline y nada los apilaba).
   La prueba de objetivos táctiles no lo detectó porque excluía elementos inline. */
.mobile-dropdown-menu a { display: flex; align-items: center; min-height: 44px; padding: 10px 0; }
/* Página activa distinguible también en el menú móvil (antes solo en escritorio) */
.mobile-nav a[aria-current="page"] {
  color: var(--color-primary); font-weight: 700;
  box-shadow: inset 3px 0 0 var(--color-acento-oscuro); padding-left: 12px;
}
/* Con la barra fija de llamada visible, el botón del menú sobra (dos CTA iguales) */
@media (max-width: 640px), (max-height: 500px) and (pointer: coarse) {
  .mobile-cta { display: none; }
}

/* El alto máximo del menú no descontaba la barra de llamada: en horizontal,
   «Contacto» quedaba debajo de ella. */
@media (max-width: 640px), (max-height: 500px) and (pointer: coarse) {
  .mobile-nav.open {
    max-height: calc(100vh - 88px - var(--call-bar-h));
    max-height: calc(100dvh - 88px - var(--call-bar-h) - env(safe-area-inset-bottom, 0px));
  }
}

/* Objetivos táctiles que la primera prueba no contaba (excluía todo lo inline):
   migas de pan, teléfono del NAP, logo del pie y enlaces en listas de legales. */
.breadcrumb a, .contact-nap a, .footer-nap a, .legal li a {
  display: inline-flex; align-items: center; min-height: 44px;
}
.breadcrumb { padding: 4px 0; }
.footer-logo { display: inline-flex; align-items: center; min-height: 48px; }
.legal li { margin-bottom: 2px; }
.breadcrumb a, .legal li a { min-width: 44px; justify-content: center; }
.breadcrumb a { padding: 0 4px; margin: 0 -4px; }

/* Alineación tras agrandar objetivos: el enlace de las migas (44 px) se
   descolgaba del resto de la línea; «Servicios» (botón) quedaba 1 px bajo. */
.breadcrumb ol, .breadcrumb li { display: flex; align-items: center; }
.breadcrumb li + li::before { display: inline-flex; align-items: center; }
.nav-desktop > a, .nav-desktop .nav-link { display: inline-flex; align-items: center; min-height: 44px; }
