/* ==========================================================================
   Cerrajeros Calvo Boadilla — web estática
   Réplica del diseño de WordPress (GeneratePress + Elementor) sin dependencias.
   Puntos de corte: móvil <= 767px · tableta 768–1024px · escritorio >= 1025px
   ========================================================================== */

:root {
  --azul-titulos: #116C92;
  --texto-gris: #7A7A7A;
  --texto-base: #222222;
  --enlace: #1E73BE;
  --verde-boton: #20B134;
  --menu: #1C244B;
  --menu-activo: #324A6D;
  --fuente-titulos: "Roboto", Sans-serif;
  --fuente-menu: "Poppins", Sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: #F7F8F9;
  color: var(--texto-base);
  font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  font-size: 17px;
  font-weight: 400;
  line-height: 1.5;
}

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

a {
  color: var(--enlace);
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--texto-base);
}

b,
strong {
  font-weight: 700;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  word-wrap: normal !important;
}

.skip-link:focus {
  z-index: 100000;
  top: 5px;
  left: 5px;
  width: auto;
  height: auto;
  padding: 15px 23px 14px;
  clip: auto;
  background: #F1F1F1;
  color: #21759B;
  font-size: 14px;
  font-weight: 700;
  line-height: normal;
}

/* ---------- Cabecera ---------- */

.site-header {
  position: relative;
  z-index: 95;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-height: 100px;
  padding: 0 8%;
  background-color: #FFFFFF;
}

.header-logo {
  flex: 0 0 auto;
  width: 24.142%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.header-logo a {
  display: inline-block;
}

.header-logo img {
  display: inline-block;
  vertical-align: middle;
}

.header-nav {
  flex: 0 0 auto;
  width: 76.442%;
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  gap: 20px;
}

.menu,
.sub-menu {
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.menu > li {
  position: relative;
  display: flex;
}

.menu-link {
  position: relative;
  display: flex;
  align-items: center;
  margin: 0 15px;
  padding: 5px 0;
  color: var(--menu);
  font-family: var(--fuente-menu);
  font-size: 23px;
  font-weight: 400;
  line-height: 1em;
  text-transform: capitalize;
  white-space: nowrap;
  transition: color .4s;
}

.menu > li:first-child > .menu-link {
  margin-left: 0;
}

.menu > li:last-child > .menu-link {
  margin-right: 0;
}

/* Subrayado al pasar el ratón / página activa */
.menu-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background-color: var(--menu-activo);
  opacity: 0;
  transition: opacity .3s;
}

.menu-link:hover,
.menu-link:focus,
.menu-link.is-active,
.has-children:hover > .menu-link,
.has-children.is-open > .menu-link {
  color: var(--menu-activo);
}

.menu-link:hover::after,
.menu-link:focus::after,
.menu-link.is-active::after,
.has-children:hover > .menu-link::after,
.has-children.is-open > .menu-link::after {
  opacity: 1;
}

.sub-arrow {
  display: flex;
  align-items: center;
  margin: -10px 0;
  padding: 10px 0 10px 10px;
  line-height: 1;
}

.sub-arrow svg {
  width: 1em;
  height: 1em;
  fill: currentColor;
}

/* Submenú "Localidades" (escritorio y tableta) */
.sub-menu {
  position: absolute;
  top: 100%;
  left: 15px;
  z-index: 3;
  display: none;
  min-width: 10em;
  background-color: #F3F5F8;
  font-size: 13px;
}

.has-children:hover > .sub-menu,
.has-children:focus-within > .sub-menu,
.has-children.is-open > .sub-menu {
  display: block;
}

.sub-link {
  display: flex;
  align-items: center;
  padding: 13px 20px;
  border-left: 8px solid transparent;
  color: var(--menu);
  font-family: var(--fuente-menu);
  font-size: 16px;
  font-weight: 400;
  line-height: 20px;
  white-space: nowrap;
}

.sub-link:hover,
.sub-link:focus,
.sub-link.is-active {
  background-color: #F9FAFD;
  color: var(--menu);
}

/* Botón hamburguesa (solo móvil) */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  padding: .25em;
  border: 0;
  border-radius: 3px;
  background-color: transparent;
  color: #467FF7;
  font-size: 20px;
  cursor: pointer;
}

.menu-toggle svg {
  display: block;
  width: 1em;
  height: 1em;
  fill: currentColor;
}

.menu-toggle .icono-cerrar,
.menu-toggle[aria-expanded="true"] .icono-abrir {
  display: none;
}

.menu-toggle[aria-expanded="true"] .icono-cerrar {
  display: block;
}

/* ---------- Estructura común de secciones ---------- */

.content {
  background-color: #FFFFFF;
}

.sec {
  display: flex;
  flex-direction: column;
}

.sec-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
}

.row {
  display: flex;
  flex-direction: row;
  gap: 20px;
  padding: 10px;
}

.col,
.stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 50%;
  padding: 10px;
}

.stack {
  width: 100%;
}

.anchor {
  height: 0;
}

.heading {
  position: relative;
  margin: 0;
  padding: 0;
  color: var(--azul-titulos);
  font-family: var(--fuente-titulos);
  font-weight: 600;
  line-height: 1;
}

h1.heading {
  font-size: 42px;
}

h2.heading {
  font-size: 35px;
}

h3.heading {
  font-size: 29px;
}

.text {
  position: relative;
  color: var(--texto-gris);
  font-family: var(--fuente-titulos);
  font-weight: 400;
}

.text p {
  margin: 0 0 1.5em;
}

.image {
  position: relative;
  margin: 0;
  text-align: center;
}

.image img {
  display: block;
  width: 100%;
  margin: 0 auto;
}

.image figcaption {
  padding-top: 5px;
  color: var(--texto-gris);
  font-family: var(--fuente-titulos);
  font-size: 75%;
  font-weight: 400;
}

.image--sin-pie {
  padding-bottom: 5px;
}

/* ---------- 1. Portada azul ---------- */

.hero {
  position: relative;
  padding: 0 59px 0 42px;
  /* #0041FD con capa negra al 52 % */
  background-color: #001F79;
}

.hero .sec-inner {
  position: relative;
  z-index: 1;
  padding: 102px 0 133px;
}

.hero .heading {
  color: #FFFFFF;
}

.hero .text {
  color: #FFFFFF;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 3px;
  background-color: var(--verde-boton);
  color: #FFFFFF;
  font-family: var(--fuente-titulos);
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
  text-align: center;
  transition: all .3s;
}

.btn:hover,
.btn:focus,
.btn:visited {
  color: #FFFFFF;
}

.btn-content {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 5px;
}

.btn-icon {
  display: flex;
  align-items: center;
}

.btn-icon svg {
  width: 1em;
  height: 1em;
  fill: currentColor;
}

.shape-bottom {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  direction: ltr;
  transform: rotate(180deg);
  pointer-events: none;
}

.shape-bottom svg {
  position: relative;
  left: 50%;
  display: block;
  width: calc(100% + 1.3px);
  transform: translateX(-50%);
}

.shape-bottom path {
  fill: #FFFFFF;
}

/* ---------- 2. Cartel de contacto ---------- */

.cartel {
  padding: 0 10px;
}

.cartel .sec-inner {
  align-items: center;
  padding: 10px 0;
}

.cartel .image {
  width: 51.171%;
  max-width: 51.171%;
  padding-bottom: 5px;
}

.cartel .image a {
  display: inline-block;
}

/* ---------- 3. Atención urgente (gris) ---------- */

.urgente {
  background-color: #ECECEC;
}

.urgente .sec-inner {
  padding: 28px 0;
}

/* ---------- 4. Servicios ---------- */

.servicios .sec-inner {
  padding: 51px 0 37px;
}

.servicios h2.heading {
  text-align: center;
}

.card {
  border: 2px solid currentColor;
  border-radius: 8px;
  padding: 22px;
}

.icon-box {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  text-align: center;
}

.icon-box .icon {
  display: inline-block;
  color: var(--azul-titulos);
  font-size: 50px;
  line-height: 1;
}

.icon-box .icon svg {
  display: block;
  width: 1em;
  height: 1em;
  fill: currentColor;
}

.icon-box h3 {
  width: 100%;
  margin: 0 0 20px;
  color: #000000;
  font-family: var(--fuente-titulos);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.2;
}

.card .text {
  text-align: center;
}

/* ---------- 5. Por qué elegirnos (gris claro) ---------- */

.porque {
  background-color: #EEEEEE;
}

.porque .sec-inner {
  padding: 20px 0 21px;
}

/* ---------- 6 y 7. Bloques de texto ---------- */

.bloque {
  padding: 0 10px;
}

.bloque .sec-inner {
  padding: 10px 0;
}

/* ---------- 8. Mapa y vídeo ---------- */

.mapa-video {
  padding: 0 10px;
}

.mapa-video .sec-inner {
  flex-direction: row;
  max-width: 1564px;
  padding: 10px 0;
}

.mapa-video iframe {
  display: block;
  width: 100%;
  border: 0;
}

.mapa iframe {
  height: 300px;
}

.video {
  aspect-ratio: 1.77777;
}

.video iframe {
  height: 100%;
  background-color: #000000;
}

/* ---------- 9. Llámanos ---------- */

.contacto {
  padding: 0 20px;
  background-image: url("../wp-content/uploads/2026/01/Aperturas-de-puertas-en-Boadilla-1536x1536.webp");
  background-position: 0 0;
  background-size: cover;
}

.contacto .sec-inner {
  padding: 20px 0;
}

.contacto-caja {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 18px 0;
}

.contacto-caja::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #CECECE;
  opacity: .8;
}

.contacto .heading {
  text-align: center;
}

.contacto h2.heading {
  color: #946600;
  font-family: "Roboto Flex", Sans-serif;
  font-size: 48px;
}

.contacto p.heading {
  color: #000000;
  font-size: 19px;
}

.contacto p.heading a {
  color: inherit;
}

/* ---------- Páginas de localidades ---------- */

.breadcrumbs {
  position: relative;
  color: #FFFFFF;
  font-family: var(--fuente-titulos);
  font-size: 14px;
  line-height: 1.4;
  opacity: .85;
}

.breadcrumbs a {
  color: #FFFFFF;
  text-decoration: underline;
}

.breadcrumbs a:hover,
.breadcrumbs a:focus {
  color: #FFFFFF;
  text-decoration: none;
}

.breadcrumbs .sep {
  margin: 0 6px;
}

/* Sección de barrios y urbanizaciones */
.barrios {
  padding: 0 10px;
  background-color: #EEEEEE;
}

.barrios .sec-inner {
  padding: 30px 10px 6px;
}

.chips {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 8px 16px;
  border: 1px solid #D5D5D5;
  border-radius: 999px;
  background-color: #FFFFFF;
  color: var(--texto-base);
  font-family: var(--fuente-titulos);
  font-size: 16px;
  line-height: 1.3;
}

/* Preguntas frecuentes */
.faq {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq details {
  border: 2px solid currentColor;
  border-radius: 8px;
  background-color: #FFFFFF;
}

.faq summary {
  position: relative;
  padding: 16px 52px 16px 20px;
  color: #000000;
  font-family: var(--fuente-titulos);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 20px;
  color: var(--azul-titulos);
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
  transform: translateY(-50%);
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq .text {
  padding: 0 20px 2px;
}

/* Tarjetas de municipios */
.zonas-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  padding: 10px;
}

.zona-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  border: 2px solid var(--texto-base);
  border-radius: 8px;
  background-color: #FFFFFF;
  color: var(--texto-gris);
  font-family: var(--fuente-titulos);
  transition: border-color .3s;
}

.zona-card:hover,
.zona-card:focus {
  border-color: var(--azul-titulos);
  color: var(--texto-gris);
}

.zona-card h3 {
  margin: 0;
  color: #000000;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
}

.zona-card p {
  margin: 0;
}

.zona-card .ver {
  margin-top: auto;
  color: var(--azul-titulos);
  font-weight: 500;
}

.zonas {
  padding: 0 10px;
  background-color: #ECECEC;
}

.zonas .sec-inner {
  padding: 30px 0;
}

.zonas h2.heading {
  text-align: center;
}

.zonas .intro {
  text-align: center;
}

.zonas .intro p {
  margin: 0;
}

/* ---------- Pie ---------- */

.site-footer {
  padding-top: 15px;
  border-top: 1px solid var(--texto-base);
}

.footer-container {
  display: flex;
  max-width: 1140px;
  margin: 0 auto;
}

.footer-col {
  width: 50%;
  padding: 10px;
}

.copyright {
  color: #B9B9B9;
  font-family: var(--fuente-titulos);
  font-weight: 600;
  line-height: 1;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin: 0 -5px;
  padding: 0;
  list-style: none;
}

.footer-links li {
  display: flex;
  margin: 0 5px;
}

.footer-links a {
  display: flex;
  align-items: center;
  color: #C5C5C5;
  font-family: var(--fuente-titulos);
  font-weight: 400;
  transition: color .3s;
}

/* ---------- Botón flotante "Llama Ya" ---------- */

.llama-ya {
  position: fixed;
  left: 20px;
  bottom: 15px;
  z-index: 2147483647;
  display: block;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  background-color: #008A00;
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiI+PHBhdGggZD0iTTI3LjAxMzU1LDIzLjQ4ODU5bC0xLjc1MywxLjc1MzA1YTUuMDAxLDUuMDAxLDAsMCwxLTUuMTk5MjgsMS4xODI0M2MtMS45NzE5My0uNjkzNzItNC44NzMzNS0yLjM2NDM4LTguNDM4NDgtNS45Mjk1UzYuMzg3LDE0LjAyOCw1LjY5MzMsMTIuMDU2MTVBNS4wMDA3OCw1LjAwMDc4LDAsMCwxLDYuODc1NzMsNi44NTY4N0w4LjYyODc4LDUuMTAzNzZhMSwxLDAsMCwxLDEuNDE0MzEuMDAwMTJsMi44MjgsMi44Mjg4QTEsMSwwLDAsMSwxMi44NzEsOS4zNDY4TDExLjA2NDcsMTEuMTUzYTEuMDAzOCwxLjAwMzgsMCwwLDAtLjA4MjEsMS4zMjE3MSw0MC43NDI3OCw0MC43NDI3OCwwLDAsMCw0LjA3NjI0LDQuNTgzNzQsNDAuNzQxNDMsNDAuNzQxNDMsMCwwLDAsNC41ODM3NCw0LjA3NjIzLDEuMDAzNzksMS4wMDM3OSwwLDAsMCwxLjMyMTcxLS4wODIwOWwxLjgwNjIyLTEuODA2MjdhMSwxLDAsMCwxLDEuNDE0MTItLjAwMDEybDIuODI4OCwyLjgyOEExLjAwMDA3LDEuMDAwMDcsMCwwLDEsMjcuMDEzNTUsMjMuNDg4NTlaIiBmaWxsPSIjZmZmZmZmIi8+PC9zdmc+");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 35px 35px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, .3);
  text-decoration: none;
  transform: scale(1.3);
}

.llama-ya span {
  position: absolute;
  top: 15px;
  left: 68px;
  display: block;
  padding: 6px 8px;
  border-radius: 2px;
  background-color: rgba(70, 70, 70, .9);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
  color: #ECECEC;
  font-family: helvetica, arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1em;
  white-space: nowrap;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
}

/* ---------- Página 404 ---------- */

.error-404 .sec-inner {
  align-items: flex-start;
  padding: 80px 20px;
}

/* ==========================================================================
   Tableta (<= 1024px)
   ========================================================================== */

@media (max-width: 1024px) {
  .site-header {
    min-height: 85px;
    padding: 0 5%;
  }

  .header-logo {
    width: 15%;
  }

  .header-nav {
    width: 85%;
  }

  .menu-link,
  .sub-link {
    font-size: 14px;
  }

  .zonas-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ==========================================================================
   Móvil (<= 767px)
   ========================================================================== */

@media (max-width: 767px) {
  .site-header {
    flex-wrap: wrap;
    min-height: 65px;
  }

  .header-logo {
    width: 20%;
  }

  .header-nav {
    width: 80%;
  }

  .menu-toggle {
    display: flex;
  }

  /* El menú se convierte en desplegable a todo el ancho */
  .nav-main {
    position: absolute;
    top: calc(100% - 2px);
    left: 0;
    z-index: 9997;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    background-color: #F3F5F8;
    font-size: 13px;
    transform: scaleY(0);
    transform-origin: top;
    transition: max-height .3s, transform .3s;
  }

  .nav-main.is-open {
    max-height: 100vh;
    overflow-y: auto;
    transform: scaleY(1);
  }

  .menu {
    display: block;
  }

  .menu > li {
    display: block;
  }

  .menu-link,
  .menu > li:first-child > .menu-link,
  .menu > li:last-child > .menu-link {
    margin: 0;
    padding: 14px 20px;
    font-size: 14px;
  }

  .menu-link::after {
    display: none;
  }

  .menu-link:hover,
  .menu-link:focus,
  .menu-link.is-active,
  .has-children:hover > .menu-link,
  .has-children.is-open > .menu-link {
    background-color: #F9FAFD;
    color: var(--menu);
  }

  .sub-menu,
  .has-children:hover > .sub-menu,
  .has-children:focus-within > .sub-menu {
    position: static;
    display: none;
    min-width: 0;
    background-color: #F3F5F8;
  }

  .has-children.is-open > .sub-menu {
    display: block;
  }

  .sub-link {
    padding: 14px 20px;
    font-size: 14px;
  }

  .row {
    flex-wrap: wrap;
  }

  .col {
    width: 100%;
  }

  .mapa-video .sec-inner {
    flex-wrap: wrap;
  }

  .contacto {
    background-image: url("../wp-content/uploads/2026/01/Aperturas-de-puertas-en-Boadilla-768x768.webp");
  }

  .zonas-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .faq summary {
    font-size: 17px;
  }

  .footer-container {
    flex-wrap: wrap;
  }

  .footer-col {
    width: 100%;
  }

  .copyright {
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }
}
