/* لاله‌زار — نسخهٔ woff2 زیرمجموعه‌شده (فارسی/لاتین/لاتین‌گسترده).
   قبلاً `Lalezar-Regular.ttf` با ۲۹۵KB بارگذاری می‌شد؛ مجموع فایل‌های زیر
   ۵۲+۱۶+۱۳ = ۸۱KB است و مرورگر فقط زیرمجموعهٔ لازمِ متن صفحه را می‌گیرد. */
@font-face {
  font-family: 'Lalezar';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/Lalezar-Arabic.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
@font-face {
  font-family: 'Lalezar';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/Lalezar-LatinExt.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Lalezar';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/Lalezar-Latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Vazirmatn — نسخه محلی (بدون وابستگی به Google Fonts که در ایران مسدود است) */
@font-face { font-family: 'Vazirmatn'; src: url('../fonts/Vazirmatn-Light.woff2') format('woff2'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('../fonts/Vazirmatn-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('../fonts/Vazirmatn-SemiBold.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('../fonts/Vazirmatn-ExtraBold.woff2') format('woff2'); font-weight: 800; font-style: normal; font-display: swap; }

/* ==========================================================================
   Variables
   ========================================================================== */
:root {
  /* Colors
     ⚠ اینها «پیش‌فرض تم پیش‌فرض» هستند و به توکن‌های واقعی سایت وصلند:
     اگر کاربر تمی را فعال کند، theme_css_vars() همین متغیرها را از پالت تم
     بازنویسی می‌کند؛ پس هر دو مسیر به یک منبع رنگ می‌رسند.

     قبلاً اینجا مقادیر تیرهٔ قالب اولیه (#0F172A / #FFFFFF / #CBD5E1) ثابت بود.
     نتیجه: در «تم پیش‌فرض» پس‌زمینهٔ صفحه تیره می‌شد، ولی کارت‌ها همان
     background:#fff را داشتند و متن سفید روی کارت سفید ناخوانا می‌شد
     (نمونهٔ واقعی: کاشی‌های «مشخصات ملک» در صفحهٔ ملک). */
  --color-primary: var(--brand, #5b45e8);
  --color-secondary: var(--brand-2, #7c3aed);
  --color-accent: var(--accent, #a78bfa);
  --color-background: var(--page-bg, #f7f9fc);
  --color-text: var(--ink, #0f172a);
  --color-text-muted: var(--muted-ink, #5b6478);
  --color-success: #22C55E;
  
  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.12);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --glass-blur: blur(12px);

  /* Typography */
  --font-en: 'Poppins', sans-serif;
  --font-fa: 'Lalezar', 'Vazirmatn', sans-serif;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}
.empty-state { min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; text-align: center; padding: 2rem; color: var(--color-text-muted); }
.empty-state i { font-size: 2rem; color: var(--color-primary); }

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-fa);
  background-color: var(--color-background);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

body.lang-fa {
  font-family: var(--font-fa);
  direction: rtl;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-normal);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.75rem; }

p {
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

/* ==========================================================================
   Utility Classes & Components
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

.text-center { text-align: center; }
.text-primary { color: var(--color-primary); }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-4 { margin-top: 2rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-normal);
  border: none;
  outline: none;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: #fff;
  box-shadow: 0 4px 15px rgba(108, 59, 255, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 59, 255, 0.6);
}

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
}

.btn-outline:hover {
  background: var(--glass-bg);
  border-color: #fff;
}

/* Glass Card */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--glass-shadow);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.5rem 0;
  transition: all var(--transition-normal);
}

.header.scrolled {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 0.5rem 1.5rem;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  padding: 0.5rem 1.5rem;
  transition: all var(--transition-normal);
}

.header.scrolled .nav-container {
  background: transparent;
  border-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 0;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo i {
  color: var(--color-primary);
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  font-weight: 500;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width var(--transition-normal);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.lang-switch {
  cursor: pointer;
  font-weight: 500;
  opacity: 0.8;
  transition: opacity var(--transition-fast);
}

.lang-switch:hover {
  opacity: 1;
}

.login-icon {
  font-size: 1.25rem;
}

.mobile-menu-btn {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--color-text);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 100px; /* offset for header */
}

/* Background Image & Overlay */
.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background: url('https://images.unsplash.com/photo-1600596542815-ffad4c1539a9?ixlib=rb-4.0.3&auto=format&fit=crop&w=2000&q=80') center/cover no-repeat;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.7) 100%);
}

/* Decorative Blur Circles */
.blur-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 0;
  opacity: 0.5;
  animation: float-slow 10s infinite ease-in-out alternate;
}

.blur-circle-1 {
  width: 400px;
  height: 400px;
  background: var(--color-primary);
  top: -100px;
  left: -100px;
}

.blur-circle-2 {
  width: 300px;
  height: 300px;
  background: var(--color-secondary);
  bottom: 100px;
  right: -50px;
  animation-delay: -5s;
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 4rem;
  position: relative;
  z-index: 1;
}

/* Hero Left: Floating Images */
.hero-images {
  flex: 1;
  position: relative;
  height: 600px;
}

.float-img {
  position: absolute;
  border-radius: 20px;
  border: 2px solid var(--glass-border);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  animation: float 6s infinite ease-in-out;
  transition: transform var(--transition-normal);
  object-fit: cover;
}

.float-img:hover {
  transform: scale(1.05) !important;
  z-index: 10;
}

.hero-image-changing {
  opacity: 0;
  transform: scale(0.96) rotate(0deg) !important;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.img-1 {
  width: 300px;
  height: 400px;
  top: 50px;
  left: 0;
  transform: rotate(-5deg);
}

.img-2 {
  width: 250px;
  height: 350px;
  top: 150px;
  left: 200px;
  transform: rotate(8deg);
  animation-delay: -2s;
}

.img-3 {
  width: 200px;
  height: 250px;
  top: 0px;
  left: 280px;
  transform: rotate(15deg);
  animation-delay: -4s;
}

/* Hero Right: Text */
.hero-text {
  flex: 1;
}

.hero-subtitle {
  color: var(--color-accent);
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: block;
}

.hero-text h1 {
  background: linear-gradient(to right, #fff, var(--color-text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-text p {
  font-size: 1.125rem;
  max-width: 500px;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

/* ==========================================================================
   Sections General
   ========================================================================== */
.section-padding {
  padding: 6rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

/* ==========================================================================
   Features Section
   ========================================================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.feature-card {
  text-align: center;
}

.feature-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(108, 59, 255, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  border: 1px solid var(--glass-border);
  transition: all var(--transition-normal);
}

.feature-card:hover .feature-icon {
  background: var(--color-primary);
  color: #fff;
  transform: scale(1.1);
}

/* ==========================================================================
   Properties Section
   ========================================================================== */
.properties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}

.realistic-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}
.realistic-grid .prop-large,
.realistic-grid .prop-tall,
.realistic-grid .prop-wide { grid-column: auto; grid-row: auto; }

.property-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.property-img-wrapper {
  position: relative;
  height: 250px;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
}

.property-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.property-card:hover .property-img-wrapper img {
  transform: scale(1.1);
}

.property-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--color-primary);
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 500;
}

.property-fav {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid var(--glass-border);
  transition: all var(--transition-fast);
}

.property-fav:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ef4444;
}

.property-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.property-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.property-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.property-location {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.property-amenities {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--glass-border);
  padding-top: 1rem;
  margin-top: auto;
  margin-bottom: 1.5rem;
}

.amenity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.amenity i {
  color: var(--color-accent);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background: rgba(15, 23, 42, 0.8);
  border-top: 1px solid var(--glass-border);
  padding: 4rem 0 2rem;
  backdrop-filter: var(--glass-blur);
}

.footer-logo { font-size: 2rem; margin-bottom: 1rem; }

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h3 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.footer-col h3::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  inset-inline-start: 0;
  left: auto;
  width: 40px;
  height: 2px;
  background: var(--color-primary);
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a:hover {
  color: var(--color-primary);
  padding-inline-start: 5px;
}

.social-icons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--glass-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--glass-border);
}

.social-icon:hover {
  background: var(--color-primary);
  transform: translateY(-3px);
}

.newsletter-form {
  display: flex;
  margin-top: 1rem;
}

.newsletter-form input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: #fff;
  border-radius: 50px 0 0 50px;
  outline: none;
}

.newsletter-form button {
  padding: 0.75rem 1.5rem;
  border-radius: 0 50px 50px 0;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--glass-border);
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.page-content { padding-top: 120px; padding-bottom: 5rem; min-height: 70vh; }
.page-header { padding: 2rem 0 3rem; text-align: center; }
.contact-layout, .dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.contact-info, .form-card { padding: 2rem; }
.contact-item { display: flex; align-items: center; gap: 1rem; margin: 1.25rem 0; color: var(--color-text-muted); }
.contact-item i, .contact-map i { color: var(--color-primary); font-size: 1.25rem; }
.contact-map { min-height: 170px; border: 1px dashed var(--glass-border); border-radius: 16px; display: flex; align-items: center; justify-content: center; gap: .75rem; color: var(--color-text-muted); margin-top: 2rem; }
.form-card form { display: flex; flex-direction: column; gap: 1rem; }
.form-card label { display: flex; flex-direction: column; gap: .45rem; color: var(--color-text-muted); }
.form-card input, .form-card textarea { width: 100%; padding: .8rem 1rem; border: 1px solid var(--glass-border); border-radius: 10px; background: rgba(0,0,0,.2); color: #fff; font: inherit; outline: none; }
.form-card input:focus, .form-card textarea:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(108,59,255,.18); }
.form-message { color: var(--color-success); min-height: 1.5rem; margin: 0; }
.auth-page { display: flex; justify-content: center; align-items: center; }
.auth-card { width: min(100%, 480px); padding: 2rem; }
.auth-card form { display: flex; flex-direction: column; gap: 1rem; }
.auth-card h1 { font-size: 2rem; }
.auth-tabs { display: flex; gap: .5rem; margin-bottom: 2rem; border-bottom: 1px solid var(--glass-border); }
.auth-tab { flex: 1; background: transparent; border: 0; color: var(--color-text-muted); padding: .8rem; font: inherit; cursor: pointer; }
.auth-tab.active { color: #fff; border-bottom: 2px solid var(--color-primary); }
.dashboard-grid { grid-template-columns: 240px 1fr; }
.dashboard-menu { height: fit-content; padding: .75rem; display: flex; flex-direction: column; gap: .25rem; }
.dashboard-menu a { padding: .8rem 1rem; border-radius: 10px; color: var(--color-text-muted); }
.dashboard-menu a:hover, .dashboard-menu a.active { background: rgba(108,59,255,.18); color: #fff; }
.article-page { max-width: 900px; }
.article-content { padding: clamp(1.25rem, 4vw, 4rem); }
.article-content h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
.article-content h2 { font-size: 2rem; margin-top: 2.5rem; }
.article-content img { width: 100%; max-height: 480px; object-fit: cover; border-radius: 18px; margin: 2rem 0; }
.article-content p { font-size: 1.1rem; line-height: 2; }

@media (max-width: 768px) {
  .realistic-grid { grid-template-columns: 1fr; }
  .footer-logo { justify-content: center; }
  .contact-layout, .dashboard-grid { grid-template-columns: 1fr; }
  .page-content { padding-top: 100px; }
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes float {
  0% { transform: translateY(0) rotate(var(--rot)); }
  50% { transform: translateY(-15px) rotate(var(--rot)); }
  100% { transform: translateY(0) rotate(var(--rot)); }
}

@keyframes float-slow {
  0% { transform: translate(0, 0); }
  100% { transform: translate(30px, 30px); }
}

/* Scroll Reveal Classes */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   RTL & LTR Logical Property Adjustments
   ========================================================================== */
.hero-images .float-img {
    left: auto; /* Reset old left */
}

.img-1 { inset-inline-start: 0; }
.img-2 { inset-inline-start: 200px; }
.img-3 { inset-inline-start: 280px; }

@media (max-width: 1024px) {
  .img-1 { inset-inline-start: 10%; }
  .img-2 { inset-inline-start: 40%; }
  .img-3 { inset-inline-start: 60%; }
}

@media (max-width: 768px) {
  .img-1 { inset-inline-start: 0; }
  .img-2 { inset-inline-start: 30%; }
  .img-3 { inset-inline-start: 60%; }
}

.blur-circle-1 {
    left: auto;
    inset-inline-start: -100px;
}

.blur-circle-2 {
    right: auto;
    inset-inline-end: -50px;
}

.property-badge {
    left: auto;
    inset-inline-start: 1rem;
}

.property-fav {
    right: auto;
    inset-inline-end: 1rem;
}

/* ==========================================================================
   3D Carousel for Testimonials
   ========================================================================== */
.carousel-container {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;
}

.test-card {
    position: absolute;
    width: 350px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 3rem 2rem 2rem;
    text-align: center;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

.test-card.active {
    opacity: 1;
    transform: translateX(0) scale(1);
    z-index: 3;
    pointer-events: auto;
    border: 1px solid var(--color-accent);
    box-shadow: 0 15px 35px rgba(0,0,0,0.4), 0 0 20px rgba(167, 139, 250, 0.2);
}

.test-card.prev {
    opacity: 0.6;
    transform: translateX(-60%) scale(0.85);
    z-index: 2;
    filter: blur(4px);
}

.test-card.next {
    opacity: 0.6;
    transform: translateX(60%) scale(0.85);
    z-index: 2;
    filter: blur(4px);
}

.test-card.prev-hidden {
    opacity: 0;
    transform: translateX(-100%) scale(0.7);
    z-index: 1;
}

.test-card.next-hidden {
    opacity: 0;
    transform: translateX(100%) scale(0.7);
    z-index: 1;
}

/* Floating Avatar */
.test-avatar-wrapper {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.test-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-background);
}

.test-quote-icon {
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
    opacity: 0.8;
}

.test-text {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--color-text);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.test-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.25rem;
}

.test-role {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.carousel-dots {
    position: absolute;
    bottom: 0px;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    width: 100%;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--glass-border);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.dot.active {
    background: var(--color-primary);
    transform: scale(1.3);
}

@media (max-width: 768px) {
    .test-card.prev { transform: translateX(-40%) scale(0.8); }
    .test-card.next { transform: translateX(40%) scale(0.8); }
}

/* ==========================================================================
   Latest Blogs (Index)
   ========================================================================== */
.blog-preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.blog-preview-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
}

.blog-preview-card .blog-img {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.blog-preview-card .blog-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.blog-preview-card:hover .blog-img img {
    transform: scale(1.05);
}

.blog-badge {
    position: absolute;
    top: 1rem;
    inset-inline-start: 1rem;
    background: var(--color-primary);
    color: #fff;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
    z-index: 2;
    backdrop-filter: blur(4px);
}

.post-featured {
    height: 100%;
}

.post-featured .blog-img {
    height: 350px;
}

.post-featured .blog-content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.post-featured h3 {
    font-size: 1.8rem;
    margin-top: 0.5rem;
}

.blog-preview-stack {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.blog-preview-stack .blog-preview-card {
    flex-direction: row;
    height: 180px;
}

.blog-preview-stack .blog-img {
    width: 40%;
    height: 100%;
}

.blog-preview-stack .blog-content {
    width: 60%;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 992px) {
    .blog-preview-grid {
        grid-template-columns: 1fr;
    }
    .blog-preview-stack .blog-preview-card {
        height: auto;
        flex-direction: column;
    }
    .blog-preview-stack .blog-img {
        width: 100%;
        height: 200px;
    }
    .blog-preview-stack .blog-content {
        width: 100%;
    }
    .header-ltr-left {
        text-align: center !important;
        width: 100%;
    }
    .btn-hidden-mobile { display: none; }
    .btn-visible-mobile { display: block !important; }
}

/* ==========================================================================
   Handcrafted Varied Grid Adjustments
   ========================================================================== */
.realistic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    align-items: stretch;
}

/* Make all property images uniform to prevent messy layout */
.realistic-grid .property-img-wrapper { 
    height: 250px; 
}


/* Mirror directional icons based on dir */
/* در چیدمان LTR، فلش «چپ» آینه می‌شود تا به راست اشاره کند.
   جایگزین گلیف آوسام (content:"\f061") با ترنسفورم روی همان SVG محلی. */
html[dir="ltr"] .fa-arrow-left > svg.ai {
    transform: scaleX(-1);
}

/* ==========================================================================
   Watchlist & Toast Notifications
   ========================================================================== */
.amlak-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translate(-50%, 100px);
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    padding: 1rem 1.5rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    z-index: 9999;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
}
.amlak-toast.show {
    transform: translate(-50%, 0);
    opacity: 1;
}
.amlak-toast.toast-error { border-color: #ef6b72; color: #ffdce0; }
.toast-undo {
    background: none;
    border: none;
    color: var(--color-primary);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
}
.btn-save-property.saved {
    color: #ef4444;
}
.btn-save-property.saved i {
    font-weight: 900;
}

/* ==========================================================================
   Property Card Hover Fixes
   ========================================================================== */
.property-img-wrapper:hover .property-badge,
.property-img-wrapper:hover .property-fav {
    z-index: 10;
}

/* ==========================================================================
   Form Inheritance
   ========================================================================== */
input, textarea, select, button {
    font-family: inherit;
}

/* ==========================================================================
   Lightbox Gallery
   ========================================================================== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
}
.lightbox.active {
    display: flex;
}
.lightbox-img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 10px;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
}
.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
}

/* ==========================================================================
   Custom Map Markers
   ========================================================================== */
.custom-price-marker {
    background: #0f172a;
    color: #fff;
    border: 2px solid var(--color-primary);
    border-radius: 20px;
    padding: 5px 12px;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    white-space: nowrap;
    transition: all 0.3s;
}
.custom-price-marker:hover {
    background: var(--color-primary);
    transform: scale(1.1);
    z-index: 1000 !important;
}

/* Header Icon Buttons (Watchlist + User) */
.header-icon-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}
.header-icon-btn:hover {
    background: rgba(108,59,255,0.2);
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-2px);
}
.header-icon-btn #watchlistBadge {
    position: absolute;
    top: -4px !important;
    inset-inline-end: -4px !important;
    right: auto !important;
    display: none;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1;
    z-index: 2;
}

/* ==========================================================================
   نقشه‌ها — پین سفارشی (رفع مربع سفید دور پین)
   ========================================================================== */
.leaflet-div-icon.amlak-pin { background: none !important; border: 0 !important; }
.amlak-pin svg { display: block; filter: drop-shadow(0 6px 10px rgba(15,23,42,.25)); }    .leaflet-container { font-family: 'Vazirmatn', sans-serif; }
    .leaflet-popup-content-wrapper { border-radius: 12px; }
    /* دکمه‌های زوم همیشه نمایان و هماهنگ با تم سایت */
    .leaflet-control-zoom { border: 0 !important; border-radius: 12px !important; overflow: hidden; box-shadow: 0 10px 26px rgba(15,23,42,.16) !important; }
    .leaflet-control-zoom a { width: 36px !important; height: 36px !important; line-height: 36px !important; font-size: 18px !important; color: #334155 !important; background: #fff !important; border-bottom: 1px solid #eef0f5 !important; transition: background .18s ease, color .18s ease; }
    .leaflet-control-zoom a:hover { background: #f4f0ff !important; color: #5b45e8 !important; }
    .leaflet-control-zoom a:last-child { border-bottom: 0 !important; }
    .leaflet-control-attribution { font-size: 9px !important; }
    /* ایزوله کردن z-index داخلی ليفلت تا نقشه روی مودال‌ها نپرد */
    .footer-map, .pl-footermap, .map-panel, #propsMap, #contactMap, #propMap, #areaMap, .ar-map-panel, .pd-card #propMap { position: relative; isolation: isolate; }
    #fullMapModal, #amlakMapModal { isolation: isolate; }
    /* خوشه‌های مارکر (leaflet.markercluster) — هماهنگ با تم بنفش */
    .amlak-cluster-wrap { background: none !important; border: 0 !important; }
    .amlak-cluster { width: 100%; height: 100%; border-radius: 50%; background: linear-gradient(135deg, #5b45e8, #8b5cf6); color: #fff; display: flex; align-items: center; justify-content: center; font-family: 'Vazirmatn', sans-serif; font-weight: 800; font-size: 13px; border: 3px solid #fff; box-shadow: 0 10px 24px rgba(91,69,232,.4); }
    /* کارت ملک داخل پاپ‌آپ مارکر */
    .mc-card { direction: rtl; text-align: right; width: 252px; font-family: 'Lalezar','Vazirmatn',sans-serif; }
    .mc-card .mc-media { position: relative; height: 130px; border-radius: 12px; overflow: hidden; background: #eef1f6; margin-bottom: 10px; }
    .mc-card .mc-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .mc-card .mc-ph { width: 100%; height: 100%; display: grid; place-items: center; color: #c3cad6; font-size: 2.2rem; }
    .mc-card .mc-price { position: absolute; right: 8px; bottom: 8px; background: linear-gradient(135deg, #5b45e8, #7c3aed); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; box-shadow: 0 6px 14px rgba(91,69,232,.35); }
    .mc-card .mc-body { padding: 0 2px; }
    .mc-card .mc-name { display: block; color: #0f172a; font-size: 15px; font-weight: 700; line-height: 1.5; margin-bottom: 6px; }
    .mc-card .mc-meta { display: flex; flex-wrap: wrap; gap: 10px; color: #64748b; font-size: 12px; margin-bottom: 10px; }
    .mc-card .mc-meta i { color: #5b45e8; margin-inline-end: 3px; }
    .mc-card .mc-link { display: inline-flex; align-items: center; gap: 6px; background: rgba(91,69,232,.09); color: #5b45e8; font-size: 12px; font-weight: 700; padding: 6px 14px; border-radius: 999px; transition: background .2s ease; }
    .mc-card .mc-link:hover { background: rgba(91,69,232,.16); }
    .leaflet-popup-content { margin: 8px 11px; font-size: 11.5px; line-height: 1.6; }
    .leaflet-popup-content-wrapper { box-shadow: 0 22px 50px rgba(15,23,42,.22); border-radius: 10px; }
    .leaflet-popup-tip { box-shadow: 0 8px 18px rgba(15,23,42,.15); }
    /* دکمهٔ بستن پاپ‌آپ جمعوجور و داخل کادر */
    .leaflet-popup-close-button { width: 22px !important; height: 22px !important; line-height: 22px !important; font-size: 15px !important; top: 5px !important; inset-inline-end: 5px !important; }
    /* ---------- برچسب/پاپ‌آپ نقشه: کادر متناسب با متن (بدون بک‌گراند بزرگ) ----------
       اندازهٔ پاپ‌آپ در maps.js بر اساس اندازهٔ ظرف نقشه تعیین می‌شود؛
       نقشه‌های کوچک کلاس amlak-popup-compact می‌گیرند تا متن‌ها فشرده شوند. */
    .leaflet-popup-content { margin: 7px 10px; font-size: 10.5px; line-height: 1.65; }
    .leaflet-popup-content-wrapper { border-radius: 10px; padding: 0; }
    .leaflet-popup-content-wrapper, .leaflet-popup-content { max-width: min(240px, 78vw); }
    .amlak-popup-compact .leaflet-popup-content-wrapper { border-radius: 9px; }
    .amlak-popup-compact .leaflet-popup-content { margin: 6px 8px; font-size: 10px; }
    .amlak-popup-compact .amlak-popup-title { font-size: 11px !important; }
    .amlak-popup-compact .mc-card { width: 156px; }
    .amlak-popup-compact .mc-card .mc-media { height: 62px; margin-bottom: 5px; }
    .amlak-popup-compact .mc-card .mc-name { font-size: 11.5px; margin-bottom: 3px; }
    .amlak-popup-compact .mc-card .mc-meta { gap: 5px; font-size: 9.5px; margin-bottom: 5px; }
    .amlak-popup-compact .mc-card .mc-link { font-size: 9.5px; padding: 3px 9px; }
    .amlak-popup-compact .mc-card .mc-price { font-size: 9.5px; padding: 3px 7px; right: 5px; bottom: 5px; }
    .amlak-popup-compact .mc-card .mc-ph { font-size: 1.5rem; }
    /* کارت ملک داخل پاپ‌آپ — نسخهٔ فشرده برای نقشه‌های کوچک */
    .mc-card { width: 200px; }
    .mc-card .mc-media { height: 104px; margin-bottom: 7px; }
    .mc-card .mc-name { font-size: 13px; margin-bottom: 4px; }
    .mc-card .mc-meta { gap: 7px; font-size: 10.5px; margin-bottom: 7px; }
    .mc-card .mc-link { font-size: 10.5px; padding: 4px 11px; }

/* ==========================================================================
   کارت ملک (مشترک بین صفحات)
   ========================================================================== */
.props-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(255px,1fr)); gap:1.4rem; }
.prop-card { background:#fff; border:1px solid rgba(148,163,184,.22); border-radius:20px; overflow:hidden; box-shadow:0 12px 30px rgba(15,23,42,.05); display:flex; flex-direction:column; transition:transform .3s cubic-bezier(.32,.72,0,1),box-shadow .3s ease; }
.prop-card:hover { transform:translateY(-6px); box-shadow:0 24px 48px rgba(15,23,42,.13); }
.prop-media { position:relative; height:190px; background:#eef1f6; overflow:hidden; }
.prop-media img { width:100%; height:100%; object-fit:cover; transition:transform .5s cubic-bezier(.32,.72,0,1); }
.prop-card:hover .prop-media img { transform:scale(1.06); }
.prop-cat-badge { position:absolute; top:.7rem; right:.7rem; background:rgba(15,23,42,.62); color:#fff; font-size:.72rem; padding:.3rem .7rem; border-radius:999px; backdrop-filter:blur(4px); }
.prop-view-badge { position:absolute; top:.7rem; left:.7rem; background:rgba(255,255,255,.9); color:#475569; font-size:.72rem; padding:.3rem .65rem; border-radius:999px; display:inline-flex; align-items:center; gap:.3rem; }
/* قیمت داخل بدنهٔ کارت (قبلاً تگ شیشه‌ای روی تصویر بود) — دیگر «تگ» نیست */
.prop-price { display:flex; align-items:center; gap:.35rem; margin:.1rem 0 .15rem; color:var(--tm-ink,#0f172a); font-weight:800; font-size:.95rem; line-height:1.7; }
.prop-price .prop-price-ico { color:var(--color-primary,#5b45e8); font-size:.82rem; flex-shrink:0; }
.prop-price .prop-price-val { font-size:1rem; }
/* ملک اقساطی: به‌جای برچسب «پرداخت مرحله‌ای» خودِ ردیف‌های اقساط نوشته می‌شود */
/* آیکون هم‌خط با ردیف‌های اقساط: قبلاً ستونی بود و آیکون یک خط بالاتر می‌افتاد */
.prop-price.prop-price-install { flex-direction:row; align-items:flex-start; gap:.4rem; }
.prop-price.prop-price-install .prop-price-ico { margin-top:.2rem; }
.prop-price-rows { display:flex; flex-direction:column; gap:.1rem; width:100%; min-width:0; }
/* عنوان قسط و مبلغش چسبیده به هم می‌مانند؛ قبلاً space-between مبلغ را به انتهای
   کارت پرت می‌کرد و بین عنوان و قیمت فاصلهٔ زیادی می‌افتاد. */
.prop-price-line { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:flex-start; gap:.35rem; font-size:.78rem; font-weight:600; color:var(--tm-muted-strong,#475569); }
.prop-price-line .ppl-title { flex:0 0 auto; }
.prop-price-line .ppl-amount { color:var(--tm-ink,#0f172a); font-weight:800; white-space:nowrap; }
.prop-price-line.prop-price-more { justify-content:flex-start; color:var(--tm-muted-strong,#94a3b8); font-size:.72rem; }
/* برچسب وضعیت ملک: فروخته شد / اجاره داده شد */
.prop-status-badge { position:absolute; top:.7rem; left:3.6rem; display:inline-flex; align-items:center; gap:.3rem; font-size:.72rem; font-weight:700; padding:.3rem .7rem; border-radius:999px; color:#fff; box-shadow:0 6px 14px rgba(15,23,42,.18); }
.prop-status-badge.prop-status-sold { background:linear-gradient(135deg,#dc2626,#ef4444); }
.prop-status-badge.prop-status-rented { background:linear-gradient(135deg,#2563eb,#3b82f6); }
.prop-card.is-sold .prop-media img, .prop-card.is-rented .prop-media img { filter:saturate(.55) brightness(.92); }
.pd-status-chip { display:inline-flex; align-items:center; gap:.4rem; font-family:'Vazirmatn',sans-serif; font-size:.85rem; font-weight:700; padding:.35rem .9rem; border-radius:999px; color:#fff; vertical-align:middle; white-space:nowrap; }
.pd-status-chip.pd-status-sold { background:linear-gradient(135deg,#dc2626,#ef4444); }
.pd-status-chip.pd-status-rented { background:linear-gradient(135deg,#2563eb,#3b82f6); }
.prop-body { padding:1rem 1rem 1.05rem; display:flex; flex-direction:column; gap:.45rem; flex:1; }
.prop-name { font-weight:800; font-size:1.02rem; color:#0f172a; margin:0; }
.prop-meta { display:flex; flex-wrap:wrap; gap:.9rem; color:#64748b; font-size:.8rem; }
.prop-meta i { color:#5b45e8; margin-inline-end:.3rem; }
.prop-consultant { display:flex; align-items:center; gap:.5rem; font-size:.8rem; color:#64748b; border-top:1px solid rgba(148,163,184,.18); margin-top:.35rem; padding-top:.6rem; }
.prop-consultant .mini-avatar { width:26px; height:26px; border-radius:50%; background:#ede9fe; color:#6d28d9; display:grid; place-items:center; font-size:.72rem; font-weight:800; }
/* برچسب واضح «مشاور» روی کارت ملک — تا نام مشاور با مالک اشتباه نشود */
.prop-consultant .pc-chip-icon { width:24px; height:24px; border-radius:8px; background:#ede9fe; color:#6d28d9; display:grid; place-items:center; font-size:.72rem; flex-shrink:0; }
.prop-consultant .pc-chip-label { color:#6d28d9; font-weight:800; }
/* آدرس سلسله‌مراتبی روی کارت ملک (استان/شهر / منطقه) */
.prop-location { display:flex; align-items:center; gap:.4rem; font-size:.79rem; color:#64748b; }
.prop-location i { color:var(--color-primary,#5b45e8); flex-shrink:0; }
/* یک خط توضیح کوتاه روی کارت — کارت‌هایی که متراژ/سال ساخت ندارند خالی به‌نظر نمی‌رسند */
.prop-snippet { color:var(--tm-muted-strong,#64748b); font-size:.78rem; line-height:1.9; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }

/* ---- برچسب‌های تاریخچهٔ بازدید کاربر («مطالعه‌شده» / «به‌تازگی بازدید شده») ----
   با assets/js/site.js روی کارت‌ها و ردیف‌های لیست پر می‌شوند.
   برچسب عمداً کوچک و جمع‌وجور است تا روی کارت‌های فشرده (مقالات مرتبط و
   کارت‌های موبایل) جا باز نکند و طرح کارت را به‌هم نزند. */
/* متن فقط برای صفحه‌خوان (مثلاً عنوان سطح ۲ برای درست‌کردن ترتیب هدینگ‌ها) */
.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; }
/* نشانگر محتوای اصلی صفحه‌هایی که <main> ندارند (role="main" روی div؛
   عمداً از عنصر <main> استفاده نشده تا قواعد CSS مربوط به آن دست‌نخورده بماند) */
.pl-main { display:block; min-width:0; }
.hist-badges { display:none; flex-wrap:wrap; gap:.25rem; }
.hist-badges:not(:empty) { display:flex; }
/* متن کوتاه «دیده‌شده» + نشان ریز: قرص تا حد امکان جمع‌وجور است تا روی کارت
   (خصوصاً در موبایل و کارت‌های مرتبط) جا باز کند و طرح را به‌هم نزند. */
.hist-badge { display:inline-flex; align-items:center; gap:.22rem; font-size:.58rem; font-weight:700; padding:.08rem .42rem; border-radius:999px; border:1px solid transparent; white-space:nowrap; line-height:1.6; }
.hist-badge i { font-size:.55rem; }
.hist-badge.is-recent { background:rgba(16,185,129,.14); border-color:rgba(16,185,129,.4); color:#047857; }
.hist-badge.is-read { background:rgba(148,163,184,.16); border-color:rgba(148,163,184,.35); color:#475569; }
/* نقطهٔ ریز حالت «تازه دیده‌شده» — همان نشان کوچکی که کاربر با یک نگاه می‌فهمد */
.hist-badge-dot { width:.34rem; height:.34rem; border-radius:999px; background:#10b981; box-shadow:0 0 0 2px rgba(16,185,129,.22); flex:0 0 auto; }
.hist-badge.is-read .hist-badge-dot { background:#94a3b8; box-shadow:none; }
/* روی تصویر کارت (صفحهٔ اصلی): قرص کوچک شیشه‌ای، بدون فشردن متن کارت */
.hist-badges--overlay { position:absolute !important; top:.65rem; left:.65rem; right:auto; z-index:2; max-width:calc(100% - 1.3rem); }
/* برچسب تاریخچه روی گوشهٔ پایین-چپ تصویر: با برچسب دسته (بالا-راست)، قیمت
   (پایین-راست) و شمارندهٔ بازدید (بالا-چپ) کارت‌های ملک تداخل نمی‌کند. */
.hist-badges--overlay-bottom { top:auto !important; bottom:.65rem; }
.hist-badges--overlay .hist-badge { background:rgba(15,23,42,.78) !important; border-color:rgba(255,255,255,.22) !important; color:#e8eefc !important; backdrop-filter:blur(4px); }
.hist-badges--overlay .hist-badge.is-recent { background:rgba(5,120,84,.85) !important; }
/* روی قرص تیرهٔ تصویر، نقطهٔ «تازه دیده‌شده» روشن‌تر می‌شود تا در پس‌زمینهٔ سبز گم نشود */
.hist-badges--overlay .hist-badge.is-recent .hist-badge-dot { background:#6ee7b7; box-shadow:0 0 0 2px rgba(110,231,183,.28); }
/* ردیف‌های لیست (لیست تحت نظر/داشبورد و ...) هم می‌توانند داده-history داشته باشند */
[data-hist-row] .hist-badges { margin-inline-start:.35rem; }
.mc-meta .mc-loc i { color:#5b45e8; }
/* جای‌نگهدار وقتی عکس کارت ملک لود نشود */
.prop-media.prop-media-empty { background:#eef1f6; }
/* آیکون «تصویر» به‌صورت SVG درون‌خطی (data URI) — جای گلیف فونت‌آوسام که
   با حذف FontAwesome از CDN دیگر وجود ندارد. */
.prop-media.prop-media-empty::after { content:''; display:block; height:100%; background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%23c3cad6' d='M448 80c8.8 0 16 7.2 16 16V415.8l-5-6.5-136-176c-4.5-5.9-11.6-9.3-19-9.3s-14.4 3.4-19 9.3L202 340.7l-30.5-42.7C167 291.7 159.8 288 152 288s-15 3.7-19.5 10.1l-80 112L48 416.3l0-.3V96c0-8.8 7.2-16 16-16H448zM64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zm80 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z'/%3E%3C/svg%3E") center/2.4rem no-repeat; }

/* لینک نام کاربر در هدر → داشبورد/ادمین */
.nav-user-link { color:inherit; font-weight:700; }
.nav-user-link:hover { color:#5b45e8; }

/* ==========================================================================
   نوار پایین موبایل (شبیه اپلیکیشن) — فقط در موبایل نمایش داده می‌شود
   ========================================================================== */
.site-tabbar { display: none !important; }
@media (max-width: 900px) {
    /*
     * ⚠ تم‌پذیری: تمام رنگ‌های این نوار از توکن‌های تم می‌آیند.
     * پیش‌تر پس‌زمینه «rgba(255,255,255,.97)» و متن «#64748b» هاردکد بودند؛
     * در نتیجه با تم تیره نوار پایین هم سفید می‌ماند و از کل صفحه جدا می‌افتاد.
     * --tabbar-rgb یک سه‌گانهٔ «r,g,b» است تا شفافیت شیشه‌ای حفظ شود.
     */
    .site-tabbar {
        display: flex !important;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        z-index: 90;
        background: rgba(var(--tabbar-rgb, 255,255,255), .94);
        -webkit-backdrop-filter: blur(18px) saturate(180%);
        backdrop-filter: blur(18px) saturate(180%);
        border-top: 1px solid rgba(var(--ink-rgb, 15,23,42), .09);
        box-shadow: 0 -10px 30px rgba(var(--ink-rgb, 15,23,42), .1);
        padding: 5px 8px calc(5px + env(safe-area-inset-bottom, 0px));
    }
    .site-tabbar .tabbar-item {
        position: relative;
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        padding: 7px 4px 6px;
        min-height: 46px;
        color: var(--tabbar-ink, #64748b);
        font-size: 10px;
        font-weight: 600;
        text-decoration: none;
        border-radius: 12px;
        -webkit-tap-highlight-color: transparent;
        transition: color .18s ease, background .18s ease;
    }
    .site-tabbar .tabbar-item span {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .site-tabbar .tabbar-item i { font-size: 1.25rem; }
    /* تبِ جاری: پیلِ کم‌رنگ برند + نشانگر بالای نوار (فقط رنگ عوض نمی‌شود) */
    .site-tabbar .tabbar-item.active {
        color: var(--tabbar-active, #5b45e8);
        background: var(--tabbar-active-bg, rgba(91,69,232,.08));
        font-weight: 700;
    }
    .site-tabbar .tabbar-item.active::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 22px;
        height: 3px;
        border-radius: 0 0 3px 3px;
        background: var(--tabbar-active, #5b45e8);
    }
    .site-tabbar .tabbar-item:active { background: var(--tabbar-active-bg, rgba(91,69,232,.08)); }
    body { padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }
}

/* دکمهٔ شناور لیست تحت نظر (موبایل) — سمت چپ، بالای تب‌بار */
.watchlist-fab {
    display: none;
    position: fixed;
    bottom: calc(78px + env(safe-area-inset-bottom, 0px));
    left: 14px;
    z-index: 95;
    width: 52px; height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5b45e8, #7c3aed);
    color: #fff;
    align-items: center; justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 12px 28px rgba(91,69,232,.4);
    text-decoration: none;
}
.watchlist-fab:active { transform: scale(.94); }
.watchlist-fab-count {
    position: absolute; top: -4px; right: -4px;
    min-width: 21px; height: 21px;
    border-radius: 999px;
    background: #e11d48; color: #fff;
    font-size: .68rem; font-weight: 800;
    display: none; align-items: center; justify-content: center;
    padding: 0 5px;
    border: 2px solid #fff;
    font-family: 'Poppins', 'Vazirmatn', sans-serif;
}
.watchlist-fab-count:not(:empty) { display: flex; }
@media (max-width: 900px) {
    .watchlist-fab { display: flex; }
}

/* دکمهٔ شناور تماس با ما (موبایل) — کنار دکمهٔ لیست تحت نظر */
.contact-fab {
    display: none;
    position: fixed;
    bottom: calc(78px + env(safe-area-inset-bottom, 0px));
    left: 74px;
    z-index: 95;
    width: 52px; height: 52px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid rgba(148,163,184,.3);
    color: #5b45e8;
    align-items: center; justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 12px 28px rgba(15,23,42,.16);
    text-decoration: none;
}
.contact-fab:active { transform: scale(.94); }
@media (max-width: 900px) {
    .contact-fab { display: flex; }
}
@media (max-width: 900px) {
    body:not(:has(.watchlist-fab)) .contact-fab { left: 14px; }
}

/* بج لیست تحت نظر در هدر (دسکتاپ، کنار حساب کاربری) */
.nav-watchlist {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(148,163,184,.25);
    color: #5b45e8;
    font-size: 1.05rem;
    transition: background .2s ease, transform .2s ease;
}
.nav-watchlist:hover { background: rgba(91,69,232,.08); transform: translateY(-1px); }
.nav-watchlist-badge {
    position: absolute; top: -5px; left: -5px;
    min-width: 19px; height: 19px;
    border-radius: 999px;
    background: #e11d48; color: #fff;
    font-size: .65rem; font-weight: 800;
    display: none; align-items: center; justify-content: center;
    padding: 0 4px;
    border: 2px solid #fff;
    font-family: 'Poppins', 'Vazirmatn', sans-serif;
}
.nav-watchlist-badge:not(:empty) { display: flex; }
@media (max-width: 900px) { .nav-watchlist { display: none; } }

/* دکمهٔ تحت نظر در صفحهٔ ملک */
.pd-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; }
.pd-title-row .pd-title { flex: 1; min-width: 0; }

/* برند در هیرو: موبایل → نام سایت داخل پیل eyebrow؛ دسکتاپ → متن ثابت */
.eyebrow-mobile { display: none; }
@media (max-width: 900px) {
    .eyebrow-desktop { display: none; }
    .eyebrow-mobile { display: inline; }
    /* پیل eyebrow در موبایل ظاهر برند را می‌گیرد */
    .hero-eyebrow.hero-eyebrow {
        gap: .4rem;
        font-size: .8rem;
        font-weight: 600;
        padding: .45rem 1rem;
    }
    /* برند متنی، بدون آیکن/لوگو — مثل برچسب‌های تب‌بار */
    .hero-section .hero-eyebrow > i { display: none; }
}

/* ==========================================================================
   فاصلهٔ شروع محتوا زیر هدر شناور — فقط دسکتاپ (موبایل هدر ندارد)
   ========================================================================== */
@media (min-width: 901px) {
    body .pl-hero { padding-top: 7.5rem !important; }
    body .page-hero { padding-top: 8.5rem !important; }
    body main > .section:first-child,
    body main > section:first-of-type:not(.hero-section) { padding-top: 6.5rem !important; }
}

/* صفحاتی که مستقیم container دارند: فاصلهٔ اول دسکتاپ */
@media (min-width: 901px) {
    body main > .container:first-child { padding-top: 6.5rem !important; }
    body .pd-wrap { padding-top: 6.5rem !important; }
    body .article-editorial { padding-top: 6.5rem !important; }
    /* هیروی صفحات عمومی: شروع محتوا از زیر هدر شناور (مثل صفحه املاک) */
    body .cs-hero { padding-top: 7.5rem !important; }
    body .ar-hero { padding-top: 7.5rem !important; }
    body .ct-hero { padding-top: 7.5rem !important; }
    /* صفحهٔ امتیازدهی و لیست تحت نظر هم باید زیر هدر شناور شروع شوند (قبلاً
       کارت سفید صفحهٔ امتیاز زیر هدر می‌رفت و بریده می‌شد) */
    body .rt-wrap { padding-top: 6.5rem !important; }
    body .wl-wrap { padding-top: 6.5rem !important; }
}

/* موبایل: هدر هم ثابت است، پس محتوای صفحه‌هایی که هیرو ندارند هم فاصله می‌گیرد */
@media (max-width: 900px) {
    body .pl-hero, body .cs-hero, body .ar-hero, body .ct-hero { padding-top: 5.75rem !important; }
    body .rt-wrap, body .wl-wrap { padding-top: 5.25rem !important; }
    body main > .container:first-child { padding-top: 5.25rem !important; }
}

/* دکمهٔ تماس در تب‌بار عمومی — ۶ آیتم جا شوند: لیبل‌ها کمی فشرده‌تر + تماس با رنگ متمایز */
@media (max-width: 900px) {
    .site-tabbar .tabbar-item { padding: 6px 2px; }
    .site-tabbar .tabbar-item span { font-size: 9.5px; }
    .site-tabbar .tabbar-contact i { font-size: 1.15rem; }
    .site-tabbar .tabbar-contact.active { color: #0ea5a4; }
}

/* دانلود اپ اندروید در فوتر */
/* دانلود APK: یک قرص فشرده در ردیف پایانی فوتر — جای ستون‌ها را نمی‌گیرد */
.pl-apk-btn { display:inline-flex; align-items:center; gap:.5rem; border-radius:999px; padding:.55rem 1.1rem; background:linear-gradient(135deg,#a4c639,#7a9a2e); color:#fff !important; font-weight:700; font-size:.82rem; box-shadow:0 6px 16px rgba(122,154,46,.3); transition:transform .2s ease, box-shadow .2s ease; white-space:nowrap; }
.pl-apk-btn:hover { transform:translateY(-2px); box-shadow:0 10px 22px rgba(122,154,46,.4); color:#fff !important; }
.pl-apk-btn i { font-size:.95rem; color:#fff !important; }
.pl-apk-btn, .pl-apk-btn:hover, .pl-apk-btn:active, .pl-apk-btn:focus { color:#ffffff !important; }
.pl-footer-bottom { display:flex; align-items:center; justify-content:center; gap:1rem; flex-wrap:wrap; text-align:center; }

/* ---------------------------------------------------------------------------
   خوانایی رنگ متنها (A11y) — هماهنگ با موتور کنتراست includes/theme.php
   ---------------------------------------------------------------------------
   پیش از این، متن چیپها/برچسبها با var(--brand) رنگ میشد و در تم تیره روی
   چیپ تیره نسبت ۳٫۷۷ میداد (حد WCAG = ۴٫۵). متغیرهای --chip-ink،
   --tm-muted-strong و --brand-solid در theme.php همان لحظه که پالت ساخته
   میشود با محاسبهٔ روشنایی نسبی WCAG تولید میشوند؛ مقادیر fallback هم برای
   حالت «تم پیشفرض» (که اصلاً متغیری تزریق نمیشود) انتخاب شدهاند.
   --------------------------------------------------------------------------- */
.section-title .eyebrow,
.hero-eyebrow,
.home-art-more,
.ar-author,
.account-role { color: var(--chip-ink, var(--brand)); }
.section-title p { color: var(--tm-muted-strong, #55607a); }
.filter-chip.active { background: var(--brand-solid, var(--brand)); border-color: transparent; color: #ffffff; }

/* ==========================================================================
   کارت مقالات مرتبط — با تصویر کاور (صفحهٔ ملک و صفحهٔ فرود منطقه)
   قبلاً این بلوک استایل درون‌خطی و بدون تصویر بود.
   ========================================================================== */
.rel-art-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.rel-art-card { display: flex; flex-direction: column; background: var(--tm-surface, #fff); border: 1px solid var(--tm-border, rgba(148,163,184,.2)); border-radius: 18px; overflow: hidden; text-decoration: none; color: inherit; transition: transform .25s cubic-bezier(.32,.72,0,1), box-shadow .25s ease; }
.rel-art-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(15,23,42,.12); }
.rel-art-media { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 9; background: var(--tm-map, #eef2f7); color: var(--tm-muted-strong, #94a3b8); }
.rel-art-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rel-art-media .rel-art-fallback { font-size: 2rem; }
.rel-art-media:not(.broken) img + .rel-art-fallback { display: none; }
.rel-art-media.broken img { display: none; }
.rel-art-body { display: flex; flex-direction: column; gap: .4rem; padding: .9rem 1rem 1rem; }
.rel-art-title { font-weight: 700; font-size: .98rem; color: var(--tm-ink, var(--ink)); line-height: 1.75; }
.rel-art-excerpt { color: var(--tm-muted-strong, #64748b); font-size: .83rem; line-height: 1.9; }
.rel-art-meta { display: inline-flex; align-items: center; gap: .35rem; color: var(--tm-muted-strong, #94a3b8); font-size: .74rem; margin-top: .15rem; }
@media (max-width: 560px) {
    .rel-art-grid { grid-template-columns: 1fr; }
}
