/* ==========================================================
   Nostra Inmobiliaria — brand tokens (from Branding.pdf)
   ========================================================== */
:root {
  --navy: #10183F;       /* principal */
  --indigo: #384CA0;     /* secundario */
  --blue: #0059B2;       /* acento / acciones */
  --taupe: #9B9B8C;      /* isotipo */
  --gray-200: #DDDDDD;
  --gray-100: #EEEEEE;
  --orange: #FF9326;     /* destacados */
  --yellow: #FFBF00;

  --ink: var(--navy);
  --ink-soft: #4A5170;
  --ink-mute: #5F6580;
  --taupe-ink: #6F6F60;  /* taupe for text: the logo taupe is too light for small type */
  --wa: #0F7A40;
  --line: #E3E4EA;
  --surface: #FFFFFF;
  --tint: #F5F5F3;
  --navy-2: #172152;

  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 63, .06), 0 2px 8px rgba(16, 24, 63, .05);
  --shadow: 0 2px 4px rgba(16, 24, 63, .05), 0 12px 32px rgba(16, 24, 63, .10);
  --shadow-lg: 0 30px 80px rgba(16, 24, 63, .25);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--surface);
  font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.ico { width: 20px; height: 20px; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip:focus { top: 16px; }

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

.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--indigo);
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: .7; }
.eyebrow--light { color: var(--gray-200); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 600; font-size: 15px;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: #004c98; box-shadow: 0 8px 20px rgba(0, 89, 178, .28); }
.btn--ghost { border: 1px solid var(--line); color: var(--navy); background: #fff; }
.btn--ghost:hover { border-color: var(--navy); }
.btn--light { background: #fff; color: var(--navy); }
.btn--light:hover { background: var(--gray-100); }
.btn--outline-light { border: 1px solid rgba(255, 255, 255, .45); color: #fff; }
.btn--outline-light:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }
.btn--wa { background: var(--wa); color: #fff; }
.btn--wa:hover { background: #0C6635; }
.btn--block { width: 100%; }
.btn--lg { height: 56px; padding: 0 30px; font-size: 16px; }
.btn--lg .ico { transition: transform .25s var(--ease); }
.btn--lg:hover .ico { transform: translateX(4px); }

.pill {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px;
  border-radius: 999px; font-size: 14px; font-weight: 600; transition: background-color .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease);
}
.pill--menu { justify-self: start; background: #fff; color: var(--navy); box-shadow: var(--shadow-sm); padding-left: 14px; }
.pill--menu:hover { background: var(--gray-100); }
.pill--solid { background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .35); backdrop-filter: blur(6px); }
.pill--solid:hover { background: #fff; color: var(--navy); }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 40; transition: background-color .3s var(--ease), box-shadow .3s var(--ease);
}
.header__inner {
  max-width: 1400px; margin: 0 auto; padding: 18px var(--gutter);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  transition: padding .3s var(--ease);
}
.brand { position: relative; display: block; height: 34px; }
.brand img { height: 100%; width: auto; transition: opacity .3s var(--ease); }
.brand__navy { position: absolute; inset: 0; opacity: 0; }
.header__links { justify-self: end; display: flex; align-items: center; gap: 28px; font-size: 14px; font-weight: 500; color: #fff; }
.header__links > a:not(.pill) { position: relative; }
.header__links > a:not(.pill)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease);
}
.header__links > a:not(.pill):hover::after, .header__links > a[aria-current]::after { transform: scaleX(1); }

.header.is-solid { background: rgba(255, 255, 255, .94); backdrop-filter: saturate(160%) blur(12px); box-shadow: 0 1px 0 var(--line); }
.header.is-solid .header__inner { padding-top: 12px; padding-bottom: 12px; }
.header.is-solid .brand__light { opacity: 0; }
.header.is-solid .brand__navy { opacity: 1; }
.header.is-solid .header__links { color: var(--navy); }
.header.is-solid .pill--menu { background: var(--gray-100); box-shadow: none; }
.header.is-solid .pill--solid { background: var(--navy); border-color: var(--navy); color: #fff; }
.header.is-solid .pill--solid:hover { background: var(--blue); border-color: var(--blue); }

/* ---------- Menu overlay ---------- */
.menu {
  position: fixed; inset: 0; z-index: 35; background: var(--navy); color: #fff;
  display: grid; place-items: center; padding: 100px var(--gutter) 40px;
  opacity: 0; transition: opacity .35s var(--ease);
}
.menu.is-open { opacity: 1; }
.menu[hidden] { display: none; }
.menu__inner { width: 100%; max-width: 1100px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 60px; align-items: end; }
.menu__nav { display: flex; flex-direction: column; }
.menu__nav a {
  font-size: clamp(30px, 5vw, 56px); font-weight: 400; letter-spacing: -0.02em; line-height: 1.25;
  color: rgba(255, 255, 255, .62); transition: color .2s, transform .3s var(--ease);
}
.menu__nav a:hover { color: #fff; transform: translateX(8px); }
.menu__aside { display: flex; flex-direction: column; gap: 10px; color: var(--gray-200); font-size: 15px; border-left: 1px solid rgba(255, 255, 255, .15); padding-left: 40px; }
.menu__aside img { width: 170px; height: auto; margin-bottom: 18px; }
.menu__aside p { margin-bottom: 12px; color: rgba(255, 255, 255, .7); }
.menu__aside a:hover { color: #fff; }
body.menu-open { overflow: hidden; }
body.menu-open .header { background: transparent; box-shadow: none; backdrop-filter: none; }
body.menu-open .header .brand__light { opacity: 1; }
body.menu-open .header .brand__navy { opacity: 0; }
body.menu-open .header .header__links { visibility: hidden; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: max(720px, 100svh); display: flex; flex-direction: column;
  align-items: center; justify-content: space-between; color: #fff; isolation: isolate;
  padding: 140px var(--gutter) 0;
}
.hero__media { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: var(--navy); }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 60%; transform: scale(1.04); animation: heroZoom 14s var(--ease) forwards; }
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 45% at 50% 32%, rgba(16, 24, 63, .45), transparent 70%),
    linear-gradient(180deg, rgba(16, 24, 63, .82) 0%, rgba(16, 24, 63, .45) 40%, rgba(16, 24, 63, .12) 62%, rgba(16, 24, 63, .88) 100%);
}
.hero h1, .hero__lead { text-shadow: 0 2px 24px rgba(16, 24, 63, .45); }
@keyframes heroZoom { to { transform: scale(1); } }
.hero__content { text-align: center; max-width: 920px; }
.hero h1 { font-size: clamp(40px, 6.4vw, 82px); font-weight: 500; letter-spacing: -0.035em; line-height: 1.04; }
.hero__lead { margin: 22px auto 0; max-width: 620px; font-size: clamp(15px, 1.4vw, 17px); color: rgba(255, 255, 255, .86); font-weight: 400; }
.hero__content > * { animation: rise .9s var(--ease) both; }
.hero__content > :nth-child(2) { animation-delay: .08s; }
.hero__content > :nth-child(3) { animation-delay: .16s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

/* ---------- Search ---------- */
.search {
  position: relative; width: 100%; max-width: 1080px; margin-top: 60px; transform: translateY(50%);
  background: #fff; color: var(--navy); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 8px 8px 0; animation: rise .9s .24s var(--ease) both;
}
.search__tabs { display: flex; gap: 4px; padding: 6px 10px 0; }
.search__tab {
  position: relative; padding: 10px 16px 14px; font-size: 14px; font-weight: 600; color: var(--ink-mute); transition: color .2s;
}
.search__tab::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: 0; height: 2px; border-radius: 2px; background: var(--blue);
  transform: scaleX(0); transition: transform .25s var(--ease);
}
.search__tab:hover { color: var(--navy); }
.search__tab.is-active { color: var(--navy); }
.search__tab.is-active::after { transform: scaleX(1); }
.search__fields {
  display: grid; grid-template-columns: 1.2fr 1.1fr 1fr auto; gap: 0; align-items: stretch;
  border-top: 1px solid var(--line); padding: 10px 6px 10px 0;
}
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.search .field { padding: 8px 22px; border-right: 1px solid var(--line); }
.search .field:nth-child(3) { border-right: 0; }
.field > span { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute); }
.field select, .field input, .field textarea {
  width: 100%; border: 0; background: transparent; padding: 0; font-size: 15px; font-weight: 500; color: var(--navy); outline: none;
}
.search .field select {
  appearance: none; cursor: pointer; padding-right: 22px; height: 28px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%2310183F' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") right center / 16px no-repeat;
}
.search .field { transition: background-color .2s, box-shadow .2s; }
.search .field:focus-within { background: #F3F7FC; box-shadow: inset 0 -2px 0 var(--blue); }
.search .field:focus-within > span { color: var(--blue); }
.search__go { height: auto; min-height: 58px; padding: 0 30px; border-radius: 14px; align-self: center; }
.search__quick {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 16px 16px;
  border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-mute);
}
.search__quick a {
  padding: 6px 12px; border-radius: 999px; background: var(--tint); color: var(--navy); font-size: 13px; font-weight: 500;
  transition: background-color .2s, color .2s;
}
.search__quick a:hover { background: var(--navy); color: #fff; }

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 10vw, 128px) 0; }
#categorias { padding-top: clamp(200px, 18vw, 230px); }
.section--tint { background: var(--tint); }
.section__head { max-width: 680px; margin-bottom: 48px; }
.section__head h2, .rural h2, .about h2, .contact h2 { font-size: clamp(30px, 3.6vw, 46px); font-weight: 500; }
.section__lead { margin-top: 16px; color: var(--ink-soft); font-size: 17px; }
.section__head--row { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

/* ---------- Bento categories ---------- */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 250px; gap: 16px; }
.tile {
  position: relative; overflow: hidden; border-radius: var(--radius-lg); text-align: left; color: #fff;
  background: var(--navy); isolation: isolate; display: flex; align-items: flex-end;
}
.tile--xl { grid-column: span 2; grid-row: span 2; }
.tile--wide { grid-column: span 2; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .8s var(--ease); }
.tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(16, 24, 63, 0) 30%, rgba(16, 24, 63, .88) 100%); transition: background .4s; }
.tile:hover img { transform: scale(1.06); }
.tile__body { display: flex; flex-direction: column; gap: 6px; padding: 24px; width: 100%; }
.tile__kicker { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--gray-200); opacity: .85; }
.tile__title { font-size: 22px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; }
.tile--xl .tile__title { font-size: clamp(26px, 2.6vw, 34px); }
.tile__text { font-size: 14px; color: rgba(255, 255, 255, .8); max-width: 380px; }
.tile__count {
  margin-top: 8px; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600;
}
.tile__count::after {
  content: ""; width: 28px; height: 28px; border-radius: 50%; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6' fill='none' stroke='%2310183F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
  transition: transform .3s var(--ease);
}
.tile:hover .tile__count::after { transform: translateX(4px); }

/* ---------- Listings ---------- */
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.seg { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.seg button { padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--ink-soft); transition: background-color .2s, color .2s; }
.seg button:hover { color: var(--navy); }
.seg button.is-active { background: var(--navy); color: #fff; }
.sort select {
  appearance: none; height: 44px; padding: 0 40px 0 18px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 14px; font-weight: 500; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%2310183F' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") right 14px center / 16px no-repeat;
}
.results-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 22px 0 24px; min-height: 34px; }
.results-bar p { font-size: 14px; color: var(--ink-soft); }
.results-bar strong { color: var(--navy); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px 0 12px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); font-size: 13px; font-weight: 500;
}
.chip svg { width: 14px; height: 14px; }
.chip:hover { border-color: var(--navy); }
.chip--clear { padding: 0 12px; color: var(--blue); border-color: transparent; background: transparent; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  position: relative; background: #fff; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; transition: box-shadow .3s var(--ease), transform .3s var(--ease);
  animation: cardIn .5s var(--ease) both;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px); } }
.card__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--gray-100); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.card:hover .card__media img { transform: scale(1.05); }
.card__badges { position: absolute; top: 14px; left: 14px; display: flex; gap: 6px; }
.badge { height: 26px; padding: 0 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; display: inline-flex; align-items: center; }
.badge--op { background: rgba(255, 255, 255, .95); color: var(--navy); }
.badge--feat { background: var(--orange); color: var(--navy); }
.badge--pre { background: var(--yellow); color: var(--navy); }
.fav {
  position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .95); color: var(--navy); transition: transform .2s var(--ease), color .2s;
}
.fav:hover { transform: scale(1.08); }
.fav .ico { width: 18px; height: 18px; }
.fav[aria-pressed="true"] { color: #E0475A; }
.fav[aria-pressed="true"] path { fill: currentColor; }
.card__content { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.card__body { padding: 20px 22px 0; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card__desc, .specs__extra { display: none !important; }
.card__type { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--taupe-ink); }
.card__title { font-size: 18px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
.card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card__loc { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-mute); }
.card__loc .ico { width: 16px; height: 16px; }
.specs { list-style: none; margin: 12px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--ink-soft); font-weight: 500; }
.specs li { display: inline-flex; align-items: center; gap: 6px; }
.specs .ico { width: 17px; height: 17px; color: var(--indigo); }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px 20px; margin-top: auto; }
.price { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.price small { font-size: 12px; font-weight: 500; color: var(--ink-mute); letter-spacing: 0; }
.card__go { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; transition: background-color .25s, color .25s, border-color .25s; }
.card:hover .card__go { background: var(--navy); color: #fff; border-color: var(--navy); }
.card__go .ico { width: 18px; height: 18px; }
.fav { z-index: 2; }

.empty { text-align: center; padding: 60px 20px; max-width: 460px; margin: 0 auto; }
.empty img { margin: 0 auto 20px; opacity: .8; }
.empty h3 { font-size: 22px; font-weight: 600; }
.empty p { margin-top: 10px; color: var(--ink-soft); }
.empty__actions { display: flex; gap: 10px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }

/* ---------- Rural ---------- */
.rural { position: relative; color: #fff; padding: clamp(90px, 11vw, 140px) 0; isolation: isolate; overflow: hidden; background: var(--navy); }
.rural__media { position: absolute; inset: 0; z-index: -1; }
.rural__media img { width: 100%; height: 100%; object-fit: cover; opacity: .45; }
.rural__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, var(--navy) 25%, rgba(16, 24, 63, .55) 100%); }
.rural__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.rural__copy > p { margin-top: 20px; color: rgba(255, 255, 255, .78); font-size: 17px; max-width: 560px; }
.checks { list-style: none; padding: 0; margin: 32px 0 36px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px 28px; }
.checks li { display: flex; gap: 14px; font-size: 14px; color: rgba(255, 255, 255, .75); }
.checks strong { display: block; color: #fff; font-weight: 600; margin-bottom: 2px; }
.checks .ico { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: rgba(155, 155, 140, .18); color: var(--gray-200); }
.rural__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.stats { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: rgba(255, 255, 255, .14); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid rgba(255, 255, 255, .14); }
.stats > div { background: rgba(16, 24, 63, .72); backdrop-filter: blur(8px); padding: 32px 28px; display: flex; flex-direction: column-reverse; gap: 6px; }
.stats dt { font-size: 13px; color: rgba(255, 255, 255, .65); }
.stats dd { margin: 0; font-size: clamp(24px, 2.6vw, 34px); font-weight: 500; letter-spacing: -0.02em; overflow-wrap: anywhere; }

/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.service { padding: 36px 32px 40px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background-color .3s var(--ease); }
.service:hover { background: var(--tint); }
.service__ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--navy); color: #fff; margin-bottom: 22px; transition: background-color .3s; }
.service:hover .service__ico { background: var(--blue); }
.service__ico .ico { width: 24px; height: 24px; }
.service h3 { font-size: 19px; font-weight: 600; margin-bottom: 10px; }
.service p { font-size: 15px; color: var(--ink-soft); }

/* ---------- About ---------- */
.about__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.about__media { position: relative; margin: 0; }
.about__media > img:first-child { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-lg); }
.about__mark { position: absolute; right: -24px; bottom: -24px; width: 150px; height: auto; background: #fff; padding: 26px 22px; border-radius: 20px; box-shadow: var(--shadow); }
.about__copy > p { margin-top: 18px; color: var(--ink-soft); font-size: 17px; }
.values { margin-top: 34px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; border-top: 1px solid var(--line); padding-top: 26px; }
.values strong { display: block; font-size: 16px; margin-bottom: 4px; }
.values span { font-size: 14px; color: var(--ink-mute); line-height: 1.5; display: block; }

/* ---------- Contact ---------- */
.contact { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 55%, var(--indigo) 140%); color: #fff; padding: clamp(80px, 10vw, 128px) 0; }
.contact__grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(40px, 6vw, 90px); align-items: start; }
.contact__copy > p { margin-top: 18px; color: rgba(255, 255, 255, .78); font-size: 17px; max-width: 460px; }
.contact__list { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 16px; font-size: 16px; }
.contact__list li { display: flex; align-items: center; gap: 14px; }
.contact__list .ico { width: 42px; height: 42px; padding: 10px; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.contact__list a:hover { text-decoration: underline; text-underline-offset: 4px; }
.form { background: #fff; color: var(--navy); border-radius: var(--radius-lg); padding: clamp(24px, 3vw, 36px); display: grid; gap: 14px; box-shadow: var(--shadow-lg); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field--box { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; transition: border-color .2s, box-shadow .2s; }
.field--box:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 89, 178, .12); }
.field--box:focus-within > span { color: var(--blue); }
.field--box.is-invalid { border-color: #D33F49; }
.field--box textarea { resize: vertical; min-height: 84px; }
.field--box select { cursor: pointer; }
.form__note { font-size: 14px; min-height: 1.4em; color: var(--ink-soft); }
.form__note.is-ok { color: #13834A; font-weight: 600; }
.form__note.is-err { color: #D33F49; }

/* ---------- Footer ---------- */
.footer { background: #0B112D; color: rgba(255, 255, 255, .7); padding: 72px 0 28px; font-size: 14px; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer__brand img { width: 150px; height: auto; margin-bottom: 18px; }
.footer h2 { color: #fff; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 16px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer a:hover { color: #fff; }
.footer__bottom { margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .1); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: rgba(255, 255, 255, .5); }

/* ---------- WhatsApp ---------- */
.wa {
  position: fixed; right: 22px; bottom: 22px; z-index: 30; width: 58px; height: 58px; border-radius: 50%;
  background: var(--wa); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 28px rgba(15, 122, 64, .38);
  transition: transform .25s var(--ease);
}
.wa:hover { transform: scale(1.07); }
.wa .ico { width: 30px; height: 30px; }

/* ---------- Modal ---------- */
.modal {
  width: min(980px, calc(100% - 32px)); max-height: calc(100dvh - 48px); padding: 0; border: 0; border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-lg); color: var(--navy);
}
.modal[open] { display: grid; grid-template-columns: 1.1fr 1fr; animation: modalIn .35s var(--ease); }
.modal::backdrop { background: rgba(11, 17, 45, .6); backdrop-filter: blur(4px); }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.modal__media img { width: 100%; height: 100%; min-height: 320px; object-fit: cover; }
.modal__body { padding: 36px 34px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.modal__body h3 { font-size: 26px; font-weight: 600; }
.modal__price { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin-top: 10px; }
.modal__specs { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modal__specs li { display: flex; align-items: center; gap: 10px; background: var(--tint); border-radius: 12px; padding: 10px 12px; font-size: 14px; font-weight: 500; }
.modal__specs .ico { color: var(--indigo); }
.modal__desc { margin-top: 12px; color: var(--ink-soft); font-size: 15px; }
.modal__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 22px; }
.modal__close { position: absolute; top: 14px; right: 14px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.modal__close:hover { background: var(--gray-100); }


/* ---------- Home: featured ---------- */
.more { display: flex; justify-content: center; margin-top: 48px; }

/* ---------- Catalog page ---------- */
.page-hero {
  position: relative; isolation: isolate; color: #fff; display: flex; flex-direction: column; align-items: center;
  padding: 150px var(--gutter) 0; min-height: 460px;
}
.page-hero .hero__media img { animation: none; transform: none; object-position: center 40%; }
.page-hero .hero__media::after { background: linear-gradient(180deg, rgba(16, 24, 63, .85) 0%, rgba(16, 24, 63, .72) 60%, rgba(16, 24, 63, .9) 100%); }
.page-hero__content { text-align: center; max-width: 760px; animation: rise .8s var(--ease) both; }
.page-hero h1 { font-size: clamp(40px, 5.4vw, 68px); font-weight: 500; letter-spacing: -0.035em; }
.page-hero__content > p { margin-top: 14px; color: rgba(255, 255, 255, .82); font-size: 17px; }
.crumbs { display: inline-flex; gap: 10px; font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, .7); margin-bottom: 16px; }
.crumbs a:hover { color: #fff; }
.crumbs [aria-current] { color: #fff; }
.search--catalog { margin-top: 48px; }
.search--catalog .search__fields { padding-right: 0; }
.search__fields--4 { grid-template-columns: 1.3fr 1.1fr 1.1fr 1fr; }
.search .field:nth-child(3) { border-right: 1px solid var(--line); }
.search .field:last-of-type { border-right: 0; }
.search .field input { height: 28px; }
.search .field input::placeholder { color: var(--ink-mute); font-weight: 400; }
.search .field input::-webkit-search-cancel-button { cursor: pointer; }
.catalog { padding-top: clamp(150px, 12vw, 160px); min-height: 70vh; }
.catalog__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.catalog__tools { display: flex; align-items: center; gap: 10px; }
.view { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.view button { width: 36px; height: 34px; border-radius: 999px; display: grid; place-items: center; color: var(--ink-mute); transition: background-color .2s, color .2s; }
.view button:hover { color: var(--navy); }
.view button.is-active { background: var(--navy); color: #fff; }
.view .ico { width: 18px; height: 18px; }

.pager { display: flex; justify-content: center; gap: 8px; margin-top: 48px; }
.pager:empty { display: none; }
.pager button {
  min-width: 44px; height: 44px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  font-weight: 600; font-size: 15px; display: grid; place-items: center; transition: background-color .2s, color .2s, border-color .2s;
  font-variant-numeric: tabular-nums;
}
.pager button:hover:not(:disabled) { border-color: var(--navy); }
.pager button.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.pager button:disabled { opacity: .4; cursor: default; }
.pager .ico { width: 18px; height: 18px; }

/* List view */
.grid--list { grid-template-columns: 1fr; gap: 20px; }
.grid--list .card { flex-direction: row; }
.grid--list .card:hover { transform: translateY(-2px); }
.grid--list .card__media { width: 40%; flex: none; aspect-ratio: auto; min-height: 270px; }
.grid--list .card__body { padding: 26px 30px 0; }
.grid--list .card__title { font-size: 21px; }
.grid--list .card__desc { display: -webkit-box !important; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink-soft); font-size: 15px; margin-top: 6px; }
.grid--list .specs__extra { display: inline-flex !important; }
.grid--list .card__foot { padding: 18px 30px 24px; }
.grid--list .price { font-size: 24px; }


/* ---------- Admin access (footer) ---------- */
.admin-link {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .16); color: rgba(255, 255, 255, .7); font-weight: 500;
  transition: border-color .2s, color .2s, background-color .2s;
}
.admin-link:hover { color: #fff; border-color: rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .05); }
.admin-link .ico { width: 15px; height: 15px; }
.footer__bottom { align-items: center; }

/* ---------- Detail gallery ---------- */
.modal__media { position: relative; }
.modal__thumbs { position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; gap: 8px; }
.modal__thumbs:empty { display: none; }
.modal__thumbs button { width: 62px; height: 46px; border-radius: 10px; overflow: hidden; border: 2px solid rgba(255, 255, 255, .6); opacity: .8; transition: opacity .2s, border-color .2s; }
.modal__thumbs button:hover { opacity: 1; }
.modal__thumbs button[aria-current="true"] { border-color: #fff; opacity: 1; }
.modal__thumbs img { width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.modal__media img#mImg { transition: opacity .25s; }

/* ---------- Content from the admin panel ---------- */
img[data-cms-img] { transition: opacity .4s var(--ease); }
img.cms-pending { opacity: 0; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 230px; }
  .tile--xl { grid-column: span 2; grid-row: span 1; }
  .rural__grid, .about__grid, .contact__grid { grid-template-columns: 1fr; }
  .services { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .about__media { max-width: 560px; }
}

@media (max-width: 860px) {
  /* iOS Safari zooms into fields under 16px */
  .field input, .field select, .field textarea, .sort select { font-size: 16px; }
  .page-hero { min-height: auto; padding-top: 120px; }
  .search--catalog { margin: 36px 0 32px; }
  .catalog { padding-top: clamp(64px, 10vw, 100px); }
  .search .field:nth-child(3) { border-right: 0; }
  .search .field:last-of-type { border-bottom: 0; }
  .search__fields--4 { grid-template-columns: 1fr; }
  .grid--list .card { flex-direction: column; }
  .grid--list .card__media { width: 100%; min-height: 0; aspect-ratio: 16 / 10; }
  .header__links > a:not(.pill) { display: none; }
  .search { transform: none; margin: 40px 0 32px; }
  .hero { min-height: auto; padding-top: 120px; }
  .hero__content { margin-top: 40px; }
  #categorias { padding-top: clamp(80px, 10vw, 128px); }
  .search__fields { grid-template-columns: 1fr; padding: 4px 8px 12px; }
  .search .field { border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 14px; }
  .search__go { width: 100%; margin-top: 4px; }
  .menu__inner { grid-template-columns: 1fr; gap: 36px; }
  .menu__aside { border-left: 0; padding-left: 0; border-top: 1px solid rgba(255, 255, 255, .15); padding-top: 28px; }
  .menu__aside img { display: none; }
  .modal[open] { grid-template-columns: 1fr; overflow-y: auto; }
  .modal__media img { min-height: 0; aspect-ratio: 16 / 10; }
}

@media (max-width: 640px) {
  .grid, .services, .bento { grid-template-columns: 1fr; }
  .tile--xl, .tile--wide { grid-column: auto; }
  .bento { grid-auto-rows: 210px; }
  .checks, .form__row, .values, .stats { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats > div { padding: 22px 18px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .brand { height: 26px; }
  .pill--menu span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .field > span, .card__type, .badge, .tile__kicker, .eyebrow { font-size: 12px; }
  .pill--menu { padding: 0 11px; }
  .header__links .pill--solid { padding: 0 14px; }
  .search__tabs { overflow-x: auto; }
  .search__quick > span { width: 100%; }
  .section__head--row { align-items: stretch; }
  .toolbar { width: 100%; }
  .seg { width: 100%; overflow-x: auto; }
  .seg button { flex: 1; padding: 8px 10px; }
  .catalog__tools { width: 100%; }
  .sort { flex: 1; }
  .sort select { width: 100%; }
  .grid--list .card__body { padding: 20px 22px 0; }
  .grid--list .card__foot { padding: 16px 22px 20px; }
  .about__mark { right: 12px; bottom: -20px; width: 110px; padding: 18px 16px; }
  .modal__body { padding: 26px 22px; }
  .modal__specs { grid-template-columns: 1fr; }
  .wa { right: 16px; bottom: 16px; width: 52px; height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Campo trampa para bots en el formulario de contacto */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
