/* /realestate/assets/css/re-ui.css  —  v1 (Stage 1)
   Mangalore Diary Real Estate — design system for the Projects module.

   RULES
   - Every class is prefixed rx- so nothing here can collide with the legacy
     real-estate.css / re-responsive.css rules (the cause of the old
     ".re-pj-grid.re-pj-grid !important" hack).
   - Selectors that touch <img> are written as ".re-module .rx-… img" so they
     out-rank the global ".re-module img { height:auto }" rule.
   - Load AFTER real-estate.css. Safe to load on every page; it only styles
     rx- classes (plus the .rx-page wrapper).
   - Contrast: body text >= 4.5:1, large text/UI >= 3:1 (WCAG 2.2 AA).
   - Touch targets >= 44px on interactive controls.
*/

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --rx-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --rx-ink:      #0f2a33;   /* headings */
  --rx-text:     #2f4550;   /* body */
  --rx-muted:    #526470;   /* secondary text, 5.9:1 on white */
  --rx-line:     #dde4e8;
  --rx-line-2:   #eef2f4;
  --rx-bg:       #f4f7f9;
  --rx-surface:  #ffffff;

  --rx-brand:    #1a3a42;
  --rx-brand-2:  #2c5f6e;
  --rx-brand-3:  #e6f0f3;   /* tint */
  --rx-accent:   #b45309;   /* price / highlights, 5.0:1 on white */
  --rx-accent-3: #fff4e5;

  --rx-ok:       #166534;  --rx-ok-bg:   #e8f5ee;
  --rx-info:     #1d4e89;  --rx-info-bg: #e8f0fb;
  --rx-warn:     #92400e;  --rx-warn-bg: #fff4e5;
  --rx-neutral:  #475569;  --rx-neutral-bg: #eef2f6;

  --rx-r-sm: 8px;  --rx-r: 12px;  --rx-r-lg: 16px;
  --rx-sh-1: 0 1px 2px rgba(15,42,51,.06), 0 1px 3px rgba(15,42,51,.04);
  --rx-sh-2: 0 4px 6px -1px rgba(15,42,51,.08), 0 10px 24px -6px rgba(15,42,51,.10);
  --rx-ring: 0 0 0 3px rgba(44,95,110,.35);

  --rx-s1: 4px; --rx-s2: 8px; --rx-s3: 12px; --rx-s4: 16px;
  --rx-s5: 24px; --rx-s6: 32px; --rx-s7: 48px;
}

/* ── Page shell ─────────────────────────────────────────── */
.re-module.rx-page { font-family: var(--rx-font); background: var(--rx-bg); color: var(--rx-text); line-height: 1.6; }
.rx-page h1, .rx-page h2, .rx-page h3 { font-family: var(--rx-font); color: var(--rx-ink); letter-spacing: -.01em; }
.rx-wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--rx-s4); }
@media (min-width: 768px) { .rx-wrap { padding: 0 var(--rx-s5); } }

.rx-skip { position: absolute; left: -9999px; top: 8px; background: var(--rx-brand); color: #fff; padding: 10px 16px; border-radius: var(--rx-r-sm); z-index: 1000; }
.rx-skip:focus { left: 8px; }

.rx-page a:focus-visible, .rx-page button:focus-visible, .rx-page select:focus-visible, .rx-page input:focus-visible {
  outline: 2px solid var(--rx-brand-2); outline-offset: 2px; box-shadow: var(--rx-ring);
}
@media (prefers-reduced-motion: reduce) { .rx-page * { transition: none !important; animation: none !important; } }

/* ── Page header (H1 + answer summary + trust strip) ───── */
.rx-head { background: var(--rx-surface); border-bottom: 1px solid var(--rx-line); padding: var(--rx-s5) 0 var(--rx-s5); }
.rx-crumbs { font-size: .8125rem; color: var(--rx-muted); margin-bottom: var(--rx-s3); }
.rx-crumbs a { color: var(--rx-muted); }
.rx-crumbs a:hover { color: var(--rx-brand-2); text-decoration: underline; }
.rx-crumbs span[aria-current] { color: var(--rx-ink); font-weight: 500; }
.rx-h1 { font-size: clamp(1.625rem, 3.2vw, 2.25rem); line-height: 1.2; font-weight: 700; margin-bottom: var(--rx-s3); max-width: 28ch; }
.rx-lead { font-size: 1rem; color: var(--rx-text); max-width: 68ch; margin-bottom: var(--rx-s4); }
.rx-lead a { color: var(--rx-brand-2); text-decoration: underline; }

.rx-trust { display: flex; flex-wrap: wrap; gap: var(--rx-s2) var(--rx-s5); font-size: .8125rem; color: var(--rx-muted); list-style: none; }
.rx-trust li { display: flex; align-items: center; gap: 6px; }
.rx-trust strong { color: var(--rx-ink); font-weight: 600; }
.rx-trust svg { flex: none; color: var(--rx-brand-2); }

/* ── Filter bar ─────────────────────────────────────────── */
.rx-filters { background: var(--rx-surface); border: 1px solid var(--rx-line); border-radius: var(--rx-r); box-shadow: var(--rx-sh-1); padding: var(--rx-s4); margin: var(--rx-s5) 0 var(--rx-s4); }
.rx-filters__row { display: grid; gap: var(--rx-s3); grid-template-columns: 1fr; }
@media (min-width: 640px)  { .rx-filters__row { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .rx-filters__row { grid-template-columns: 1.6fr 1fr 1fr 1fr auto; align-items: end; } }
.rx-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rx-field label { font-size: .75rem; font-weight: 600; color: var(--rx-muted); text-transform: uppercase; letter-spacing: .04em; }
.rx-input, .rx-select {
  width: 100%; min-height: 44px; padding: 0 var(--rx-s3); font: 500 .9375rem var(--rx-font); color: var(--rx-ink);
  background: #fff; border: 1px solid #c3ced5; border-radius: var(--rx-r-sm); transition: border-color .15s, box-shadow .15s;
}
.rx-input::placeholder { color: #73858f; font-weight: 400; }
.rx-input:hover, .rx-select:hover { border-color: var(--rx-brand-2); }
.rx-select:disabled { background: var(--rx-line-2); color: #73858f; cursor: not-allowed; }

.rx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 var(--rx-s5);
  font: 600 .9375rem var(--rx-font); border-radius: var(--rx-r-sm); border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, color .15s; }
.rx-btn--primary { background: var(--rx-brand); color: #fff; }
.rx-btn--primary:hover { background: var(--rx-brand-2); color: #fff; }
.rx-btn--ghost { background: #fff; color: var(--rx-brand); border-color: #c3ced5; }
.rx-btn--ghost:hover { border-color: var(--rx-brand-2); color: var(--rx-brand-2); }
.rx-btn--block { width: 100%; }

.rx-chips { display: flex; flex-wrap: wrap; gap: var(--rx-s2); margin-top: var(--rx-s4); padding-top: var(--rx-s4); border-top: 1px solid var(--rx-line-2); align-items: center; }
.rx-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; font-size: .8125rem; font-weight: 500; color: var(--rx-text);
  background: #fff; border: 1px solid var(--rx-line); border-radius: 999px; text-decoration: none; }
a.rx-chip:hover { border-color: var(--rx-brand-2); color: var(--rx-brand-2); }
.rx-chip[aria-current="true"] { background: var(--rx-brand); color: #fff; border-color: var(--rx-brand); }
.rx-chip--active { background: var(--rx-brand-3); border-color: #b8d4dd; color: var(--rx-brand); }
.rx-chip__x { font-size: 1rem; line-height: 1; }
.rx-chips__label { font-size: .75rem; font-weight: 600; color: var(--rx-muted); text-transform: uppercase; letter-spacing: .04em; margin-right: 4px; }

/* ── Results bar ────────────────────────────────────────── */
.rx-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--rx-s3); margin: var(--rx-s5) 0 var(--rx-s4); }
.rx-count { font-size: .9375rem; color: var(--rx-text); }
.rx-count strong { color: var(--rx-ink); }
.rx-sort { display: flex; align-items: center; gap: var(--rx-s2); font-size: .8125rem; color: var(--rx-muted); }
.rx-sort .rx-select { width: auto; min-width: 190px; }

/* ── Badges ─────────────────────────────────────────────── */
.rx-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; font-size: .75rem; font-weight: 600; line-height: 1.5; border-radius: 999px; white-space: nowrap; }
.rx-badge--new   { background: var(--rx-info-bg);    color: var(--rx-info); }
.rx-badge--uc    { background: var(--rx-warn-bg);    color: var(--rx-warn); }
.rx-badge--ready { background: var(--rx-ok-bg);      color: var(--rx-ok); }
.rx-badge--done  { background: var(--rx-neutral-bg); color: var(--rx-neutral); }
.rx-badge--feat  { background: var(--rx-accent-3);   color: var(--rx-warn); }
.rx-badge--rera  { background: var(--rx-brand-3);    color: var(--rx-brand); }

/* ── Cards ──────────────────────────────────────────────── */
.rx-cards { display: grid; gap: var(--rx-s5); grid-template-columns: 1fr; list-style: none; margin-bottom: var(--rx-s6); }
@media (min-width: 640px)  { .rx-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .rx-cards { grid-template-columns: repeat(3, 1fr); } }

.rx-card { position: relative; display: flex; flex-direction: column; background: var(--rx-surface); border: 1px solid var(--rx-line); border-radius: var(--rx-r); overflow: hidden; box-shadow: var(--rx-sh-1); transition: box-shadow .2s, border-color .2s, transform .2s; }
.rx-card:hover { box-shadow: var(--rx-sh-2); border-color: #c3ced5; transform: translateY(-2px); }
.rx-card:focus-within { box-shadow: var(--rx-ring); }
.rx-card__media { position: relative; aspect-ratio: 4 / 3; background: var(--rx-line-2); overflow: hidden; }
.re-module .rx-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.rx-card__badges { position: absolute; top: var(--rx-s3); left: var(--rx-s3); right: var(--rx-s3); display: flex; justify-content: space-between; gap: 6px; flex-wrap: wrap; z-index: 1; }
.rx-card__badges .rx-badge { box-shadow: 0 1px 2px rgba(0,0,0,.12); background-clip: padding-box; }
.rx-card__body { display: flex; flex-direction: column; gap: 6px; padding: var(--rx-s4) var(--rx-s4) var(--rx-s4); flex: 1; }
.rx-card__title { font-size: 1.0625rem; font-weight: 650; line-height: 1.3; }
.rx-card__title a { color: var(--rx-ink); }
.rx-card__title a::after { content: ''; position: absolute; inset: 0; z-index: 0; }   /* whole card is the click target */
.rx-card__title a:hover { color: var(--rx-brand-2); }
.rx-card__loc, .rx-card__dev { display: flex; align-items: center; gap: 6px; font-size: .8125rem; color: var(--rx-muted); }
.rx-card__loc svg, .rx-card__dev svg { flex: none; }
.rx-card__cfg { font-size: .8125rem; color: var(--rx-text); }
.rx-price { font-size: 1.1875rem; font-weight: 700; color: var(--rx-accent); line-height: 1.3; margin-top: 2px; }
.rx-price small { font-size: .75rem; font-weight: 500; color: var(--rx-muted); margin-left: 4px; }
.rx-price--none { font-size: 1rem; color: var(--rx-text); font-weight: 600; }
.rx-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--rx-s3); margin-top: auto; padding-top: var(--rx-s3); border-top: 1px solid var(--rx-line-2); }
.rx-fact dt { font-size: .6875rem; text-transform: uppercase; letter-spacing: .05em; color: var(--rx-muted); font-weight: 600; }
.rx-fact dd { font-size: .875rem; font-weight: 600; color: var(--rx-ink); }
.rx-card__cta { margin-top: var(--rx-s3); pointer-events: none; }   /* decorative; the title link's ::after is the click target */

/* Featured (hero) card */
.rx-feature { display: grid; grid-template-columns: 1fr; background: var(--rx-surface); border: 1px solid var(--rx-line); border-radius: var(--rx-r-lg); overflow: hidden; box-shadow: var(--rx-sh-1); margin-bottom: var(--rx-s5); position: relative; }
@media (min-width: 860px) { .rx-feature { grid-template-columns: 1.2fr 1fr; } }
.rx-feature .rx-card__media { aspect-ratio: 16 / 10; }
@media (min-width: 860px) { .rx-feature .rx-card__media { aspect-ratio: auto; min-height: 340px; } }
.rx-feature .rx-card__body { padding: var(--rx-s5); gap: var(--rx-s2); justify-content: center; }
.rx-feature .rx-card__title { font-size: 1.5rem; }
.rx-feature .rx-price { font-size: 1.5rem; }
.rx-feature__tag { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--rx-accent); }

/* ── Content panels (AEO answer blocks, FAQ) ───────────── */
.rx-panel { background: var(--rx-surface); border: 1px solid var(--rx-line); border-radius: var(--rx-r); padding: var(--rx-s5); margin-bottom: var(--rx-s5); }
.rx-panel h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: var(--rx-s3); }
.rx-panel p { margin-bottom: var(--rx-s3); max-width: 75ch; }
.rx-panel p:last-child { margin-bottom: 0; }
.rx-split { display: grid; gap: var(--rx-s5); grid-template-columns: 1fr; }
@media (min-width: 860px) { .rx-split { grid-template-columns: 1.3fr 1fr; } }

.rx-faq { border-top: 1px solid var(--rx-line); }
.rx-faq details { border-bottom: 1px solid var(--rx-line); }
.rx-faq summary { cursor: pointer; list-style: none; padding: var(--rx-s4) 0; font-weight: 600; color: var(--rx-ink); display: flex; justify-content: space-between; gap: var(--rx-s3); min-height: 44px; }
.rx-faq summary::-webkit-details-marker { display: none; }
.rx-faq summary::after { content: '+'; font-size: 1.25rem; line-height: 1; color: var(--rx-brand-2); }
.rx-faq details[open] summary::after { content: '–'; }
.rx-faq .rx-faq__a { padding: 0 0 var(--rx-s4); color: var(--rx-text); max-width: 75ch; }

.rx-pills { display: flex; flex-wrap: wrap; gap: var(--rx-s2); list-style: none; margin-bottom: var(--rx-s3); }

/* ── Empty state, pagination ────────────────────────────── */
.rx-empty { text-align: center; padding: var(--rx-s7) var(--rx-s4); background: var(--rx-surface); border: 1px dashed #c3ced5; border-radius: var(--rx-r); margin-bottom: var(--rx-s5); }
.rx-empty h2 { font-size: 1.25rem; margin-bottom: var(--rx-s2); }
.rx-empty p { margin-bottom: var(--rx-s4); }
.rx-disclaimer { font-size: .8125rem; color: var(--rx-muted); margin: 0 0 var(--rx-s6); max-width: 80ch; }

/* ── Print ──────────────────────────────────────────────── */
@media print { .rx-filters, .rx-skip, .rx-card__cta { display: none !important; } .rx-card { box-shadow: none; break-inside: avoid; } }

/* Legacy pagination markup (re_pagination_html) — modern skin, scoped to rx pages */
.rx-page .re-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: var(--rx-s5) 0 var(--rx-s6); }
.rx-page .re-pagination .re-page-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 12px;
  font: 600 .9375rem var(--rx-font); color: var(--rx-text); background: #fff; border: 1px solid var(--rx-line); border-radius: var(--rx-r-sm); text-decoration: none; }
.rx-page .re-pagination a.re-page-btn:hover { border-color: var(--rx-brand-2); color: var(--rx-brand-2); }
.rx-page .re-pagination .re-page-btn.active { background: var(--rx-brand); border-color: var(--rx-brand); color: #fff; }
.rx-page .re-pagination .re-page-btn.dots { border: 0; background: transparent; }

/* ═══════════════════════════════════════════════════════════
   PROJECT DETAIL (Stage 2)
   ═══════════════════════════════════════════════════════════ */

/* re-responsive.css sets ".re-module{overflow-x:hidden !important}". Any
   overflow other than visible/clip on an ancestor turns it into the scroll
   container and silently breaks position:sticky inside it. "clip" gives the
   same no-horizontal-scroll result without that side effect. (0,2,0) beats
   the legacy (0,1,0) even though both are !important. */
.re-module.rx-page { overflow-x: clip !important; }

.rx-notice { display: flex; gap: var(--rx-s3); align-items: flex-start; padding: var(--rx-s3) var(--rx-s4); border-radius: var(--rx-r-sm); margin: var(--rx-s4) 0 0; font-size: .9375rem; border: 1px solid; }
.rx-notice--ok  { background: var(--rx-ok-bg);   color: var(--rx-ok);   border-color: #b8dcc8; }
.rx-notice--err { background: #fdecec;           color: #9b1c1c;        border-color: #f3b4b4; }

/* Title block */
.rx-title { padding: var(--rx-s5) 0 var(--rx-s4); }
.rx-title__badges { display: flex; flex-wrap: wrap; gap: var(--rx-s2); margin-bottom: var(--rx-s3); }
.rx-title .rx-h1 { max-width: none; margin-bottom: var(--rx-s2); }
.rx-title__meta { display: flex; flex-wrap: wrap; gap: var(--rx-s2) var(--rx-s4); color: var(--rx-muted); font-size: .9375rem; }
.rx-title__meta span, .rx-title__meta a { display: inline-flex; align-items: center; gap: 6px; }
.rx-title__meta a { color: var(--rx-brand-2); font-weight: 500; }
.rx-title__price { margin-top: var(--rx-s3); }
.rx-title__price .rx-price { font-size: 1.75rem; }
.rx-title__price small { font-size: .875rem; }

/* Gallery collage */
.rx-gal { display: grid; gap: 8px; grid-template-columns: 1fr; border-radius: var(--rx-r-lg); overflow: hidden; position: relative; }
@media (min-width: 860px) { .rx-gal--multi { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 16 / 7; } .rx-gal--multi .rx-gal__main { grid-row: 1 / 3; } }
.rx-gal__btn { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: var(--rx-line-2); cursor: zoom-in; overflow: hidden; aspect-ratio: 16 / 10; }
@media (min-width: 860px) { .rx-gal__btn { aspect-ratio: auto; } .rx-gal:not(.rx-gal--multi) .rx-gal__btn { aspect-ratio: 16 / 7; } }
.re-module .rx-gal__btn img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.rx-gal__btn:hover img { transform: scale(1.03); }
.rx-gal__thumbs { display: none; }
@media (min-width: 860px) { .rx-gal--multi .rx-gal__btn:not(.rx-gal__main) { display: block; } }
.rx-gal__more { position: absolute; right: var(--rx-s3); bottom: var(--rx-s3); background: rgba(15,42,51,.88); color: #fff; font: 600 .8125rem var(--rx-font); padding: 8px 14px; border-radius: 999px; pointer-events: none; }
.rx-gal__sub { display: none; }
@media (min-width: 860px) { .rx-gal--multi .rx-gal__sub { display: block; } }

/* Layout */
.rx-detail { display: grid; gap: var(--rx-s5); grid-template-columns: 1fr; margin-top: var(--rx-s5); padding-bottom: var(--rx-s7); }
@media (min-width: 1000px) { .rx-detail { grid-template-columns: minmax(0, 1fr) 360px; gap: var(--rx-s6); align-items: start; } }
.rx-side { display: flex; flex-direction: column; gap: var(--rx-s4); }
@media (min-width: 1000px) { .rx-side__sticky { position: sticky; top: 96px; } }
.rx-jump { display: flex; flex-wrap: wrap; gap: var(--rx-s2); margin-bottom: var(--rx-s4); }
.rx-sec { background: var(--rx-surface); border: 1px solid var(--rx-line); border-radius: var(--rx-r); padding: var(--rx-s5); margin-bottom: var(--rx-s4); scroll-margin-top: 96px; }
.rx-sec > h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: var(--rx-s4); }
.rx-sec > h2 small { font-size: .8125rem; font-weight: 500; color: var(--rx-muted); margin-left: 8px; }
.rx-sec p { max-width: 75ch; }
.rx-prose { white-space: normal; color: var(--rx-text); }

/* Answer summary + key facts */
.rx-answer { background: var(--rx-brand-3); border: 1px solid #b8d4dd; border-radius: var(--rx-r); padding: var(--rx-s4) var(--rx-s5); margin-bottom: var(--rx-s4); color: var(--rx-ink); }
.rx-answer p { margin: 0; max-width: 80ch; }
.rx-answer small { display: block; margin-top: var(--rx-s2); color: var(--rx-muted); }
.rx-kf { display: grid; gap: 1px; background: var(--rx-line); border: 1px solid var(--rx-line); border-radius: var(--rx-r); overflow: hidden; grid-template-columns: repeat(2, 1fr); margin-bottom: var(--rx-s4); }
@media (min-width: 640px) { .rx-kf { grid-template-columns: repeat(3, 1fr); } }
.rx-kf > div { background: var(--rx-surface); padding: var(--rx-s3) var(--rx-s4); }
.rx-kf dt { font-size: .6875rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; color: var(--rx-muted); }
.rx-kf dd { font-weight: 600; color: var(--rx-ink); overflow-wrap: anywhere; }

/* Features */
.rx-fcat { margin-bottom: var(--rx-s4); }
.rx-fcat:last-child { margin-bottom: 0; }
.rx-fcat h3 { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--rx-muted); margin-bottom: var(--rx-s3); font-weight: 700; }
.rx-flist { display: grid; gap: var(--rx-s2); grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); list-style: none; }
.rx-flist li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--rx-line); border-radius: var(--rx-r-sm); font-size: .9rem; color: var(--rx-ink); background: #fff; }
.rx-ico { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--rx-brand-3); color: var(--rx-brand-2); font-size: .85rem; }
.re-module .rx-ico img { width: 16px; height: 16px; object-fit: contain; }

/* Floor plans, units */
.rx-plans { display: grid; gap: var(--rx-s4); grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.rx-plan { border: 1px solid var(--rx-line); border-radius: var(--rx-r); overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.rx-plan__img { display: block; width: 100%; padding: 0; border: 0; background: var(--rx-line-2); aspect-ratio: 4 / 3; position: relative; cursor: zoom-in; }
.re-module .rx-plan__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rx-plan__none { aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; background: var(--rx-line-2); color: var(--rx-muted); font-size: .8125rem; }
.rx-plan__body { padding: var(--rx-s3) var(--rx-s4); display: flex; flex-direction: column; gap: 4px; }
.rx-plan__body strong { color: var(--rx-ink); }
.rx-plan__body span { font-size: .8125rem; color: var(--rx-muted); }
.rx-units { display: flex; flex-direction: column; gap: var(--rx-s3); }
.rx-unit { display: flex; gap: var(--rx-s4); align-items: center; border: 1px solid var(--rx-line); border-radius: var(--rx-r); padding: var(--rx-s3); position: relative; background: #fff; }
.rx-unit:hover { border-color: var(--rx-brand-2); }
.re-module .rx-unit img, .rx-unit__ph { width: 96px; height: 72px; flex: none; border-radius: var(--rx-r-sm); object-fit: cover; background: var(--rx-line-2); }
.rx-unit__body { flex: 1; min-width: 0; }
.rx-unit__body a { color: var(--rx-ink); font-weight: 600; }
.rx-unit__body a::after { content: ''; position: absolute; inset: 0; }
.rx-unit__specs { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: .8125rem; color: var(--rx-muted); }

/* Media tiles (video / tour) */
.rx-embed { position: relative; aspect-ratio: 16 / 9; border-radius: var(--rx-r); overflow: hidden; border: 1px solid var(--rx-line); background: #000; }
.rx-embed iframe, .re-module .rx-embed img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.rx-embed__play { position: absolute; inset: 0; width: 100%; border: 0; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.rx-embed__play span { width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,.95); display: flex; align-items: center; justify-content: center; box-shadow: var(--rx-sh-2); color: var(--rx-brand); }

/* Location */
.rx-map { border: 1px solid var(--rx-line); border-radius: var(--rx-r); overflow: hidden; margin-top: var(--rx-s4); }
.rx-map iframe { display: block; width: 100%; height: 300px; border: 0; }
.re-module .rx-map-img { width: 100%; max-height: 340px; object-fit: cover; border-radius: var(--rx-r); border: 1px solid var(--rx-line); }
.rx-near { list-style: none; display: flex; flex-direction: column; gap: var(--rx-s3); margin-top: var(--rx-s4); }
.rx-near li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: center; }
.rx-near__top { display: flex; justify-content: space-between; gap: 8px; font-size: .9rem; }
.rx-near__top strong { color: var(--rx-ink); font-weight: 600; }
.rx-near__top span { color: var(--rx-brand-2); font-weight: 600; white-space: nowrap; }
.rx-near__bar { height: 6px; border-radius: 3px; background: var(--rx-line-2); overflow: hidden; margin-top: 5px; }
.rx-near__bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--rx-brand-2), #3a8a6a); border-radius: 3px; }
.rx-near small { color: var(--rx-muted); font-size: .75rem; }

/* Sidebar cards */
.rx-card-s { background: var(--rx-surface); border: 1px solid var(--rx-line); border-radius: var(--rx-r); padding: var(--rx-s5); box-shadow: var(--rx-sh-1); }
.rx-card-s h2, .rx-card-s h3 { font-size: 1.0625rem; font-weight: 700; margin-bottom: var(--rx-s1); }
.rx-card-s .rx-sub { color: var(--rx-muted); font-size: .875rem; margin-bottom: var(--rx-s4); }
.rx-card-s .rx-btn { width: 100%; margin-bottom: var(--rx-s2); }
.rx-btn--wa { background: #128c4a; color: #fff; }
.rx-btn--wa:hover { background: #0f7a41; color: #fff; }
.rx-or { display: flex; align-items: center; gap: var(--rx-s3); color: var(--rx-muted); font-size: .8125rem; margin: var(--rx-s3) 0; }
.rx-or::before, .rx-or::after { content: ''; flex: 1; height: 1px; background: var(--rx-line); }
.rx-form { display: flex; flex-direction: column; gap: var(--rx-s3); }
.rx-form textarea.rx-input { min-height: 88px; padding: var(--rx-s3); resize: vertical; }
.rx-legal { font-size: .75rem; color: var(--rx-muted); margin-top: var(--rx-s3); }
.rx-legal a { text-decoration: underline; }
.rx-dev { display: flex; align-items: center; gap: var(--rx-s3); margin-bottom: var(--rx-s3); }
.re-module .rx-dev img, .rx-dev__ph { width: 48px; height: 48px; border-radius: var(--rx-r-sm); object-fit: contain; border: 1px solid var(--rx-line); background: #fff; padding: 4px; flex: none; }
.rx-dev__ph { display: flex; align-items: center; justify-content: center; background: var(--rx-brand); color: #fff; font-weight: 700; padding: 0; }
.rx-links { display: flex; flex-direction: column; gap: 6px; font-size: .875rem; }
.rx-links a { color: var(--rx-brand-2); font-weight: 600; }
.rx-more { display: flex; align-items: center; gap: var(--rx-s3); padding: 8px 0; border-bottom: 1px solid var(--rx-line-2); color: var(--rx-ink); }
.re-module .rx-more img, .rx-more__ph { width: 48px; height: 48px; border-radius: 6px; object-fit: cover; background: var(--rx-line-2); flex: none; }
.rx-more strong { display: block; font-size: .875rem; }
.rx-more span { font-size: .75rem; color: var(--rx-muted); }

/* Share */
.rx-share { display: flex; flex-wrap: wrap; gap: var(--rx-s2); }

/* Mobile action bar (sits above the module's 60px bottom nav) */
.rx-mbar { display: none; }
@media (max-width: 999px) {
  .rx-mbar { display: flex; gap: var(--rx-s2); position: fixed; left: 0; right: 0; bottom: calc(60px + env(safe-area-inset-bottom, 0px)); z-index: 600;
    padding: var(--rx-s2) var(--rx-s3); background: #fff; border-top: 1px solid var(--rx-line); box-shadow: 0 -4px 16px rgba(15,42,51,.12); }
  .rx-mbar .rx-btn { flex: 1; padding: 0 var(--rx-s2); margin: 0; }
  .rx-detail { padding-bottom: 150px; }
}

/* Lightbox (<dialog>) */
.rx-lb { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(10,20,25,.95); color: #fff; }
.rx-lb::backdrop { background: rgba(10,20,25,.95); }
.rx-lb__inner { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 56px 64px; }
.rx-lb__stage { margin: 0; width: 100%; max-width: 1100px; text-align: center; }
.re-module .rx-lb__stage img, .rx-lb__stage img { max-width: 100%; max-height: 74vh; width: auto; height: auto; margin: 0 auto; border-radius: var(--rx-r-sm); object-fit: contain; }
.rx-lb__frame { width: 100%; height: 78vh; border: 0; border-radius: var(--rx-r-sm); background: #fff; }
.rx-lb__stage figcaption { margin-top: var(--rx-s3); font-size: .9375rem; }
.rx-lb__btn { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 1.75rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.rx-lb__btn:hover { background: rgba(255,255,255,.28); }
.rx-lb__close { top: 12px; right: 12px; }
.rx-lb__prev  { left: 12px;  top: 50%; transform: translateY(-50%); }
.rx-lb__next  { right: 12px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) { .rx-lb__inner { padding: 64px 8px 24px; } .rx-lb__prev, .rx-lb__next { top: auto; bottom: 12px; transform: none; } }

/* ═══════════════════════════════════════════════════════════
   MOBILE PASS (v2) — projects directory + project page
   ═══════════════════════════════════════════════════════════ */

/* 1. A 1fr track is minmax(auto,1fr): one wide child (a no-wrap chip row, a long
      word) used to stretch the whole column past the screen, and overflow-x:clip
      then cut the right edge off. minmax(0,1fr) + min-width:0 stops that. */
.rx-detail { grid-template-columns: minmax(0, 1fr); }
.rx-detail > main, .rx-detail > aside { min-width: 0; }

/* 2. Button text: legacy ".re-module a" colour rules out-rank single-class colours,
      which left the green WhatsApp button's label unreadable. */
.re-module.rx-page a.rx-btn--primary, .re-module.rx-page a.rx-btn--primary:hover,
.re-module.rx-page a.rx-btn--wa,      .re-module.rx-page a.rx-btn--wa:hover { color: #fff; text-decoration: none; }
.re-module.rx-page a.rx-btn--ghost { color: var(--rx-brand); text-decoration: none; }
.re-module.rx-page a.rx-btn--ghost:hover { color: var(--rx-brand-2); }

/* 3. Enquire anchor lands below the sticky header, not under it */
#rx-enquire { scroll-margin-top: 80px; }

/* 4. Mobile action bar: the bottom nav is hidden from 901px, the bar is not
      (it shows up to 999px), so there it must sit on the screen edge. */
@media (min-width: 901px) and (max-width: 999px) {
  .rx-mbar { bottom: env(safe-area-inset-bottom, 0px); }
  .rx-detail { padding-bottom: 96px; }
}

/* 5. Lightbox: 100vh is taller than the visible screen on phone browsers */
@supports (height: 100dvh) {
  .rx-lb { height: 100dvh; }
  .rx-lb__frame { height: 78dvh; }
  .re-module .rx-lb__stage img, .rx-lb__stage img { max-height: 74dvh; }
}

/* 6. Filter toggle (shown only on phones, only when JS has run) */
.rx-filters__toggle { display: none; }
.rx-filters__n { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--rx-brand); color: #fff; font-size: .75rem; }

/* 7. Phones */
@media (max-width: 767px) {
  /* iOS Safari zooms the page when a field under 16px gets focus */
  .rx-input, .rx-select, .rx-form textarea.rx-input { font-size: 16px; }
}
@media (max-width: 639px) {
  .rx-wrap { padding: 0 14px; }
  .rx-sec, .rx-panel, .rx-card-s { padding: var(--rx-s4); }
  .rx-answer { padding: var(--rx-s3) var(--rx-s4); }
  .rx-sec > h2, .rx-panel h2 { font-size: 1.125rem; margin-bottom: var(--rx-s3); }
  .rx-head { padding: var(--rx-s4) 0; }
  .rx-title { padding: var(--rx-s4) 0 var(--rx-s3); }
  .rx-title .rx-h1 { font-size: 1.5rem; }
  .rx-title__price .rx-price { font-size: 1.5rem; }

  /* Highlights / amenities / specs: thin rows instead of one bordered box per item */
  .rx-flist { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .rx-flist li { border: 0; border-bottom: 1px solid var(--rx-line-2); border-radius: 0; padding: 9px 2px; font-size: .875rem; align-items: flex-start; }
  .rx-flist li:last-child { border-bottom: 0; }
  .rx-fcat { margin-bottom: var(--rx-s3); }

  /* One scrollable row instead of a wrapping block of chips */
  .rx-jump, .rx-chips { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .rx-jump::-webkit-scrollbar, .rx-chips::-webkit-scrollbar { display: none; }
  .rx-jump { margin-inline: -14px; padding: 0 14px 4px; }
  .rx-jump .rx-chip, .rx-chips .rx-chip { flex: none; min-height: 44px; }
  .rx-chips .rx-chips__label { flex: none; }

  /* Sidebar links and "more by" rows: 44px touch targets */
  .rx-links a { display: flex; align-items: center; min-height: 44px; }
  .rx-more { min-height: 56px; }

  /* Filters: search stays visible, the rest opens with one tap */
  .rx-filters { padding: var(--rx-s3); margin: var(--rx-s4) 0 var(--rx-s3); }
  .rx-js .rx-filters__toggle { display: inline-flex; width: 100%; }
  .rx-js .rx-filters:not(.is-open) .rx-field:not(.rx-field--q) { display: none; }
  .rx-filters__row .rx-btn--primary { width: 100%; }
  .rx-chips { margin-top: var(--rx-s3); padding-top: var(--rx-s3); }
  .rx-sort .rx-select { min-width: 0; }
  .rx-bar { margin: var(--rx-s4) 0 var(--rx-s3); }
}
