:root {
  color-scheme: light;
  --forest: #173627;
  --ink: #20372b;
  --muted: #526257;
  --paper: #f7f5ed;
  --white: #fffdf8;
  --line: #d8dbcc;
  --moss: #e6ebdc;
  --gold: #e8bf81;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 1rem/1.55 var(--sans); }
a { color: inherit; }
button, input, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid #997137; outline-offset: 4px; }
.shell { width: min(100% - 5rem, 78rem); margin-inline: auto; }
.skip-link { position: absolute; top: .4rem; left: .5rem; z-index: 3; padding: .65rem 1rem; background: var(--white); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.site-header { border-bottom: 1px solid #365042; background: var(--forest); color: var(--white); }
.header-row, .footer-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.header-row { min-height: 4.65rem; }
.wordmark { display: inline-grid; grid-auto-flow: column; align-items: center; gap: .75rem; text-decoration: none; white-space: nowrap; }
.wordmark span:first-child { font: 600 1.65rem/1.1 var(--serif); letter-spacing: -.055em; }
.wordmark span:last-child { padding-left: .72rem; border-left: 1px solid #8e9f8e; color: var(--gold); font-weight: 650; font-size: .84rem; letter-spacing: .13em; text-transform: uppercase; }
nav { display: flex; align-items: center; gap: clamp(1rem, 4vw, 2.6rem); }
nav a { text-decoration: none; font-weight: 600; font-size: .92rem; }
nav a:hover, footer a:hover { color: var(--gold); }
nav .header-contact { padding: .53rem 1.05rem; border: 1px solid #738a76; border-radius: .25rem; }
.hero { position: relative; isolation: isolate; display: flex; align-items: center; min-height: clamp(25rem, 43vw, 38rem); padding-block: clamp(3.7rem, 7vw, 6rem); color: var(--white); background: #263f30; }
.hero::before { position: absolute; inset: 0; z-index: -1; content: ""; background: linear-gradient(90deg, rgb(17 34 25 / .88) 1%, rgb(17 34 25 / .66) 42%, rgb(17 34 25 / .17) 76%), url("hero.webp") center 56% / cover no-repeat; }
.hero-inner { position: relative; }
.eyebrow { margin: 0; color: #536755; font-size: .85rem; font-weight: 750; letter-spacing: .145em; text-transform: uppercase; }
.hero .eyebrow { color: #f2d5a5; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 500; }
h1 { max-width: 48rem; font-size: clamp(3.1rem, 6.9vw, 6.65rem); line-height: .96; margin-top: 1.15rem; letter-spacing: -.058em; text-wrap: balance; }
.hero-copy { max-width: 34rem; margin: 1.55rem 0 1.95rem; color: #f4f0e4; font-size: clamp(1rem, 1.65vw, 1.22rem); }
.hero-action, .empty button { display: inline-block; padding: .8rem 1.25rem; border: 1px solid transparent; border-radius: .24rem; text-decoration: none; font-weight: 750; }
.hero-action { background: var(--gold); color: #263225; }
.hero-action:hover { background: #f4d4a8; }
.hero-credit { position: absolute; inset: auto 1rem .9rem auto; display: inline-block; padding: .1rem .35rem; border-radius: 2px; background: rgb(18 31 24 / .82); color: #fff9ed; font-size: .75rem; }
.catalog { padding-block: clamp(2.6rem, 5vw, 5.4rem) 4.75rem; scroll-margin-top: 1rem; }
.catalog-heading { margin-bottom: 1.7rem; }
h2 { margin-top: .28rem; font-size: clamp(2.45rem, 4.85vw, 4.4rem); letter-spacing: -.049em; line-height: 1.05; }
.categories { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .95rem; }
.categories button { color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 2rem; padding: .52rem .93rem; font-weight: 650; font-size: .89rem; min-height: 2.65rem; }
.categories button:hover { background: var(--moss); }
.categories button[aria-pressed="true"] { background: var(--forest); border-color: var(--forest); color: var(--white); }
.filter-panel { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem; padding: 1rem; border: 1px solid var(--line); border-radius: .4rem; background: var(--white); }
.search-field { grid-column: span 2; }
.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: .3rem; font-weight: 690; font-size: .875rem; }
.field input, .field select, .sort select { min-width: 0; min-height: 2.75rem; width: 100%; padding: .55rem .75rem; background-color: var(--white); border: 1px solid #adb6a7; color: var(--ink); border-radius: .25rem; font-weight: 490; font-size: 1rem; }
.field input::placeholder { color: #58675e; }
.field select, .sort select { appearance: none; padding-right: 2rem; background-image: linear-gradient(45deg, transparent 50%, #45604e 50%), linear-gradient(135deg, #45604e 50%, transparent 50%); background-position: right 1rem center, right .68rem center; background-size: .34rem .34rem; background-repeat: no-repeat; }
.results-bar { display: flex; gap: .65rem; justify-content: space-between; align-items: center; margin-block: 1.3rem .85rem; }
.results-bar p { margin: 0; }
.sort { display: flex; gap: .45rem; align-items: center; color: var(--muted); font-size: .865rem; }
.sort select { font-size: .875rem; width: auto; min-height: 2.35rem; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .92rem; }
.listing { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-top: 3px solid #738468; border-radius: .35rem; background: var(--white); }
.listing[data-section="hoteles"] { border-top-color: #ab8c61; }
.listing[data-section="casas"] { border-top-color: #8c9875; }
.listing[data-section="complejos"] { border-top-color: #a57667; }
.listing-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .3rem .65rem; min-height: 1.8rem; }
.operation { padding: .16rem .58rem; border-radius: 2rem; background: var(--moss); font-size: .84rem; font-weight: 700; }
.review { font-size: .79rem; color: #795128; }
.listing-location { font-size: .9rem; font-weight: 690; color: #526858; margin: .95rem 0 .25rem; }
.listing h3 { font-size: clamp(1.36rem, 2vw, 1.8rem); line-height: 1.12; letter-spacing: -.025em; overflow-wrap: anywhere; }
.listing h3 a { text-decoration: none; }
.listing h3 a:hover { text-decoration: underline; text-underline-offset: .17rem; }
.listing-category { margin: .42rem 0 .75rem; color: var(--muted); font-size: .9rem; }
.listing-detail { flex-grow: 1; }
.dining { display: inline-block; padding: .13rem .45rem; border-radius: .18rem; background: #f1ece0; color: #4f4a34; font-size: .84rem; font-weight: 650; }
.listing-foot { display: flex; justify-content: space-between; align-items: center; gap: .5rem; border-top: 1px solid var(--line); margin-top: .95rem; padding-top: .64rem; font-size: .84rem; color: var(--muted); }
.listing-link { min-height: 2.25rem; display: inline-flex; align-items: center; text-underline-offset: .22rem; font-size: .94rem; font-weight: 730; color: var(--forest); white-space: nowrap; }
.listing-link:hover { color: #775426; }
.empty { padding: 2rem 1rem; text-align: center; border: 1px solid var(--line); border-radius: .35rem; background: var(--white); }
.empty h3 { font-size: 1.75rem; }
.empty p { margin: .4rem 0 1rem; color: var(--muted); }
.more { display: flex; flex-direction: column; align-items: center; margin-top: 1.7rem; gap: .55rem; color: var(--muted); }
.empty button { color: var(--white); background: var(--forest); }
.empty button:hover { background: #315442; }
.pagination { flex-wrap: wrap; justify-content: center; gap: .38rem; }
.pagination button { min-width: 2.65rem; min-height: 2.65rem; padding: .35rem .65rem; border: 1px solid var(--line); border-radius: .24rem; background: var(--white); color: var(--forest); font-weight: 700; }
.pagination button:hover:not(:disabled), .pagination button[aria-current="page"] { background: var(--forest); color: var(--white); }
.pagination button:disabled { opacity: .58; cursor: default; }
#summary:focus { outline-offset: .2rem; }
footer { padding-block: 1.9rem; background: var(--forest); color: var(--white); }
footer p { margin: 0; color: #d6e0d4; font-size: .9rem; }
footer .footer-row > a:last-child { font-size: .9rem; text-underline-offset: .2rem; }
@media (max-width: 950px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) {
  .shell { width: calc(100% - 2rem); }
  .header-row { min-height: 3.85rem; }
  .wordmark { gap: .45rem; }
  .wordmark span:first-child { font-size: 1.43rem; }
  .wordmark span:last-child { padding-left: .42rem; font-size: .72rem; }
  nav { gap: .6rem; }
  nav a { font-size: .85rem; }
  nav .header-contact { padding: .45rem .55rem; }
  .hero::before { background-image: linear-gradient(90deg, rgb(17 34 25 / .91), rgb(17 34 25 / .65) 67%, rgb(17 34 25 / .31)), url("hero.webp"); background-position: 62% center; }
  .filter-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: .75rem; gap: .65rem; }
  .search-field { grid-column: 1 / -1; }
  .footer-row { flex-direction: column; align-items: flex-start; gap: .75rem; }
}
@media (max-width: 510px) {
  .cards { grid-template-columns: 1fr; }
  .categories { gap: .38rem; }
  .categories button { padding-inline: .62rem; }
  .sort span { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  .sort select { max-width: 9.2rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.property { max-width: 63rem; padding-block: clamp(2rem, 5vw, 4.25rem) clamp(3rem, 7vw, 6rem); }
.back-link { font-weight: 650; text-underline-offset: .23rem; }
.back-link:hover { color: #775426; }
.property-panel { overflow: hidden; margin-top: 1.35rem; border: 1px solid var(--line); border-radius: .42rem; background: var(--white); }
.property-header, .property-body { padding: clamp(1.35rem, 4vw, 3.2rem); }
.property-header { background: var(--moss); }
.property-header h1 { max-width: 100%; margin-top: .65rem; font-size: clamp(2.4rem, 5.5vw, 4.75rem); line-height: 1.03; overflow-wrap: anywhere; }
.property-reference { color: var(--muted); margin: .9rem 0 0; font-size: .94rem; }
.property-body h2 { margin: 0; font-size: clamp(1.8rem, 3.5vw, 2.65rem); }
.property-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.4rem; margin: 1rem 0 1.5rem; }
.property-facts > div { padding: .76rem 0; border-bottom: 1px solid var(--line); }
.property-facts dt { color: var(--muted); font-size: .875rem; }
.property-facts dd { margin: .1rem 0 0; font-weight: 675; }
.property-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .85rem 1.5rem; }
.detail-note { margin: 0 0 1.1rem; color: #795128; }
@media (max-width: 480px) { .property-facts { grid-template-columns: 1fr; } }

.listing-content { display: flex; flex: 1; flex-direction: column; padding: 1.12rem 1.18rem .95rem; }
.listing-photo { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--moss); color: var(--muted); }
.listing-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.listing-photo-simulated img, .listing-photo-original img { object-fit: contain; }
.listing-photo:focus-visible { outline-offset: -4px; }
.listing-photo-empty { display: grid; place-items: center; margin: 0; font-size: .9rem; }
.off-market-cover { display: grid; place-items: center; background: var(--forest); color: var(--gold); font: 700 clamp(1.3rem, 3vw, 2.15rem)/1.2 var(--sans); letter-spacing: .13em; text-decoration: none; }
.property-off-market { min-height: clamp(8.5rem, 21vw, 15rem); }
.property-gallery { background: #e4e9dc; }
.gallery-frame { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 9; max-height: 34rem; overflow: hidden; }
.gallery-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.gallery-unavailable, .property-no-photos { color: var(--muted); margin: 0; }
.property-no-photos { padding: 1rem clamp(1.35rem, 4vw, 3.2rem); border-bottom: 1px solid var(--line); background: #f2f4eb; }
.gallery-controls { display: flex; justify-content: center; align-items: center; gap: .8rem; padding: .68rem 1rem; border-top: 1px solid #d1d8cb; color: var(--forest); }
.gallery-controls button { padding: .48rem .75rem; min-height: 2.75rem; border: 1px solid #a5b3a4; border-radius: .25rem; background: var(--white); color: var(--forest); font-size: .9rem; font-weight: 700; }
.gallery-controls button:hover { background: #f5f0df; }
.photo-count { min-width: 4.6rem; text-align: center; font-size: .9rem; font-variant-numeric: tabular-nums; }

.listing-price { margin: .55rem 0 0; color: var(--forest); font-size: 1.18rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.property-price { margin: 1rem 0 0; color: var(--forest); font-size: clamp(1.55rem, 3vw, 2.35rem); line-height: 1.2; font-weight: 750; font-variant-numeric: tabular-nums; }
.property-price-note { color: var(--muted); margin: .38rem 0 0; font-size: .94rem; }
.property-description { max-width: 46rem; margin: 1.75rem 0 1.8rem; }
.property-description p { margin: .72rem 0 0; overflow-wrap: anywhere; }

.budget { grid-column: span 2; min-width: 0; margin: 0; padding: 0; border: 0; }
.budget legend { padding: 0; margin-bottom: .3rem; font-size: .9rem; font-weight: 760; }
.price-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
#budget-hint, #budget-error { margin: .37rem 0 0; font-size: .84rem; color: var(--muted); }
#budget-error { color: #822c27; }
.budget input[aria-invalid="true"] { border-color: #822c27; }
.filter-actions { grid-column: span 2; align-self: center; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: .5rem 1rem; }
.photos-filter { display: inline-flex; gap: .42rem; align-items: center; font-weight: 650; font-size: .91rem; min-height: 2.65rem; }
.photos-filter input { width: 1.05rem; height: 1.05rem; margin: 0; accent-color: var(--forest); }
#clear-filters { background: transparent; border: 1px solid var(--line); border-radius: .25rem; color: var(--forest); padding: .48rem .7rem; font-size: .9rem; font-weight: 680; }
#clear-filters:hover { background: var(--moss); }
@media (max-width: 680px) { .budget, .filter-actions { grid-column: 1 / -1; } .filter-actions { justify-content: space-between; } }

.rural-wp-form { margin-block: 2rem; padding: clamp(1rem, 3vw, 2rem); border: 1px solid var(--line); border-radius: .4rem; background: var(--white); }
.rural-wp-form h2 { margin-bottom: 1rem; font-size: clamp(1.65rem, 4vw, 2.4rem); }
