/* ── Base común de las tres webs de hormigón (cada sitio redefine las variables en sitios/<sitio>.css) ── */
:root {
  --tinta: #111418;
  --tinta-2: #2a2f36;
  --texto: #3b4048;
  --texto-suave: #5d636c;
  --fondo: #ffffff;
  --suave: #f5f3ef;
  --borde: #e3e0da;
  --acento: #d42a1f;
  --acento-texto: #b82218;
  --sobre-acento: #ffffff;
  --wa: #0f7a40;
  --f-tit: system-ui, sans-serif;
  --f-txt: system-ui, sans-serif;
  --peso-tit: 800;
  --tracking-tit: -0.02em;
  --radio: 10px;
  --radio-g: 16px;
  --sombra: 0 1px 2px rgb(0 0 0 / .05), 0 8px 24px rgb(0 0 0 / .07);
  --ancho: 1200px;
  --margen: clamp(16px, 4vw, 32px);
  --alto-cab: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--alto-cab) + 12px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--fondo); color: var(--texto);
  font: 400 1.0625rem/1.65 var(--f-txt);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--acento-texto); text-underline-offset: .18em; }
h1, h2, h3, h4 { font-family: var(--f-tit); font-weight: var(--peso-tit); color: var(--tinta); line-height: 1.12; letter-spacing: var(--tracking-tit); margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5.4vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 3.3vw, 2.75rem); }
h3 { font-size: clamp(1.18rem, 1.6vw, 1.35rem); letter-spacing: -.01em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--acento); outline-offset: 3px; border-radius: 4px; }
.saltar { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--tinta); color: #fff; padding: .6em 1em; border-radius: var(--radio); }
.saltar:focus { left: 8px; }
.envoltura { width: min(100% - 2 * var(--margen), var(--ancho)); margin-inline: auto; }
.ico { display: inline-grid; width: 1.15em; height: 1.15em; flex: none; }
.ico svg { width: 100%; height: 100%; }

/* ── botones ── */
.botones { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 50px; padding: .8em 1.35em; border-radius: var(--radio); border: 2px solid transparent;
  font: 700 1rem/1.1 var(--f-txt); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .15s ease, background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn .ico-flecha { transition: transform .15s ease; }
.btn:hover .ico-flecha { transform: translateX(3px); }
.btn--acento { background: var(--acento); color: var(--sobre-acento); }
.btn--acento:hover { filter: brightness(1.06); }
.btn--wa { background: var(--wa); color: #fff; }
.btn--wa:hover { background: #0b6434; }
.btn--linea { border-color: currentColor; color: var(--tinta); background: transparent; }
.btn--linea:hover { background: var(--tinta); color: #fff; border-color: var(--tinta); }
.btn--claro { background: #fff; color: var(--tinta); }
.btn--claro:hover { background: #f1f1f1; }
.btn--bloque { width: 100%; }

/* ── cabecera ── */
.cabecera { position: sticky; top: 0; z-index: 50; background: var(--fondo-cab, #fff); border-bottom: 1px solid var(--borde-cab, var(--borde)); }
.cabecera__in { display: flex; align-items: center; gap: 24px; min-height: var(--alto-cab); }
.logo { display: block; flex: none; }
.logo img { height: var(--alto-logo, 52px); width: auto; }
.menu { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.menu > a, .desplegable > summary {
  display: inline-flex; align-items: center; gap: 4px; padding: .55em .8em; border-radius: 8px;
  color: var(--color-menu, var(--tinta)); text-decoration: none; font-weight: 700; font-size: .98rem; cursor: pointer; list-style: none;
}
.desplegable > summary::-webkit-details-marker { display: none; }
.menu > a:hover, .desplegable > summary:hover, .menu > a[aria-current="page"] { color: var(--acento-menu, var(--acento-texto)); }
.desplegable { position: relative; }
.desplegable .ico-abajo { width: 16px; height: 16px; transition: transform .2s; }
.desplegable[open] .ico-abajo { transform: rotate(180deg); }
.desplegable__panel {
  position: absolute; top: calc(100% + 8px); left: 50%; translate: -50% 0; min-width: 250px; z-index: 5;
  background: #fff; border: 1px solid var(--borde); border-radius: var(--radio-g); box-shadow: var(--sombra); padding: 8px;
  display: grid;
}
.desplegable__panel a { display: block; padding: .55em .8em; border-radius: 8px; color: var(--tinta); text-decoration: none; font-weight: 600; font-size: .95rem; }
.desplegable__panel a:hover { background: var(--suave); color: var(--acento-texto); }
.cabecera__acciones { display: flex; gap: 10px; align-items: center; }
.cabecera__tel { font-weight: 800; color: var(--color-menu, var(--tinta)); text-decoration: none; display: inline-flex; gap: .4em; align-items: center; white-space: nowrap; }
.boton-menu { display: none; margin-left: auto; width: 48px; height: 48px; border: 0; border-radius: 10px; background: transparent; color: var(--color-menu, var(--tinta)); cursor: pointer; padding: 10px; }
.boton-menu svg { width: 100%; height: 100%; }

@media (max-width: 1020px) {
  :root { --alto-cab: 68px; }
  .boton-menu { display: block; }
  .cabecera__acciones .btn, .cabecera__tel { display: none; }
  .menu {
    position: fixed; inset: var(--alto-cab) 0 0 0; z-index: 49; margin: 0; padding: 16px var(--margen) 120px;
    background: #fff; flex-direction: column; align-items: stretch; gap: 2px; overflow-y: auto;
    visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .2s, transform .2s, visibility .2s;
  }
  .menu-abierto .menu { visibility: visible; opacity: 1; transform: none; }
  .menu-abierto { overflow: hidden; }
  .menu > a, .desplegable > summary { font-size: 1.15rem; padding: .8em .4em; border-bottom: 1px solid var(--borde); border-radius: 0; color: var(--tinta); justify-content: space-between; width: 100%; }
  .desplegable__panel { position: static; translate: none; box-shadow: none; border: 0; padding: 0 0 8px 8px; min-width: 0; }
  .menu .menu__movil { display: grid; gap: 10px; margin-top: 18px; }
}
.menu__movil { display: none; }

/* ── portada ── */
.portada { position: relative; isolation: isolate; color: #fff; display: grid; align-items: end; min-height: clamp(560px, 88vh, 860px); padding-block: clamp(110px, 14vw, 160px) clamp(40px, 6vw, 72px); overflow: hidden; }
.portada__foto { position: absolute; inset: 0; z-index: -2; }
.portada__foto img { width: 100%; height: 100%; object-fit: cover; }
.portada::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--velo-portada, linear-gradient(180deg, rgb(0 0 0 / .25), rgb(0 0 0 / .72))); }
.portada h1 { color: #fff; max-width: 15ch; margin-bottom: .35em; }
.portada__texto { font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 58ch; color: rgb(255 255 255 / .92); margin-bottom: 1.6em; }
.portada .eyebrow { color: var(--eyebrow-portada, #fff); }

.portadilla { background: var(--fondo-portadilla, var(--tinta)); color: #fff; padding-block: clamp(48px, 7vw, 88px) clamp(40px, 6vw, 72px); position: relative; isolation: isolate; }
.portadilla--foto { background: var(--tinta) var(--foto) center / cover no-repeat; }
.portadilla--foto::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(0 0 0 / .78), rgb(0 0 0 / .45)); }
.portadilla h1 { color: #fff; font-size: clamp(2rem, 4.6vw, 3.4rem); max-width: 22ch; }
.portadilla__sub { font-size: clamp(1.02rem, 1.5vw, 1.2rem); max-width: 60ch; color: rgb(255 255 255 / .88); }
.portadilla .botones { margin-top: 1.4em; }
.portadilla .eyebrow { color: var(--eyebrow-oscuro, #fff); }
.migas ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 18px; font-size: .9rem; color: rgb(255 255 255 / .7); }
.migas li + li::before { content: "/"; margin-right: 6px; opacity: .6; }
.migas a { color: rgb(255 255 255 / .85); text-decoration: none; }
.migas a:hover { color: #fff; text-decoration: underline; }

/* ── bandas y cabezas de sección ── */
.banda { padding-block: clamp(56px, 8vw, 104px); }
.banda--suave { background: var(--suave); }
.cabeza { max-width: 780px; margin-bottom: clamp(28px, 4vw, 48px); }
.cabeza--centro { margin-inline: auto; text-align: center; }
.cabeza .intro { font-size: 1.1rem; color: var(--texto-suave); }
.cabeza .intro p:last-child { margin-bottom: 0; }
.eyebrow { font: 800 .8rem/1.2 var(--f-txt); letter-spacing: .16em; text-transform: uppercase; color: var(--acento-texto); margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 28px; height: 3px; background: var(--acento); border-radius: 2px; flex: none; }
.cabeza--centro .eyebrow { justify-content: center; }

/* ── rejillas y tarjetas ── */
.rejilla { display: grid; gap: clamp(16px, 2.4vw, 28px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
@media (min-width: 900px) { .rejilla--3 { grid-template-columns: repeat(3, 1fr); } .rejilla--4 { grid-template-columns: repeat(4, 1fr); } .rejilla--2 { grid-template-columns: repeat(2, 1fr); } }
.tarjeta { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio-g); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.tarjeta:has(a):hover { box-shadow: var(--sombra); transform: translateY(-2px); }
.tarjeta__enlace { color: inherit; text-decoration: none; display: flex; flex-direction: column; height: 100%; }
.tarjeta__foto { aspect-ratio: 4 / 3; overflow: hidden; background: var(--suave); }
.tarjeta__foto img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tarjeta:hover .tarjeta__foto img { transform: scale(1.03); }
.tarjeta__cuerpo { padding: clamp(18px, 2vw, 26px); display: flex; flex-direction: column; flex: 1; }
.tarjeta__cuerpo p { color: var(--texto-suave); font-size: 1rem; }
.tarjeta__cuerpo p:last-of-type { margin-bottom: 0; }
.tarjeta__mas { margin-top: auto; padding-top: 14px; font-weight: 800; color: var(--acento-texto); display: inline-flex; align-items: center; gap: .4em; }
.rejilla--blog .tarjeta h3 { font-size: 1.15rem; }

/* ── pasos ── */
.pasos { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(16px, 2.4vw, 28px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.paso { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio-g); padding: clamp(20px, 2.4vw, 30px); position: relative; }
.paso__n { display: block; font: 900 2.6rem/1 var(--f-tit); color: var(--acento); margin-bottom: 14px; letter-spacing: -.03em; }
.paso p { margin: 0; font-size: 1rem; color: var(--texto-suave); }
.banda--suave .paso, .banda--suave .tarjeta { border-color: transparent; }

/* ── listas ── */
.ventajas, .checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.ventajas li, .checklist li { display: flex; gap: 12px; align-items: flex-start; }
.ventajas .ico, .checklist .ico { width: 26px; height: 26px; padding: 4px; border-radius: 50%; background: var(--acento); color: var(--sobre-acento); margin-top: 1px; }
.ventajas strong { color: var(--tinta); display: block; font-size: 1.05rem; }
.ventajas p { margin: .25em 0 0; color: var(--texto-suave); font-size: .98rem; }
.ventajas--rejilla { gap: 24px 32px; }
@media (min-width: 760px) { .ventajas--rejilla { grid-template-columns: repeat(2, 1fr); } }
.checklist { margin-block: 1.2em; }
.checklist li span { font-weight: 600; color: var(--tinta); }

/* ── cifras ── */
.cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px; }
.cifra { display: grid; gap: 4px; }
.cifra__n { font: 900 clamp(2.2rem, 4vw, 3.2rem)/1 var(--f-tit); color: var(--acento); letter-spacing: -.03em; }
.cifra__t { font-weight: 600; color: var(--texto-suave); }
.banda--cifras { background: var(--tinta); }
.banda--cifras .cifra__t, .banda--cifras h2 { color: #fff; }
.banda--cifras .cifras { text-align: center; }

/* ── dividido ── */
.dividido { display: grid; gap: clamp(28px, 5vw, 72px); align-items: center; }
@media (min-width: 900px) { .dividido { grid-template-columns: 1.05fr .95fr; } .dividido--invertido > :first-child { order: 2; } }
.dividido__foto img { width: 100%; border-radius: var(--radio-g); aspect-ratio: 4 / 3.4; object-fit: cover; }
.dividido .cabeza { margin-bottom: 20px; }

/* ── prosa ── */
.prosa { max-width: 70ch; }
.prosa--ancha { max-width: 80ch; }
.prosa h2 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); margin-top: 1.6em; }
.prosa h3 { margin-top: 1.4em; }
.prosa ul, .prosa ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prosa li { margin-bottom: .4em; }
.prosa li::marker { color: var(--acento); }
.prosa li > p { margin: 0; }
.prosa strong { color: var(--tinta); }
.prosa table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: .98rem; }
.prosa th, .prosa td { border-bottom: 1px solid var(--borde); padding: .6em .5em; text-align: left; }
.prosa > :first-child { margin-top: 0; }
.prosa--legal { max-width: 80ch; font-size: 1rem; }
.prosa--legal h2 { font-size: 1.35rem; }

/* ── galería ── */
.galeria { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(46%, 220px), 1fr)); }
.galeria__item { display: block; aspect-ratio: 1; overflow: hidden; border-radius: var(--radio); background: var(--suave); }
.galeria__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease, filter .3s; }
.galeria__item:hover img { transform: scale(1.04); }
.galeria--mini { grid-template-columns: repeat(2, 1fr); }
.galeria--completa { display: block; columns: 4 240px; column-gap: 10px; }
.galeria--completa .galeria__item { aspect-ratio: auto; margin-bottom: 10px; break-inside: avoid; }
.galeria--completa .galeria__item img { height: auto; }
.galeria__pie { text-align: center; margin: 28px 0 0; }
.dividido--galeria { align-items: start; }

/* ── visor de fotos ── */
.visor { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.visor::backdrop { background: rgb(8 9 11 / .92); }
.visor[open] { display: grid; place-items: center; }
.visor img { max-width: min(94vw, 1400px); max-height: 86vh; width: auto; height: auto; border-radius: 6px; }
.visor button { position: fixed; border: 0; background: rgb(255 255 255 / .12); color: #fff; width: 52px; height: 52px; border-radius: 50%; padding: 13px; cursor: pointer; }
.visor button:hover { background: rgb(255 255 255 / .24); }
.visor button svg { width: 100%; height: 100%; }
.visor__cerrar { top: 16px; right: 16px; }
.visor__ant { left: 16px; top: 50%; translate: 0 -50%; }
.visor__ant svg { transform: rotate(180deg); }
.visor__sig { right: 16px; top: 50%; translate: 0 -50%; }

/* ── formularios ── */
.form { background: #fff; color: var(--texto); border-radius: var(--radio-g); padding: clamp(20px, 3vw, 32px); box-shadow: var(--sombra); display: grid; gap: 16px; }
.form__titulo { font-size: clamp(1.3rem, 2vw, 1.6rem); margin: 0; }
.form__texto { margin: -6px 0 0; color: var(--texto-suave); font-size: .98rem; }
.form__campos { display: grid; gap: 14px; }
@media (min-width: 560px) { .form--presupuesto .form__campos { grid-template-columns: 1fr 1fr; } .campo--ancho { grid-column: 1 / -1; } }
.campo label { display: block; font-weight: 700; font-size: .92rem; color: var(--tinta); margin-bottom: 6px; }
.campo label span { font-weight: 500; color: var(--texto-suave); }
.campo input, .campo select, .campo textarea {
  width: 100%; min-height: 50px; padding: .7em .9em; font: 500 1rem/1.3 var(--f-txt); color: var(--tinta);
  background: #fbfbfa; border: 1.5px solid #cfcbc4; border-radius: var(--radio);
}
.campo textarea { min-height: 96px; resize: vertical; }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; border-color: var(--acento); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acento) 22%, transparent); background: #fff; }
.aviso { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--texto-suave); }
.aviso input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--acento); flex: none; }
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__estado { margin: 0; font-weight: 700; min-height: 1.2em; }
.form__estado.ok { color: #0f7a3d; }
.form__estado.error { color: #b3261e; }
.form.enviado .form__campos, .form.enviado .aviso, .form.enviado button { display: none; }

/* ── FAQ ── */
.faqs { display: grid; gap: 10px; max-width: 860px; }
.faq { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); }
.faq summary { cursor: pointer; padding: 1em 1.2em; font-weight: 800; color: var(--tinta); display: flex; justify-content: space-between; gap: 12px; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq[open] .ico-abajo { transform: rotate(180deg); }
.faq .prosa { padding: 0 1.2em 1em; }

/* ── franja de llamada ── */
.cta { background: var(--fondo-cta, var(--acento)); color: var(--color-cta, #fff); padding-block: clamp(40px, 6vw, 64px); }
.cta__in { display: flex; flex-wrap: wrap; gap: 24px 40px; align-items: center; justify-content: space-between; }
.cta h2 { color: inherit; margin: 0 0 .25em; font-size: clamp(1.6rem, 3vw, 2.3rem); max-width: 24ch; }
.cta p { margin: 0; max-width: 56ch; }

/* ── artículo ── */
.articulo__in { max-width: 820px; }
.articulo__fecha { color: var(--texto-suave); font-weight: 600; }
.articulo__foto { margin: 0 0 clamp(24px, 4vw, 40px); }
.articulo__foto img { border-radius: var(--radio-g); width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.aviso-cta { margin-top: 48px; padding: clamp(22px, 3vw, 34px); border-radius: var(--radio-g); background: var(--suave); border-left: 6px solid var(--acento); }
.aviso-cta h2 { font-size: 1.5rem; margin-bottom: .3em; }

/* ── pie ── */
.pie { background: var(--fondo-pie, var(--tinta)); color: rgb(255 255 255 / .78); padding-block: clamp(48px, 7vw, 80px) 28px; font-size: .97rem; }
.pie a { color: #fff; text-decoration: none; }
.pie a:hover { text-decoration: underline; }
.pie__rejilla { display: grid; gap: 36px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
@media (min-width: 900px) { .pie__rejilla { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.pie h2 { color: #fff; font-size: .82rem; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 1em; font-family: var(--f-txt); }
.pie ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pie__logo img { height: var(--alto-logo-pie, 84px); width: auto; margin-bottom: 18px; }
.pie__base { margin-top: 44px; padding-top: 22px; border-top: 1px solid rgb(255 255 255 / .14); display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; font-size: .88rem; color: rgb(255 255 255 / .6); }
.pie__tel { font: 800 1.35rem/1.2 var(--f-tit); }

/* ── WhatsApp y barra del móvil ── */
.wa-flotante { position: fixed; right: 22px; bottom: 22px; z-index: 40; width: 60px; height: 60px; border-radius: 50%; background: #25d366; color: #fff; padding: 14px; box-shadow: 0 6px 20px rgb(0 0 0 / .25); transition: transform .2s; }
.wa-flotante:hover { transform: scale(1.06); }
.barra-movil { display: none; }
@media (max-width: 760px) {
  .wa-flotante { display: none; }
  .barra-movil { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: rgb(255 255 255 / .96); border-top: 1px solid var(--borde); backdrop-filter: blur(6px); }
  .barra-movil .btn { min-height: 48px; padding: .6em .8em; }
  .barra-movil .btn--claro { border: 2px solid var(--tinta); }
  body { padding-bottom: 72px; }
  .portada .botones .btn, .portadilla .botones .btn { flex: 1 1 100%; }
}

/* ── 404 / gracias ── */
.error404 { min-height: 56vh; display: grid; align-items: center; }
.error404 h1 { font-size: clamp(2rem, 5vw, 3.4rem); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ── piezas compartidas de portada y bandas ── */
.sellos { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 28px; padding: 0; margin: clamp(28px, 4vw, 44px) 0 0; color: rgb(255 255 255 / .86); font-size: .98rem; }
.sellos li { display: flex; align-items: baseline; gap: .45em; }
.sellos strong { font: 900 1.5rem/1 var(--f-tit); color: #fff; }
.cabeza-fila { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: end; justify-content: space-between; margin-bottom: clamp(28px, 4vw, 44px); }
.cabeza-fila .cabeza { margin-bottom: 0; }
.banda--oscura { background: var(--tinta); color: rgb(255 255 255 / .86); }
.banda--oscura h2, .banda--oscura h3 { color: #fff; }
.banda--oscura .eyebrow { color: var(--eyebrow-oscuro, #fff); }
.banda--oscura .checklist li span { color: #fff; }
.lead { font-size: 1.15rem; }

/* ── aviso de cookies (solo webs con etiqueta de Google) ── */
.aviso-cookies { position: fixed; z-index: 60; left: 16px; right: 16px; bottom: 16px; max-width: 560px; background: #fff; color: var(--texto); border: 1px solid var(--borde); border-radius: var(--radio-g); box-shadow: 0 12px 40px rgb(0 0 0 / .22); padding: 18px 20px; display: grid; gap: 12px; font-size: .95rem; }
.aviso-cookies[hidden] { display: none; }
.aviso-cookies p { margin: 0; }
.aviso-cookies a { color: var(--acento-texto); font-weight: 700; }
.aviso-cookies__botones { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.aviso-cookies .btn { min-height: 44px; padding-inline: 1.2em; }
@media (max-width: 760px) { .aviso-cookies { bottom: 80px; left: 10px; right: 10px; padding: 12px 14px; gap: 8px; font-size: .86rem; line-height: 1.45; } .aviso-cookies .btn { min-height: 40px; padding: .4em 1em; font-size: .92rem; } }
.pie button.pie__cookies { background: none; border: 0; padding: 0; color: #fff; font: inherit; cursor: pointer; text-align: left; }
.pie button.pie__cookies:hover { text-decoration: underline; }

/* ── tarjeta de WhatsApp (sustituye a los formularios) ── */
.contacto-wa { background: #fff; color: var(--texto); border-radius: var(--radio-g); padding: clamp(22px, 3vw, 34px); box-shadow: var(--sombra); display: grid; gap: 14px; border-top: 5px solid var(--wa); }
.contacto-wa__ico { width: 52px; height: 52px; border-radius: 50%; background: #e7f6ee; color: var(--wa); padding: 12px; display: block; }
.contacto-wa__ico svg { width: 100%; height: 100%; display: block; }
.contacto-wa__titulo { font-size: clamp(1.35rem, 2.2vw, 1.7rem); margin: 0; }
.contacto-wa__texto { margin: 0; color: var(--texto-suave); }
.contacto-wa .btn { min-height: 56px; font-size: 1.06rem; }
.contacto-wa__tel { margin: 0; text-align: center; color: var(--texto-suave); font-size: .96rem; }
.contacto-wa__tel a { font-weight: 800; color: var(--tinta); white-space: nowrap; }

/* formulario que abre WhatsApp con el mensaje redactado */
.form--wa { border-top: 5px solid var(--wa); }
.form--wa__cabeza { display: flex; align-items: center; gap: 14px; }
.form--wa__cabeza .contacto-wa__ico { width: 46px; height: 46px; padding: 11px; flex: none; }
.form--wa .btn--wa { min-height: 56px; font-size: 1.06rem; gap: .5em; }
.form--wa .btn--wa svg { width: 1.3em; height: 1.3em; }
.form__nota { margin: -6px 0 0; text-align: center; font-size: .86rem; color: var(--texto-suave); }
.form--wa .form__estado:empty { display: none; }
.form--wa .form__estado a { color: var(--wa); }
.form--wa { container-type: inline-size; }
@container (min-width: 500px) { .form--wa .form__campos { grid-template-columns: 1fr 1fr; } .form--wa .campo--ancho { grid-column: 1 / -1; } }

/* Antonio Fernández Abogados · negro, blanco y rojo #D12F1E del logotipo «aF» (rojo oscuro #891D1D en los títulos de las cajas)
   · Inter en casi todo y Lora en los títulos de página, como en la web anterior (tema Avvocato + Elementor) */
@font-face { font-family: "Inter"; src: url(/fuentes/inter-normal.woff2) format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Lora"; src: url(/fuentes/lora-500.woff2) format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
:root {
  --negro: #000000;
  --tinta: #111111;
  --tinta-2: #1F1F1F;
  --texto: #262626;
  --texto-suave: #4f5357;
  --suave: #F6F6F6;
  --gris: #F2F2F2;
  --borde: #e2e2e2;
  --acento: #D12F1E;
  --acento-texto: #B3271A;
  --rojo-oscuro: #891D1D;
  --sobre-acento: #ffffff;
  --f-tit: "Inter", system-ui, sans-serif;
  --f-txt: "Inter", system-ui, sans-serif;
  --f-lora: "Lora", Georgia, "Times New Roman", serif;
  --peso-tit: 700;
  --tracking-tit: -0.02em;
  --radio: 4px;
  --radio-g: 6px;
  --alto-cab: 92px;
  --alto-logo: 66px;
  --ancho: 1200px;
  --fondo-portadilla: #000;
  --fondo-pie: #000;
  --color-menu: #000;
  --acento-menu: var(--acento-texto);
  --eyebrow-oscuro: #C4C4C4;
  --sombra: 0 1px 2px rgb(0 0 0 / .05), 0 10px 30px rgb(0 0 0 / .08);
}
body { font-size: 1.0625rem; line-height: 1.6; color: var(--texto); }
strong, b { font-weight: 600; }
h1, h2, h3 { color: var(--negro); }
.btn { font-weight: 600; border-radius: var(--radio); }
.btn--negro { background: var(--tinta-2); color: #fff; }
.btn--negro:hover { background: #000; }
.btn--gris { background: #1F1F1F; color: #fff; border-color: #333; min-height: 48px; padding: .6em 1.1em; font-size: 1.02rem; }
.btn--gris:hover { background: #2c2c2c; text-decoration: none !important; }
.btn--linea:hover { background: #000; border-color: #000; }
.titulo-lora { font-family: var(--f-lora); font-weight: 500; letter-spacing: 0; line-height: 1.3; font-size: clamp(1.45rem, 2.4vw, 2rem); color: var(--tinta-2); }
.enlace-flecha { display: inline-flex; align-items: center; gap: .4em; font-weight: 600; color: var(--acento-texto); }
.eyebrow::before { height: 2px; border-radius: 0; }

/* barra superior negra: horario, correo y teléfono */
.barra-sup { background: #000; color: #fff; font-size: .84rem; }
.barra-sup__in { display: flex; align-items: center; gap: 6px 32px; min-height: 36px; flex-wrap: wrap; }
.barra-sup a, .barra-sup span { display: inline-flex; align-items: center; gap: .5em; color: inherit; text-decoration: none; }
.barra-sup a:hover { text-decoration: underline; }
.barra-sup .ico { width: 1em; height: 1em; color: #ff7a6b; }
.barra-sup a:last-child { margin-left: auto; font-weight: 600; }
@media (max-width: 760px) { .barra-sup__mail { display: none !important; } .barra-sup__in { min-height: 32px; font-size: .8rem; } }

/* cabecera */
.cabecera { border-bottom: 1px solid #cfcfcf; }
.logo img { height: var(--alto-logo); width: auto; }
.logo picture { display: block; }
.menu { gap: 2px; }
.menu > a, .desplegable > summary { font-weight: 500; font-size: 1.02rem; letter-spacing: -.005em; }
.menu > a[aria-current="page"], .desplegable.es-actual > summary { color: #000; box-shadow: inset 0 -2px 0 var(--acento); border-radius: 0; }
.menu > a:hover, .desplegable > summary:hover { color: var(--acento-texto); }
.desplegable__panel { border-radius: var(--radio-g); min-width: 270px; }
.desplegable__panel a { font-weight: 500; }
.desplegable__panel a[aria-current="page"] { background: var(--gris); }
.desplegable__todas { border-top: 1px solid var(--borde); margin-top: 4px; padding-top: .7em !important; display: flex !important; gap: .4em; align-items: center; color: var(--acento-texto) !important; font-weight: 600 !important; }
.desplegable__todas .ico { width: 1em; height: 1em; }
.cabecera__tel { font-weight: 600; font-size: 1.02rem; }
.cabecera__tel .ico { color: var(--acento); }
.btn--cab { min-height: 44px; padding: .5em 1em; font-size: .95rem; }
.menu__dato { display: none; }
@media (max-width: 1020px) {
  :root { --alto-cab: 72px; --alto-logo: 54px; }
  .menu > a[aria-current="page"], .desplegable.es-actual > summary { box-shadow: none; color: var(--acento-texto); }
  /* en móvil la web anterior llevaba la cabecera oscura (#0F151F) con el logotipo en blanco y sin la barra superior */
  .barra-sup { display: none; }
  .cabecera { --fondo-cab: #0F151F; --color-menu: #fff; border-bottom-color: #0F151F; }
  .menu .menu__dato { display: flex; gap: 10px; align-items: center; margin: 4px 0 0; color: var(--texto-suave); font-size: .95rem; }
}
@media (min-width: 1021px) and (max-width: 1180px) { .cabecera__tel { display: none; } }

/* portada: blanco con las letras «aF» del logotipo en claro, como la web anterior */
.portada-af { position: relative; background: #fff url(/af-claro.svg) no-repeat right max(2%, calc(50% - 560px)) center / auto 88%; min-height: clamp(520px, 76vh, 760px); display: grid; align-items: center; padding-block: clamp(56px, 8vw, 96px); }
.portada-af h1 { font-size: clamp(1.6rem, 3.8vw, 2.9rem); line-height: 1.18; letter-spacing: -.02em; max-width: 21ch; margin-bottom: .7em; }
.portada-af__nombre { display: block; font-weight: 400; letter-spacing: -.01em; }
.abogamos { font-size: clamp(1.15rem, 1.9vw, 1.5rem); line-height: 1.5; max-width: 40ch; color: #000; margin-bottom: 1.6em; font-weight: 500; }
.abogamos em { font-style: italic; letter-spacing: .02em; font-weight: 600; }
.portada-af .botones { margin-bottom: 26px; }
.portada-af__dato { display: flex; gap: 8px; align-items: flex-start; margin: 0; color: var(--texto-suave); font-size: .95rem; }
.portada-af__dato .ico { color: var(--acento); margin-top: .2em; }
@media (max-width: 760px) {
  .portada-af { background-position: right -30px top 20px; background-size: auto 62%; min-height: 0; align-items: start; }
  .portada-af .botones .btn { flex: 1 1 100%; }
}

/* +25 años con la raya roja vertical */
.trayectoria { display: grid; gap: 20px 48px; }
@media (min-width: 860px) { .trayectoria { grid-template-columns: minmax(220px, .8fr) 2.4fr; } }
.trayectoria__cifra { margin: 0; font: 500 clamp(1.5rem, 2.6vw, 2.1rem)/1.25 var(--f-tit); color: #000; letter-spacing: -.015em; }
.trayectoria__cifra strong { display: block; font-weight: 700; }
.trayectoria__texto { border-left: 2px solid var(--acento); padding-left: clamp(20px, 3vw, 32px); font-size: clamp(1.08rem, 1.6vw, 1.32rem); line-height: 1.5; color: #000; }
.trayectoria__texto p:last-child { margin-bottom: 0; }
.banda--trayectoria { padding-block: clamp(32px, 5vw, 72px); }

/* nuestro despacho */
.dividido--despacho .cabeza h2 { font-size: clamp(2.2rem, 4.4vw, 3.2rem); }
.dividido--despacho .prosa strong { color: #000; }
.dividido__foto img { aspect-ratio: 1464 / 866; border-radius: 0; }
.principios { display: grid; gap: 28px 36px; margin-top: clamp(36px, 5vw, 64px); }
@media (min-width: 640px) { .principios { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) { .principios { grid-template-columns: repeat(4, 1fr); } }
.principio h3 { font-weight: 500; font-size: clamp(1.2rem, 1.7vw, 1.4rem); line-height: 1.25; letter-spacing: -.01em; color: var(--rojo-oscuro); border-left: 3px solid var(--acento); padding-left: 10px; }
.principio p { margin: 0; font-size: .98rem; color: var(--texto); }

/* áreas en tarjetas */
.banda--gris { background: var(--suave); }
.tarjetas-area { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
.tarjeta-area a { display: flex; flex-direction: column; height: 100%; padding: 24px 24px 22px; background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); color: inherit; text-decoration: none; transition: border-color .2s, box-shadow .2s; }
.tarjeta-area a:hover { border-color: #000; box-shadow: var(--sombra); }
.tarjeta-area h3 { font-size: 1.3rem; border-left: 3px solid var(--acento); padding-left: 10px; margin-bottom: .7em; }
.tarjeta-area ul { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 6px; color: var(--texto-suave); font-size: .97rem; }
.tarjeta-area__mas { margin-top: auto; display: inline-flex; align-items: center; gap: .4em; font-weight: 600; color: var(--acento-texto); font-size: .95rem; }
.tarjeta-area__mas .ico { transition: transform .15s; }
.tarjeta-area a:hover .tarjeta-area__mas .ico { transform: translateX(3px); }

/* franja de contacto («Queremos escucharle…») */
.banda--contacto.banda--blanca { background: #fff; }
.banda--contacto .titulo-lora { margin-bottom: 26px; }
@media (min-width: 900px) { .dividido--form { grid-template-columns: 1fr .95fr; align-items: start; } .dividido--form .form--wa { position: sticky; top: calc(var(--alto-cab) + 24px); } }
.contacto-lista { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.contacto-lista a, .contacto-lista__sin { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--borde); border-radius: var(--radio); color: #000; text-decoration: none; font-weight: 600; font-size: 1rem; background: #fff; }
.contacto-lista a:hover { border-color: #000; }
.contacto-lista .ico { width: 42px; height: 42px; padding: 10px; border-radius: 50%; background: var(--gris); color: var(--acento-texto); flex: none; }
.contacto-lista small { display: block; font-weight: 400; font-size: .84rem; color: var(--texto-suave); }
.contacto-lista em { display: block; font-style: normal; font-weight: 600; font-size: .86rem; color: var(--acento-texto); margin-top: 2px; }
.form--wa { border-top-color: var(--acento); }
.campo label { font-weight: 600; }
.nota-24 { margin: 18px 0 0; color: var(--texto-suave); font-size: .95rem; }

/* portadillas: negras, título en Lora y las «aF» en línea roja del pie */
.portadilla--af { background: #000 url(/af-linea.svg) no-repeat right max(2%, calc(50% - 560px)) top 50% / auto 150%; padding-block: clamp(56px, 8vw, 104px) clamp(48px, 7vw, 88px); }
.portadilla--af h1 { font-family: var(--f-lora); font-weight: 500; letter-spacing: 0; line-height: 1.15; font-size: clamp(2.2rem, 5vw, 3.6rem); max-width: 20ch; margin-bottom: 0; }
.portadilla--entrada h1 { font-size: clamp(1.8rem, 3.8vw, 2.8rem); max-width: 28ch; }
.portadilla__eb { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font: 600 .8rem/1.2 var(--f-txt); letter-spacing: .16em; text-transform: uppercase; color: #C4C4C4; }
.portadilla__eb::before { content: ""; width: 28px; height: 2px; background: var(--acento); flex: none; }
.portadilla__sub { margin-top: 18px; max-width: 60ch; font-size: clamp(1.02rem, 1.5vw, 1.18rem); color: rgb(255 255 255 / .88); }
.portadilla__sub p { margin: 0; }
.migas ol { color: rgb(255 255 255 / .75); }
@media (max-width: 760px) { .portadilla--af { background-position: right -60px center; background-size: auto 120%; } }

/* páginas de cada área */
.area { display: grid; gap: 40px 56px; align-items: start; }
@media (min-width: 980px) { .area { grid-template-columns: 290px 1fr; grid-template-areas: "lat principal"; } .area__principal { grid-area: principal; } .areas-lateral { grid-area: lat; position: sticky; top: calc(var(--alto-cab) + 24px); } }
.areas-lateral h2 { font-size: 1.55rem; padding-bottom: 18px; margin-bottom: 14px; border-bottom: 1px solid #cfcfcf; }
.areas-lateral ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.areas-lateral a { display: block; padding: .5em .9em; color: #000; text-decoration: none; font-weight: 500; font-size: 1.08rem; border-radius: 2px; }
.areas-lateral a:hover { color: var(--acento-texto); }
.areas-lateral a[aria-current="page"] { background: var(--gris); }
.prosa--area { max-width: 72ch; }
.prosa--area > p:first-child { font-size: 1.1rem; }
.prosa--area strong { color: #000; }
.llamada-af { margin: 32px 0 44px; padding: 24px clamp(20px, 3vw, 32px); background: #e4e4e4; border-bottom: 5px solid var(--acento); display: grid; gap: 6px 32px; align-items: center; }
@media (min-width: 760px) { .llamada-af { grid-template-columns: 1fr auto; } .llamada-af .botones { grid-column: 2; grid-row: 1 / span 2; } }
.llamada-af__lema { margin: 0; font-size: clamp(1.15rem, 1.8vw, 1.4rem); color: #000; }
.llamada-af__tel { font: 700 clamp(1.4rem, 2.4vw, 1.75rem)/1.2 var(--f-tit); color: #000; text-decoration: none; letter-spacing: -.01em; }
.llamada-af__tel:hover { text-decoration: underline; }
.area__h2 { font-weight: 500; font-size: clamp(1.45rem, 2.4vw, 2rem); letter-spacing: -.015em; margin-bottom: 28px; }
.cajas-area { display: grid; gap: 30px 44px; }
@media (min-width: 700px) { .cajas-area { grid-template-columns: 1fr 1fr; } }
.caja-area h3 { font-size: clamp(1.2rem, 1.8vw, 1.45rem); border-left: 3px solid var(--acento); padding-left: 8px; margin-bottom: .55em; line-height: 1.2; }
.caja-area ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; color: var(--texto-suave); font-size: 1rem; }
.area__cierre { margin-top: 48px; padding: clamp(24px, 3vw, 36px); background: var(--gris); border-radius: var(--radio); }
.area__cierre .prosa p { font: 500 clamp(1.15rem, 1.7vw, 1.32rem)/1.45 var(--f-lora); color: var(--tinta-2); padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid rgb(0 0 0 / .15); }
.area__cierre .prosa strong { font-weight: 500; color: #000; }
.ico-flecha-diag { width: 1.1em; height: 1.1em; }
@media (max-width: 760px) { .llamada-af .botones .btn { flex: 1 1 100%; } }

/* el despacho: balanza dorada y los cuatro principios numerados (web anterior) */
.prosa--grande { max-width: 75ch; font-size: clamp(1.08rem, 1.6vw, 1.25rem); color: #000; line-height: 1.6; }
.prosa--grande b, .prosa--grande strong { color: #000; font-weight: 700; }
.prosa--centro { margin-inline: auto; }
.banda--intro { padding-block: clamp(40px, 6vw, 72px); }
.principios-n { display: grid; gap: 40px 64px; align-items: start; }
@media (min-width: 900px) { .principios-n { grid-template-columns: .8fr 1.2fr; } .principios-n__balanza { position: sticky; top: calc(var(--alto-cab) + 40px); } }
.principios-n__balanza img { width: min(100%, 380px); height: auto; }
@media (max-width: 899px) { .principios-n__balanza img { width: 150px; } }
.principios-n ol { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(40px, 6vw, 72px); counter-reset: principio; }
.principio-n { position: relative; isolation: isolate; padding-top: 30px; max-width: 520px; counter-increment: principio; }
.principio-n::before { content: ""; position: absolute; left: 0; top: 0; width: min(100%, 420px); height: 6px; background: var(--acento); }
.principio-n::after { content: counter(principio); position: absolute; right: 0; top: -.15em; z-index: -1; font: 800 clamp(5rem, 10vw, 8rem)/1 var(--f-tit); color: #fbe4e1; }
.principio-n__n { display: none; }
.principio-n h3 { font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.18; max-width: 16ch; }
.principio-n p { margin: 0; font-size: 1.08rem; color: #000; }

/* consulta digital */
.servicio-consulta { background: #fff; border-top: 4px solid var(--acento); border-radius: var(--radio); padding: 22px 24px; margin-bottom: 30px; box-shadow: var(--sombra); }
.servicio-consulta__eb { margin: 0 0 4px; font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--acento-texto); }
.servicio-consulta h2 { font-size: clamp(1.5rem, 2.4vw, 1.85rem); margin-bottom: .5em; }
.servicio-consulta__datos { list-style: none; margin: 0; padding: 0; display: flex; gap: 12px 40px; flex-wrap: wrap; }
.servicio-consulta__datos small { display: block; font-size: .85rem; color: var(--texto-suave); }
.servicio-consulta__datos strong { font-size: 1.35rem; color: #000; }

/* blog */
.entradas { display: grid; gap: 24px; }
.entrada a { display: grid; gap: 0; background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); overflow: hidden; color: inherit; text-decoration: none; }
@media (min-width: 760px) { .entrada a { grid-template-columns: .9fr 1.1fr; } }
.entrada a:hover { border-color: #000; }
.entrada__foto img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.entrada__cuerpo { padding: clamp(20px, 3vw, 36px); display: flex; flex-direction: column; justify-content: center; }
.entrada__fecha { margin: 0 0 8px; font-size: .9rem; color: var(--texto-suave); font-weight: 600; }
.entrada h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.entrada p { color: var(--texto-suave); }
.articulo__foto img { aspect-ratio: 776 / 652; max-height: 520px; }
.prosa ul { list-style: none; padding-left: 0; }
.prosa--area ul { list-style: disc; padding-left: 1.3em; }

/* pie negro con las «aF» en línea roja */
.pie { color: rgb(255 255 255 / .82); background: #000 url(/af-linea.svg) no-repeat left max(-40px, calc(50% - 680px)) bottom 90px / auto 380px; }
.pie__rejilla { gap: 36px 40px; }
@media (min-width: 900px) { .pie__rejilla { grid-template-columns: 1.35fr 1fr 1fr .9fr; } }
@media (max-width: 899px) { .pie__rejilla { grid-template-columns: 1fr 1fr; gap: 36px 24px; } .pie__rejilla > div:nth-child(-n+2) { grid-column: 1 / -1; } }
.pie__marca { display: grid; gap: 18px; justify-items: start; align-content: start; }
.pie__marca p { margin: 0; font-size: .92rem; max-width: 34ch; }
.pie__nombre { font: 600 clamp(1.6rem, 2.6vw, 2.05rem)/1.15 var(--f-tit); color: #fff; letter-spacing: -.015em; }
.pie__nombre small { display: block; margin-top: .45em; font: 500 1.02rem/1.35 var(--f-tit); letter-spacing: 0; }
.pie h2 { font-family: var(--f-txt); font-weight: 600; color: #C4C4C4; }
.pie__ue { margin: 48px 0 0; }
.pie__ue img { width: min(100%, 440px); height: auto; }
.pie__legal { display: flex; flex-wrap: wrap; gap: 0 28px; margin-top: 28px; padding-top: 24px; border-top: 1px solid rgb(255 255 255 / .16); }
.pie__legal a, .pie button.pie__cookies { font-weight: 600; font-size: 1rem; min-height: 44px; display: inline-flex; align-items: center; }
.pie__base { margin-top: 24px; padding-top: 0; border-top: 0; color: rgb(255 255 255 / .7); }

/* legales y 404 */
.prosa--legal h2 { color: #000; }
.prosa--legal ul { list-style: disc; padding-left: 1.3em; }
.error404 .eyebrow { justify-content: flex-start; }
