/* =====================================================================
   RM GROUP INMOBILIARIA — Sistema visual
   Estructura según RM-Group.md (lienzo blanco, píldoras, tarjetas 16 px,
   paneles 32 px, imágenes 20 px, secciones 96 px, sin degradados).
   Colores de marca: marino #1d3c74 (acción), azul #2a5298 (acento
   decorativo), plata #b0b0b0.
   Los nombres de tokens coinciden con los de López para compartir admin.css.
   ===================================================================== */

:root {
  /* Marca */
  --azul: #1d3c74;          /* Midnight → acción principal, superficie inversa */
  --azul-700: #132952;
  --azul-050: #e8eef8;      /* Ice → franjas tintadas */
  --dorado: #2a5298;        /* Electric Blue → acento decorativo (nunca fondo de botón) */
  --dorado-600: #1f3f78;
  --dorado-050: #e8eef8;
  --plata: #b0b0b0;         /* Concrete */

  /* Neutros */
  --texto: #1e1e1e;         /* Ink */
  --texto-2: #666666;       /* Smoke: piso del texto legible */
  --niebla: #8d8d8d;        /* Fog: metadatos */
  --gris-500: #999999;      /* Ash: placeholder */
  --linea: #ccd1da;         /* Mist */
  --muted: #eef1f5;
  --lienzo: #f7fafc;        /* Snow */
  --tarjeta: #fafafa;
  --blanco: #ffffff;        /* Paper */
  --exito: #2f7a05;
  --error: #c02626;

  /* Tipografía */
  --fuente: 'Outfit', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --t-caption: 11px;
  --t-small: 12px;
  --t-body: 14px;
  --t-ui: 16px;
  --t-sub: 20px;
  --t-lg: 22px;
  --t-h-sm: 24px;
  --t-h: 32px;
  --t-h-lg: 40px;
  --t-display: clamp(40px, 6vw, 64px);

  /* Espaciado: base 4px */
  --s4: 4px; --s8: 8px; --s12: 12px; --s16: 16px; --s20: 20px; --s24: 24px; --s28: 28px;
  --s32: 32px; --s36: 36px; --s40: 40px; --s44: 44px; --s48: 48px; --s64: 64px; --s80: 80px; --s96: 96px;
  --gutter: 20px;
  --ancho: 1200px;
  --seccion: 64px;

  /* Formas */
  --r-input: 10px;          /* mínimo permitido en controles */
  --r-card: 16px;
  --r-img: 20px;
  --r-card-lg: 32px;
  --r-pill: 100px;

  /* Elevación (solo flotantes y botones principales) */
  --sombra-boton: 0 0 0 1px #16305d, 0 1px 2px rgba(27, 28, 29, .48);
  --sombra-flotante: 0 1.78px 8px rgba(0,0,0,.05), 0 .89px 2.67px rgba(0,0,0,.04);
  --sombra-sutil: 0 1px 2px rgba(10, 13, 20, .03);
  --sombra-overlay: 0 12px 32px rgba(10, 13, 20, .18);
  --sombra-menu: 0 8px 24px rgba(10, 13, 20, .14);
  --sombra-tip: 0 2px 4px rgba(0,0,0,.12);

  --ease: cubic-bezier(.23, 1, .32, 1);
  --header: 88px;
}
@media (min-width: 744px) { :root { --gutter: 32px; --seccion: 96px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header) + 16px); }
body {
  margin: 0; font-family: var(--fuente); font-size: var(--t-ui); font-weight: 400; line-height: 1.5; letter-spacing: -.01em;
  color: var(--texto); background: var(--blanco); -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; color: var(--texto); font-weight: 600; letter-spacing: -.03em; text-wrap: balance; }
h1 { font-size: var(--t-h-lg); line-height: 1.2; }
h2 { font-size: var(--t-h); line-height: 1.25; }
h3 { font-size: var(--t-sub); line-height: 1.3; }
p { margin: 0; text-wrap: pretty; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
::selection { background: var(--azul); color: #fff; }
:focus-visible { outline: 2px solid var(--dorado); outline-offset: 2px; border-radius: 6px; }
.num { font-variant-numeric: tabular-nums; }
.oculto { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.contenedor { width: 100%; max-width: calc(var(--ancho) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.angosto { max-width: calc(760px + var(--gutter) * 2); }
.seccion { padding-block: var(--seccion); }
.banda { background: var(--lienzo); }
.muted { color: var(--texto-2); }
.etiqueta-sup { display: block; font-size: var(--t-caption); font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--dorado); margin-bottom: var(--s12); }
.saltar { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--azul); color: #fff; padding: 12px 16px; border-radius: var(--r-pill); }
.saltar:focus { top: 12px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; }
  .btn:active, .btn-icono:active, .tarjeta-foto img, .menu-movil { transform: none !important; }
}

/* ---------- Botones (píldora) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s8);
  min-height: 44px; padding: 0 var(--s20); border-radius: var(--r-pill); border: 1px solid transparent;
  font-size: var(--t-body); font-weight: 500; line-height: 1; letter-spacing: -.02em; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 160ms var(--ease);
}
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-solido, .btn-accion { background: var(--azul); color: #fff; box-shadow: var(--sombra-boton); }
.btn-solido:hover, .btn-accion:hover { background: var(--azul-700); }
.btn-contorno { background: var(--blanco); color: var(--texto); border-color: var(--linea); }
.btn-contorno:hover { border-color: var(--texto); }
.btn-whatsapp { background: #128c4b; color: #fff; }
.btn-whatsapp:hover { background: #0e723d; }
.btn-grande { min-height: 52px; padding: 0 var(--s28); font-size: var(--t-ui); }
.btn-chico { min-height: 36px; padding: 0 var(--s16); font-size: var(--t-body); }
.btn-bloque { width: 100%; }
.btn-icono {
  width: 40px; height: 40px; padding: 0; border-radius: var(--r-pill); border: 0; cursor: pointer;
  background: var(--lienzo); color: var(--texto); display: inline-grid; place-items: center;
  transition: background-color 150ms ease, transform 160ms var(--ease);
}
.btn-icono:hover { background: var(--muted); }
.btn-icono:active { transform: scale(.94); }
.enlace { color: var(--texto); font-weight: 500; text-decoration: underline; }

/* ---------- Encabezado: píldora flotante ---------- */
.header { position: sticky; top: 0; z-index: 50; padding-top: var(--s12); }
.header-pildora {
  height: 64px; display: flex; align-items: center; gap: var(--s16); padding: 0 var(--s8) 0 var(--s16);
  background: rgba(255,255,255,.96); border: 1px solid var(--linea); border-radius: var(--r-pill); box-shadow: var(--sombra-flotante);
}
@supports (backdrop-filter: blur(8px)) { .header-pildora { background: rgba(255,255,255,.82); backdrop-filter: saturate(1.4) blur(12px); } }
.marca { display: flex; align-items: center; gap: var(--s8); flex: none; text-decoration: none; }
.marca img { width: 40px; height: 40px; }
.marca span { font-weight: 600; letter-spacing: -.02em; }
.nav { display: none; gap: var(--s4); margin-inline: auto; }
.nav a { padding: var(--s8) var(--s12); border-radius: var(--r-pill); color: var(--texto); font-size: var(--t-body); font-weight: 500; text-decoration: none; transition: background-color 150ms ease; }
.nav a:hover { background: var(--lienzo); }
.nav a[aria-current="page"] { background: var(--azul-050); color: var(--azul); }
.header-acciones { display: flex; align-items: center; gap: var(--s8); margin-left: auto; }
.header-acciones .btn { display: none; }
@media (min-width: 1024px) {
  .nav { display: flex; }
  .header-acciones { margin-left: 0; }
  .header-acciones .btn { display: inline-flex; }
  .menu-btn { display: none; }
}
@media (min-width: 1024px) and (max-width: 1199px) {
  .nav { gap: 0; }
  .nav a { padding-inline: var(--s8); }
}
.menu-movil {
  position: fixed; inset: calc(var(--header)) var(--gutter) auto; z-index: 49; background: var(--blanco); border: 1px solid var(--linea);
  border-radius: var(--r-card); box-shadow: var(--sombra-overlay); padding: var(--s16); display: flex; flex-direction: column; gap: var(--s4);
  transform: translateY(-8px) scale(.98); transform-origin: top right; opacity: 0; visibility: hidden;
  transition: opacity 150ms ease, transform 150ms var(--ease), visibility 0s linear 150ms;
}
.menu-movil.abierto { transform: none; opacity: 1; visibility: visible; transition: opacity 200ms var(--ease), transform 200ms var(--ease), visibility 0s; }
.menu-movil a:not(.btn) { padding: var(--s12) var(--s12); border-radius: var(--r-input); font-size: var(--t-ui); font-weight: 500; text-decoration: none; }
.menu-movil a:not(.btn):hover { background: var(--lienzo); }
.menu-movil .btn { margin-top: var(--s8); }

/* ---------- Hero: lienzo blanco + foto en tarjeta ---------- */
.hero { padding-block: var(--s48) var(--seccion); }
.hero .contenedor { display: grid; gap: var(--s40); align-items: center; }
@media (min-width: 1024px) { .hero .contenedor { grid-template-columns: 1.05fr 1fr; gap: var(--s64); } }
.hero h1 { font-size: var(--t-display); line-height: 1.08; letter-spacing: -.035em; max-width: 13ch; }
.hero-texto { margin-top: var(--s20); font-size: var(--t-lg); line-height: 1.4; color: var(--texto-2); max-width: 34ch; }
.hero-acciones { display: flex; flex-wrap: wrap; gap: var(--s12); margin-top: var(--s32); }
.hero-foto { position: relative; border-radius: var(--r-img); overflow: hidden; aspect-ratio: 4 / 3; background: var(--muted); }
.hero-foto img { width: 100%; height: 100%; object-fit: cover; }
.hero-datos { display: flex; flex-wrap: wrap; gap: var(--s24); margin-top: var(--s40); }
.hero-datos li { display: flex; align-items: center; gap: var(--s8); color: var(--texto); font-weight: 500; }

/* Palomita circular (acento decorativo) */
.check { width: 20px; height: 20px; flex: none; border-radius: 888px; background: var(--dorado); color: #fff; display: inline-grid; place-items: center; font-size: 10px; }
.lista-check { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s12); }
.lista-check li { display: flex; gap: var(--s12); align-items: flex-start; }

/* Buscador en píldora */
.buscador {
  margin-top: var(--s32); display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); padding: var(--s8);
  border: 1px solid var(--linea); border-radius: var(--r-card); background: var(--blanco); box-shadow: var(--sombra-flotante);
}
.buscador-campo { display: flex; flex-direction: column; padding: var(--s8) var(--s16); border-radius: var(--r-input); transition: background-color 150ms ease; }
.buscador-campo:hover { background: var(--lienzo); }
.buscador-campo label { font-size: var(--t-caption); font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--texto-2); }
.buscador-campo select, .buscador-campo input { border: 0; padding: 2px 0 0; background: transparent; outline: none; font-size: var(--t-body); font-weight: 500; appearance: none; width: 100%; cursor: pointer; }
.buscador .btn { grid-column: 1 / -1; }
/* Fila en píldora solo cuando hay espacio (hero a una columna, o columna ancha) */
@media (min-width: 744px) and (max-width: 1023px), (min-width: 1200px) {
  .buscador { grid-template-columns: 1fr 1fr 1fr auto; border-radius: var(--r-pill); align-items: center; }
  .buscador-campo { border-radius: var(--r-pill); }
  .buscador .btn { grid-column: auto; }
}

/* ---------- Encabezados de sección ---------- */
.titulo-seccion { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--s16); margin-bottom: var(--s40); }
.titulo-seccion p { margin-top: var(--s12); color: var(--texto-2); max-width: 52ch; }
.centrado { text-align: center; }
.centrado .titulo-seccion, .titulo-seccion.centrado { justify-content: center; flex-direction: column; align-items: center; }

/* ---------- Tarjetas ---------- */
.rejilla { display: grid; gap: var(--s32) var(--s24); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .rejilla { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .rejilla { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tarjeta { position: relative; min-width: 0; display: flex; flex-direction: column; gap: var(--s16); }
.tarjeta-foto { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-img); overflow: hidden; background: var(--muted); }
.tarjeta-foto img { width: 100%; height: 100%; object-fit: cover; transition: transform 300ms var(--ease); }
@media (hover: hover) and (pointer: fine) { .tarjeta:hover .tarjeta-foto img { transform: scale(1.02); } }
.tarjeta-enlace { position: absolute; inset: 0; z-index: 1; border-radius: var(--r-img); }
.insignia { position: absolute; top: var(--s12); left: var(--s12); z-index: 2; background: var(--blanco); color: var(--texto); border-radius: var(--r-pill); padding: 4px 12px; font-size: var(--t-small); font-weight: 600; box-shadow: var(--sombra-tip); }
.insignia-ref { left: auto; right: var(--s12); background: rgba(255,255,255,.9); font-weight: 500; color: var(--texto-2); }
.tarjeta-cuerpo { display: flex; flex-direction: column; gap: var(--s4); padding-inline: var(--s4); }
.tarjeta-titulo { font-size: var(--t-ui); font-weight: 600; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tarjeta-meta { font-size: var(--t-body); color: var(--texto-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tarjeta-precio { font-size: var(--t-ui); font-weight: 600; margin-top: var(--s4); }
.tarjeta-precio small { font-weight: 400; color: var(--texto-2); }

.tarjeta-plana { background: var(--tarjeta); border-radius: var(--r-card); padding: var(--s24); }
.tarjeta-plana h3 { margin-bottom: var(--s8); }
.tarjeta-plana p { color: var(--texto-2); }
.icono-circulo { width: 44px; height: 44px; border-radius: 888px; display: grid; place-items: center; background: var(--blanco); color: var(--azul); margin-bottom: var(--s20); font-size: 18px; box-shadow: var(--sombra-sutil); }
.servicios-rejilla { display: grid; gap: var(--s16); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.panel-grande { background: var(--tarjeta); border-radius: var(--r-card-lg); padding: var(--s48) var(--s24); }
@media (min-width: 744px) { .panel-grande { padding: var(--s96) var(--s48); } }
.panel-marino { background: var(--azul); color: #fff; border-radius: var(--r-card-lg); padding: var(--s48) var(--s24); display: grid; gap: var(--s24); align-items: center; }
.panel-marino h2 { color: #fff; }
.panel-marino p { color: rgba(255,255,255,.82); margin-top: var(--s12); max-width: 52ch; }
.panel-marino .btn-contorno { border-color: transparent; }
@media (min-width: 900px) { .panel-marino { grid-template-columns: 1fr auto; padding: var(--s64); } }
.tinte { background: var(--azul-050); border-radius: var(--r-card); padding: var(--s24); }

.cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--s32); }
.cifras strong { display: block; font-size: var(--t-h-lg); font-weight: 600; letter-spacing: -.03em; color: var(--texto); }
.cifras span { color: var(--texto-2); }

.dividido { display: grid; gap: var(--s48); align-items: start; }
@media (min-width: 1024px) { .dividido { grid-template-columns: 1fr 1fr; gap: var(--s80); } }

/* ---------- Catálogo ---------- */
.filtros-caja { display: flex; gap: var(--s8); flex-wrap: wrap; align-items: end; padding: var(--s16); border-radius: var(--r-card); background: var(--tarjeta); }
.filtro { display: flex; flex-direction: column; gap: 2px; min-width: 150px; flex: 1; }
.filtro label { font-size: var(--t-caption); font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--texto-2); padding-left: var(--s12); }
.filtro .control { min-height: 44px; border-radius: var(--r-pill); }
.resultado-cabecera { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--s12); margin: var(--s40) 0 var(--s24); }
.vacio { text-align: center; padding: var(--s64) var(--s24); border-radius: var(--r-card-lg); background: var(--tarjeta); }
.vacio h2 { font-size: var(--t-h-sm); margin-bottom: var(--s8); }
.vacio .btn { margin-top: var(--s24); }

/* ---------- Ficha ---------- */
.ficha-cabecera { padding-top: var(--s32); }
.ruta { color: var(--texto-2); font-size: var(--t-body); margin-bottom: var(--s12); }
.ruta a { color: var(--texto-2); }
.ficha-cabecera h1 { font-size: clamp(28px, 4vw, var(--t-h-lg)); }
.ficha-sub { display: flex; flex-wrap: wrap; gap: var(--s8) var(--s20); margin-top: var(--s12); color: var(--texto-2); }
.galeria { margin-top: var(--s32); display: grid; gap: var(--s8); position: relative; }
.galeria-principal { aspect-ratio: 4 / 3; border-radius: var(--r-img); overflow: hidden; background: var(--muted); }
.galeria img { width: 100%; height: 100%; object-fit: cover; }
.galeria-principal button, .galeria-miniaturas button { display: block; width: 100%; height: 100%; padding: 0; border: 0; cursor: zoom-in; background: var(--muted); border-radius: inherit; overflow: hidden; }
.galeria-miniaturas { display: none; }
.galeria-ver { position: absolute; right: var(--s16); bottom: var(--s16); z-index: 2; }
@media (min-width: 744px) {
  .galeria { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; height: clamp(320px, 42vw, 520px); }
  .galeria-principal { grid-row: 1 / 3; aspect-ratio: auto; }
  .galeria-miniaturas { display: contents; }
  .galeria-miniaturas button { border-radius: var(--r-img); }
}
.ficha-cuerpo { display: grid; gap: var(--s48); padding-block: var(--s48) var(--seccion); }
@media (min-width: 1024px) { .ficha-cuerpo { grid-template-columns: minmax(0, 1fr) 380px; gap: var(--s64); } }
.ficha-bloque + .ficha-bloque { margin-top: var(--s48); }
.ficha-bloque h2 { font-size: var(--t-h-sm); margin-bottom: var(--s20); }
.datos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s12); }
@media (min-width: 744px) { .datos { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.dato { background: var(--tarjeta); border-radius: var(--r-card); padding: var(--s16); }
.dato small { display: block; color: var(--texto-2); font-size: var(--t-small); }
.dato strong { display: block; font-size: var(--t-sub); font-weight: 600; letter-spacing: -.02em; margin-top: var(--s4); }
.amenidades { columns: 2; column-gap: var(--s24); list-style: none; padding: 0; margin: 0; }
.amenidades li { display: flex; gap: var(--s12); align-items: center; padding-block: var(--s8); break-inside: avoid; }
.descripcion { font-size: var(--t-ui); line-height: 1.7; white-space: pre-line; max-width: 68ch; color: var(--texto); }
.panel-contacto { position: sticky; top: calc(var(--header) + var(--s16)); align-self: start; background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--r-card); padding: var(--s24); box-shadow: var(--sombra-flotante); }
.panel-precio { font-size: var(--t-h); font-weight: 600; letter-spacing: -.03em; }
.panel-precio small { font-size: var(--t-body); font-weight: 400; color: var(--texto-2); letter-spacing: 0; }
.panel-contacto form { margin-top: var(--s20); }
.panel-nota { margin-top: var(--s16); text-align: center; color: var(--texto-2); font-size: var(--t-small); }

.visor { position: fixed; inset: 0; z-index: 200; background: rgba(10,13,20,.94); display: none; }
.visor.abierto { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; opacity: 1; transition: opacity 200ms var(--ease); }
@starting-style { .visor.abierto { opacity: 0; } }
.visor-barra { display: flex; justify-content: space-between; align-items: center; padding: var(--s16) var(--gutter); color: #fff; }
.visor-imagen { display: grid; place-items: center; padding: 0 var(--gutter); min-height: 0; }
.visor-imagen img { max-height: calc(100dvh - 160px); max-width: 100%; width: auto; height: auto; object-fit: contain; border-radius: var(--r-card); }
.visor-nav { display: flex; justify-content: center; gap: var(--s16); padding: var(--s16); }
.visor .btn-icono { background: rgba(255,255,255,.12); color: #fff; }
.visor .btn-icono:hover { background: rgba(255,255,255,.22); }

/* ---------- Formularios ---------- */
.formulario { display: grid; gap: var(--s16); }
.fila-2 { display: grid; gap: var(--s16); }
@media (min-width: 640px) { .fila-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.campo { display: flex; flex-direction: column; gap: var(--s8); }
.campo > label, .campo > .etiqueta-campo { font-size: var(--t-body); font-weight: 500; }
.campo small { color: var(--texto-2); font-size: var(--t-small); }
.control {
  width: 100%; min-height: 48px; padding: var(--s12) var(--s16); border: 1px solid var(--linea); border-radius: var(--r-input);
  background: var(--blanco); font-size: var(--t-ui); transition: border-color 150ms ease, box-shadow 150ms ease;
}
textarea.control { min-height: 120px; resize: vertical; line-height: 1.5; }
select.control { appearance: none; padding-right: 40px; background: var(--blanco) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231e1e1e' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 16px center; }
.control::placeholder { color: var(--gris-500); }
.control:hover { border-color: var(--plata); }
.control:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 3px var(--azul-050); }
.casilla { display: flex; align-items: center; gap: var(--s12); min-height: 44px; padding: 0 var(--s12); border: 1px solid var(--linea); border-radius: var(--r-input); cursor: pointer; }
.casilla:has(input:checked) { border-color: var(--azul); background: var(--azul-050); }
.casilla input { width: 18px; height: 18px; accent-color: var(--azul); }
.casillas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s8); }
@media (min-width: 640px) { .casillas { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.trampa { position: absolute; left: -9999px; }
.caja { background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--r-card); padding: var(--s24); }
@media (min-width: 744px) { .caja { padding: var(--s32); } }

/* ---------- Avisos ---------- */
.avisos { display: grid; gap: var(--s8); margin-bottom: var(--s24); }
.aviso { display: flex; gap: var(--s12); align-items: flex-start; padding: var(--s16); border-radius: var(--r-card); background: var(--lienzo); font-size: var(--t-body); }
.aviso i { margin-top: 3px; }
.aviso-exito { background: #edf6e4; color: #24560a; }
.aviso-error { background: #fdeeee; color: #8f1d1d; }
.aviso-info { background: var(--azul-050); color: var(--azul); }
.aviso-dorado { background: #fff6e0; color: #6b4e0f; }

/* ---------- Simulador ---------- */
.sim { display: grid; gap: var(--s32); }
@media (min-width: 1024px) { .sim { grid-template-columns: 1fr 400px; gap: var(--s48); } }
.sim-resultado { background: var(--azul); color: #fff; border-radius: var(--r-card-lg); padding: var(--s32); position: sticky; top: calc(var(--header) + var(--s16)); align-self: start; }
.sim-resultado small { color: rgba(255,255,255,.75); }
.sim-mensualidad { font-size: clamp(36px, 4vw, 48px); font-weight: 600; letter-spacing: -.03em; margin: var(--s4) 0 var(--s24); }
.sim-fila { display: flex; justify-content: space-between; gap: var(--s16); padding: var(--s12) 0; border-top: 1px solid rgba(255,255,255,.16); }
.sim-barra { height: 8px; border-radius: var(--r-pill); background: rgba(255,255,255,.18); overflow: hidden; margin: var(--s8) 0 var(--s24); }
.sim-barra span { display: block; height: 100%; width: 100%; background: var(--plata); transform-origin: left; transform: scaleX(var(--pct, .2)); transition: transform 250ms var(--ease); }
.sim-sugerencias { display: grid; gap: var(--s8); }
.sim-sugerencia { display: flex; gap: var(--s12); align-items: center; padding: var(--s8); border-radius: var(--r-card); background: var(--tarjeta); text-decoration: none; transition: background-color 150ms ease; }
.sim-sugerencia:hover { background: var(--muted); }
.sim-sugerencia img { width: 64px; height: 48px; border-radius: var(--r-input); object-fit: cover; }
input[type=range] { width: 100%; accent-color: var(--azul); margin-top: var(--s8); }
.tabla-scroll { overflow: auto; max-height: 460px; border: 1px solid var(--linea); border-radius: var(--r-card); }
.tabla { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: var(--t-body); }
.tabla th, .tabla td { padding: var(--s12) var(--s16); text-align: right; border-bottom: 1px solid var(--linea); white-space: nowrap; }
.tabla th:first-child, .tabla td:first-child { text-align: left; }
.tabla thead th { position: sticky; top: 0; background: var(--blanco); font-size: var(--t-caption); font-weight: 600; color: var(--texto-2); text-transform: uppercase; letter-spacing: .02em; }

/* ---------- Blog ---------- */
.articulo-tarjeta .tarjeta-foto { aspect-ratio: 16 / 10; }
.articulo-meta { display: flex; flex-wrap: wrap; gap: var(--s8) var(--s16); color: var(--texto-2); font-size: var(--t-body); }
.articulo { max-width: 720px; margin-inline: auto; }
.articulo h1 { font-size: clamp(32px, 5vw, var(--t-h-lg)); }
.articulo-portada { margin: var(--s32) 0; border-radius: var(--r-img); overflow: hidden; aspect-ratio: 16 / 9; background: var(--muted); }
.articulo-portada img { width: 100%; height: 100%; object-fit: cover; }
.prosa { font-size: 18px; line-height: 1.75; color: #2b2b2b; }
.prosa > * + * { margin-top: 1.1em; }
.prosa h2 { font-size: var(--t-h-sm); margin-top: 1.8em; }
.prosa h3 { font-size: var(--t-sub); margin-top: 1.5em; }
.prosa a { color: var(--azul); }
.prosa img { border-radius: var(--r-card); }
.prosa blockquote { margin: 1.5em 0; padding-left: var(--s20); border-left: 1px solid var(--linea); color: var(--texto-2); }
.prosa ul, .prosa ol { padding-left: 1.3em; }
.texto-legal { font-size: var(--t-ui); line-height: 1.7; }
.texto-legal h2 { font-size: var(--t-sub); margin: var(--s40) 0 var(--s12); }
.texto-legal p + p, .texto-legal ul { margin-top: var(--s12); }
.nota-legal { font-size: var(--t-small); color: var(--texto-2); line-height: 1.6; }
.pagina-cabecera { padding-block: var(--s48) var(--s32); }
.pagina-cabecera p { margin-top: var(--s12); color: var(--texto-2); font-size: var(--t-lg); line-height: 1.4; max-width: 46ch; }

/* ---------- Pie ---------- */
.pie { border-top: 1px solid var(--linea); margin-top: var(--seccion); }
.pie-columnas { display: grid; gap: var(--s40); padding-block: var(--s64) var(--s48); }
@media (min-width: 744px) { .pie-columnas { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.pie h3 { font-size: var(--t-body); font-weight: 600; letter-spacing: -.01em; margin-bottom: var(--s16); }
.pie ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s12); font-size: var(--t-body); }
.pie a { color: var(--texto-2); text-decoration: none; }
.pie a:hover { color: var(--texto); }
.pie-boletin { display: flex; gap: var(--s8); margin-top: var(--s16); }
.pie-boletin .control { min-height: 44px; border-radius: var(--r-pill); font-size: var(--t-body); }
.pie-legal { border-top: 1px solid var(--linea); padding-block: var(--s24); display: flex; flex-wrap: wrap; gap: var(--s8) var(--s24); justify-content: space-between; align-items: center; color: var(--texto-2); font-size: var(--t-body); }
.redes { display: flex; gap: var(--s8); }
.redes a { width: 36px; height: 36px; border-radius: 888px; display: grid; place-items: center; background: var(--lienzo); color: var(--texto); transition: background-color 150ms ease; }
.redes a:hover { background: var(--muted); }

/* ---------- Flotantes ---------- */
.wa-flotante {
  position: fixed; right: var(--s16); bottom: var(--s16); z-index: 40; width: 56px; height: 56px; border-radius: 888px;
  background: #128c4b; color: #fff; display: grid; place-items: center; font-size: 28px; box-shadow: var(--sombra-menu); text-decoration: none;
  transition: transform 160ms var(--ease);
}
@media (hover: hover) and (pointer: fine) { .wa-flotante:hover { transform: scale(1.05); } }
.wa-flotante:active { transform: scale(.94); }
.cookies {
  position: fixed; left: var(--s16); right: var(--s16); bottom: var(--s16); z-index: 45; max-width: 520px;
  background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--r-card); box-shadow: var(--sombra-overlay); padding: var(--s20);
  display: none; gap: var(--s16); align-items: center;
}
.cookies.visible { display: flex; opacity: 1; transform: none; transition: opacity 250ms var(--ease), transform 250ms var(--ease); }
@starting-style { .cookies.visible { opacity: 0; transform: translateY(16px); } }
.cookies p { font-size: var(--t-body); color: var(--texto-2); }
@media (max-width: 560px) { .cookies { flex-direction: column; align-items: stretch; } }

/* Galería que se adapta a la cantidad de fotos */
@media (min-width: 744px) {
  .galeria:not(:has(.galeria-miniaturas button)) { grid-template-columns: 1fr; }
  .galeria-miniaturas button:only-child { grid-row: 1 / 3; }
}

/* ---------- Nuestro equipo ---------- */
.equipo-hero { padding-block: var(--s32) var(--s48); }
.equipo-hero-foto { aspect-ratio: 16 / 10; }
@media (max-width: 1023px) { .equipo-hero-foto { aspect-ratio: 16 / 9; } }

/* Tarjetas horizontales compactas: foto chica a la izquierda (3 por fila en escritorio) */
.equipo-rejilla { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s16); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .equipo-rejilla { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s20); } }
@media (min-width: 1100px) { .equipo-rejilla { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.equipo-tarjeta { display: flex; align-items: flex-start; gap: var(--s16); min-width: 0; padding: var(--s16); background: var(--blanco); border-radius: var(--r-card); box-shadow: var(--sombra-sutil); border: 1px solid var(--muted); }
.equipo-foto { flex: none; width: 88px; height: 88px; border-radius: 12px; overflow: hidden; background: var(--muted); }
@media (min-width: 700px) { .equipo-foto { width: 112px; height: 112px; } }
.equipo-foto img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.equipo-iniciales { width: 100%; height: 100%; display: grid; place-items: center; background: var(--azul-050); color: var(--azul); font-size: 28px; font-weight: 600; letter-spacing: -.03em; }
.equipo-cuerpo { display: flex; flex-direction: column; align-items: flex-start; flex: 1; min-width: 0; align-self: stretch; }
.equipo-nombre { font-size: var(--t-ui); line-height: 1.3; letter-spacing: -.02em; }
.equipo-puesto { color: var(--azul); font-size: var(--t-small); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-top: 2px; }
.equipo-presentacion { color: var(--texto-2); font-size: var(--t-body); line-height: 1.45; margin: var(--s8) 0 var(--s12); flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.equipo-wa .fa-whatsapp { color: #128c4b; }

/* ---------- Hero del inicio: espacios en celular ---------- */
/* .lista-check (definida después) ponía margin: 0 y anulaba la separación con el buscador */
.hero-datos.lista-check { display: flex; flex-wrap: wrap; gap: var(--s12) var(--s24); margin-top: var(--s32); }
@media (max-width: 743px) {
  .hero { padding-block: var(--s32) var(--s48); }
  .hero h1 { font-size: clamp(34px, 9.5vw, 44px); line-height: 1.1; }
  .hero-texto { font-size: var(--t-ui); line-height: 1.5; margin-top: var(--s16); }
  .buscador { margin-top: var(--s24); padding: var(--s12); gap: 0; }
  .buscador-campo { padding: var(--s12) var(--s8); border-radius: 0; }
  .buscador-campo:nth-child(1) { border-right: 1px solid var(--linea); }
  .buscador-campo:nth-child(1), .buscador-campo:nth-child(2) { border-bottom: 1px solid var(--linea); }
  .buscador-campo:nth-child(2) { padding-left: var(--s16); }
  .buscador-campo:nth-child(3) { grid-column: 1 / -1; }
  .buscador .btn { margin-top: var(--s8); min-height: 48px; }
  .hero-datos.lista-check { flex-direction: column; gap: var(--s12); margin-top: var(--s24); }
  .hero-datos li { font-size: var(--t-body); }
  .hero .contenedor { gap: var(--s32); }
}

/* ---------- Administración de conjuntos (Domus) ---------- */
.conj-hero .contenedor { align-items: center; }
.conj-panel { background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--r-card-lg); padding: var(--s24); box-shadow: var(--sombra-overlay); }
.conj-panel-cab { display: flex; justify-content: space-between; align-items: center; gap: var(--s12); font-weight: 600; color: var(--azul); margin-bottom: var(--s20); }
.conj-panel-cab small { font-size: var(--t-caption); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--niebla); border: 1px solid var(--linea); border-radius: var(--r-pill); padding: 2px 10px; }
.conj-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s12); }
.conj-kpis > div { background: var(--lienzo); border-radius: var(--r-card); padding: var(--s16); display: flex; flex-direction: column; gap: 4px; }
.conj-kpis small { color: var(--texto-2); font-size: var(--t-small); }
.conj-kpis strong { font-size: var(--t-h); color: var(--azul); letter-spacing: -.03em; }
.conj-barra { height: 6px; border-radius: 6px; background: var(--azul-050); overflow: hidden; }
.conj-barra span { display: block; height: 100%; background: var(--azul); border-radius: 6px; }
.conj-feed { list-style: none; margin: var(--s20) 0 0; padding: 0; display: grid; gap: 10px; }
.conj-feed li { display: flex; gap: 10px; align-items: center; font-size: var(--t-body); color: var(--texto-2); padding-top: 10px; border-top: 1px solid var(--muted); }
.conj-feed i { color: var(--azul); width: 18px; text-align: center; }
.conj-retos { display: grid; gap: var(--s16); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 744px) { .conj-retos { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.conj-retos .tarjeta-plana { background: var(--blanco); }
.conj-caminos { display: grid; gap: var(--s24); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .conj-caminos { grid-template-columns: 1fr 1fr; } }
.conj-camino { display: flex; flex-direction: column; gap: var(--s16); padding: var(--s32); border-radius: var(--r-card-lg); border: 1px solid var(--linea); background: var(--blanco); }
.conj-camino h3 { font-size: var(--t-h-sm); }
.conj-camino p { color: var(--texto-2); }
.conj-camino .lista-check { flex: 1; }
.conj-camino .btn { align-self: flex-start; }
.conj-camino-rm { background: var(--azul-050); border-color: transparent; }
.conj-pasos { list-style: none; margin: 0; padding: 0; counter-reset: paso; display: grid; gap: var(--s16); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 744px) { .conj-pasos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .conj-pasos { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.conj-pasos li { counter-increment: paso; background: var(--tarjeta); border-radius: var(--r-card); padding: var(--s24); display: flex; flex-direction: column; gap: 6px; }
.conj-pasos li::before { content: counter(paso); width: 32px; height: 32px; border-radius: 50%; background: var(--azul); color: #fff; display: grid; place-items: center; font-weight: 600; margin-bottom: 8px; }
.conj-pasos span { color: var(--texto-2); font-size: var(--t-body); }
.conj-banner { display: grid; gap: var(--s24); align-items: center; padding: var(--s32); border-radius: var(--r-card-lg); background: var(--azul-050); }
@media (min-width: 900px) { .conj-banner { grid-template-columns: 1fr auto; padding: var(--s40) var(--s48); } }
.conj-banner p { color: var(--texto-2); margin-top: var(--s8); max-width: 60ch; }
.conj-hero-foto img { object-position: 70% center; }
.conj-vista { display: grid; gap: var(--s32); align-items: center; }
@media (min-width: 900px) { .conj-vista { grid-template-columns: 1fr 1fr; gap: var(--s48); } }
.conj-vista p { color: var(--texto-2); margin-top: var(--s12); max-width: 52ch; }
