@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Manrope:wght@400;500;600;700&display=swap');

:root {
  --navy: #243b6b;
  --navy-deep: #17294c;
  --navy-soft: #365181;
  --gold: #d9a33d;
  --gold-light: #e9c36d;
  --ivory: #f7f5ef;
  --paper: #fffdf9;
  --white: #ffffff;
  --ink: #222936;
  --muted: #68717f;
  --line: #e5e1d8;
  --success: #2f6f55;
  --shadow-sm: 0 12px 30px rgba(24, 42, 77, 0.08);
  --shadow-lg: 0 30px 80px rgba(24, 42, 77, 0.18);
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 28px;
  --container: min(1180px, calc(100% - 40px));
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Manrope', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--ivory);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.menu-open, body.filters-open { overflow: hidden; }
img { display: block; width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.container { width: var(--container); margin-inline: auto; }
.page-main { min-height: 65vh; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 999; background: var(--gold); color: var(--navy-deep); padding: 10px 16px; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); line-height: 1.08; color: var(--navy-deep); }
h1 { font-size: clamp(3rem, 7vw, 6rem); letter-spacing: -0.04em; }
h2 { font-size: clamp(2.45rem, 4.8vw, 4.35rem); letter-spacing: -0.025em; }
h3 { font-size: clamp(1.55rem, 2.2vw, 2.05rem); }
p { margin-top: 0; }
.eyebrow { margin-bottom: 14px; color: var(--gold); font-weight: 700; font-size: 0.76rem; letter-spacing: 0.16em; text-transform: uppercase; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 42px; }
.section-heading__copy { max-width: 720px; }
.section-heading__copy p:last-child { max-width: 610px; color: var(--muted); margin: 16px 0 0; }
.section { padding: 108px 0; }
.section--white { background: var(--paper); }
.section--navy { background: var(--navy-deep); color: white; }
.section--navy h2, .section--navy h3 { color: white; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 700;
  transition: transform .25s ease, background .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.button:hover { transform: translateY(-2px); }
.button--gold { background: var(--gold); color: var(--navy-deep); box-shadow: 0 10px 24px rgba(217, 163, 61, .2); }
.button--gold:hover { background: var(--gold-light); }
.button--navy { background: var(--navy); color: white; }
.button--outline { border-color: rgba(255,255,255,.55); color: white; background: rgba(255,255,255,.04); }
.button--outline-dark { border-color: var(--navy); color: var(--navy); background: transparent; }
.button--full { width: 100%; }
.text-link { color: var(--navy); font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
.text-link span { transition: transform .2s ease; }
.text-link:hover span { transform: translateX(4px); }

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  transition: background .3s ease, box-shadow .3s ease, transform .3s ease;
}
.site-header.is-scrolled, .site-header--solid { background: rgba(24, 42, 77, .96); box-shadow: 0 8px 30px rgba(0,0,0,.12); backdrop-filter: blur(16px); }
.site-header__inner { width: var(--container); margin-inline: auto; min-height: 92px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 11px; margin-right: auto; color: white; }
.brand img { width: 72px; height: 66px; object-fit: cover; border-radius: 3px; }
.brand__name { display: grid; font-family: var(--font-display); font-size: 1.34rem; font-weight: 700; line-height: .9; letter-spacing: .015em; }
.brand__name small { margin-top: 7px; font-family: var(--font-body); font-size: .58rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-light); }
.desktop-nav { display: flex; gap: 26px; align-items: center; color: white; font-size: .92rem; font-weight: 600; }
.desktop-nav a { position: relative; padding: 10px 0; }
.desktop-nav a::after { content: ''; position: absolute; left: 0; bottom: 4px; width: 100%; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.desktop-nav a:hover::after, .desktop-nav a[aria-current="page"]::after { transform: scaleX(1); }
.language-switch { display: flex; align-items: center; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; padding: 3px; }
.language-switch button { border: 0; background: transparent; color: rgba(255,255,255,.68); padding: 6px 9px; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.language-switch button.is-active { background: white; color: var(--navy-deep); }
.header-whatsapp { min-height: 44px; padding: 8px 16px; }
.menu-toggle { display: none; background: transparent; color: white; border: 0; padding: 8px; }
.menu-toggle span { display: block; width: 25px; height: 2px; background: currentColor; margin: 5px 0; }
.mobile-nav { display: none; }

/* Hero */
.hero { position: relative; min-height: 850px; display: flex; align-items: end; color: white; background: var(--navy-deep); overflow: visible; }
.hero__mosaic { position: absolute; inset: 0; display: grid; grid-template-columns: 1.7fr 1fr; grid-template-rows: 1fr 1fr; gap: 5px; }
.hero__image { min-width: 0; overflow: hidden; background: var(--navy); }
.hero__image:first-child { grid-row: 1 / 3; }
.hero__image img { height: 100%; object-fit: cover; }
.hero__overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(13,29,57,.88) 0%, rgba(13,29,57,.65) 43%, rgba(13,29,57,.22) 76%, rgba(13,29,57,.38) 100%), linear-gradient(0deg, rgba(13,29,57,.72), transparent 58%); }
.hero__content { position: relative; z-index: 2; width: var(--container); margin-inline: auto; padding: 180px 0 154px; }
.hero__copy { max-width: 780px; }
.hero h1 { color: white; max-width: 780px; }
.hero__text { max-width: 650px; margin: 24px 0 32px; color: rgba(255,255,255,.84); font-size: 1.08rem; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-search-wrap { position: absolute; left: 50%; bottom: -52px; z-index: 5; width: var(--container); transform: translateX(-50%); }
.hero-search { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 8px; padding: 16px; border-radius: var(--radius); background: white; box-shadow: var(--shadow-lg); color: var(--ink); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field span, label { font-size: .76rem; font-weight: 700; color: var(--muted); }
.field select, .field input, .field textarea, .contact-card input, .contact-card textarea, .contact-form input, .contact-form textarea, .contact-form select, .filter-form select, .filter-form input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 7px;
  min-height: 46px;
  padding: 10px 12px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
textarea { resize: vertical; }
.field select:focus, .field input:focus, .contact-card input:focus, .contact-card textarea:focus, .contact-form input:focus, .contact-form textarea:focus, .filter-form select:focus, .filter-form input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217,163,61,.13); }
.hero-search .button { align-self: end; min-height: 46px; }

/* Niches */
.niches-section { padding-top: 150px; }
.niche-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.niche-card { position: relative; min-height: 480px; border-radius: var(--radius); overflow: hidden; isolation: isolate; box-shadow: var(--shadow-sm); }
.niche-card img { position: absolute; inset: 0; height: 100%; object-fit: cover; z-index: -2; transition: transform .7s ease; }
.niche-card::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(15,31,59,.9), rgba(15,31,59,.12) 75%); }
.niche-card:hover img { transform: scale(1.045); }
.niche-card__content { position: absolute; inset: auto 28px 28px; color: white; }
.niche-card h3 { color: white; font-size: 2.25rem; }
.niche-card p { color: rgba(255,255,255,.78); margin: 12px 0 18px; }
.niche-card .text-link { color: var(--gold-light); }

/* Cards */
.property-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.property-grid--featured { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.property-card { background: var(--paper); border: 1px solid rgba(33,47,73,.08); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .3s ease, box-shadow .3s ease; }
.property-card:hover { transform: translateY(-7px); box-shadow: 0 24px 55px rgba(24,42,77,.14); }
.property-card__image-wrap { display: block; position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #d9d9d9; }
.property-card__image { height: 100%; object-fit: cover; transition: transform .65s ease; }
.property-card:hover .property-card__image { transform: scale(1.045); }
.property-card__badge, .property-card__category { position: absolute; top: 16px; padding: 7px 10px; border-radius: 999px; font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.property-card__badge { left: 16px; background: var(--gold); color: var(--navy-deep); }
.property-card__category { right: 16px; background: rgba(23,41,76,.88); color: white; backdrop-filter: blur(6px); }
.property-card__body { padding: 23px; }
.property-card__location { margin: 0 0 6px; color: var(--muted); font-size: .8rem; font-weight: 600; }
.property-card h3 { font-size: 1.75rem; margin-bottom: 10px; }
.property-card__price { color: var(--navy); font-size: 1.22rem; font-weight: 800; margin-bottom: 12px; }
.property-card__specs { display: flex; flex-wrap: wrap; gap: 7px 15px; list-style: none; padding: 13px 0; margin: 0 0 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: .78rem; font-weight: 700; }
.property-card__specs li { position: relative; }
.property-card__specs li:not(:last-child)::after { content: '·'; position: absolute; right: -10px; }
.property-card__excerpt { color: var(--muted); font-size: .88rem; min-height: 58px; }
.featured-footer { margin-top: 42px; text-align: center; }

/* About teaser */
.about-teaser { display: grid; grid-template-columns: .88fr 1.12fr; gap: 72px; align-items: center; }
.about-teaser__visual { min-height: 520px; border-radius: var(--radius-lg); background: linear-gradient(140deg, var(--navy-deep), var(--navy-soft)); display: grid; place-items: center; overflow: hidden; position: relative; }
.about-teaser__visual::before, .about-teaser__visual::after { content: ''; position: absolute; border: 1px solid rgba(217,163,61,.55); transform: rotate(45deg); }
.about-teaser__visual::before { width: 310px; height: 310px; right: -60px; top: -70px; }
.about-teaser__visual::after { width: 180px; height: 180px; left: -35px; bottom: -35px; }
.about-teaser__visual img { width: 250px; height: 250px; object-fit: cover; position: relative; z-index: 1; border-radius: 6px; box-shadow: 0 20px 45px rgba(0,0,0,.22); }
.about-teaser__content p:not(.eyebrow) { max-width: 610px; color: var(--muted); margin: 20px 0 28px; }
.about-teaser__actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* CTA */
.cta-block { display: flex; justify-content: space-between; gap: 50px; align-items: center; padding: 72px; border: 1px solid rgba(255,255,255,.13); border-radius: var(--radius-lg); background: linear-gradient(125deg, rgba(255,255,255,.07), rgba(255,255,255,.015)); }
.cta-block__copy { max-width: 760px; }
.cta-block p:not(.eyebrow) { color: rgba(255,255,255,.72); margin: 18px 0 0; }
.cta-block__actions { flex: 0 0 auto; display: flex; gap: 12px; flex-wrap: wrap; }

/* Footer */
.site-footer { background: #101e39; color: rgba(255,255,255,.72); padding: 78px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr .7fr .7fr 1fr; gap: 50px; }
.footer-brand img { width: 125px; height: auto; object-fit: contain; margin-bottom: 18px; }
.footer-brand p { max-width: 320px; }
.site-footer h3 { color: white; font-family: var(--font-body); font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 18px; }
.footer-links { display: grid; gap: 10px; }
.footer-links a:hover { color: var(--gold-light); }
.footer-bottom { margin-top: 54px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.1); display: flex; justify-content: space-between; gap: 20px; font-size: .78rem; }

/* Page hero */
.page-hero { padding: 190px 0 82px; background: radial-gradient(circle at 80% 20%, rgba(217,163,61,.18), transparent 26%), linear-gradient(145deg, var(--navy-deep), var(--navy)); color: white; }
.page-hero h1 { color: white; max-width: 930px; }
.page-hero__text { color: rgba(255,255,255,.75); max-width: 720px; margin: 22px 0 0; font-size: 1.04rem; }

/* Listings */
.listings-layout { display: grid; grid-template-columns: 270px 1fr; gap: 38px; align-items: start; }
.filters-toolbar { display: none; }
.filter-panel { position: sticky; top: 120px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.filter-panel__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.filter-panel h2 { font-family: var(--font-body); font-size: 1rem; }
.clear-button { border: 0; background: transparent; color: var(--navy); font-weight: 700; font-size: .78rem; padding: 4px; }
.filter-form { display: grid; gap: 15px; }
.filter-form label { display: grid; gap: 6px; }
.listings-main__top { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.result-count { margin: 0; font-weight: 700; color: var(--muted); }
.sort-field { display: flex; align-items: center; gap: 10px; }
.sort-field select { min-height: 42px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); padding: 8px 10px; }
.empty-state { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); text-align: center; padding: 70px 30px; }
.empty-state h2 { font-size: 2.2rem; }
.empty-state p { color: var(--muted); }

/* Detail */
.detail-page { background: var(--paper); }
.detail-gallery { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: repeat(2, 300px); gap: 5px; padding-top: 92px; background: var(--navy-deep); }
.detail-gallery button { border: 0; padding: 0; overflow: hidden; background: #ddd; }
.detail-gallery__main { grid-row: 1 / 3; }
.detail-gallery img { height: 100%; object-fit: cover; transition: transform .5s ease; }
.detail-gallery button:hover img { transform: scale(1.025); }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 70px; padding-top: 60px; padding-bottom: 110px; align-items: start; }
.breadcrumb { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: .78rem; margin-bottom: 26px; }
.breadcrumb a { color: var(--navy); font-weight: 700; }
.detail-heading { display: flex; justify-content: space-between; gap: 30px; align-items: start; }
.detail-labels { display: flex; gap: 7px; margin-bottom: 14px; }
.detail-labels span { padding: 6px 9px; border-radius: 999px; background: #f0e5c9; color: #785712; font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.detail-heading h1 { font-size: clamp(2.8rem, 5.4vw, 5.2rem); }
.detail-location { color: var(--muted); margin: 12px 0 0; }
.detail-price { margin: 12px 0 0; white-space: nowrap; color: var(--navy); font-size: 1.45rem; font-weight: 800; }
.detail-specs { display: flex; gap: 10px; flex-wrap: wrap; list-style: none; padding: 22px 0; margin: 28px 0 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.detail-specs li { padding: 8px 12px; border-radius: 999px; background: var(--ivory); font-size: .8rem; font-weight: 700; color: var(--muted); }
.dummy-notice { display: inline-block; margin: 18px 0 0; padding: 7px 10px; border-radius: 6px; background: #fff3d6; color: #7b5a16; font-size: .72rem; font-weight: 700; }
.detail-section { padding-top: 50px; }
.detail-description { color: var(--muted); max-width: 760px; font-size: 1.03rem; }
.features-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.features-grid li { display: flex; align-items: center; gap: 10px; padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--ivory); font-size: .88rem; }
.features-grid span { color: var(--gold); font-weight: 900; }
.map-placeholder { overflow: hidden; height: 390px; border-radius: var(--radius); border: 1px solid var(--line); }
.map-placeholder iframe { width: 100%; height: 100%; border: 0; }
.contact-card { position: sticky; top: 120px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--ivory); box-shadow: var(--shadow-sm); }
.contact-card h2 { font-size: 2rem; margin-bottom: 22px; }
.contact-card form { display: grid; gap: 14px; }
.contact-card label { display: grid; gap: 6px; }
.contact-card__links { display: grid; gap: 10px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .76rem; font-weight: 700; color: var(--navy); overflow-wrap: anywhere; }
.property-grid--related { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mobile-contact-bar { display: none; }
.gallery-modal { width: min(1100px, 92vw); max-height: 90vh; border: 0; padding: 0; background: transparent; overflow: visible; }
.gallery-modal::backdrop { background: rgba(6,14,28,.88); }
.gallery-modal img { max-height: 86vh; width: 100%; object-fit: contain; }
.gallery-modal__close { position: absolute; right: -8px; top: -42px; width: 38px; height: 38px; border: 0; border-radius: 999px; color: white; background: rgba(255,255,255,.15); font-size: 1.6rem; }

/* About page */
.about-intro { display: grid; grid-template-columns: 1.1fr .9fr; gap: 70px; align-items: stretch; }
.about-intro__copy { padding: 30px 0; }
.about-intro__copy p:not(.eyebrow) { color: var(--muted); max-width: 690px; font-size: 1.02rem; }
.about-intro__graphic { min-height: 480px; border-radius: var(--radius-lg); background: linear-gradient(145deg, var(--navy-deep), var(--navy)); position: relative; display: grid; place-items: center; overflow: hidden; }
.about-intro__graphic img { width: 260px; height: 260px; object-fit: cover; box-shadow: 0 20px 50px rgba(0,0,0,.2); }
.about-intro__graphic::after { content: 'PANAMÁ'; position: absolute; bottom: 24px; right: 28px; color: rgba(255,255,255,.14); font-size: 4rem; font-weight: 800; letter-spacing: .16em; }
.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 42px; }
.value-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.value-card__number { color: var(--gold); font-family: var(--font-display); font-size: 2.7rem; line-height: 1; }
.value-card h3 { margin: 16px 0 10px; }
.value-card p { color: var(--muted); margin-bottom: 0; }
.specialties { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.specialties__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.specialties__list li { padding: 22px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; color: white; font-size: 1.03rem; font-weight: 700; }
.specialties__copy p:not(.eyebrow) { color: rgba(255,255,255,.7); }
.license-block { margin-top: 28px; color: var(--gold-light); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

/* Contact page */
.contact-layout { display: grid; grid-template-columns: .86fr 1.14fr; gap: 70px; align-items: start; }
.contact-details { display: grid; gap: 16px; margin-top: 34px; }
.contact-detail { padding: 22px; border: 1px solid var(--line); background: var(--paper); border-radius: 12px; }
.contact-detail span { display: block; color: var(--muted); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.contact-detail a { display: inline-block; color: var(--navy); font-size: 1.08rem; font-weight: 800; margin-top: 5px; }
.contact-form-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 42px; box-shadow: var(--shadow-sm); }
.contact-form-card h2 { font-size: 2.5rem; margin-bottom: 24px; }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form label { display: grid; gap: 6px; }
.contact-form label:last-of-type { grid-column: 1 / -1; }
.contact-form .button, .contact-form-note { grid-column: 1 / -1; }
.contact-form-note { color: var(--muted); font-size: .72rem; margin: 0; }
.contact-license { margin-top: 24px; color: var(--muted); font-size: .85rem; }

/* Privacy / 404 */
.content-narrow { width: min(780px, calc(100% - 40px)); margin-inline: auto; }
.prose { padding: 90px 0; }
.prose h1 { font-size: clamp(2.8rem, 5vw, 4.8rem); margin-bottom: 28px; }
.prose p { color: var(--muted); }
.error-page { min-height: 80vh; display: grid; place-items: center; text-align: center; padding: 150px 20px 80px; background: radial-gradient(circle at top, rgba(217,163,61,.18), transparent 36%), var(--navy-deep); color: white; }
.error-page h1 { color: white; font-size: clamp(6rem, 18vw, 13rem); }
.error-page h2 { color: white; }
.error-page p { color: rgba(255,255,255,.7); max-width: 580px; margin: 18px auto 30px; }

/* Floating WhatsApp */
.whatsapp-float { position: fixed; right: 22px; bottom: 22px; z-index: 80; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 999px; background: #25d366; color: #092b16; font-weight: 900; box-shadow: 0 16px 35px rgba(0,0,0,.22); transition: transform .25s ease; }
.whatsapp-float:hover { transform: translateY(-4px) scale(1.03); }
.whatsapp-float svg { width: 29px; height: 29px; }

/* Reveal */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1050px) {
  .desktop-nav { display: none; }
  .header-whatsapp { display: none; }
  .menu-toggle { display: block; }
  .mobile-nav { display: block; position: fixed; inset: 92px 0 auto; max-height: 0; overflow: hidden; opacity: 0; background: var(--navy-deep); color: white; transition: max-height .35s ease, opacity .25s ease; }
  .mobile-nav.is-open { max-height: calc(100vh - 92px); opacity: 1; overflow-y: auto; border-top: 1px solid rgba(255,255,255,.1); }
  .mobile-nav__inner { width: var(--container); margin-inline: auto; padding: 24px 0 35px; display: grid; gap: 4px; }
  .mobile-nav a { padding: 12px 0; font-size: 1.1rem; border-bottom: 1px solid rgba(255,255,255,.08); }
  .mobile-nav .button { margin-top: 14px; }
  .hero-search { grid-template-columns: repeat(2, 1fr); }
  .hero-search .button { grid-column: 1 / -1; }
  .niche-grid { grid-template-columns: 1fr 1fr; }
  .niche-card:last-child { grid-column: 1 / -1; min-height: 380px; }
  .property-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; }
  .footer-grid > div:last-child { grid-column: 2 / 4; }
  .detail-layout { grid-template-columns: 1fr 330px; gap: 35px; }
  .about-intro, .about-teaser, .contact-layout { gap: 42px; }
}

@media (max-width: 820px) {
  :root { --container: min(100% - 28px, 680px); }
  .section { padding: 78px 0; }
  .site-header__inner { min-height: 78px; }
  .brand img { width: 58px; height: 54px; }
  .brand__name { font-size: 1.08rem; }
  .mobile-nav { inset: 78px 0 auto; }
  .hero { min-height: 760px; }
  .hero__mosaic { grid-template-columns: 1fr 1fr; grid-template-rows: 1.5fr .7fr; }
  .hero__image:first-child { grid-row: auto; grid-column: 1 / -1; }
  .hero__content { padding: 145px 0 180px; }
  .hero__overlay { background: linear-gradient(0deg, rgba(13,29,57,.89), rgba(13,29,57,.25) 80%); }
  .hero-search-wrap { bottom: -165px; }
  .hero-search { grid-template-columns: 1fr 1fr; }
  .niches-section { padding-top: 235px; }
  .niche-grid { grid-template-columns: 1fr; }
  .niche-card, .niche-card:last-child { grid-column: auto; min-height: 390px; }
  .section-heading { align-items: start; flex-direction: column; }
  .property-grid, .property-grid--featured { grid-template-columns: 1fr; }
  .about-teaser, .about-intro, .contact-layout, .specialties { grid-template-columns: 1fr; }
  .about-teaser__visual { min-height: 390px; }
  .cta-block { padding: 44px 28px; flex-direction: column; align-items: start; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-grid > div:last-child { grid-column: auto; }
  .footer-bottom { flex-direction: column; }
  .page-hero { padding: 145px 0 68px; }
  .filters-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
  .filter-toggle { border: 1px solid var(--navy); background: transparent; color: var(--navy); border-radius: 7px; padding: 10px 14px; font-weight: 800; }
  .listings-layout { display: block; }
  .filter-panel { position: fixed; z-index: 150; top: 0; right: 0; width: min(390px, 92vw); height: 100vh; border-radius: 0; transform: translateX(105%); transition: transform .3s ease; overflow-y: auto; padding: 28px; }
  .filter-panel.is-open { transform: translateX(0); }
  .listings-main__top { align-items: flex-start; }
  .sort-field { flex-direction: column; align-items: flex-start; gap: 4px; }
  .detail-gallery { padding-top: 78px; grid-template-columns: 1fr 1fr; grid-template-rows: 460px 180px; }
  .detail-gallery__main { grid-row: auto; grid-column: 1 / -1; }
  .detail-layout { display: block; padding-bottom: 125px; }
  .contact-card { position: static; margin-top: 50px; }
  .detail-heading { display: block; }
  .detail-price { margin-top: 20px; }
  .features-grid { grid-template-columns: 1fr; }
  .property-grid--related { grid-template-columns: 1fr; }
  .mobile-contact-bar { position: fixed; z-index: 95; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1fr 1fr; background: white; border-top: 1px solid var(--line); box-shadow: 0 -8px 28px rgba(0,0,0,.1); }
  .mobile-contact-bar a { text-align: center; padding: 15px; font-weight: 800; color: var(--navy); }
  .mobile-contact-bar a:last-child { background: #25d366; color: #082c16; }
  .detail-page .whatsapp-float { display: none; }
  .values-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  h1 { font-size: clamp(2.75rem, 14vw, 4.2rem); }
  h2 { font-size: clamp(2.2rem, 11vw, 3.4rem); }
  .hero { min-height: 720px; }
  .hero__content { padding-bottom: 245px; }
  .hero__actions { display: grid; }
  .hero__actions .button { width: 100%; }
  .hero-search-wrap { bottom: -244px; }
  .hero-search { grid-template-columns: 1fr; padding: 14px; }
  .niches-section { padding-top: 315px; }
  .niche-card { min-height: 350px; }
  .property-card h3 { font-size: 1.6rem; }
  .about-teaser__visual { min-height: 310px; }
  .about-teaser__visual img { width: 190px; height: 190px; }
  .cta-block__actions, .about-teaser__actions { display: grid; width: 100%; }
  .cta-block__actions .button, .about-teaser__actions .button { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid > div:last-child, .footer-brand { grid-column: auto; }
  .listings-main__top { flex-direction: column; }
  .detail-gallery { grid-template-rows: 360px 130px; }
  .detail-layout { padding-top: 38px; }
  .contact-card { padding: 22px; }
  .contact-form-card { padding: 26px 20px; }
  .contact-form { grid-template-columns: 1fr; }
  .contact-form label:last-of-type, .contact-form .button, .contact-form-note { grid-column: auto; }
  .about-intro__graphic { min-height: 350px; }
  .about-intro__graphic img { width: 205px; height: 205px; }
  .about-intro__graphic::after { font-size: 2rem; }
  .whatsapp-float { width: 52px; height: 52px; right: 14px; bottom: 14px; }
}

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


/* Real property catalog additions */
.property-card__meta { display: flex; justify-content: space-between; gap: 12px; align-items: start; margin-bottom: 6px; color: var(--muted); font-size: .72rem; font-weight: 700; }
.property-card__meta .property-card__location { margin: 0; }
.property-card__meta span { flex: 0 0 auto; }
.property-card h3 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; min-height: 2.15em; }
.property-card__excerpt { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; min-height: 4.5em; }
.property-card__photo-note { position: absolute; left: 16px; bottom: 16px; padding: 7px 10px; border-radius: 999px; background: rgba(255,255,255,.9); color: var(--navy-deep); font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; backdrop-filter: blur(6px); }

.detail-gallery { position: relative; }
.gallery-count-button { position: absolute; z-index: 3; right: 18px; bottom: 18px; padding: 10px 14px !important; border-radius: 999px !important; background: rgba(255,255,255,.94) !important; color: var(--navy-deep); font-size: .76rem; font-weight: 800; box-shadow: var(--shadow-sm); }
.photo-pending-notice { display: inline-block; margin: 18px 0 0; padding: 8px 11px; border-radius: 7px; background: #f1f3f6; color: var(--muted); font-size: .76rem; font-weight: 700; }
.contact-card__reference { margin: -14px 0 20px; color: var(--muted); font-size: .76rem; font-weight: 800; }

.gallery-modal { position: relative; }
.gallery-modal figure { margin: 0; display: grid; justify-items: center; gap: 10px; }
.gallery-modal figcaption { color: white; font-size: .82rem; font-weight: 700; }
.gallery-modal__nav { position: absolute; z-index: 2; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border: 0; border-radius: 999px; background: rgba(255,255,255,.16); color: white; font-size: 2.2rem; line-height: 1; cursor: pointer; }
.gallery-modal__nav--prev { left: -62px; }
.gallery-modal__nav--next { right: -62px; }

@media (max-width: 1220px) {
  .gallery-modal__nav--prev { left: 8px; }
  .gallery-modal__nav--next { right: 8px; }
}
@media (max-width: 640px) {
  .property-card__meta { font-size: .68rem; }
  .gallery-count-button { right: 10px; bottom: 10px; }
  .gallery-modal__nav { width: 42px; height: 42px; }
}


/* Professional affiliations */
.photo-pending-notice { display: none; }
.footer-partners { margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.14); }
.footer-partners > span { display: block; margin-bottom: 11px; color: rgba(255,255,255,.58); font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.footer-partners__logos { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-partners__logos img { width: auto; max-width: 142px; max-height: 50px; padding: 6px 9px; border-radius: 7px; background: white; object-fit: contain; opacity: .96; }
.affiliations-section { background: white; }
.affiliations-card { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); align-items: center; gap: 48px; padding: 42px; border: 1px solid var(--stone); border-radius: 18px; background: var(--ivory); }
.affiliations-card__copy h2 { margin-bottom: 14px; }
.affiliations-card__copy p:last-child { color: var(--text-muted); }
.affiliations-card__logos { display: flex; align-items: center; justify-content: center; gap: 28px; flex-wrap: wrap; }
.affiliations-card__logos img { width: auto; max-width: 220px; max-height: 82px; object-fit: contain; }
@media (max-width: 820px) {
  .affiliations-card { grid-template-columns: 1fr; padding: 28px 22px; }
  .affiliations-card__logos { justify-content: flex-start; }
  .affiliations-card__logos img { max-width: 170px; max-height: 64px; }
}

/* Teléfono visible en el encabezado */
.header-phone {
  margin-left: 18px;
  margin-right: auto;
  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.header-phone:hover,
.header-phone:focus-visible {
  color: #dda638;
}

@media (max-width: 1050px) {
  .header-phone {
    display: none;
  }
}

/* ===== Pulido final 2026 ===== */
.hero__image--building img { object-position: center 42%; }
.hero__image--beach img { object-position: center 52%; }
.hero__image--casco img { object-position: center 52%; }
.niche-card img { width: 100%; }

.about-intro__graphic img,
.about-teaser__visual img {
  object-fit: contain;
  background: transparent;
  box-shadow: none;
}
.about-intro__graphic::after { content: none; }

.field--price-range,
.price-filter-group {
  display: grid;
  gap: 7px;
}
.field--price-range > span,
.price-filter-group > span {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
}
.price-number-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.price-number-inputs input {
  min-width: 0;
}
.price-range-slider {
  width: 100%;
  height: 24px;
  padding: 0;
  border: 0;
  box-shadow: none;
  accent-color: var(--navy);
  background: transparent;
}
.price-range-slider:focus {
  box-shadow: none;
}
.price-range-scale {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: .66rem;
  font-weight: 700;
}
.hero-search {
  grid-template-columns: .85fr .85fr .75fr minmax(290px, 1.55fr) auto;
}

@media (min-width: 900px) {
  .filter-panel {
    top: 98px;
    max-height: calc(100vh - 118px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }
  .filter-panel::-webkit-scrollbar { width: 7px; }
  .filter-panel::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(24,42,77,.22);
  }
  .filter-form {
    gap: 11px;
  }
  .filter-form label {
    gap: 4px;
  }
}

@media (max-width: 1180px) {
  .hero-search {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .field--price-range {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .price-number-inputs {
    grid-template-columns: 1fr;
  }
}

/* Prefijo de dólar en filtros de precio */
.price-input {
  position: relative;
  width: 100%;
}

.price-input__symbol {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  color: #6b7280;
  font-weight: 700;
  pointer-events: none;
}

.price-input input {
  width: 100%;
  padding-left: 29px;
  font-size: 0.76rem;
}

/* ===== Búsqueda geográfica y por descripción ===== */
.hero-search {
  grid-template-columns: .8fr .8fr .8fr minmax(300px, 1.45fr) auto;
  grid-template-areas:
    "zone type operation price button"
    "location location location price button";
  align-items: stretch;
}

.hero-search .field--zone { grid-area: zone; }
.hero-search .field--type { grid-area: type; }
.hero-search .field--operation { grid-area: operation; }
.hero-search .field--location-search { grid-area: location; }
.hero-search .field--price-range { grid-area: price; }
.hero-search > .button {
  grid-area: button;
  align-self: stretch;
}

.field--location-search input,
.location-search-field input {
  width: 100%;
}

.location-search-field input[type="search"]::-webkit-search-cancel-button,
.field--location-search input[type="search"]::-webkit-search-cancel-button {
  cursor: pointer;
}

@media (max-width: 1180px) {
  .hero-search {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "zone type"
      "operation location"
      "price price"
      "button button";
  }

  .hero-search > .button {
    min-height: 46px;
  }
}

@media (max-width: 640px) {
  .hero-search {
    grid-template-columns: 1fr;
    grid-template-areas:
      "zone"
      "type"
      "operation"
      "location"
      "price"
      "button";
  }
}

/* Ajuste final del buscador principal */
.hero-search {
  grid-template-columns: .8fr .8fr .8fr minmax(360px, 1.6fr) 150px;
  padding: 20px;
  column-gap: 14px;
  row-gap: 12px;
}

.hero-search > .button {
  width: 150px;
  min-width: 150px;
  height: 64px;
  min-height: 64px;
  align-self: center;
  padding: 0 22px;
  font-size: 1rem;
  border-radius: 9px;
}

@media (max-width: 1180px) {
  .hero-search > .button {
    width: 100%;
    min-width: 0;
    height: 50px;
    min-height: 50px;
  }
}

/* ===== Layout final de filtros en móvil ===== */
@media (max-width: 640px) {
  /* Formulario/panel de filtros */
  [data-filter-form] {
    width: 100%;
  }

  /* Buscar ubicación a todo el ancho */
  [data-filter-form] .location-search-field,
  [data-filter-form] .field--location-search {
    width: 100%;
    max-width: none;
  }

  [data-filter-form] .location-search-field input,
  [data-filter-form] .field--location-search input {
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  /* Precio mínimo y máximo en una misma fila */
  [data-filter-form] .price-filter-group,
  [data-filter-form] [data-price-filter] {
    width: 100%;
  }

  [data-filter-form] .price-filter-inputs {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    width: 100%;
  }

  /* Fallback para proyectos donde los .price-input son hijos directos */
  [data-filter-form] .price-filter-group:has(.price-input),
  [data-filter-form] [data-price-filter]:has(.price-input) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
  }

  [data-filter-form] .price-filter-group > label,
  [data-filter-form] [data-price-filter] > label,
  [data-filter-form] .price-filter-group > .price-range,
  [data-filter-form] [data-price-filter] > .price-range,
  [data-filter-form] .price-filter-group > input[type="range"],
  [data-filter-form] [data-price-filter] > input[type="range"],
  [data-filter-form] .price-filter-group > .price-range-labels,
  [data-filter-form] [data-price-filter] > .price-range-labels,
  [data-filter-form] .price-filter-group > [data-price-slider],
  [data-filter-form] [data-price-filter] > [data-price-slider],
  [data-filter-form] .price-filter-group > [data-price-slider-value],
  [data-filter-form] [data-price-filter] > [data-price-slider-value] {
    grid-column: 1 / -1;
  }

  [data-filter-form] .price-input {
    width: 100%;
    min-width: 0;
  }

  [data-filter-form] .price-input input {
    width: 100%;
    min-width: 0;
    font-size: .78rem;
  }

  /* Slider y etiquetas siempre ocupan todo el ancho */
  [data-filter-form] input[type="range"],
  [data-filter-form] [data-price-slider] {
    width: 100%;
    max-width: none;
  }

  /* Botón Buscar ancho completo */
  [data-filter-form] button[type="submit"],
  [data-filter-form] .button[type="submit"],
  [data-filter-form] .filter-submit,
  [data-filter-form] [data-filter-submit] {
    width: 100%;
    max-width: none;
    min-height: 48px;
    margin-top: 6px;
  }
}

/* ===== Mobile audit fixes 2026 ===== */

/*
  IMPORTANTE:
  Todo este bloque está limitado a móvil.
  El layout de laptop/desktop no se modifica.
*/

.mobile-price-parent {
  /* En desktop no cambia el layout existente. */
}

@media (max-width: 700px) {

  /* ---------- HOME: bloque de búsqueda ---------- */

  .hero-search {
    width: calc(100% - 24px) !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 18px !important;

    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
  }

  /* Cada control del buscador usa el ancho disponible */
  .hero-search > *,
  .hero-search label,
  .hero-search .field,
  .hero-search .form-field,
  .hero-search .search-field,
  .hero-search .filter-field,
  .hero-search .price-filter-group,
  .hero-search .price-range-field,
  .hero-search .location-search-field,
  .hero-search .field--location-search {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .hero-search select,
  .hero-search input:not([type="range"]),
  .hero-search .price-input,
  .hero-search .price-input input {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  /* Selects e inputs dejan de conservar anchuras pequeñas de desktop */
  .hero-search select,
  .hero-search input:not([type="range"]) {
    min-height: 48px !important;
  }

  /* Ubicación ocupa una fila completa */
  .hero-search [name="q"],
  .hero-search [type="search"],
  .hero-search .mobile-location-field {
    width: 100% !important;
    max-width: none !important;
  }

  /* Precio mínimo + máximo en una misma fila cuando comparten contenedor */
  .hero-search .mobile-price-parent {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .hero-search .mobile-price-parent > .mobile-price-min,
  .hero-search .mobile-price-parent > .mobile-price-max {
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  .hero-search .mobile-price-parent .price-input,
  .hero-search .mobile-price-parent input {
    width: 100% !important;
    min-width: 0 !important;
  }

  .hero-search .price-input input {
    font-size: .78rem !important;
  }

  /* Slider y sus etiquetas ocupan todo el ancho */
  .hero-search input[type="range"],
  .hero-search [data-price-slider],
  .hero-search .price-range,
  .hero-search .price-slider,
  .hero-search .price-range-labels {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    grid-column: 1 / -1 !important;
  }

  /* Botón Search / Buscar */
  .hero-search button[type="submit"],
  .hero-search .button[type="submit"],
  .hero-search .button {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: 50px !important;
    min-height: 50px !important;
    margin: 0 !important;
  }


  /* ---------- PROPIEDADES: drawer de filtros ---------- */

  /*
    No alteramos su diseño.
    Solo aseguramos que el panel conserve scrolling natural si lo necesita.
  */
  .mobile-audit-filter-panel {
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }


  /* ---------- DETALLE: WhatsApp duplicado ---------- */

  /*
    En propiedad.html ya existe la barra fija Llamar / WhatsApp.
    Ocultamos únicamente el botón circular flotante detectado por JS.
  */
  .mobile-hide-floating-whatsapp {
    display: none !important;
  }
}

@media (max-width: 390px) {
  .hero-search {
    width: calc(100% - 18px) !important;
    padding: 15px !important;
    gap: 12px !important;
  }

  .hero-search .mobile-price-parent {
    gap: 8px !important;
  }

  .hero-search .price-input input {
    font-size: .74rem !important;
  }
}

/* ===== Mobile audit hotfix 2 ===== */

@media (max-width: 700px) {

  /*
    HOME:
    El buscador deja de flotar/solaparse sobre los botones CTA.
    En móvil entra al flujo normal del documento.
  */
  .hero-search {
    position: static !important;
    inset: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;

    transform: none !important;
    translate: none !important;

    margin-top: 18px !important;
    margin-bottom: 22px !important;

    z-index: 2 !important;
  }

  /*
    Los botones Explore properties / WhatsApp quedan por encima
    y totalmente tocables en móvil.
  */
  .hero__actions,
  .hero-actions,
  .hero__cta,
  .hero-cta,
  .hero .actions {
    position: relative !important;
    z-index: 5 !important;
  }

  /*
    Si el hero tenía una altura rígida pensada para desktop,
    permitimos que crezca para contener el buscador.
  */
  .hero {
    height: auto !important;
    min-height: 0 !important;
    padding-bottom: 24px !important;
  }

  /*
    Evita que el siguiente bloque suba debajo del buscador.
  */
  .hero + section,
  .hero + main,
  .hero + .section {
    position: relative;
    z-index: 1;
  }
}

/* ===== Mobile simple fix: bajar buscador + X filtros ===== */

@media (max-width: 700px) {

  /*
    HOME:
    No rediseñamos nada más.
    Solo bajamos el bloque blanco para que NO tape
    Explore Properties ni Contact via WhatsApp.
  */
  .hero-search {
    margin-top: 185px !important;
  }

  /*
    PROPIEDADES:
    X móvil, discreta y siempre accesible mientras se hace scroll.
  */
  .mobile-filter-x {
    position: sticky;
    top: 12px;
    z-index: 99999;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;
    margin: 12px 14px 4px auto;

    border: 1px solid rgba(23, 48, 88, .18);
    border-radius: 50%;

    background: #ffffff;
    color: #173058;

    font-size: 29px;
    font-weight: 400;
    line-height: 1;

    box-shadow: 0 5px 18px rgba(0, 0, 0, .12);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-filter-x:active {
    transform: scale(.96);
  }

  /*
    Fallback visual únicamente si el drawer original no responde
    al botón Filtros cuando tocamos la X.
  */
  .mobile-filter-force-closed {
    transform: translateX(110%) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

/* En laptop/desktop la X ni siquiera se muestra. */
@media (min-width: 701px) {
  .mobile-filter-x {
    display: none !important;
  }
}
/* ===== Ajustes manuales mobile ===== */
@media (max-width: 700px) {

  /* Mover el bloque blanco del inicio hacia abajo */
  .hero-search {
    transform: translateY(110px) !important;
    margin-top: 0 !important;
    margin-bottom: 110px !important;
  }

  /* Dar espacio al hero para que el bloque no choque con la sección siguiente */
  .hero {
    padding-bottom: 120px !important;
    overflow: visible !important;
  }

  /* X de filtros */
  .mobile-filter-x {
    position: sticky !important;
    top: 6px !important;
    z-index: 99999 !important;

    width: 36px !important;
    height: 36px !important;

    margin: 6px -2px 2px auto !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    background: #d9dde2 !important;
    border: 1px solid #c4c9d0 !important;
    border-radius: 50% !important;

    color: #173058 !important;
    font-size: 25px !important;
    font-weight: 400 !important;
    line-height: 1 !important;

    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.12) !important;
  }
}

/* ===== Family polish: hero touch targets ===== */

@media (max-width: 700px) {
  .hero__overlay,
  .hero__mosaic {
    pointer-events: none !important;
  }

  .hero__content {
    position: relative !important;
    z-index: 40 !important;
  }

  .hero__actions {
    position: relative !important;
    z-index: 60 !important;
    pointer-events: auto !important;
  }

  .hero__actions .button {
    position: relative !important;
    z-index: 61 !important;
    pointer-events: auto !important;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .hero-search-wrap {
    z-index: 20 !important;
    pointer-events: none !important;
  }

  .hero-search {
    pointer-events: auto !important;
  }
}

/* ===== Mobile floating filters button ===== */

.mobile-floating-filters {
  display: none;
}

@media (max-width: 700px) {
  .mobile-floating-filters {
    position: fixed;
    left: 50%;
    bottom: calc(18px + env(safe-area-inset-bottom));
    transform: translate(-50%, 18px);
    z-index: 8500;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-height: 46px;
    padding: 0 18px;

    border: 1px solid rgba(255,255,255,.12);
    border-radius: 999px;
    background: var(--navy);
    color: #fff;

    font-weight: 700;
    line-height: 1;

    box-shadow: 0 8px 24px rgba(0,0,0,.22);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
      opacity .18s ease,
      transform .18s ease,
      visibility .18s ease;
  }

  .mobile-floating-filters.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
  }

  .mobile-floating-filters svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-floating-filters:active {
    transform: translate(-50%, 1px);
  }
}

/* ===== Mobile small polish: price labels / call / hero eyebrow ===== */

@media (max-width: 700px) {
  .mobile-contact-bar a:first-child {
    background: #d9dee6 !important;
    color: #173058 !important;
  }

  .hero .hero__copy .eyebrow {
    color: #173b68 !important;
    text-shadow: 0 1px 8px rgba(255,255,255,.32);
  }
}

/* ===== Mobile Home interaction safety ===== */

@media (max-width: 700px) {
  .hero__content,
  .hero__copy {
    pointer-events: none !important;
  }

  .hero__actions,
  .hero__actions .button,
  .hero__actions a {
    pointer-events: auto !important;
  }

  .hero-search {
    pointer-events: auto !important;
  }

  .hero-search .field--zone,
  .hero-search .field--type,
  .hero-search .field--operation,
  .hero-search .field--location-search,
  .hero-search .field--price-range {
    position: relative;
    pointer-events: auto !important;
  }

  .hero-search .field--zone,
  .hero-search .field--type {
    z-index: 4;
  }

  .hero-search select,
  .hero-search input,
  .hero-search button {
    pointer-events: auto !important;
    touch-action: manipulation;
  }

  .hero-search .field--zone select,
  .hero-search .field--type select {
    position: relative;
    z-index: 5;
  }
}

/* ===== Clear filters label polish ===== */

/* Página de Propiedades: hacer más claro y legible "Clear filters". */
[data-clear-filters] {
  font-size: 13px !important;
}

/* ===== Mobile clear filters button ===== */

@media (max-width: 700px) {
  /*
    Solo el "Limpiar filtros / Clear filters" de la barra superior.
    Lo hacemos visualmente tan claro como el botón Filtros.
  */
  .filters-toolbar [data-clear-filters] {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;

    min-height: 42px;
    padding: 9px 13px !important;

    border: 1px solid var(--navy) !important;
    border-radius: 6px !important;
    background: transparent !important;
    color: var(--navy) !important;

    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1 !important;

    cursor: pointer;
    touch-action: manipulation;
  }

  .filters-toolbar [data-clear-filters]:active {
    background: rgba(23, 48, 88, .07) !important;
  }
}

/* ===== Desktop sticky Request Information ===== */

/*
  Solo laptop/desktop.
  Request Information acompaña el scroll para que Send inquiry
  permanezca accesible mientras se revisa la propiedad.
*/
@media (min-width: 900px) {
  .detail-layout .contact-card {
    position: sticky;
    top: 112px;
    align-self: start;

    max-height: calc(100vh - 136px);
    overflow-y: auto;
    overscroll-behavior: contain;

    scrollbar-width: thin;
    scrollbar-color: rgba(23, 48, 88, .35) transparent;
  }

  .detail-layout .contact-card::-webkit-scrollbar {
    width: 7px;
  }

  .detail-layout .contact-card::-webkit-scrollbar-track {
    background: transparent;
  }

  .detail-layout .contact-card::-webkit-scrollbar-thumb {
    background: rgba(23, 48, 88, .28);
    border-radius: 999px;
  }

  .detail-layout .contact-card::-webkit-scrollbar-thumb:hover {
    background: rgba(23, 48, 88, .42);
  }
}

/* ===== Local upgrade: card gallery + email inquiry ===== */

.property-card__media {
  position: relative;
}

.property-card__carousel-nav {
  position: absolute;
  z-index: 8;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.92);
  color: var(--navy-deep);
  box-shadow: 0 5px 18px rgba(0,0,0,.18);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}

.property-card__carousel-nav--prev { left: 12px; }
.property-card__carousel-nav--next { right: 12px; }

@media (hover: hover) and (pointer: fine) {
  .property-card__media:hover .property-card__carousel-nav,
  .property-card__media:focus-within .property-card__carousel-nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .property-card__carousel-nav:hover {
    transform: translateY(-50%) scale(1.06);
  }
}

@media (max-width: 700px) {
  .property-card__image-wrap { touch-action: pan-y; }
  .property-card__carousel-nav { display: none; }
}

.contact-form-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.contact-card .contact-form-actions {
  grid-template-columns: 1fr;
}

.contact-form-actions .button {
  width: 100%;
}

@media (max-width: 640px) {
  .contact-form-actions {
    grid-template-columns: 1fr;
  }
}

/* ===== Desktop contact actions side by side ===== */

/*
  Solo Contacto en laptop/desktop:
  WhatsApp y Email quedan uno al lado del otro usando todo el ancho.
*/
@media (min-width: 641px) {
  .contact-form .contact-form-actions {
    grid-column: 1 / -1;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px;
    width: 100%;
  }
}

/* En móvil se mantienen apilados, como ya se aprobó. */
@media (max-width: 640px) {
  .contact-form .contact-form-actions {
    grid-column: 1 / -1;
    grid-template-columns: 1fr !important;
  }
}
