/* =====================================================================
   Sheidaei Realtor — main stylesheet
   Design direction: refined, editorial luxury. Deep violet as the
   dominant tone, warm off-white ground, thin gold rules as accents.
   Mobile-first. RTL-aware via logical properties + [dir="rtl"] hooks.
   ===================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Brand palette — from colors.webp (The Spruce "plum living room" scheme) */
  --plum-900: #4E2F45;   /* deepest plum (hover / footer accents) */
  --plum-800: #623C57;   /* primary plum */
  --plum-600: #7D5070;   /* lifted plum for buttons */
  --lilac:    #E0C1D7;   /* soft lilac */
  --lilac-50: #F5ECF2;   /* lilac tint for section grounds */
  --teal:     #0E5C64;   /* deep teal — focus rings, links, "now selling" */
  --sage:     #94A18B;   /* sage green — tertiary surfaces */
  --sage-50:  #EEF1EB;   /* sage tint */
  --mustard:  #C29243;   /* mustard gold — accents, used sparingly */
  --mustard-soft: #EFDDB8;
  --ivory:    #FAF8F7;
  --paper:    #FFFFFF;
  --ink:      #2A2329;
  --ink-soft: #55494F;
  --ink-mute: #85777E;
  --line:     #E9DEE4;
  --success:  #1F7A4D;
  --danger:   #B42318;

  /* legacy aliases so every component reads from the palette above */
  --violet-900: var(--plum-800);
  --violet-700: var(--plum-600);
  --violet-600: var(--teal);
  --violet-100: var(--lilac);
  --violet-50:  var(--lilac-50);
  --gold:       var(--mustard);
  --gold-soft:  var(--mustard-soft);

  --font-display: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --font-body: "Manrope", "Segoe UI", Helvetica, Arial, sans-serif;
  --font-fa: "Vazirmatn", "Tahoma", "Segoe UI", sans-serif;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(31,31,36,.06), 0 2px 8px rgba(98,60,87,.06);
  --shadow: 0 6px 24px rgba(98,60,87,.10), 0 1px 3px rgba(31,31,36,.06);
  --shadow-lg: 0 24px 60px rgba(98,60,87,.16);
  --ease: cubic-bezier(.2,.7,.2,1);
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 76px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--ivory);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
html[lang="fa"] body,
html[lang="fa"] button, html[lang="fa"] input, html[lang="fa"] select, html[lang="fa"] textarea {
  font-family: var(--font-fa);
}
html[lang="fa"] .display, html[lang="fa"] h1, html[lang="fa"] h2, html[lang="fa"] h3, html[lang="fa"] .logo-word {
  font-family: var(--font-fa);
  font-weight: 700;
  letter-spacing: 0;
}
html[lang="fa"] body { line-height: 1.85; }
main { flex: 1 0 auto; }
img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--plum-800); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; margin: 0 0 .5em; color: var(--violet-900); letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 5.2vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); }
h4 { font-size: 1.1rem; font-family: var(--font-body); font-weight: 700; color: var(--ink); }
p { margin: 0 0 1em; }
.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 62ch; }
.eyebrow { font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); font-weight: 700; margin-bottom: .75rem; display: inline-flex; align-items: center; gap: .6rem; }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--gold); }
html[lang="fa"] .eyebrow { letter-spacing: 0; font-size: .9rem; }
.muted { color: var(--ink-mute); }
.small { font-size: .875rem; }
.center { text-align: center; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--violet-600); outline-offset: 3px; border-radius: 4px; }
.skip-link { position: absolute; inset-inline-start: 1rem; top: -100px; background: var(--violet-900); color: #fff; padding: .6rem 1rem; border-radius: var(--radius-sm); z-index: 1000; }
.skip-link:focus { top: 1rem; }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section-tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section-head { max-width: 720px; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head.split { max-width: none; display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 2rem; }
.section-head.split > div { max-width: 640px; }
.bg-violet { background: var(--violet-900); color: #fff; }
.bg-violet h2, .bg-violet h3, .bg-violet h1 { color: #fff; }
.bg-violet .lede, .bg-violet .muted { color: rgba(255,255,255,.78); }
.bg-lavender { background: var(--lilac-50); }
.bg-sage { background: var(--sage-50); }
.bg-paper { background: var(--paper); }
.gold-rule { width: 64px; height: 2px; background: var(--gold); border: 0; margin: 1.25rem 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .85rem 1.5rem; border-radius: 999px; border: 1.5px solid transparent;
  font: inherit; font-weight: 700; font-size: .95rem; line-height: 1; cursor: pointer;
  text-decoration: none; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, color .25s, border-color .25s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--plum-800); color: #fff; box-shadow: 0 8px 22px rgba(98,60,87,.28); }
.btn-primary:hover { background: var(--plum-900); color: #fff; box-shadow: 0 10px 26px rgba(78,47,69,.32); }
.btn-secondary { background: transparent; color: var(--violet-900); border-color: var(--violet-900); }
.btn-secondary:hover { background: var(--lilac-50); color: var(--plum-900); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: #AD8039; color: var(--ink); }
.btn-ghost { background: transparent; color: var(--violet-900); padding-inline: .9rem; }
.btn-ghost:hover { background: var(--violet-100); }
.btn-light { background: #fff; color: var(--violet-900); }
.btn-light:hover { background: var(--violet-100); color: var(--violet-900); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn-outline-light:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-sm { padding: .55rem 1rem; font-size: .85rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn svg { width: 1em; height: 1em; flex: none; }
[dir="rtl"] .btn svg.arrow { transform: scaleX(-1); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,249,252,.86); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: clamp(1.25rem, 2.5vw, 2.5rem); min-height: var(--header-h); width: min(100% - 2 * var(--gutter), 1400px); }
.logo { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--violet-900); margin-inline-end: auto; flex: none; white-space: nowrap; }
.logo img { height: 56px; width: auto; }
.logo .logo-compact { display: none; height: 48px; }
@media (max-width: 480px) { .logo .logo-full { display: none; } .logo .logo-compact { display: block; } }
.logo .logo-word { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; line-height: 1; letter-spacing: -.01em; }
.logo .logo-word small { display: block; font-family: var(--font-body); font-weight: 600; font-size: .62rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin-top: .25rem; }
html[lang="fa"] .logo .logo-word small { letter-spacing: 0; font-size: .75rem; }
.nav { display: none; flex: 1 1 auto; min-width: 0; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: nowrap; justify-content: safe center; gap: .1rem; align-items: center; }
.nav a { display: inline-block; padding: .5rem .5rem; border-radius: 999px; color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: .84rem; white-space: nowrap; transition: background .2s, color .2s; }
.nav a:hover { background: var(--violet-100); color: var(--violet-900); }
.nav a[aria-current="page"] { color: var(--violet-900); background: var(--violet-100); }
.header-actions { display: flex; align-items: center; gap: .5rem; flex: none; }
.lang-switch { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; padding: 3px; background: #fff; }
.lang-switch button { font: inherit; font-weight: 700; font-size: .82rem; border: 0; background: transparent; padding: .35rem .7rem; border-radius: 999px; cursor: pointer; color: var(--ink-soft); }
.lang-switch button[aria-pressed="true"] { background: var(--violet-900); color: #fff; }
.lang-switch button[lang="fa"] { font-family: var(--font-fa); }
.fav-link { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; color: var(--violet-900); text-decoration: none; }
.fav-link:hover { background: var(--violet-100); }
.fav-link svg { width: 22px; height: 22px; }
.fav-count { position: absolute; top: 2px; inset-inline-end: 0; min-width: 18px; height: 18px; padding: 0 5px; font-size: .7rem; font-weight: 800; border-radius: 999px; background: var(--gold); color: var(--ink); display: none; align-items: center; justify-content: center; }
.fav-count.on { display: inline-flex; }
.menu-btn { display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; cursor: pointer; padding: 0 12px; }
.menu-btn span { display: block; height: 2px; background: var(--violet-900); border-radius: 2px; transition: transform .3s var(--ease), opacity .3s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.header-vip { display: none; }

.mobile-menu { position: fixed; inset: var(--header-h) 0 0 0; background: var(--ivory); z-index: 99; padding: 1.5rem var(--gutter) 6rem; overflow-y: auto; transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .25s var(--ease), transform .25s var(--ease); }
.mobile-menu.open { opacity: 1; transform: none; pointer-events: auto; }
.mobile-menu ul { list-style: none; margin: 0; padding: 0; }
.mobile-menu a { display: block; padding: .9rem 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--violet-900); font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; }
.mobile-menu a[aria-current="page"] { color: var(--violet-700); }
.mobile-menu .btn { margin-top: 1.5rem; }

@media (min-width: 1100px) {
  .nav { display: block; }
  .menu-btn { display: none; }
  .nav a { font-size: .78rem; padding: .45rem .38rem; }
  .logo img { height: 46px; }
}
@media (min-width: 1250px) { .header-vip { display: inline-flex; } .nav a { font-size: .8rem; padding: .5rem .42rem; } }
@media (min-width: 1400px) { .nav a { font-size: .86rem; padding: .55rem .6rem; } .logo img { height: 56px; } }
@media (min-width: 1600px) { .nav a { font-size: .9rem; padding: .55rem .7rem; } }

/* ---------- Mobile sticky bar ---------- */
.mobile-bar { position: fixed; bottom: 0; inset-inline: 0; z-index: 90; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1px; background: var(--line); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.mobile-bar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: .6rem .3rem; background: #fff; color: var(--violet-900); text-decoration: none; font-size: .72rem; font-weight: 700; }
.mobile-bar a.accent { background: var(--violet-900); color: #fff; }
.mobile-bar svg { width: 20px; height: 20px; }
body.has-mobile-bar { padding-bottom: 66px; }
@media (min-width: 1100px) { .mobile-bar { display: none; } body.has-mobile-bar { padding-bottom: 0; } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: clip; background: var(--plum-900); color: #fff; }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(78,47,69,.96) 0%, rgba(98,60,87,.82) 45%, rgba(14,92,100,.30) 100%); }
[dir="rtl"] .hero-media::after { background: linear-gradient(-100deg, rgba(78,47,69,.96) 0%, rgba(98,60,87,.82) 45%, rgba(14,92,100,.30) 100%); }
.hero-inner { position: relative; padding-block: clamp(4rem, 10vw, 8.5rem) clamp(3rem, 7vw, 6rem); display: grid; gap: 2rem; }
.hero h1 { color: #fff; max-width: 15ch; margin-bottom: 1rem; }
.hero h1 em { font-style: italic; color: var(--gold-soft); }
.hero .lede { color: rgba(255,255,255,.82); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.5rem; }
.hero-note { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 2rem; font-size: .85rem; color: rgba(255,255,255,.7); }
.hero-note b { display: block; font-family: var(--font-display); font-size: 1.6rem; color: #fff; font-weight: 600; line-height: 1.1; }
.hero-frame { position: absolute; inset: 20px; border: 1px solid rgba(194,146,67,.35); pointer-events: none; }
@media (max-width: 700px) { .hero-frame { display: none; } }

.reveal { opacity: 0; transform: translateY(18px); animation: reveal .8s var(--ease) forwards; }
.reveal:nth-child(2) { animation-delay: .12s; } .reveal:nth-child(3) { animation-delay: .24s; } .reveal:nth-child(4) { animation-delay: .36s; }
@keyframes reveal { to { opacity: 1; transform: none; } }

/* ---------- Quick search ---------- */
.quick-search { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 1.25rem; display: grid; gap: .9rem; margin-top: -3rem; position: relative; z-index: 2; border: 1px solid var(--line); }
@media (min-width: 800px) { .quick-search { grid-template-columns: repeat(4, 1fr) auto; align-items: end; padding: 1.4rem 1.6rem; } }

/* ---------- Forms ---------- */
.field { display: grid; gap: .35rem; }
.field label, legend { font-weight: 700; font-size: .85rem; color: var(--ink-soft); }
.field .hint { font-size: .8rem; color: var(--ink-mute); }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="date"], input[type="time"], input[type="search"], select, textarea {
  width: 100%; font: inherit; padding: .75rem .9rem; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: #fff; color: var(--ink); transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--violet-600); box-shadow: 0 0 0 4px rgba(14,92,100,.14); }
textarea { min-height: 120px; resize: vertical; }
select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' fill='none' stroke='%234C1D75' stroke-width='1.8'/></svg>"); background-repeat: no-repeat; background-position: right .9rem center; padding-inline-end: 2.4rem; }
[dir="rtl"] select { background-position: left .9rem center; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--danger); }
.error-msg { color: var(--danger); font-size: .82rem; min-height: 1.2em; }
.check { display: flex; gap: .65rem; align-items: flex-start; font-size: .9rem; color: var(--ink-soft); }
.check input { margin-top: .3rem; width: 18px; height: 18px; accent-color: var(--violet-700); flex: none; }
.form-grid { display: grid; gap: 1.1rem; }
@media (min-width: 700px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .span-2 { grid-column: span 2; } }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.25rem, 3vw, 2.25rem); box-shadow: var(--shadow-sm); }
.form-status { padding: 1rem 1.1rem; border-radius: var(--radius-sm); margin-top: 1rem; font-weight: 600; }
.form-status.success { background: #E8F5EE; color: var(--success); border: 1px solid #BFE3CE; }
.form-status.error { background: #FDECEA; color: var(--danger); border: 1px solid #F5C2BD; }
.honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s var(--ease); display: flex; flex-direction: column; position: relative; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-media { position: relative; aspect-ratio: 4/3; background: var(--violet-100); overflow: hidden; }
.card-media img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card-media img { transform: scale(1.04); }
.card-body { padding: 1.15rem 1.25rem 1.25rem; display: grid; gap: .55rem; flex: 1; }
.card-title { font-family: var(--font-display); font-size: 1.45rem; font-weight: 600; margin: 0; color: var(--violet-900); }
.card-title a { color: inherit; text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; }
.card-sub { color: var(--ink-mute); font-size: .88rem; }
.card-meta { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .85rem; color: var(--ink-soft); }
.card-meta span { display: inline-flex; align-items: center; gap: .35rem; }
.card-meta svg { width: 15px; height: 15px; color: var(--teal); }
.card-price { font-size: 1.05rem; font-weight: 800; color: var(--ink); }
.card-price small { font-weight: 600; color: var(--ink-mute); font-size: .78rem; display: block; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .5rem; position: relative; z-index: 2; }
.badges { position: absolute; top: .8rem; inset-inline-start: .8rem; inset-inline-end: 3.6rem; display: flex; flex-wrap: wrap; gap: .35rem; z-index: 2; }
.badge { font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: .3rem .6rem; border-radius: 999px; background: rgba(255,255,255,.92); color: var(--violet-900); backdrop-filter: blur(6px); }
.badge.gold { background: var(--gold); color: var(--ink); }
.badge.status-selling { background: var(--teal); color: #fff; }
.badge.status-coming-soon { background: var(--sage); color: #fff; }
.badge.status-vip { background: var(--gold); color: var(--ink); }
.badge.status-sold-out { background: #999; color: #fff; }
.badge.demo { background: #FFF3CD; color: #7A5A00; }
html[lang="fa"] .badge { letter-spacing: 0; font-size: .78rem; }
.card .fav-btn { position: absolute; top: .7rem; inset-inline-end: .7rem; z-index: 3; }
.fav-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.94); color: var(--violet-900); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm); transition: transform .2s var(--ease); }
.fav-btn:hover { transform: scale(1.08); }
.fav-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.fav-btn[aria-pressed="true"] svg { fill: var(--violet-700); stroke: var(--violet-700); }
.compare-check { display: inline-flex; align-items: center; gap: .45rem; font-size: .82rem; font-weight: 600; color: var(--ink-soft); cursor: pointer; }
.compare-check input { width: 17px; height: 17px; accent-color: var(--violet-700); }

/* ---------- Filters ---------- */
.filters { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.25rem; display: grid; gap: 1rem; }
.filters-grid { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.filters-bar { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; justify-content: space-between; margin-block: 1.25rem; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip { display: inline-flex; align-items: center; gap: .4rem; background: var(--lilac); color: var(--violet-900); font-size: .8rem; font-weight: 700; padding: .35rem .5rem .35rem .8rem; border-radius: 999px; border: 0; cursor: pointer; }
[dir="rtl"] .chip { padding: .35rem .8rem .35rem .5rem; }
.chip:hover { background: #D3ADC7; }
.chip .x { width: 18px; height: 18px; border-radius: 50%; background: var(--violet-900); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; line-height: 1; }
.results-count { font-weight: 700; color: var(--ink-soft); }
.sort-wrap { display: inline-flex; align-items: center; gap: .5rem; }
.sort-wrap select { width: auto; padding-block: .5rem; }
.empty { text-align: center; padding: 3rem 1rem; color: var(--ink-mute); background: #fff; border: 1px dashed var(--line); border-radius: var(--radius-lg); }

/* ---------- Compare tray ---------- */
.compare-tray { position: fixed; bottom: 70px; inset-inline: 0; z-index: 95; display: flex; justify-content: center; padding-inline: var(--gutter); pointer-events: none; }
.compare-tray-inner { pointer-events: auto; background: var(--plum-900); color: #fff; border-radius: 999px; padding: .55rem .6rem .55rem 1.1rem; display: flex; align-items: center; gap: 1rem; box-shadow: var(--shadow-lg); transform: translateY(20px); opacity: 0; transition: .3s var(--ease); }
[dir="rtl"] .compare-tray-inner { padding: .55rem 1.1rem .55rem .6rem; }
.compare-tray.on .compare-tray-inner { transform: none; opacity: 1; }
.compare-tray .btn { padding-block: .55rem; }
@media (min-width: 1100px) { .compare-tray { bottom: 24px; } }

/* ---------- Project detail ---------- */
.breadcrumbs { font-size: .85rem; color: var(--ink-mute); padding-block: 1rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: "/"; margin-inline-end: .4rem; color: var(--line); }
.breadcrumbs a { color: var(--ink-soft); text-decoration: none; }
.gallery { display: grid; gap: .6rem; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 140px; border-radius: var(--radius-lg); overflow: hidden; }
.gallery button { border: 0; padding: 0; background: var(--violet-100); cursor: pointer; overflow: hidden; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.gallery button:hover img { transform: scale(1.04); }
.gallery button:first-child { grid-column: span 2; grid-row: span 2; }
@media (max-width: 700px) { .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 120px; } .gallery button:nth-child(n+5) { display: none; } }
.detail-layout { display: grid; gap: 2.5rem; margin-top: 2rem; }
@media (min-width: 960px) { .detail-layout { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; } .detail-side { position: sticky; top: calc(var(--header-h) + 1rem); } }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; margin-block: 1.5rem; }
.fact { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; }
.fact small { display: block; color: var(--ink-mute); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; }
html[lang="fa"] .fact small { letter-spacing: 0; font-size: .8rem; }
.fact b { font-size: 1.05rem; }
.detail-section { padding-block: 1.75rem; border-top: 1px solid var(--line); }
.detail-section h2 { font-size: 1.75rem; }
.deposit-table, .spec-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.deposit-table th, .deposit-table td, .spec-table th, .spec-table td { text-align: start; padding: .65rem .75rem; border-bottom: 1px solid var(--line); }
.deposit-table th, .spec-table th { color: var(--ink-mute); font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
html[lang="fa"] .deposit-table th, html[lang="fa"] .spec-table th { letter-spacing: 0; font-size: .85rem; }
.spec-table th[scope="row"] { color: var(--ink); text-transform: none; letter-spacing: 0; font-size: .92rem; background: var(--violet-50); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.amenities { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .5rem .9rem; }
.amenities li { display: flex; gap: .55rem; align-items: flex-start; }
.amenities li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); margin-top: .55rem; }
.plans { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.plan { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.plan .plan-img { aspect-ratio: 1.05; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.plan .plan-img img { width: 100%; height: 100%; object-fit: contain; }
.plan .plan-body { padding: .9rem 1rem; display: grid; gap: .3rem; }
.plan .plan-body b { font-size: 1rem; }
.side-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.4rem; box-shadow: var(--shadow-sm); display: grid; gap: .9rem; }
.side-card .price { font-family: var(--font-display); font-size: 2.2rem; font-weight: 600; color: var(--violet-900); line-height: 1; }
.side-card .price small { display: block; font-family: var(--font-body); font-size: .8rem; color: var(--ink-mute); font-weight: 600; margin-top: .3rem; }
.sticky-cta { position: fixed; bottom: 66px; inset-inline: 0; z-index: 92; background: #fff; border-top: 1px solid var(--line); padding: .6rem var(--gutter); display: flex; gap: .6rem; }
.sticky-cta .btn { flex: 1; padding-inline: .8rem; }
@media (min-width: 960px) { .sticky-cta { display: none; } }
body.has-sticky-cta { padding-bottom: 130px; }
@media (min-width: 960px) { body.has-sticky-cta { padding-bottom: 66px; } }
@media (min-width: 1100px) { body.has-sticky-cta { padding-bottom: 0; } }

/* ---------- Map ---------- */
.map-wrap { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.static-map { width: 100%; height: auto; display: block; background: linear-gradient(180deg, #F1F4EE, #E3E9DF); }
.static-map .road { stroke: #cfd6c9; stroke-width: 3; fill: none; }
.static-map .road.major { stroke: #bfc9b8; stroke-width: 5; }
.static-map .label { font-family: var(--font-body); font-size: 11px; fill: var(--ink-mute); font-weight: 700; letter-spacing: .04em; }
.static-map .marker { cursor: pointer; }
.static-map .marker circle { fill: var(--plum-800); stroke: #fff; stroke-width: 2.5; transition: r .2s, fill .2s; }
.static-map .marker text { font-family: var(--font-body); font-size: 11px; font-weight: 800; fill: #fff; text-anchor: middle; pointer-events: none; }
.static-map .marker.active circle, .static-map .marker:hover circle { fill: var(--gold); r: 15; }
.static-map .marker.active text { fill: var(--ink); }
.map-note { position: absolute; bottom: .6rem; inset-inline-start: .6rem; font-size: .7rem; background: rgba(255,255,255,.9); padding: .25rem .5rem; border-radius: 6px; color: var(--ink-mute); }
#leaflet-map { height: 420px; }
.gmap { height: 460px; width: 100%; background: var(--sage-50); }
#detail-map .gmap, #office-map .gmap { height: 340px; border-radius: var(--radius-lg); }
.office-map-fallback { display: flex; gap: 1rem; align-items: center; padding: 1.25rem; background: var(--sage-50); border: 1px solid var(--line); border-radius: var(--radius-lg); text-decoration: none; color: var(--ink); }
.office-map-fallback svg { width: 34px; height: 34px; color: var(--plum-800); flex: none; }
.office-map-fallback b { color: var(--plum-800); }
.showing-project { display: grid; grid-template-columns: 96px 1fr; gap: .9rem; align-items: center; background: var(--lilac-50); border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem; }
.showing-project img { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; }
.showing-project b { display: block; font-family: var(--font-display); font-size: 1.15rem; color: var(--plum-800); }
.showing-project span, .showing-project a { display: block; }
.stepper { display: flex; align-items: stretch; }
.stepper input { text-align: center; border-radius: 0; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper button { width: 46px; border: 1.5px solid var(--line); background: #fff; color: var(--plum-800); font-size: 1.25rem; font-weight: 700; cursor: pointer; }
.stepper button:first-child { border-start-start-radius: var(--radius-sm); border-end-start-radius: var(--radius-sm); border-inline-end: 0; }
.stepper button:last-child { border-start-end-radius: var(--radius-sm); border-end-end-radius: var(--radius-sm); border-inline-start: 0; }
.stepper button:hover { background: var(--lilac-50); }
.map-list { display: grid; gap: .8rem; max-height: 480px; overflow-y: auto; padding-inline-end: .3rem; }
.map-list .mini { display: grid; grid-template-columns: 84px 1fr; gap: .8rem; align-items: center; background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); padding: .5rem; cursor: pointer; text-align: start; font: inherit; color: inherit; transition: border-color .2s, box-shadow .2s; }
.map-list .mini img { width: 84px; height: 64px; object-fit: cover; border-radius: 8px; }
.map-list .mini.active, .map-list .mini:hover { border-color: var(--violet-700); box-shadow: 0 0 0 3px rgba(98,60,87,.12); }
.map-list .mini b { display: block; font-family: var(--font-display); font-size: 1.1rem; color: var(--violet-900); }
.map-layout { display: grid; gap: 1.25rem; }
@media (min-width: 900px) { .map-layout { grid-template-columns: 1fr 340px; } }

/* ---------- Feature blocks ---------- */
.features { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.6rem; position: relative; }
.feature .num { font-family: var(--font-display); font-size: 2.6rem; color: var(--gold); line-height: 1; font-weight: 600; margin-bottom: .6rem; }
.feature h3 { font-size: 1.3rem; margin-bottom: .4rem; }
.feature p { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.bg-violet .feature { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); }
.bg-violet .feature h3 { color: #fff; }
.bg-violet .feature p { color: rgba(255,255,255,.75); }

.steps { counter-reset: step; display: grid; gap: 0; position: relative; }
.step { display: grid; grid-template-columns: 56px 1fr; gap: 1.25rem; padding-block: 1.5rem; border-bottom: 1px solid var(--line); }
.step:last-child { border-bottom: 0; }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); font-family: var(--font-display); font-size: 2rem; color: var(--gold); line-height: 1; font-weight: 600; }
html[lang="fa"] .step::before { content: counter(step); font-family: var(--font-fa); }
.step h3 { font-size: 1.3rem; margin-bottom: .3rem; }
.step p { margin: 0; color: var(--ink-soft); }

.split { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } .split.reverse > :first-child { order: 2; } }
.split img { border-radius: var(--radius-lg); box-shadow: var(--shadow); aspect-ratio: 4/3; object-fit: cover; width: 100%; height: auto; }
.portrait-frame { position: relative; }
.portrait-frame::before { content: ""; position: absolute; inset: -14px 14px 14px -14px; border: 1.5px solid var(--gold); border-radius: var(--radius-lg); z-index: -1; }
[dir="rtl"] .portrait-frame::before { inset: -14px -14px 14px 14px; }

.testimonials { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.quote { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.6rem; position: relative; }
.quote::before { content: "\201C"; position: absolute; top: .2rem; inset-inline-start: 1.2rem; font-family: var(--font-display); font-size: 4.5rem; color: var(--lilac); line-height: 1; }
.quote p { position: relative; font-style: italic; color: var(--ink-soft); }
.quote footer { font-weight: 700; font-size: .85rem; color: var(--violet-900); }

.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1.5rem; }
.stat-strip b { display: block; font-family: var(--font-display); font-size: 2.4rem; color: var(--violet-900); line-height: 1; font-weight: 600; }
.stat-strip span { color: var(--ink-mute); font-size: .9rem; }

/* ---------- Blog ---------- */
.article-card .card-media { aspect-ratio: 16/10; }
.cat-pill { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--violet-700); }
html[lang="fa"] .cat-pill { letter-spacing: 0; font-size: .8rem; }
.article-body { max-width: 720px; margin-inline: auto; font-size: 1.08rem; }
.article-body h2 { font-size: 1.7rem; margin-top: 2rem; }
.article-body p { color: var(--ink-soft); }
.share { display: flex; gap: .5rem; flex-wrap: wrap; }
.blog-toolbar { display: grid; gap: .9rem; margin-bottom: 2rem; }
@media (min-width: 800px) { .blog-toolbar { grid-template-columns: 1fr auto; align-items: center; } }
.cat-tabs { display: flex; flex-wrap: wrap; gap: .4rem; }
.cat-tabs button { font: inherit; font-size: .82rem; font-weight: 700; border: 1.5px solid var(--line); background: #fff; color: var(--ink-soft); padding: .45rem .9rem; border-radius: 999px; cursor: pointer; }
.cat-tabs button[aria-pressed="true"] { background: var(--violet-900); color: #fff; border-color: var(--violet-900); }

/* ---------- Calculator ---------- */
.calc-layout { display: grid; gap: 2rem; }
@media (min-width: 900px) { .calc-layout { grid-template-columns: 1fr 1fr; align-items: start; } }
.calc-result { background: var(--teal); color: #fff; border-radius: var(--radius-lg); padding: 2rem; display: grid; gap: 1.25rem; position: sticky; top: calc(var(--header-h) + 1rem); }
.calc-result .big { font-family: var(--font-display); font-size: clamp(2.4rem, 5vw, 3.4rem); font-weight: 600; line-height: 1; }
.calc-result .big small { display: block; font-family: var(--font-body); font-size: .85rem; opacity: .8; margin-top: .4rem; font-weight: 600; }
.calc-rows { display: grid; gap: .6rem; border-top: 1px solid rgba(255,255,255,.2); padding-top: 1rem; }
.calc-rows div { display: flex; justify-content: space-between; gap: 1rem; font-size: .95rem; }
.calc-rows b { font-weight: 800; }
.input-group { display: flex; }
.input-group input { border-start-end-radius: 0; border-end-end-radius: 0; }
.input-group .toggle { display: inline-flex; border: 1.5px solid var(--line); border-inline-start: 0; border-start-end-radius: var(--radius-sm); border-end-end-radius: var(--radius-sm); overflow: hidden; }
.input-group .toggle button { font: inherit; font-weight: 700; border: 0; background: #fff; padding: 0 .9rem; cursor: pointer; color: var(--ink-mute); }
.input-group .toggle button[aria-pressed="true"] { background: var(--violet-900); color: #fff; }
.notice { background: var(--gold-soft); border-inline-start: 4px solid var(--gold); padding: 1rem 1.2rem; border-radius: var(--radius-sm); font-size: .9rem; color: #4a3b12; }
.notice.violet { background: var(--violet-100); border-color: var(--violet-700); color: var(--violet-900); }

/* ---------- Compare ---------- */
.compare-table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 720px; }
.compare-table th, .compare-table td { padding: .9rem 1rem; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.compare-table thead th { background: #fff; }
.compare-table th[scope="row"] { background: var(--violet-50); color: var(--ink-soft); font-size: .85rem; width: 180px; }
.compare-table img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); margin-bottom: .6rem; }
.compare-table .cmp-name { font-family: var(--font-display); font-size: 1.35rem; color: var(--violet-900); }

/* ---------- Modal / lightbox ---------- */
.modal { border: 0; padding: 0; border-radius: var(--radius-lg); max-width: min(560px, calc(100vw - 2rem)); width: 100%; box-shadow: var(--shadow-lg); background: #fff; color: var(--ink); }
.modal::backdrop { background: rgba(31,31,36,.55); backdrop-filter: blur(4px); }
.modal-inner { padding: clamp(1.25rem, 3vw, 2rem); display: grid; gap: 1rem; }
.modal-close { position: absolute; top: .75rem; inset-inline-end: .75rem; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--violet-100); color: var(--violet-900); font-size: 1.3rem; cursor: pointer; }
.lightbox { max-width: min(1100px, calc(100vw - 1.5rem)); background: transparent; box-shadow: none; }
.lightbox img { width: 100%; max-height: 85vh; object-fit: contain; border-radius: var(--radius); background: #fff; }
.lightbox .modal-close { background: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--plum-900); color: rgba(255,255,255,.78); padding-block: 3.5rem 2rem; margin-top: auto; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.site-footer h4 { color: #fff; font-family: var(--font-body); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 1rem; }
html[lang="fa"] .site-footer h4 { letter-spacing: 0; font-size: .95rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.site-footer a { color: rgba(255,255,255,.78); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-brand img { height: auto; width: min(100%, 220px); border-radius: 12px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2.5rem; padding-top: 1.5rem; font-size: .8rem; color: rgba(255,255,255,.55); display: grid; gap: .75rem; }
.footer-bottom p { margin: 0; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { background: var(--violet-900); color: #fff; padding-block: clamp(3rem, 6vw, 5rem); position: relative; overflow: clip; }
.page-hero h1 { color: #fff; margin-bottom: .5rem; }
.page-hero .lede { color: rgba(255,255,255,.8); }
.page-hero::after { content: ""; position: absolute; inset-inline-end: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%; border: 1px solid rgba(194,146,67,.35); }
.page-hero::before { content: ""; position: absolute; inset-inline-end: -40px; top: -40px; width: 420px; height: 420px; border-radius: 50%; border: 1px solid rgba(194,146,67,.2); }

/* ---------- Prose ---------- */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.75rem; margin-top: 2.25rem; }
.prose h3 { font-size: 1.3rem; margin-top: 1.5rem; }
.prose p, .prose li { color: var(--ink-soft); }
.prose ul { padding-inline-start: 1.25rem; }
.placeholder { background: #FFF8E1; border: 1px dashed #E0C36A; color: #6b5200; padding: .15rem .45rem; border-radius: 4px; font-size: .9em; }
.toc { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; font-size: .9rem; }
.toc ol { margin: .5rem 0 0; padding-inline-start: 1.2rem; }
.toc a { text-decoration: none; }

/* ---------- Utilities ---------- */
.ico svg { width: 1em; height: 1em; vertical-align: -.15em; color: var(--violet-600); }
.flex { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.between { justify-content: space-between; }
.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; } .mb-2 { margin-bottom: 2rem; }
.toast { position: fixed; bottom: 90px; inset-inline-start: 50%; transform: translate(-50%, 20px); background: var(--violet-900); color: #fff; padding: .8rem 1.2rem; border-radius: 999px; font-weight: 600; box-shadow: var(--shadow-lg); opacity: 0; transition: .3s var(--ease); z-index: 200; pointer-events: none; }
[dir="rtl"] .toast { transform: translate(50%, 20px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
[dir="rtl"] .toast.on { transform: translate(50%, 0); }
@media (min-width: 1100px) { .toast { bottom: 32px; } }

.in-view { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.in-view.shown { opacity: 1; transform: none; }

/* ---------- Motion / a11y ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal, .in-view { opacity: 1; transform: none; }
}
@media print { .site-header, .mobile-bar, .sticky-cta, .compare-tray, .toast { display: none !important; } }

/* ---- Showing form: "working with your own realtor?" ---- */
.radio-field { border: 0; padding: 0; margin: 0; min-width: 0; }
.radio-field legend { font-weight: 600; font-size: .92rem; margin-bottom: .45rem; padding: 0; color: var(--ink); }
.radio-row { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.radio-row .check { display: inline-flex; align-items: center; gap: .45rem; cursor: pointer; }
.radio-row input[type=radio] { width: 1.1rem; height: 1.1rem; accent-color: var(--plum-800); margin: 0; }
.radio-field.invalid legend { color: var(--danger, #B3261E); }
