/* remax.mkw.group — Remax Estates rebuild (2026-05-11 r4)
 * Visual identity: Minimal Premium / Authoritative
 * Palette (from brief section 8):
 *   #0A0A0A text/headers · #FFFFFF base · #F5F5F5 alt section
 *   #DC1C2E primary CTA (RE/MAX red) · #003DA5 accent (RE/MAX blue)
 * Fonts: IBM Plex Sans Arabic (AR) + Inter (EN) — display=swap
 * Mobile-first. RTL default. Bilingual.
 */

:root {
  --ink:        #0A0A0A;
  --bg:         #FFFFFF;
  --bg-alt:     #F5F5F5;
  --cta:        #DC1C2E;
  --cta-dark:   #B41523;
  --accent:     #003DA5;
  --accent-dark:#002A75;
  --line:       #E4E4E7;
  --muted:      #57575E;
  --soft:       #71717A;
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 8px;
  --shadow-sm: 0 1px 2px rgba(10,10,10,0.04), 0 1px 1px rgba(10,10,10,0.03);
  --shadow-md: 0 6px 18px -8px rgba(10,10,10,0.12);
  --shadow-lg: 0 20px 40px -22px rgba(10,10,10,0.18);
  --container: 1180px;
  --pad-section-mob: 48px;
  --pad-section: 80px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'IBM Plex Sans Arabic', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  font-size: 16px;
}
html[lang="en"] body { font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; }
html[dir="rtl"] body { text-align: right; }
html[dir="ltr"] body { text-align: left; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
input, textarea, select { font-size: 16px; } /* prevent iOS zoom */

/* ── Layout ── */
.container { max-width: var(--container); margin: 0 auto; padding-inline: 20px; }
@media (min-width: 768px) { .container { padding-inline: 32px; } }

section { padding-block: var(--pad-section-mob); }
@media (min-width: 1024px) { section { padding-block: var(--pad-section); } }
section.alt { background: var(--bg-alt); }

h1, h2, h3, h4 {
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(1.8rem, 6vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 4.2vw, 2.2rem); }
h3 { font-size: clamp(1.15rem, 2.6vw, 1.4rem); }
p  { color: var(--muted); margin: 0 0 1em; line-height: 1.75; }
small, .small { font-size: 0.85rem; color: var(--soft); }

.kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cta);
  margin-bottom: 0.85rem;
}
.kicker.muted { color: var(--accent); }

.lead { font-size: clamp(1rem, 1.4vw, 1.1rem); color: var(--muted); max-width: 56ch; }

/* ── Skip link (accessibility) ── */
.skip { position: absolute; inset-inline-start: -9999px; top: auto; }
.skip:focus { position: fixed; top: 10px; inset-inline-start: 10px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 4px; z-index: 999; }

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.95);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 64px;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: 20px;
}
@media (min-width: 768px) { .site-header__inner { padding-inline: 32px; height: 72px; } }
.site-header__logo { display: flex; align-items: center; gap: 10px; }
.site-header__logo img { height: 40px; width: auto; }
.site-header__brand { font-weight: 800; font-size: 0.95rem; color: var(--ink); letter-spacing: 0.02em; }
@media (max-width: 480px) { .site-header__brand { display: none; } }

.site-nav {
  display: none;
  margin-inline-start: auto;
  gap: 4px;
  align-items: center;
}
@media (min-width: 1024px) { .site-nav { display: flex; } }
.site-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
  padding: 10px 14px;
  border-radius: var(--r-sm);
  transition: background 0.15s;
}
.site-nav a:hover { background: var(--bg-alt); }
.site-nav a.is-current { color: var(--cta); font-weight: 700; }

.header-tools {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
@media (min-width: 1024px) { .header-tools { margin-inline-start: 12px; } }

.lang-switch {
  display: inline-flex;
  align-items: center;
  height: 40px;
  min-width: 44px;
  padding: 0 12px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.lang-switch:hover { background: var(--bg-alt); border-color: var(--ink); }

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  background: var(--cta);
  color: #fff;
  border-radius: var(--r-sm);
  font-weight: 700;
  font-size: 0.88rem;
  transition: background 0.15s, transform 0.15s;
}
.header-cta:hover { background: var(--cta-dark); transform: translateY(-1px); }
@media (max-width: 480px) { .header-cta { padding: 0 12px; font-size: 0.82rem; } }

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
}
@media (min-width: 1024px) { .menu-toggle { display: none; } }
.menu-toggle svg { width: 22px; height: 22px; stroke: var(--ink); }

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 8px 20px 16px;
}
.mobile-nav.is-open { display: block; }
.mobile-nav a {
  display: block;
  padding: 12px 4px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  min-height: 44px;
}
.mobile-nav a:last-child { border-bottom: 0; }
.mobile-nav a.is-current { color: var(--cta); font-weight: 700; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 22px;
  border-radius: var(--r-sm);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
  text-align: center;
}
.btn--primary { background: var(--cta); color: #fff; }
.btn--primary:hover { background: var(--cta-dark); transform: translateY(-1px); }
.btn--secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--secondary:hover { background: var(--ink); color: #fff; }
.btn--ghost { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn--ghost:hover { background: var(--accent); color: #fff; }
.btn--wide { width: 100%; }

/* ── Hero ── */
.hero {
  padding-block: 64px 56px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 1024px) { .hero { padding-block: 96px 96px; } }
.hero__grid {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 900px) {
  .hero__grid { grid-template-columns: 1.1fr 0.9fr; gap: 56px; }
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(0,61,165,0.08);
  padding: 6px 14px;
  border-radius: 9999px;
  margin-bottom: 18px;
}
.hero__eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--cta); }
.hero__title { font-size: clamp(2rem, 6.4vw, 3.4rem); font-weight: 800; line-height: 1.15; }
.hero__lead { font-size: clamp(1rem, 1.5vw, 1.15rem); color: var(--muted); margin-bottom: 28px; max-width: 56ch; }
.hero__ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__media { display: flex; justify-content: center; align-items: center; }
.hero__media img {
  width: 100%;
  max-width: 460px;
  height: auto;
  filter: drop-shadow(0 30px 40px rgba(10,10,10,0.10));
}

/* ── Section heading ── */
.section-heading { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.section-heading h2 { margin-bottom: 12px; }
.section-heading p { margin: 0; }

/* ── Cards (services / property / values) ── */
.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 600px)  { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px)  { .grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px)  { .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .grid--4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px 22px;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
}
.card:hover { border-color: var(--ink); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card__icon {
  width: 44px; height: 44px;
  border-radius: var(--r-md);
  background: rgba(220,28,46,0.08);
  color: var(--cta);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 6px;
}
.card__icon svg { width: 22px; height: 22px; }
.card__icon--accent { background: rgba(0,61,165,0.08); color: var(--accent); }
.card h3 { margin: 0 0 4px; font-size: 1.08rem; font-weight: 700; }
.card p { margin: 0; font-size: 0.95rem; line-height: 1.7; }

/* ── Stats strip (placeholder for RE/MAX global numbers) ── */
.stats {
  background: var(--ink);
  color: #fff;
}
.stats .container { padding-block: 12px; }
.stats__grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(2, 1fr);
  text-align: center;
}
@media (min-width: 768px) { .stats__grid { grid-template-columns: repeat(4, 1fr); } }
.stat__num { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 800; color: #fff; line-height: 1; }
.stat__label { font-size: 0.85rem; color: rgba(255,255,255,0.7); margin-top: 6px; letter-spacing: 0.04em; }

/* ── Pending content placeholder badge ── */
.coming-soon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,61,165,0.10);
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 9999px;
  margin-bottom: 12px;
  border: 1px dashed rgba(0,61,165,0.30);
}
.coming-soon::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ── Final CTA band ── */
.cta-band {
  background: var(--ink);
  color: #fff;
  text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,0.75); margin: 0 auto 24px; max-width: 52ch; }
.cta-band .btn--primary { background: var(--cta); }
.cta-band .btn--secondary { color: #fff; border-color: rgba(255,255,255,0.4); }
.cta-band .btn--secondary:hover { background: #fff; color: var(--ink); }

/* ── Forms ── */
.form { display: flex; flex-direction: column; gap: 14px; max-width: 560px; }
.form--wide { max-width: 100%; }
.form__row { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .form__row--2 { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 0.88rem; font-weight: 600; color: var(--ink); }
.field > input,
.field > select,
.field > textarea {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: 16px;
  color: var(--ink);
  min-height: 44px;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field > textarea { resize: vertical; min-height: 120px; line-height: 1.6; }
.field > input:focus,
.field > select:focus,
.field > textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,61,165,0.15);
}
.field--error > input,
.field--error > select,
.field--error > textarea { border-color: var(--cta); }
.field__error { font-size: 0.8rem; color: var(--cta); }
.form__feedback {
  padding: 12px 16px;
  border-radius: var(--r-sm);
  font-size: 0.92rem;
  display: none;
}
.form__feedback.is-success { display: block; background: rgba(0,150,80,0.08); color: #047a3f; border: 1px solid rgba(0,150,80,0.20); }
.form__feedback.is-info    { display: block; background: rgba(0,61,165,0.08); color: var(--accent); border: 1px solid rgba(0,61,165,0.20); }
.form__feedback.is-error   { display: block; background: rgba(220,28,46,0.06); color: var(--cta); border: 1px solid rgba(220,28,46,0.20); }
.form__fallback-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }

/* ── Knowledge article cards ── */
.article-list { display: grid; gap: 16px; }
@media (min-width: 768px) { .article-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .article-list { grid-template-columns: repeat(3, 1fr); } }
.article-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px 20px 22px;
  transition: border-color 0.18s, box-shadow 0.18s;
  display: flex; flex-direction: column; gap: 8px;
  height: 100%;
}
.article-card:hover { border-color: var(--ink); box-shadow: var(--shadow-md); }
.article-card__cat { font-size: 0.76rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.article-card h3 { margin: 0; font-size: 1.05rem; line-height: 1.4; }
.article-card p { margin: 0; font-size: 0.93rem; color: var(--muted); }
.article-card__read { margin-top: auto; padding-top: 12px; font-size: 0.85rem; font-weight: 700; color: var(--cta); }

/* ── Article body (knowledge stub) ── */
.article {
  max-width: 720px;
  margin: 0 auto;
  padding-block: 56px;
}
.article h1 { margin-bottom: 8px; }
.article__meta { color: var(--soft); font-size: 0.88rem; margin-bottom: 28px; }
.article__body p { font-size: 1.04rem; line-height: 1.85; color: #2a2a30; }
.article__body h2 { margin-top: 36px; }
.article__body h3 { margin-top: 28px; }
.article__body ul, .article__body ol { padding-inline-start: 1.4em; color: #2a2a30; line-height: 1.85; }

/* ── Map embed ── */
.map-wrap {
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 16 / 10;
  background: var(--bg-alt);
}
.map-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ── Footer ── */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.7);
  padding-block: 48px 28px;
  border-top: 1px solid #000;
  font-size: 0.9rem;
}
.site-footer__grid {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer h4 { color: #fff; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 14px; }
.site-footer a { color: rgba(255,255,255,0.7); display: inline-block; padding: 4px 0; }
.site-footer a:hover { color: #fff; }
.site-footer__logo { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.site-footer__logo img { height: 40px; filter: brightness(0) invert(1); }
.site-footer__brand { font-weight: 800; color: #fff; }
.site-footer__nav, .site-footer__contact { display: flex; flex-direction: column; }
.site-footer__social { display: flex; gap: 10px; margin-top: 8px; }
.site-footer__social a {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.06);
  border-radius: var(--r-sm);
  padding: 0;
}
.site-footer__social a:hover { background: rgba(255,255,255,0.12); }
.site-footer__social svg { width: 18px; height: 18px; fill: currentColor; color: rgba(255,255,255,0.85); }
.site-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 32px;
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}
.site-footer__endorsement { display: inline-flex; align-items: center; gap: 8px; }
.site-footer__endorsement img { height: 18px; opacity: 0.85; filter: brightness(0) invert(1); }
.site-footer__indep { font-size: 0.74rem; color: rgba(255,255,255,0.4); letter-spacing: 0.04em; }

/* ── Floating WhatsApp button ── */
.wa-fab {
  position: fixed;
  bottom: 18px;
  inset-inline-end: 18px;
  z-index: 60;
  width: 56px; height: 56px;
  background: #25D366;
  color: #fff;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px -8px rgba(37,211,102,0.55);
  transition: transform 0.15s, box-shadow 0.15s;
}
.wa-fab:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -10px rgba(37,211,102,0.6); }
.wa-fab svg { width: 30px; height: 30px; fill: currentColor; }
/* In RTL, the brief asked bottom-left for AR. Override below. */
html[dir="rtl"] .wa-fab { inset-inline-end: auto; inset-inline-start: 18px; }

/* ── Reveal on scroll ── */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.in { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ── Utilities ── */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.hide-mob { display: none; }
@media (min-width: 768px) { .hide-mob { display: initial; } .hide-desk { display: none; } }
