/* HausiGlobal Group · estilos del sitio público
   Colores de marca: azul #0A1931 · blanco #FFFFFF · rojo #BD2600 · dorado #D4AF37 */

@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 600; font-style: normal; font-display: swap; src: url('../vendor/fonts/plus-jakarta-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 700; font-style: normal; font-display: swap; src: url('../vendor/fonts/plus-jakarta-sans-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 800; font-style: normal; font-display: swap; src: url('../vendor/fonts/plus-jakarta-sans-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-weight: 400; font-style: normal; font-display: swap; src: url('../vendor/fonts/dm-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-weight: 500; font-style: normal; font-display: swap; src: url('../vendor/fonts/dm-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-weight: 600; font-style: normal; font-display: swap; src: url('../vendor/fonts/dm-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-weight: 700; font-style: normal; font-display: swap; src: url('../vendor/fonts/dm-sans-latin-700-normal.woff2') format('woff2'); }

:root {
  --navy: #0A1931;
  --navy-2: #14284a;
  --navy-3: #1d3866;
  --red: #BD2600;
  --red-dark: #9a1f00;
  --gold: #D4AF37;
  --gold-soft: #f4ecd0;
  --ink: #0A1931;
  --muted: #55637a;
  --line: #e3e8f0;
  --bg: #f5f7fb;
  --white: #ffffff;
  --ok: #17794a;
  --err: #b42318;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(10, 25, 49, .06), 0 8px 24px rgba(10, 25, 49, .08);
  --shadow-lg: 0 2px 4px rgba(10, 25, 49, .08), 0 18px 48px rgba(10, 25, 49, .16);
  --font: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: 'Plus Jakarta Sans', 'DM Sans', system-ui, sans-serif;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--white); -webkit-font-smoothing: antialiased; }
img, svg, video { max-width: 100%; display: block; }
a { color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--red-dark); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; color: var(--navy); letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 1.2rem + 3.4vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 1rem + 1.4vw, 2rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul { padding: 0; margin: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--navy-3); outline-offset: 2px; border-radius: 4px; }
.on-dark :focus-visible, .hero :focus-visible { outline-color: var(--gold); }
::selection { background: var(--gold); color: var(--navy); }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding-inline: 16px; }
@media (min-width: 640px) { .wrap { padding-inline: 24px; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 8px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.hide-sm, .btn.hide-sm { display: none; }
@media (min-width: 640px) { .btn.hide-sm { display: inline-flex; } }
.ic { width: 20px; height: 20px; flex: none; }
.ic-xl { width: 56px; height: 56px; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

/* ---------- botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border: 2px solid transparent; border-radius: 10px; font-weight: 700; font-size: 1rem; text-decoration: none; transition: background .15s, color .15s, border-color .15s, transform .1s; cursor: pointer; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-3); color: #fff; }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: #e0bd4d; color: var(--navy); }
.btn-ghost { background: #fff; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: .95rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.link-arrow { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; text-decoration: none; }
.link-arrow .ic { width: 18px; height: 18px; }

.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.badge-gold { background: var(--gold); color: var(--navy); }
.badge-navy { background: var(--navy); color: #fff; }

/* ---------- cabecera ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .97); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--header-h); }
.brand { flex: none; }
.brand img { height: 40px; width: auto; max-width: none; }
.nav { display: none; }
.nav a { display: block; padding: 10px 14px; border-radius: 8px; color: var(--navy); text-decoration: none; font-weight: 600; }
.nav a:hover { background: var(--bg); color: var(--navy); }
.nav a[aria-current="page"] { color: var(--red); }
.bar-right { display: flex; align-items: center; gap: 10px; }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: #fff; }
.lang a { padding: 5px 11px; border-radius: 999px; font-size: .8rem; font-weight: 700; color: var(--muted); text-decoration: none; }
.lang a[aria-current="true"] { background: var(--navy); color: #fff; }
.lang a:not([aria-current="true"]):hover { color: var(--navy); }
.burger { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--navy); }
.nav-open .nav { display: block; position: absolute; left: 0; right: 0; top: var(--header-h); background: #fff; border-bottom: 1px solid var(--line); padding: 8px 16px 16px; box-shadow: var(--shadow); }
@media (min-width: 900px) {
  .nav { display: flex; gap: 2px; }
  .burger { display: none; }
  .brand img { height: 48px; }
}

/* ---------- hero y buscador ---------- */
.hero { position: relative; background: radial-gradient(900px 420px at 85% -10%, #1f3d73 0%, rgba(31, 61, 115, 0) 60%), linear-gradient(180deg, var(--navy) 0%, #0d2142 100%); color: #fff; padding: 56px 0 120px; overflow: hidden; }
.hero::after { content: ''; position: absolute; right: -60px; bottom: -80px; width: 460px; height: 440px; background: url('../assets/house.svg') no-repeat center / contain; opacity: .05; filter: invert(1); pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { color: #fff; max-width: 18ch; margin-bottom: .4em; }
.hero p.lead { max-width: 56ch; color: rgba(255, 255, 255, .86); font-size: clamp(1rem, .9rem + .5vw, 1.2rem); margin-bottom: 0; }
.hero .eyebrow { display: inline-block; color: var(--gold); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: .78rem; margin-bottom: 14px; }
.search-card { position: relative; z-index: 2; margin-top: -76px; background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); padding: 20px; border: 1px solid var(--line); }
.search-card h2 { font-size: 1.1rem; margin-bottom: 2px; }
.search-card .sub { color: var(--muted); font-size: .9rem; margin-bottom: 14px; }
.seg { display: inline-flex; background: var(--bg); border-radius: 12px; padding: 4px; gap: 2px; margin-bottom: 14px; flex-wrap: wrap; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { padding: 9px 16px; border-radius: 9px; font-weight: 600; font-size: .92rem; cursor: pointer; color: var(--muted); min-height: 40px; display: inline-flex; align-items: center; }
.seg input:checked + label { background: var(--navy); color: #fff; }
.seg input:focus-visible + label { outline: 3px solid var(--navy-3); outline-offset: 2px; }
.search-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .search-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .search-grid { grid-template-columns: 1.3fr 1.3fr 1.1fr .9fr auto; align-items: end; } }

/* ---------- formularios ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: .85rem; font-weight: 700; color: var(--navy); }
.field input, .field select, .field textarea { min-height: 46px; width: 100%; padding: 10px 12px; border: 1.5px solid #cfd7e4; border-radius: 10px; background: #fff; color: var(--navy); }
.field textarea { min-height: 96px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #9aa8c0; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid rgba(29, 56, 102, .25); border-color: var(--navy-3); }
.field select { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2355637a' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; padding-right: 36px; }
.field .hint { font-size: .8rem; color: var(--muted); }
.field-row { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.input-prefix { position: relative; }
.input-prefix > span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none; }
.input-prefix input { padding-left: 34px; }
.lead-form { display: grid; gap: 12px; margin: 14px 0; }
.form-msg { min-height: 1.4em; margin: 0; font-weight: 600; }
.form-msg.ok { color: var(--ok); }
.form-msg.err { color: var(--err); }
.consent { color: var(--muted); margin: 0; }

/* ---------- secciones ---------- */
.section { padding: 64px 0; }
.section.alt { background: var(--bg); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head p { margin: 4px 0 0; color: var(--muted); }
[hidden] { display: none !important; }

/* ---------- tarjetas de inmuebles ---------- */
.carousel { position: relative; }
.track { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 18px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.track::-webkit-scrollbar { display: none; }
.track > * { flex: 0 0 min(320px, 84%); scroll-snap-align: start; }
.car-btn { position: absolute; top: 38%; z-index: 3; width: 46px; height: 46px; display: none; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); color: var(--navy); }
.car-btn:hover { background: var(--navy); color: #fff; }
.car-btn[disabled] { opacity: 0; pointer-events: none; }
.car-prev { left: -14px; } .car-next { right: -14px; }
@media (min-width: 900px) { .car-btn { display: grid; } }

.pgrid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.pcard { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: inherit; text-decoration: none; transition: transform .18s, box-shadow .18s, border-color .18s; height: 100%; }
.pcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: transparent; color: inherit; }
.pcard-img { position: relative; aspect-ratio: 4 / 3; background: #e9eef6; overflow: hidden; }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.pcard:hover .pcard-img img { transform: scale(1.04); }
.pcard-img .noimg { position: absolute; inset: 0; display: grid; place-items: center; color: #9fb0cc; }
.pcard-img .badge { position: absolute; top: 12px; left: 12px; }
.pcard-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pcard-price { font-family: var(--font-head); font-weight: 800; font-size: 1.35rem; color: var(--navy); line-height: 1.2; }
.pcard-price small { font-weight: 600; font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-right: 4px; }
.pcard-alt { font-size: .85rem; color: var(--muted); min-height: 1.3em; }
.pcard-title { font-size: 1rem; font-weight: 700; color: var(--navy); margin: 4px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
.pcard-loc { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: .9rem; }
.pcard-loc .ic { width: 16px; height: 16px; color: var(--red); }
.pcard-specs { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); font-size: .88rem; font-weight: 600; color: var(--navy); }
.pcard-specs li { display: inline-flex; align-items: center; gap: 5px; }
.pcard-specs .ic { width: 17px; height: 17px; color: var(--muted); }
.skeleton { background: linear-gradient(100deg, #eef2f8 30%, #f8fafd 50%, #eef2f8 70%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: var(--radius); min-height: 330px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- herramientas (tarjetas del inicio) ---------- */
.tool-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); }
.tool-card { display: flex; flex-direction: column; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; text-decoration: none; color: inherit; transition: box-shadow .18s, transform .18s, border-color .18s; }
.tool-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--gold); color: inherit; }
.tool-card .ico { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: var(--navy); color: var(--gold); margin-bottom: 6px; }
.tool-card h3 { margin: 0; }
.tool-card p { color: var(--muted); margin: 0 0 6px; }
.tool-card .link-arrow { margin-top: auto; }

.why { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.why-item { padding-top: 18px; border-top: 3px solid var(--gold); }
.why-item h3 { margin-bottom: 6px; }
.why-item p { color: var(--muted); margin: 0; }

.cta-band { background: var(--navy); color: #fff; border-radius: 20px; padding: 40px 28px; display: grid; gap: 20px; align-items: center; background-image: radial-gradient(600px 240px at 100% 0, #1f3d73 0, rgba(31, 61, 115, 0) 70%); }
.cta-band h2 { color: #fff; margin-bottom: 4px; }
.cta-band p { color: rgba(255, 255, 255, .85); margin: 0; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.cta-band .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .4); }
.cta-band .btn-ghost:hover { border-color: #fff; color: #fff; }
@media (min-width: 800px) { .cta-band { grid-template-columns: 1fr auto; padding: 48px; } }

/* ---------- listado ---------- */
.page-title { padding: 40px 0 8px; }
.page-title p { color: var(--muted); max-width: 60ch; }
.filters { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 20px; }
.filters-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); align-items: end; }
.filters-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; align-items: center; }
.price-fields { display: grid; grid-template-columns: 1fr 1fr 96px; gap: 8px; }
.results-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.results-bar .count { font-weight: 700; color: var(--navy); }
.results-bar .sort { display: flex; align-items: center; gap: 8px; }
.results-bar .sort select { min-height: 40px; padding: 6px 34px 6px 10px; border: 1.5px solid #cfd7e4; border-radius: 10px; background-color: #fff; }
.empty { text-align: center; padding: 56px 16px; border: 2px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.empty h3 { color: var(--navy); }
.load-more { display: flex; justify-content: center; margin-top: 28px; }

/* ---------- ficha de inmueble ---------- */
.prop { padding-top: 20px; padding-bottom: 64px; }
.crumbs a { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; font-weight: 600; color: var(--muted); }
.crumbs a:hover { color: var(--navy); }
.prop-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; align-items: flex-end; margin: 14px 0 22px; }
.prop-head h1 { font-size: clamp(1.6rem, 1rem + 2.4vw, 2.5rem); margin: 10px 0 6px; max-width: 24ch; }
.prop-loc { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 1.05rem; margin: 0; }
.prop-loc .ic { color: var(--red); }
.prop-price { text-align: left; }
@media (min-width: 700px) { .prop-price { text-align: right; } }
.price-main { font-family: var(--font-head); font-weight: 800; font-size: clamp(1.7rem, 1.2rem + 2vw, 2.5rem); color: var(--navy); line-height: 1.1; margin: 0; }
.price-main small { font-size: .9rem; font-weight: 600; color: var(--muted); }
.price-alt { color: var(--muted); margin: 4px 0 0; min-height: 1.5em; }
.prop-grid { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .prop-grid { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; } .prop-side { position: sticky; top: calc(var(--header-h) + 16px); } }
.gallery { display: grid; gap: 10px; margin-bottom: 22px; }
.gallery-main { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 16px; overflow: hidden; background: #e9eef6; aspect-ratio: 4 / 3; cursor: zoom-in; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-count { position: absolute; right: 12px; bottom: 12px; background: rgba(10, 25, 49, .78); color: #fff; padding: 4px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.gallery-thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.gallery-thumbs button { width: 92px; aspect-ratio: 4 / 3; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: #e9eef6; opacity: .75; flex: none; }
.gallery-thumbs button[aria-current="true"] { border-color: var(--navy); opacity: 1; }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.gallery-empty { place-items: center; text-align: center; padding: 64px 16px; background: var(--bg); border: 2px dashed var(--line); border-radius: 16px; color: #9fb0cc; }
.gallery-empty p { margin: 0; color: var(--muted); }
.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin: 0 0 8px; }
.spec { display: grid; gap: 2px; justify-items: start; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.spec .ic { color: var(--red); margin-bottom: 4px; }
.spec-val { font-family: var(--font-head); font-weight: 800; font-size: 1.2rem; line-height: 1.1; }
.spec-lbl { font-size: .8rem; color: var(--muted); }
.block { margin-top: 30px; }
.block h2 { font-size: 1.35rem; }
.prose p { max-width: 70ch; }
.details { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0 28px; margin: 0; }
.details > div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.details dt { color: var(--muted); }
.details dd { margin: 0; font-weight: 700; text-align: right; }
.amenities { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px 20px; }
.amenities li { display: flex; align-items: center; gap: 8px; }
.amenities .ic { color: var(--ok); width: 18px; height: 18px; }
.video-box { max-width: 380px; border-radius: 16px; overflow: hidden; background: #000; box-shadow: var(--shadow); }
.video-box video { width: 100%; max-height: 640px; }
.map-box { height: 340px; border-radius: 16px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); z-index: 0; }
.side-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: var(--shadow); margin-bottom: 16px; }
.side-card h2 { font-size: 1.2rem; margin-bottom: 4px; }
.side-card > .btn + .lead-form { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.mini-out { background: var(--bg); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.mini-out strong { display: block; font-family: var(--font-head); font-size: 1.5rem; color: var(--navy); }
.mini-out span { color: var(--muted); font-size: .85rem; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(5, 12, 26, .94); display: grid; place-items: center; padding: 20px; }
.lightbox img { max-height: 86vh; max-width: min(1100px, 94vw); object-fit: contain; border-radius: 8px; }
.lightbox button { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; display: grid; place-items: center; }
.lightbox button:hover { background: rgba(255, 255, 255, .28); }
.lb-close { top: 16px; right: 16px; } .lb-prev { left: 16px; top: 50%; } .lb-next { right: 16px; top: 50%; }
.lb-count { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); color: #fff; font-weight: 700; }

/* ---------- herramientas (página) ---------- */
.tools-nav { position: sticky; top: var(--header-h); z-index: 20; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.tools-nav .wrap { display: flex; gap: 6px; overflow-x: auto; padding-block: 8px; scrollbar-width: none; }
.tools-nav a { padding: 8px 16px; border-radius: 999px; font-weight: 700; text-decoration: none; color: var(--navy); white-space: nowrap; border: 1px solid var(--line); background: #fff; }
.tools-nav a:hover { border-color: var(--navy); }
.tool { padding: 48px 0; border-bottom: 1px solid var(--line); }
.tool:last-of-type { border-bottom: 0; }
.tool-wrap { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .tool-wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: var(--shadow); display: grid; gap: 14px; }
.panel.result { background: var(--navy); color: #fff; border-color: var(--navy); }
.panel.result h3, .panel.result .big { color: #fff; }
.big { font-family: var(--font-head); font-weight: 800; font-size: clamp(1.8rem, 1.3rem + 2vw, 2.7rem); line-height: 1.1; }
.panel.result .big .cur { color: var(--gold); font-size: .5em; margin-right: 6px; letter-spacing: .04em; }
.kv { display: grid; gap: 0; }
.kv > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.panel:not(.result) .kv > div { border-bottom-color: var(--line); }
.kv > div:last-child { border-bottom: 0; }
.kv dt { opacity: .8; } .kv dd { margin: 0; font-weight: 700; text-align: right; }
.kv .total { font-size: 1.1rem; }
.kv .total dd, .kv .total dt { opacity: 1; font-weight: 800; }
.result .note { color: rgba(255, 255, 255, .75); font-size: .85rem; margin: 0; }
.note { color: var(--muted); font-size: .85rem; margin: 0; }
.range { width: 100%; accent-color: var(--red); height: 32px; }
.fx-row { display: grid; grid-template-columns: 1fr 120px; gap: 10px; }
.swap-btn { justify-self: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--navy); display: grid; place-items: center; }
.swap-btn:hover { background: var(--navy); color: #fff; }
.alert { padding: 10px 14px; border-radius: 10px; background: var(--gold-soft); color: #5e4a05; font-size: .9rem; }
details.amort { border: 1px solid var(--line); border-radius: 12px; padding: 4px 14px; background: #fff; }
details.amort summary { cursor: pointer; font-weight: 700; padding: 10px 0; }
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th, .tbl td { padding: 8px 6px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl th { color: var(--muted); font-weight: 700; }

/* ---------- contacto y legales ---------- */
.contact-grid { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); padding-bottom: 64px; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } }
.contact-card { background: var(--navy); color: #fff; border-radius: 16px; padding: 28px; display: grid; gap: 14px; align-content: start; }
.contact-card h2 { color: #fff; }
.contact-card a { color: #fff; }
.contact-list { display: grid; gap: 10px; }
.contact-list li { display: flex; align-items: center; gap: 10px; }
.contact-list .ic { color: var(--gold); }
.legal { max-width: 78ch; padding-block: 40px 72px; }
.legal h1 { font-size: clamp(1.8rem, 1.2rem + 2vw, 2.4rem); }
.legal h2 { margin-top: 1.6em; font-size: 1.25rem; }
.legal ul { list-style: disc; padding-left: 1.3em; margin-bottom: 1em; }
.legal li { margin-bottom: .4em; }
.notfound { text-align: center; padding: 96px 16px; }

/* ---------- pie ---------- */
.site-footer { background: #fff; color: var(--muted); padding-top: 56px; margin-top: 0; border-top: 4px solid var(--red); }
.site-footer a { color: var(--navy); text-decoration: none; }
.site-footer a:hover { color: var(--red); text-decoration: underline; }
.site-footer h2 { color: var(--navy); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 14px; font-family: var(--font); font-weight: 700; }
.foot-grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .foot-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .foot-grid { grid-template-columns: 1.5fr 1fr 1.2fr 1fr; } }
.foot-brand img { height: 46px; width: auto; margin-bottom: 14px; }
.foot-brand p { max-width: 32ch; }
.site-footer li { margin-bottom: 8px; }
.site-footer .contact-list li { margin: 0 0 10px; }
.social { display: flex; gap: 14px; flex-wrap: wrap; }
.foot-bottom { margin-top: 40px; padding-block: 22px; border-top: 1px solid var(--line); display: grid; gap: 6px; font-size: .85rem; color: var(--muted); }
.foot-bottom p { margin: 0; }
@media (min-width: 800px) { .foot-bottom { grid-template-columns: auto 1fr; gap: 28px; } .foot-bottom p:last-child { text-align: right; } }

/* ---------- asistente virtual ---------- */
.chat-launcher { position: fixed; right: 18px; bottom: 18px; z-index: 80; display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 20px 0 16px; border: 0; border-radius: 999px; background: var(--red); color: #fff; font-weight: 700; box-shadow: 0 8px 24px rgba(189, 38, 0, .4); }
.chat-launcher:hover { background: var(--red-dark); }
.chat-launcher .ic { width: 24px; height: 24px; }
.chat-open .chat-launcher { display: none; }
.chat { position: fixed; z-index: 90; right: 0; bottom: 0; width: 100%; height: min(640px, 100dvh); background: #fff; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); border: 1px solid var(--line); overflow: hidden; border-radius: 18px 18px 0 0; }
@media (min-width: 520px) { .chat { right: 18px; bottom: 18px; width: 392px; height: min(640px, calc(100dvh - 36px)); border-radius: 18px; } }
.chat-head { background: var(--navy); color: #fff; padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.chat-head .av { width: 38px; height: 38px; border-radius: 50%; background: #fff; display: grid; place-items: center; flex: none; }
.chat-head .av img { width: 24px; }
.chat-head h2 { color: #fff; font-size: 1rem; margin: 0; font-family: var(--font); }
.chat-head p { margin: 0; font-size: .78rem; color: rgba(255, 255, 255, .75); }
.chat-head button { margin-left: auto; width: 40px; height: 40px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .12); color: #fff; display: grid; place-items: center; }
.chat-head button:hover { background: rgba(255, 255, 255, .24); }
.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 16px; font-size: .95rem; line-height: 1.5; white-space: pre-line; }
.msg.bot { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; align-self: flex-start; }
.msg.user { background: var(--navy); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.msg.typing { color: var(--muted); font-style: italic; }
.chat-props { display: grid; gap: 8px; align-self: stretch; }
.chat-prop { display: grid; grid-template-columns: 84px 1fr; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; text-decoration: none; color: inherit; }
.chat-prop:hover { border-color: var(--navy); color: inherit; }
.chat-prop .im { background: #e9eef6; min-height: 72px; }
.chat-prop .im img { width: 100%; height: 100%; object-fit: cover; }
.chat-prop .tx { padding: 8px 10px 8px 0; display: grid; gap: 1px; align-content: center; }
.chat-prop .tx strong { font-size: .92rem; line-height: 1.25; }
.chat-prop .tx span { font-size: .8rem; color: var(--muted); }
.chat-prop .tx .pr { color: var(--navy); font-weight: 800; }
.chat-actions { display: flex; flex-wrap: wrap; gap: 8px; align-self: flex-start; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--navy); background: #fff; color: var(--navy); font-weight: 600; font-size: .88rem; text-decoration: none; }
.chip:hover { background: var(--navy); color: #fff; }
.chip.wa { background: var(--red); border-color: var(--red); color: #fff; }
.chip.wa:hover { background: var(--red-dark); }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: #fff; }
.chat-form input { flex: 1; min-height: 46px; padding: 0 14px; border: 1.5px solid #cfd7e4; border-radius: 999px; }
.chat-form button { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--red); color: #fff; display: grid; place-items: center; }
.chat-form button:hover { background: var(--red-dark); }
.chat-lead { display: grid; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; align-self: stretch; }
.chat-lead .field input { min-height: 42px; }
.chat-foot { padding: 6px 12px 10px; font-size: .72rem; color: var(--muted); text-align: center; background: #fff; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media print {
  .site-header, .site-footer, .chat-launcher, #hg-chat-root, .prop-side .btn, .tools-nav { display: none !important; }
}
.site-footer .contact-list .ic { color: var(--red); }
