/* VISUR Viviendas — fondo blanco, texto azul marino, bloques en azul del logo.
   Tipografía: Libre Franklin (recta y ancha, sin cursivas). Newsreader solo para el logotipo. */

:root {
  --navy: #1b2a5e;
  --navy-deep: #141f47;
  --bg: #ffffff;
  --bg-2: #f2f5fa;
  --bg-3: #e3e9f2;
  --line: rgba(27, 42, 94, .12);
  --line-strong: rgba(27, 42, 94, .22);
  --text: #1b2a5e;
  --text-2: #3f4a64;
  --text-3: #626c86;
  --accent: #3f6690;
  --btn: #1b2a5e;
  --btn-hover: #141f47;
  --btn-text: #ffffff;
  --overlay: rgba(255, 255, 255, .94);
  --sans: 'Libre Franklin', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --brand: 'Newsreader', Georgia, 'Times New Roman', serif;
  --gutter: 64px;
  --header-h: 78px;
}

/* Bloques en azul marino: redefinen los tokens para texto claro */
.on-navy {
  --text: #ffffff;
  --text-2: #d0d7e7;
  --text-3: #9aa7c2;
  --accent: #a9c0dc;
  --line: rgba(255, 255, 255, .16);
  --line-strong: rgba(255, 255, 255, .28);
  --btn: #ffffff;
  --btn-hover: #eef1f6;
  --btn-text: #1b2a5e;
  background: var(--navy);
  color: var(--text-2);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text-2);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
em { font-style: normal; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }

.skip { position: absolute; left: -999px; top: 16px; z-index: 100; background: var(--btn); color: var(--btn-text); padding: 10px 14px; }
.skip:focus { left: 16px; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }

/* Tipografía */
h1, h2, h3 { margin: 0; font-family: var(--sans); font-weight: 600; color: var(--text); letter-spacing: -.015em; text-wrap: pretty; }
h1 em, h2 em, h3 em, .statement em { color: var(--accent); }
.display { font-size: clamp(38px, 5vw, 62px); line-height: 1.08; letter-spacing: -.025em; }
.h1 { font-size: clamp(32px, 4.2vw, 52px); line-height: 1.1; letter-spacing: -.02em; }
.h2 { font-size: clamp(26px, 2.6vw, 34px); line-height: 1.15; }
.eyebrow {
  display: block; margin: 0 0 22px;
  font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--accent);
}
.lead { margin: 0; max-width: 480px; font-size: 18px; line-height: 1.6; color: var(--text-2); }
.muted { font-size: 13px; color: var(--text-3); }

/* Botones y links */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 26px; border: 1px solid transparent;
  font-family: var(--sans); font-size: 14px; font-weight: 600; letter-spacing: .02em; text-decoration: none;
  cursor: pointer; transition: background-color .2s, color .2s, border-color .2s;
}
.btn-primary { background: var(--btn); color: var(--btn-text); }
.btn-primary:hover { background: var(--btn-hover); }
.btn-outline { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn-outline:hover { border-color: var(--text); }
.link-line {
  display: inline-block; padding: 4px 0; color: var(--text); text-decoration: none;
  font-size: 14px; font-weight: 600; letter-spacing: .02em; border-bottom: 2px solid var(--accent);
  transition: color .2s, border-color .2s;
}
.link-line:hover { color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 40px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  position: relative; max-width: 1280px; height: var(--header-h); margin: 0 auto; padding: 0 48px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.brand-name { display: flex; flex-direction: column; line-height: 1; }
.brand-name b { font-family: var(--brand); font-weight: 500; font-size: 23px; letter-spacing: .02em; }
.brand-name small { margin-top: 3px; font-size: 10px; letter-spacing: .32em; color: var(--accent); }
.nav { display: flex; gap: 34px; font-size: 15px; font-weight: 500; }
.nav a { padding-bottom: 4px; color: var(--text-2); text-decoration: none; border-bottom: 2px solid transparent; transition: color .2s; }
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.header-call { padding: 11px 18px; font-size: 13px; }
.nav-cta { display: none; }
.mobile-bar { display: none; }
.nav-toggle { display: none; width: 40px; height: 40px; padding: 0 8px; background: none; border: 0; cursor: pointer; flex-direction: column; justify-content: center; gap: 7px; }
.nav-toggle i { display: block; height: 2px; background: var(--text); transition: transform .2s; }
.nav-toggle[aria-expanded="true"] i:first-child { transform: translateY(4.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] i:last-child { transform: translateY(-4.5px) rotate(-45deg); }

/* Fotos y placeholders */
.media { position: relative; overflow: hidden; background: var(--bg-3); }
.media img { width: 100%; height: 100%; object-fit: cover; }
.ph { background: var(--bg-3) repeating-linear-gradient(135deg, rgba(255, 255, 255, .5) 0 14px, transparent 14px 28px); }
.ph span {
  position: absolute; top: 14px; left: 14px; max-width: calc(100% - 28px);
  padding: 5px 10px; background: var(--overlay);
  font-size: 12px; line-height: 1.4; color: var(--text-2);
}

/* Secciones */
.section { padding: 120px 0; border-top: 1px solid var(--line); }
.section-flush { padding-top: 0; border-top: 0; }
.section-alt { background: var(--bg-2); }
.section-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 24px;
  margin-bottom: 48px; padding-bottom: 18px; border-bottom: 1px solid var(--line);
}
.section-head-plain { padding-bottom: 0; border-bottom: 0; }
.section-head a { color: var(--accent); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.section-head a:hover { color: var(--text); }

/* Inicio */
.hero { display: grid; grid-template-columns: 1fr 1fr; max-width: 1280px; min-height: 700px; margin: 0 auto; }
.hero-copy { display: flex; flex-direction: column; justify-content: space-between; gap: 56px; padding: 88px 72px 56px var(--gutter); }
.hero-copy .lead { margin-top: 28px; }
.hero-proof { margin: 28px 0 0; padding-left: 18px; border-left: 3px solid var(--navy); font-size: 17px; line-height: 1.5; color: var(--text-2); }
.hero-proof strong { display: block; font-size: 22px; font-weight: 700; color: var(--text); letter-spacing: -.01em; }
.hero-media { margin: 28px 28px 28px 0; min-height: 420px; }

.quick-filter { display: grid; grid-template-columns: 1fr 1fr auto; padding-top: 18px; border-top: 1px solid var(--line); }
.quick-filter label { display: flex; flex-direction: column; gap: 6px; padding: 0 22px; border-left: 1px solid var(--line); }
.quick-filter label:first-child { padding-left: 0; border-left: 0; }
.quick-filter label span { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.quick-filter select {
  width: 100%; padding: 2px 20px 2px 0; border: 0; appearance: none; -webkit-appearance: none; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 500; color: var(--text);
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%233f6690' stroke-width='1.5'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E") no-repeat right center;
}
.quick-filter select option { background: #fff; color: var(--navy); }
.quick-filter button {
  align-self: end; padding: 4px 0; background: none; border: 0; border-bottom: 2px solid var(--accent);
  color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.quick-filter button:hover { color: var(--accent); }

.statement { margin: 0; max-width: 1060px; font-weight: 500; font-size: clamp(24px, 3vw, 38px); line-height: 1.3; letter-spacing: -.015em; color: var(--text); text-wrap: pretty; }
.statement-link { margin-top: 36px; }

.systems { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.system .media { height: 260px; }
.system h3 { margin: 26px 0 10px; font-size: 22px; }
.system p { margin: 0; font-size: 15px; }

.works { display: grid; grid-template-columns: 1.6fr 1fr; grid-template-rows: 260px 260px; gap: 20px; }
.work { position: relative; margin: 0; }
.work .media { height: 100%; }
.work-featured { grid-row: span 2; }
.work figcaption {
  position: absolute; left: 0; bottom: 0; padding: 10px 14px; background: var(--overlay);
  font-size: 13px; font-weight: 500; color: var(--text);
}

.not-found { min-height: 52vh; padding-top: 120px; padding-bottom: 120px; }
.not-found .lead { margin-top: 20px; }

/* Encabezados de página interna */
.page-intro { padding-top: 96px; padding-bottom: 72px; }
.page-intro-split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: end; }
.page-intro-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 64px; padding-bottom: 56px; }
.page-intro-row .lead { max-width: 420px; text-align: right; }

/* Servicios */
.feature { display: grid; grid-template-columns: 1.2fr 1fr; gap: 64px; align-items: center; padding-top: 56px; padding-bottom: 56px; border-top: 1px solid var(--line); }
.feature > .media { height: 520px; }
.feature-reverse { grid-template-columns: 1fr 1.2fr; }
.feature-reverse > .media { order: 2; }
.feature-copy { display: flex; flex-direction: column; gap: 20px; }
.feature-copy .eyebrow { margin: 0; }
.feature-copy h2 { font-size: clamp(30px, 3.2vw, 40px); line-height: 1.1; }
.feature-copy p { margin: 0; font-size: 16px; }
.plans { margin-top: 56px; padding: 100px 0; }
.plans-head { display: grid; grid-template-columns: 1.2fr 1fr; gap: 64px; align-items: end; margin-bottom: 56px; }
.plans-head .lead { color: var(--text-2); }
.plans-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.plan {
  display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
  padding: 32px 28px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .04);
}
.plan-num { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .14em; color: var(--accent); }
.plan h3 { font-size: 24px; }
.plan-summary { margin: 0; font-size: 15px; color: var(--text-2); }
.plan-label { margin: 10px 0 0; font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.plan-benefits { width: 100%; margin: 0 0 8px; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.plan-benefits li { position: relative; padding: 11px 0 11px 22px; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 500; line-height: 1.45; color: var(--text); }
.plan-benefits li::before { content: ''; position: absolute; left: 2px; top: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.plan .link-line { margin-top: auto; }
.inline-link { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }

/* Promo vigente (inicio) */
.promo { padding: 56px 0; }
.promo-inner { display: grid; grid-template-columns: 1.5fr 1fr; gap: 56px; align-items: center; }
.promo-copy p:last-child { margin: 16px 0 0; max-width: 620px; font-size: 16px; color: var(--text-2); }
.promo-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; justify-self: end; }

/* Obras: galería */
.gallery-section { padding-bottom: 96px; }
.filters { display: flex; flex-direction: column; gap: 12px; margin-bottom: 40px; }
.filter-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 9px 16px; background: none; border: 1px solid var(--line-strong); color: var(--text-2);
  font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; transition: all .2s;
}
.chip:hover { color: var(--text); border-color: var(--text-3); }
.chip[aria-pressed="true"] { background: var(--btn); border-color: var(--btn); color: var(--btn-text); }
/* Galería en columnas (respeta fotos verticales y horizontales) */
.gallery { columns: 3; column-gap: 20px; }
.gallery-item { break-inside: avoid; margin: 0 0 20px; }
.gallery-open { display: block; width: 100%; padding: 0; border: 0; background: var(--bg-3); cursor: zoom-in; overflow: hidden; }
.gallery-open img { width: 100%; height: auto; transition: transform .5s ease; }
.gallery-open:hover img { transform: scale(1.03); }
.gallery-item figcaption { margin-top: 8px; font-size: 13px; color: var(--text-2); }

/* Visor de fotos */
.lightbox { width: 100vw; max-width: none; height: 100vh; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(10, 16, 36, .94); color: #fff; }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: rgba(10, 16, 36, .6); }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lightbox img { max-width: min(92vw, 1400px); max-height: 82vh; width: auto; height: auto; }
.lightbox figcaption { font-size: 14px; color: #d0d7e7; text-align: center; padding: 0 16px; }
.lightbox-close, .lightbox-nav { position: absolute; display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; padding: 0; border: 0; background: rgba(255, 255, 255, .1); color: #fff; font-size: 34px; line-height: 1; cursor: pointer; }
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255, 255, 255, .2); }
.lightbox-close { top: 16px; right: 16px; font-size: 30px; }
.lightbox-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 16px; top: 50%; transform: translateY(-50%); }

/* Etapas de construcción (Servicios) */
.stages { padding: 100px 0 40px; border-top: 1px solid var(--line); }
.stages-head { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: end; margin-bottom: 64px; }
.stage-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 72px; }
.stage { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; }
.stage-reverse { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.stage-reverse .stage-main { order: 2; }
.stage-main { aspect-ratio: 3 / 4; }
.stage-body { display: flex; flex-direction: column; gap: 14px; }
.stage-step { margin: 0; display: flex; align-items: baseline; gap: 14px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text); }
.stage-step span { font-weight: 500; letter-spacing: .04em; text-transform: none; color: var(--accent); }
.stage-bar { height: 4px; background: var(--bg-3); }
.stage-bar span { display: block; height: 100%; background: var(--navy); }
.stage-body h3 { margin-top: 8px; font-size: clamp(26px, 2.6vw, 34px); }
.stage-text { margin: 0; max-width: 520px; font-size: 17px; color: var(--text-2); }
.stage-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.stage-photos .media { aspect-ratio: 4 / 3; }
.plan-extra { font-size: 14px; font-weight: 600; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.plan-extra:hover { color: var(--text); }

/* Mapa de localidades */
.map-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: end; margin-bottom: 48px; }
.map-intro .eyebrow { grid-column: 1 / -1; margin-bottom: -40px; }
.map-intro .lead { max-width: 440px; }
.map-layout { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: stretch; }
.map { height: 540px; border: 1px solid var(--line-strong); background: #e8edf5; }
.map-towns { display: flex; flex-direction: column; gap: 26px; padding: 28px; background: var(--bg); border: 1px solid var(--line-strong); }
.map-towns-group h3 { margin-bottom: 4px; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.map-towns-group ul { margin: 0; padding: 0; list-style: none; }
.town-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  padding: 12px 0; background: none; border: 0; border-bottom: 1px solid var(--line); cursor: pointer;
  font: inherit; font-size: 16px; font-weight: 500; color: var(--text); text-align: left; transition: color .2s;
}
.town-btn::after { content: ''; flex: none; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--navy); background: rgba(27, 42, 94, .15); transition: all .2s; }
.town-btn:hover { color: var(--accent); }
.town-btn[aria-pressed="true"] { font-weight: 700; }
.town-btn[aria-pressed="true"]::after { background: var(--navy); box-shadow: 0 0 0 5px rgba(27, 42, 94, .14); }
.map-towns .link-line { margin-top: auto; align-self: flex-start; }
.map-reset { align-self: flex-start; padding: 0; background: none; border: 0; cursor: pointer; font: inherit; font-size: 13px; font-weight: 500; color: var(--text-3); text-decoration: underline; text-underline-offset: 3px; }
.map-reset:hover { color: var(--text); }

/* Leaflet + mapa base propio (Protomaps, estilo claro) */
.leaflet-container { background: #e8edf5; font-family: var(--sans); }
.leaflet-tile-pane { filter: saturate(.55); }
.leaflet-control-attribution { background: rgba(255, 255, 255, .85) !important; color: var(--text-3) !important; font-size: 10px; }
.leaflet-control-attribution a { color: var(--text-2) !important; }
.leaflet-bar { border: 1px solid var(--line-strong) !important; border-radius: 0 !important; box-shadow: none !important; }
.leaflet-bar a { background: #fff !important; color: var(--navy) !important; border-bottom-color: var(--line) !important; border-radius: 0 !important; }
.leaflet-bar a:hover { background: var(--bg-2) !important; }
.leaflet-tooltip.town-label {
  padding: 0; background: none; border: 0; box-shadow: none;
  font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--navy);
  text-shadow: 0 0 3px #fff, 0 0 6px #fff, 0 0 10px #fff, 0 0 14px #fff;
}
.leaflet-tooltip.town-label::before { display: none; }
.leaflet-tooltip.town-label.is-active { font-size: 15px; font-weight: 700; }

.aerial { position: relative; height: 640px; overflow: hidden; }
.aerial-media { position: absolute; inset: 0; }
.aerial-media.ph span { top: 22px; right: 24px; left: auto; }
.aerial-card { position: absolute; left: var(--gutter); top: 64px; max-width: 420px; padding: 28px 30px; background: var(--overlay); border: 1px solid var(--line); }
.aerial-card .eyebrow { margin-bottom: 12px; }
.aerial-card h2 { margin-bottom: 12px; font-size: 32px; line-height: 1.1; }
.aerial-card p:last-child { margin: 0; font-size: 14px; }
.hotspot { position: absolute; display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 500; color: var(--text); }
.hotspot i { display: block; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--navy); box-shadow: 0 0 0 10px rgba(255, 255, 255, .45); }
.hotspot span { padding: 4px 10px; background: var(--overlay); }

/* Nosotros */
.about-title { max-width: 980px; }
.about-media { height: 560px; }
.about-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px; padding-top: 96px; padding-bottom: 96px; }
.about-grid > div { display: flex; flex-direction: column; gap: 16px; padding-top: 22px; border-top: 2px solid var(--navy); }
.about-grid h2 { font-size: 22px; }
.about-grid p { margin: 0; }
.quote {
  padding: 88px 24px; text-align: center; border-top: 1px solid var(--line);
  background-color: var(--bg-2);
  background-image:
    linear-gradient(rgba(27, 42, 94, .06) 1px, transparent 1px),
    conic-gradient(from 90deg at 1px 26px, transparent 0 270deg, rgba(27, 42, 94, .06) 270deg 360deg),
    conic-gradient(from 90deg at 1px 26px, transparent 0 270deg, rgba(27, 42, 94, .06) 270deg 360deg);
  background-size: 100% 26px, 104px 52px, 104px 52px;
  background-position: 0 0, 0 0, 52px 26px;
}
.quote p { max-width: 760px; margin: 0 auto; font-weight: 600; font-size: clamp(26px, 3vw, 36px); line-height: 1.25; letter-spacing: -.015em; color: var(--text); }

/* Contacto */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 96px; padding-top: 96px; padding-bottom: 96px; }
.contact-info { display: flex; flex-direction: column; gap: 44px; }
.contact-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; font-size: 15px; line-height: 1.7; }
.contact-card { padding-top: 16px; border-top: 2px solid var(--navy); }
.contact-card a { color: var(--text-2); text-decoration: none; }
.contact-card a:hover { color: var(--text); }
.contact-card-title { margin: 0 0 6px; font-size: 17px; font-weight: 600; color: var(--text); }
.contact-card .contact-map-link { display: inline-block; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--accent); border-bottom: 1px solid currentColor; }
.contact-form { display: flex; flex-direction: column; gap: 26px; padding-top: 12px; }
.contact-form label { display: flex; flex-direction: column; gap: 8px; }
.contact-form label span { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.contact-form input, .contact-form textarea {
  padding: 10px 0; background: transparent; border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0;
  font-family: var(--sans); font-size: 16px; color: var(--text); outline: none; transition: border-color .2s;
}
.contact-form textarea { resize: vertical; }
.contact-form input::placeholder, .contact-form textarea::placeholder { color: var(--text-3); }
.contact-form input:focus, .contact-form textarea:focus { border-bottom-color: var(--accent); }
.contact-form .actions { margin-top: 10px; }
.form-note { margin: 0; font-size: 13px; color: var(--text-3); }

/* Footer */
.site-footer { padding: 56px 0 36px; }
.site-footer .wrap { padding: 0 48px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid var(--line); }
.footer-brand { display: flex; flex-direction: column; gap: 18px; }
.footer-tagline { margin: 0; font-size: 19px; font-weight: 600; color: var(--text); }
.footer-col { display: flex; flex-direction: column; font-size: 14px; line-height: 1.7; color: var(--text-2); }
.footer-col a { color: var(--text-2); text-decoration: none; }
.footer-col a:hover { color: var(--text); }
.footer-title { margin: 0 0 8px; font-weight: 600; color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; padding-top: 20px; font-size: 12px; color: var(--text-3); }

/* Responsive */
@media (max-width: 1100px) {
  :root { --gutter: 40px; }
  .header-inner, .site-footer .wrap { padding: 0 var(--gutter); }
  .nav { gap: 24px; }
  .hero-copy { padding-right: 48px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .map-layout { grid-template-columns: 1fr 300px; }
}

@media (max-width: 900px) {
  .nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    display: none; flex-direction: column; gap: 0; padding: 8px var(--gutter) 24px;
    background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
  .nav a[aria-current="page"] { border-bottom-color: var(--line); color: var(--accent); }
  .nav .nav-cta {
    display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 18px; padding: 14px;
    background: var(--navy); border: 0; color: #fff; font-size: 15px; font-weight: 600;
  }
  .nav-toggle { display: flex; }

  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-copy { padding: 64px var(--gutter) 40px; gap: 40px; }
  .hero-media { margin: 0 0 0 var(--gutter); height: 420px; min-height: 0; }
  .systems, .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .works { grid-template-columns: 1fr 1fr; grid-template-rows: 300px 220px; }
  .work-featured { grid-row: auto; grid-column: span 2; }
  .page-intro-split, .plans-head, .contact { grid-template-columns: 1fr; gap: 40px; }
  .plans-cards { grid-template-columns: 1fr; gap: 16px; }
  .plans-head { margin-bottom: 36px; }
  .promo-inner { grid-template-columns: 1fr; gap: 28px; }
  .promo-actions { justify-self: start; }
  .page-intro-row { flex-direction: column; align-items: flex-start; gap: 24px; }
  .page-intro-row .lead { text-align: left; }
  .feature, .feature-reverse { grid-template-columns: 1fr; gap: 32px; }
  .feature > .media { height: 380px; }
  .feature-reverse > .media { order: 0; }
  .gallery { columns: 2; column-gap: 16px; }
  .gallery-item { margin-bottom: 16px; }
  .stages-head { grid-template-columns: 1fr; gap: 20px; margin-bottom: 44px; }
  .stage, .stage-reverse { grid-template-columns: 1fr; gap: 24px; }
  .stage-reverse .stage-main { order: 0; }
  .stage-main { aspect-ratio: 4 / 3; }
  .map-intro { grid-template-columns: 1fr; gap: 20px; }
  .map-intro .eyebrow { margin-bottom: 0; }
  .map-layout { grid-template-columns: 1fr; }
  .map { height: 440px; }
  .about-media { height: 380px; }
}

/* Celular: barra fija de contacto al alcance del pulgar */
@media (max-width: 760px) {
  .header-call { display: none; }
  .mobile-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 999;
    display: grid; grid-template-columns: 1.3fr 1fr; gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line);
    box-shadow: 0 -6px 20px rgba(27, 42, 94, .08);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  }
  .mobile-bar-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px;
    border: 1px solid var(--line-strong); color: var(--navy);
    font-size: 15px; font-weight: 600; text-decoration: none;
  }
  .mobile-bar-wa { background: var(--navy); border-color: var(--navy); color: #fff; }
  body { padding-bottom: calc(67px + env(safe-area-inset-bottom)); }
}

@media (max-width: 600px) {
  :root { --gutter: 20px; --header-h: 64px; }
  .brand-name b { font-size: 20px; }
  .section { padding: 64px 0; }
  .section-flush { padding-top: 0; }
  .page-intro { padding-top: 48px; padding-bottom: 36px; }
  .eyebrow { margin-bottom: 14px; }
  .lead { font-size: 16px; }
  .btn { padding: 13px 20px; font-size: 14px; }
  .actions { gap: 12px 20px; margin-top: 28px; }

  .hero-copy { padding-top: 40px; padding-bottom: 32px; gap: 0; }
  .hero-copy .lead { margin-top: 18px; }
  .hero-proof { margin-top: 20px; font-size: 15px; }
  .hero-proof strong { font-size: 19px; }
  .quick-filter { display: none; }
  .hero-media { height: 240px; }

  .section-head { flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 28px; }
  .systems { gap: 36px; }
  .system .media { height: 200px; }
  .system h3 { margin-top: 18px; font-size: 20px; }
  .works { grid-template-columns: 1fr 1fr; grid-template-rows: 220px 150px; gap: 12px; }
  .work-featured { grid-column: span 2; }
  .work figcaption { padding: 7px 10px; font-size: 12px; }

  /* Filtros de obras en una fila deslizable */
  .filter-group { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 4px; scrollbar-width: none; }
  .filter-group::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .gallery { column-gap: 10px; }
  .gallery-item { margin-bottom: 14px; }
  .gallery-item figcaption { font-size: 12px; }
  .lightbox-nav { top: auto; bottom: 20px; transform: none; }
  .stages { padding: 64px 0 24px; }
  .stage-list { gap: 52px; }
  .stage-photos { gap: 10px; margin-top: 10px; }
  .stage-text { font-size: 16px; }

  /* Mapa: localidades como chips */
  .map-intro { margin-bottom: 28px; }
  .map-layout { gap: 16px; }
  .map { height: 320px; }
  .leaflet-tooltip.town-label { font-size: 12px; }
  .leaflet-tooltip.town-label.is-active { font-size: 13px; }
  .map-towns { padding: 18px; gap: 16px; }
  .map-towns-group h3 { margin-bottom: 8px; }
  .map-towns-group ul { display: flex; flex-wrap: wrap; gap: 8px; }
  .town-btn { width: auto; padding: 9px 14px; border: 1px solid var(--line-strong); font-size: 14px; }
  .town-btn::after { display: none; }
  .town-btn[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }

  .feature { padding-top: 40px; padding-bottom: 40px; gap: 24px; }
  .feature > .media { height: 240px; }
  .plans { margin-top: 40px; padding: 56px 0; }
  .plans-head { gap: 16px; }
  .plan { padding: 24px 20px; }
  .promo { padding: 44px 0; }
  .promo-actions { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .about-grid { padding-top: 56px; padding-bottom: 56px; gap: 36px; }
  .quote { padding: 56px 20px; }
  .contact { padding-top: 48px; padding-bottom: 56px; gap: 48px; }
  .contact-info { gap: 32px; }
  .aerial { height: 480px; }
  .aerial-card { left: var(--gutter); right: var(--gutter); top: auto; bottom: 24px; max-width: none; }
  .hotspot { display: none; }
  .contact-cards { grid-template-columns: 1fr; }
  .about-media { height: 300px; }
  .site-footer .wrap { padding: 0 var(--gutter); }
  .footer-grid { grid-template-columns: 1fr; }
}
