/* ===== Fuentes alojadas en la propia web (sin conexión a Google) ===== */
@font-face {
  font-family: "Montserrat"; font-style: normal; font-weight: 600 800; font-display: swap;
  src: url("fonts/montserrat-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("fonts/inter-latin.woff2") format("woff2");
}

/* ===== Tokens (colores del logo ALCALAVI) ===== */
:root {
  --navy: #0d1b56;
  --navy-2: #1b2f7d;
  --navy-3: #08123d;
  --red: #d3121a;
  --red-2: #b00d14;
  --red-logo: #f50d15;
  --wa: #1a9e50;
  --wa-2: #148442;
  --ink: #1a2133;
  --muted: #4b5568;
  --line: #dfe4ec;
  --bg: #ffffff;
  --bg-soft: #f3f5f9;
  --navy-tint: #e9edf7;
  --error: #c0161e;
  --radius: 12px;
  --shadow: 0 12px 32px rgba(13, 27, 86, .10);
  --font-head: "Montserrat", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --header-h: 80px;
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg, iframe { display: block; max-width: 100%; }
a { color: var(--navy-2); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .5em; color: var(--navy); letter-spacing: -.01em; }
p { margin: 0 0 1em; }
address { font-style: normal; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* Eyebrow con el tejado del logo */
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-head); font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em; font-size: .8rem;
  color: var(--red); margin-bottom: .9rem;
}
.eyebrow::before {
  content: ""; width: 10px; height: 10px; margin-top: 5px;
  border-top: 3px solid var(--red-logo); border-left: 3px solid var(--red-logo);
  transform: rotate(45deg);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: var(--font-head); font-weight: 700; font-size: 1rem;
  padding: .85rem 1.45rem; border-radius: 8px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer; text-align: center;
  transition: background .2s, color .2s, border-color .2s;
  min-height: 50px;
}
.btn svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-sm { padding: .55rem 1.1rem; font-size: .92rem; min-height: 44px; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-2); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-2); }
.btn-outline { border-color: var(--navy); color: var(--navy); background: #fff; }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-whatsapp { background: var(--wa); color: #fff; }
.btn-whatsapp:hover { background: var(--wa-2); }
:focus-visible { outline: 3px solid var(--red-logo); outline-offset: 3px; }

/* ===== Top bar ===== */
.topbar { background: var(--navy); color: #c9d2ea; font-size: .86rem; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 38px; }
.topbar-links { display: flex; gap: 1.4rem; }
.topbar a { color: #fff; text-decoration: none; font-weight: 500; }
.topbar a:hover { text-decoration: underline; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 12px rgba(13,27,86,.05);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 1rem; }
.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; }
.brand-logo { width: 60px; height: auto; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--font-head); font-size: 1.45rem; font-weight: 800; letter-spacing: .04em; color: var(--navy); }
.brand-text strong span { font-weight: 600; font-size: .85em; letter-spacing: 0; }
.brand-text small { font-size: .8rem; color: var(--red); font-weight: 600; letter-spacing: .02em; margin-top: 2px; }

.nav { display: flex; align-items: center; gap: 1.8rem; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .96rem; position: relative; }
.nav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--red-logo); transform: scaleX(0); transition: transform .2s; }
.nav a:not(.btn):hover::after { transform: scaleX(1); }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; width: 46px; height: 46px; }
.nav-toggle span { display: block; height: 2.5px; background: var(--navy); border-radius: 2px; margin: 5px 0; transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ===== Hero ===== */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #fff 0%, var(--bg-soft) 100%);
  border-bottom: 1px solid var(--line);
}
/* Tejado del logo como motivo de fondo */
.hero::before {
  content: ""; position: absolute; width: 620px; height: 620px; right: -120px; top: 120px;
  border-top: 46px solid var(--red-logo); border-left: 46px solid var(--red-logo);
  transform: rotate(45deg); opacity: .06; pointer-events: none;
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.2fr .8fr; gap: 3.5rem; align-items: center; padding: 4.5rem 20px 5rem; }
.hero h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 800; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 38rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin: 1.8rem 0 1.6rem; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; color: var(--ink); font-size: .95rem; font-weight: 500; }
.hero-points li::before { content: "✓"; color: var(--red); font-weight: 800; margin-right: .45rem; }

.hero-panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 1.5rem; }
.hero-panel-title { font-family: var(--font-head); font-weight: 700; color: var(--navy); font-size: 1.1rem; margin: 0 0 .8rem; }
.hero-link {
  display: flex; align-items: center; gap: 1rem; padding: 1rem; border-radius: 10px;
  text-decoration: none; color: var(--ink); border: 1px solid transparent; transition: background .2s, border-color .2s;
}
.hero-link + .hero-link { margin-top: .35rem; }
.hero-link:hover { background: var(--bg-soft); border-color: var(--line); }
.hero-link strong { display: block; font-family: var(--font-head); color: var(--navy); font-size: 1.02rem; }
.hero-link small { display: block; color: var(--muted); font-size: .88rem; line-height: 1.45; margin-top: 2px; }
.hl-icon { flex: none; width: 48px; height: 48px; border-radius: 10px; background: var(--navy); display: grid; place-items: center; }
.hl-icon svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ===== Sections ===== */
.section { padding: 5.5rem 0; }
.section-soft { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 700px; margin: 0 auto 3rem; }
.section-head.left { text-align: left; margin: 0 0 2rem; }
.section-head h2 { font-size: clamp(1.75rem, 3.2vw, 2.4rem); font-weight: 800; }
.section-head p:last-child { color: var(--muted); font-size: 1.07rem; }

/* Trabajos */
.service-group + .service-group { margin-top: 3.5rem; }
.group-title { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 2px solid var(--line); }
.group-num { font-family: var(--font-head); font-weight: 800; font-size: 2.4rem; color: var(--red-logo); line-height: 1; }
.group-title h3 { font-size: 1.55rem; margin: 0; }
.group-title p { margin: 0; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.card {
  background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--navy); border-radius: var(--radius); padding: 1.8rem;
  transition: box-shadow .2s, border-top-color .2s;
}
.card:hover { box-shadow: var(--shadow); border-top-color: var(--red-logo); }
.card-icon { width: 54px; height: 54px; border-radius: 10px; background: var(--navy-tint); display: grid; place-items: center; margin-bottom: 1.1rem; }
.card-icon svg { width: 28px; height: 28px; fill: none; stroke: var(--navy); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card h4 { font-size: 1.25rem; }
.card p { color: var(--muted); margin: 0; }
.card p strong { color: var(--navy); }
.card { display: flex; flex-direction: column; }
.card:has(.card-tag) p { margin-bottom: 1rem; }
.card-tag {
  align-self: flex-start; margin-top: auto;
  background: var(--navy-tint); color: var(--navy); font-family: var(--font-head); font-weight: 700;
  font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; padding: .25rem .6rem; border-radius: 6px;
}
.cards-4 { grid-template-columns: repeat(4, 1fr); }
.cards-4 .card { padding: 1.6rem 1.4rem; }
.card-tag { white-space: nowrap; }
@media (max-width: 1180px) and (min-width: 641px) {
  .cards-4 { grid-template-columns: repeat(2, 1fr); }
}

.group-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap;
  background: var(--navy); color: #dfe5f5; border-radius: var(--radius); padding: 1.5rem 1.8rem; text-decoration: none;
  transition: background .2s;
}
.group-banner:hover { background: var(--navy-2); }
.group-banner strong { color: #fff; font-family: var(--font-head); white-space: nowrap; }

/* Comunidades */
.comm { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2rem; align-items: start; }
.comm-works { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 2rem; }
.comm-works h3, .comm-admin h3 { font-size: 1.35rem; }
.tick-list { list-style: none; padding: 0; margin: 1rem 0 1.5rem; display: grid; gap: .75rem; }
.comm-works .tick-list { margin-bottom: 0; }
.tick-list li { display: flex; align-items: flex-start; gap: .7rem; font-weight: 500; }
.tick-list li::before {
  content: "✓"; flex: none; display: grid; place-items: center; width: 24px; height: 24px; margin-top: 1px;
  border-radius: 50%; background: var(--navy); color: #fff; font-size: .78rem; font-weight: 800;
}
.comm-admin { background: var(--navy); color: #dfe5f5; border-radius: 16px; padding: 2rem; position: relative; overflow: hidden; }
.comm-admin h3 { color: #fff; }
.comm-tag {
  display: inline-block; background: var(--red); color: #fff; font-family: var(--font-head); font-weight: 700;
  font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; padding: .35rem .7rem; border-radius: 6px; margin-bottom: 1rem;
}
.admin-list { list-style: none; padding: 0; margin: 0 0 1.6rem; display: grid; gap: .8rem; }
.admin-list li { padding-left: 1.4rem; position: relative; }
.admin-list li::before { content: ""; position: absolute; left: 0; top: .6em; width: 8px; height: 8px; border-radius: 50%; background: var(--red-logo); }
.admin-list strong { color: #fff; }
.comm-admin .btn { width: 100%; }

/* Por qué elegirnos */
.section-navy { background: var(--navy); color: #d3dbef; }
.section-navy h2, .section-navy h3 { color: #fff; }
.section-navy .eyebrow { color: #ff6b70; }
.section-navy .section-head p:last-child { color: #bcc7e3; }
.reasons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.reason { padding: 1.8rem; border-radius: var(--radius); background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); }
.reason svg { width: 36px; height: 36px; fill: none; stroke: var(--red-logo); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 1rem; }
.reason h3 { font-size: 1.2rem; }
.reason p { margin: 0; }

/* Presupuesto */
.quote { display: grid; grid-template-columns: .85fr 1.15fr; gap: 3.5rem; align-items: start; }
.quote-intro h2 { font-size: clamp(1.75rem, 3.2vw, 2.4rem); font-weight: 800; }
.quote-intro > p { color: var(--muted); }
.quote-alt { font-weight: 500; }
.quote-alt a { font-weight: 700; color: var(--navy); }

.quote-form { background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--red-logo); border-radius: 16px; padding: 2rem; box-shadow: var(--shadow); }
.field { display: flex; flex-direction: column; margin-bottom: 1.1rem; min-width: 0; }
.field[hidden] { display: none; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field label { font-weight: 600; font-size: .93rem; margin-bottom: .35rem; color: var(--navy); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; color: var(--ink); background: #fff; width: 100%;
  border: 1.5px solid #c8d0dd; border-radius: 8px; padding: .75rem .9rem; min-height: 50px;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(27,47,125,.15); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--error); }
.error { color: var(--error); font-size: .87rem; font-weight: 500; }
.error:not(:empty) { margin-top: .3rem; }
.field-check { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: .6rem; }
.field-check input { width: 22px; height: 22px; min-height: 0; margin: 2px 0 0; accent-color: var(--navy); flex: none; }
.field-check label { flex: 1; font-weight: 400; font-size: .92rem; color: var(--muted); margin: 0; }
.field-check .error { flex-basis: 100%; }
.form-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; margin-top: .5rem; }
.form-status { margin: 1rem 0 0; font-weight: 600; color: var(--wa-2); }
.form-status:empty { display: none; }

/* Contacto */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.4rem; }
.contact-list li { display: flex; gap: 1rem; align-items: flex-start; }
.contact-list strong { display: block; font-family: var(--font-head); font-size: 1.05rem; color: var(--navy); }
.contact-list a { font-weight: 600; text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }
.ci { flex: none; width: 48px; height: 48px; border-radius: 10px; background: var(--navy); display: grid; place-items: center; }
.ci svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.map { border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); background: #dfe5ee; aspect-ratio: 4 / 3; }
.map iframe { width: 100%; height: 100%; border: 0; }

/* Footer */
.site-footer { background: var(--navy-3); color: #aeb8d4; padding: 2.5rem 0 6rem; font-size: .93rem; }
.site-footer strong { color: #fff; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 1.2rem 2rem; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 1rem; }
.footer-brand img { width: 56px; height: auto; flex: none; }
.footer-links { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }
.footer-links a { color: #fff; text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: #ff8a8e; }
.footer-legal {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,.1); padding-top: 1rem;
}
.footer-legal nav { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.footer-legal a { color: #cfd6ea; font-size: .88rem; }
.footer-legal a:hover { color: #fff; }

/* Reseñas de Google */
.reviews-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.4rem; margin-bottom: 1.8rem;
}
.reviews-brand { display: flex; align-items: center; gap: .9rem; }
.reviews-brand svg { width: 38px; height: 38px; flex: none; }
.reviews-brand strong { display: block; font-family: var(--font-head); color: var(--navy); font-size: 1.1rem; }
.reviews-brand small { color: var(--muted); font-size: .88rem; }
.reviews-actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.reviews[hidden] { display: none; }
.review { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; display: flex; flex-direction: column; }
.review-head { display: flex; align-items: center; gap: .8rem; }
.review-avatar { width: 42px; height: 42px; flex: none; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; }
.review-head strong { display: block; color: var(--navy); }
.review-head small { color: var(--muted); font-size: .85rem; }
.review-stars { color: #f4b400; font-size: 1.15rem; letter-spacing: .1em; margin: .9rem 0 .4rem; }
.review blockquote { margin: 0; color: var(--ink); }
.reviews-empty { text-align: center; background: #fff; border: 1px dashed #b9c3d6; border-radius: 16px; padding: 2.5rem 1.5rem; max-width: 720px; margin: 0 auto; }
.reviews-empty[hidden] { display: none; }
.reviews-empty-stars { color: #f4b400; font-size: 1.8rem; letter-spacing: .15em; margin-bottom: .4rem; }
.reviews-empty p:not(.reviews-empty-stars) { color: var(--muted); }

/* Contenido bloqueado por cookies (mapa) */
.map { position: relative; }
.map iframe[hidden] { display: none; }
.consent-blocked {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .8rem; text-align: center; padding: 1.5rem; background: var(--navy-tint); color: var(--muted); font-size: .95rem;
}
.consent-blocked[hidden] { display: none; }
.consent-blocked svg { width: 40px; height: 40px; fill: none; stroke: var(--navy); stroke-width: 1.8; }
.consent-blocked strong { display: block; color: var(--navy); font-family: var(--font-head); font-size: 1.05rem; margin-bottom: .2rem; }
.consent-blocked p { margin: 0; max-width: 340px; }
.consent-blocked a { font-weight: 600; font-size: .92rem; }

/* Información básica de protección de datos (formulario) */
.privacy-basic { font-size: .82rem; line-height: 1.5; color: var(--muted); background: var(--bg-soft); border-radius: 8px; padding: .8rem 1rem; margin: 0 0 1.1rem; }
.privacy-basic strong { color: var(--navy); }
.field-check label a { font-weight: 600; }

/* Banner de cookies */
.cc-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 100;
  max-width: 1100px; margin: 0 auto; background: #fff; color: var(--ink);
  border: 1px solid var(--line); border-top: 4px solid var(--navy); border-radius: 14px;
  box-shadow: 0 18px 48px rgba(8, 18, 61, .28);
}
.cc-banner[hidden] { display: none; }
/* Banner dinámico: entra deslizando, avisa si se navega sin decidir y sale al elegir */
.cc-banner { animation: cc-in .55s cubic-bezier(.2, .8, .2, 1) both; }
.cc-banner.cc-nudge { animation: cc-nudge .7s ease both; }
.cc-banner.cc-leaving { animation: cc-out .35s ease forwards; pointer-events: none; }
@keyframes cc-in {
  from { transform: translateY(calc(100% + 24px)); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@keyframes cc-out {
  to { transform: translateY(calc(100% + 24px)); opacity: 0; }
}
@keyframes cc-nudge {
  0%, 100% { transform: none; box-shadow: 0 18px 48px rgba(8, 18, 61, .28); }
  20% { transform: translateY(-10px); box-shadow: 0 0 0 4px rgba(245, 13, 21, .35), 0 24px 56px rgba(8, 18, 61, .35); }
  40% { transform: none; }
  60% { transform: translateY(-5px); box-shadow: 0 0 0 4px rgba(245, 13, 21, .25), 0 20px 50px rgba(8, 18, 61, .3); }
}
.cc-pending { display: inline-flex; align-items: center; gap: .45rem; font-size: .8rem; font-weight: 600; color: var(--red); margin-left: .6rem; }
.cc-pending::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--red-logo); animation: cc-blink 1.6s ease-in-out infinite; }
.cc-pending[hidden] { display: none; }
@keyframes cc-blink { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) {
  .cc-banner, .cc-banner.cc-nudge, .cc-banner.cc-leaving, .cc-pending::before { animation: none; }
}
.cc-inner { display: flex; align-items: flex-end; gap: 1.5rem 2rem; padding: 1.3rem 1.5rem; }
.cc-text { flex: 1; font-size: .93rem; line-height: 1.55; }
.cc-text p { margin: 0 0 .5rem; }
.cc-title { font-family: var(--font-head); font-weight: 700; color: var(--navy); font-size: 1.1rem; }
.cc-config { display: grid; gap: .7rem; margin-top: .9rem; }
.cc-config[hidden] { display: none; }
.cc-opt { display: flex; gap: .7rem; align-items: flex-start; background: var(--bg-soft); border-radius: 8px; padding: .7rem .9rem; cursor: pointer; }
.cc-opt input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--navy); flex: none; }
.cc-opt strong { display: block; color: var(--navy); }
.cc-actions { display: flex; flex-wrap: wrap; gap: .6rem; flex: none; }
.cc-actions .btn { min-width: 128px; min-height: 46px; padding: .6rem 1.1rem; }
.cc-actions [hidden] { display: none; }
body.cc-open .wa-float { display: none; }

/* Páginas legales */
.legal-header .header-inner { height: 76px; }
.legal-back { font-weight: 600; text-decoration: none; }
.legal { max-width: 820px; padding-top: 3rem; padding-bottom: 4.5rem; }
.legal h1 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); font-weight: 800; }
.legal h2 { font-size: 1.3rem; margin-top: 2.2rem; }
.legal p, .legal li { color: #2a3347; }
.legal-updated { color: var(--muted); font-size: .92rem; }
.legal table { width: 100%; border-collapse: collapse; font-size: .92rem; margin: 1rem 0; }
.legal th, .legal td { text-align: left; vertical-align: top; border: 1px solid var(--line); padding: .6rem .7rem; }
.legal th { background: var(--bg-soft); color: var(--navy); }
.table-wrap { overflow-x: auto; }
mark.todo { background: #fff1b8; color: #6b4e00; padding: 0 .25em; border-radius: 3px; font-weight: 600; }

/* WhatsApp flotante */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  width: 60px; height: 60px; border-radius: 50%; background: var(--wa);
  display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.25);
  transition: transform .2s, background .2s;
}
.wa-float:hover { transform: scale(1.07); background: var(--wa-2); }
.wa-float svg { width: 32px; height: 32px; fill: #fff; }

/* ===== Responsive ===== */
@media (max-width: 1020px) {
  .nav { gap: 1.2rem; }
  .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; padding: 3.5rem 20px 4rem; }
  .cards, .reasons { grid-template-columns: repeat(2, 1fr); }
  .comm, .quote, .contact { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 860px) {
  .reviews { grid-template-columns: 1fr; }
  .cc-inner { flex-direction: column; align-items: stretch; }
  .cc-actions .btn { flex: 1 1 30%; }
}

@media (max-width: 1100px) {
  :root { --header-h: 68px; }
  .topbar-loc { display: none; }
  .topbar-inner { justify-content: center; }
  .topbar-links a[href^="mailto"] { display: none; }
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(13,27,86,.12);
    padding: .5rem 20px 1.2rem;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: .95rem 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav a:not(.btn)::after { display: none; }
  .nav .btn { margin-top: 1rem; }
  .brand-logo { width: 50px; }
  .brand-text strong { font-size: 1.22rem; }
  .site-header { position: sticky; }
}

@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .section { padding: 4rem 0; }
  .hero::before { width: 360px; height: 360px; right: -140px; top: 60px; border-width: 30px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-panel { padding: 1rem; }
  .hero-link { padding: .8rem; }
  .cards, .reasons { grid-template-columns: 1fr; }
  .card, .reason { padding: 1.5rem; }
  .group-num { font-size: 2rem; }
  .group-title h3 { font-size: 1.35rem; }
  .group-banner strong { white-space: normal; }
  .comm-works, .comm-admin { padding: 1.5rem; }
  .quote-form { padding: 1.4rem; }
  .field-row, .form-actions { grid-template-columns: 1fr; gap: 0; }
  .form-actions { gap: .75rem; }
  .footer-inner { grid-template-columns: 1fr; }
  .reviews-bar { padding: 1rem; }
  .reviews-actions, .reviews-actions .btn { width: 100%; }
  .cc-inner { padding: 1rem; }
  .cc-banner { left: 8px; right: 8px; bottom: 8px; max-height: calc(100vh - 16px); overflow-y: auto; }
  .cc-actions .btn { flex: 1 1 100%; }
  .wa-float { width: 56px; height: 56px; right: 14px; bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
