/* ============================================================
   Wejhah Real Estate — homepage prototype
   Brand tokens lifted from wejhah-landing-web (the canonical).
   ============================================================ */

:root {
  /* brand */
  --wj-blue: #004992;
  --wj-blue-light: #0066A6;
  --wj-cyan: #03AAF3;
  --wj-yellow: #F7C32E;
  --wj-yellow-dark: #d9a90c;
  --wj-gray: #747579;
  --wj-dark: #0B0A12;
  --wj-bg: #ffffff;
  --wj-bg-light: #F5F5F6;
  --wj-bg-section: #E9EEF2;
  --wj-border: #e3e6ea;

  /* type */
  --font-en: 'Outfit', system-ui, sans-serif;
  --font-ar: 'Cairo', 'Outfit', system-ui, sans-serif;

  /* radii / shadows */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(11,10,18,.06);
  --shadow-md: 0 6px 16px rgba(11,10,18,.08);
  --shadow-lg: 0 12px 32px rgba(11,10,18,.12);

  /* layout */
  --container: 1240px;
  --gutter: 24px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: var(--font-ar);
  color: var(--wj-dark);
  background: var(--wj-bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

[lang="en"] body, body[lang="en"], html[lang="en"] body { font-family: var(--font-en); }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; border: 0; background: none; }
input, select { font: inherit; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* =============== Top utility bar =============== */
.topbar {
  background: var(--wj-dark);
  color: #d8dadf;
  font-size: 13px;
  padding: 10px 0;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.topbar a { color: #d8dadf; }
.topbar a:hover { color: #fff; }
.topbar .left, .topbar .right { display: flex; align-items: center; gap: 18px; }
.topbar .sep { width: 1px; height: 14px; background: #2a2933; display: inline-block; }
.topbar .pill {
  background: rgba(255,255,255,.08);
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-weight: 500;
}
.topbar .lang {
  color: var(--wj-yellow);
  font-weight: 600;
  letter-spacing: .02em;
}
.topbar .icon { width: 16px; height: 16px; display: inline-block; vertical-align: middle; }

/* =============== Header / nav =============== */
.header {
  background: #fff;
  border-bottom: 1px solid var(--wj-border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}
.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand img { height: 38px; width: auto; display: block; }
.brand-sub {
  font-family: var(--font-ar);
  font-size: 14px;
  font-weight: 700;
  color: var(--wj-blue);
  padding-inline-start: 12px;
  border-inline-start: 2px solid var(--wj-yellow);
  letter-spacing: .01em;
  line-height: 1;
}
.nav-primary {
  display: flex;
  align-items: center;
  gap: 28px;
  font-weight: 500;
  font-size: 15px;
}
.nav-primary a {
  color: var(--wj-dark);
  padding: 6px 0;
  position: relative;
  transition: color .15s;
}
.nav-primary a:hover { color: var(--wj-blue); }
.nav-primary a.active { color: var(--wj-blue); }
.nav-primary a.active::after {
  content: ""; position: absolute; bottom: -16px; left: 0; right: 0;
  height: 3px; background: var(--wj-blue); border-radius: 2px;
}
.cta-yellow {
  background: var(--wj-yellow);
  color: var(--wj-dark);
  padding: 10px 22px;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .01em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background .15s, transform .15s;
  white-space: nowrap;
}
.cta-yellow:hover { background: var(--wj-yellow-dark); transform: translateY(-1px); }

/* =============== Hero =============== */
.hero {
  position: relative;
  min-height: 560px;
  background:
    linear-gradient(135deg, rgba(0,73,146,.85) 0%, rgba(0,102,166,.78) 60%, rgba(3,170,243,.55) 100%),
    url('https://images.unsplash.com/photo-1518780664697-55e3ad937233?w=1920&q=80') center/cover no-repeat;
  color: #fff;
  display: flex;
  align-items: center;
  padding: 72px 0 96px;
}
.hero h1 {
  font-size: clamp(28px, 4.2vw, 48px);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 14px;
  max-width: 720px;
}
.hero .sub {
  font-size: clamp(15px, 1.5vw, 18px);
  opacity: .92;
  margin-bottom: 36px;
  max-width: 620px;
}
.hero .stats {
  display: flex;
  gap: 28px;
  margin-bottom: 28px;
  font-size: 14px;
  opacity: .9;
  flex-wrap: wrap;
}
.hero .stats .stat strong {
  color: var(--wj-yellow);
  font-size: 22px;
  font-weight: 700;
  display: block;
  margin-bottom: 2px;
}

/* search panel */
.search-panel {
  background: #fff;
  color: var(--wj-dark);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  max-width: 1080px;
}
.search-tabs {
  display: flex;
  border-bottom: 1px solid var(--wj-border);
}
.search-tab {
  flex: 0 0 auto;
  padding: 16px 32px;
  font-weight: 600;
  font-size: 16px;
  color: var(--wj-gray);
  border-bottom: 3px solid transparent;
  transition: color .15s, border-color .15s, background .15s;
}
.search-tab:hover { color: var(--wj-blue); }
.search-tab.active {
  color: var(--wj-blue);
  border-bottom-color: var(--wj-blue);
  background: rgba(0,73,146,.04);
}
.search-form {
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(6, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}
.search-form .field {
  position: relative;
}
.search-form .field label {
  position: absolute;
  top: 6px;
  inset-inline-start: 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--wj-gray);
  letter-spacing: .03em;
  pointer-events: none;
}
.search-form select, .search-form input {
  width: 100%;
  height: 56px;
  padding: 22px 14px 6px;
  border: 1px solid var(--wj-border);
  border-radius: var(--r-md);
  background: var(--wj-bg-light);
  font-weight: 500;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%23747579' d='M0 0l5 6 5-6z'/></svg>");
  background-repeat: no-repeat;
  background-position: left 14px center;
}
[dir="rtl"] .search-form select, [dir="rtl"] .search-form input {
  background-position: left 14px center;
}
[dir="ltr"] .search-form select, [dir="ltr"] .search-form input {
  background-position: right 14px center;
}
.search-form .submit {
  background: var(--wj-blue);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  padding: 0 32px;
  border-radius: var(--r-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .15s;
  height: 56px;
}
.search-form .submit:hover { background: var(--wj-blue-light); }

/* =============== Sections =============== */
section { padding: 72px 0; }
section.bg-soft { background: var(--wj-bg-section); }
section.bg-light { background: var(--wj-bg-light); }

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.section-head h2 {
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 700;
  color: var(--wj-dark);
  letter-spacing: -.005em;
}
.section-head .lead {
  color: var(--wj-gray);
  font-size: 15px;
  margin-top: 6px;
  max-width: 540px;
}
.see-all {
  color: var(--wj-blue);
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid transparent;
  transition: border-color .15s;
}
.see-all:hover { border-bottom-color: var(--wj-blue); }

/* =============== Listing card =============== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.card {
  background: #fff;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.card .media {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--wj-bg-light);
}
.card .media img { width: 100%; height: 100%; object-fit: cover; }
.card .badges {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  display: flex;
  gap: 6px;
}
.badge {
  background: rgba(11,10,18,.78);
  color: #fff;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
  backdrop-filter: blur(6px);
}
.badge.exclusive { background: var(--wj-yellow); color: var(--wj-dark); }
.badge.featured  { background: var(--wj-blue); }
.badge.new       { background: var(--wj-cyan); }
.card .ref {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  background: rgba(255,255,255,.92);
  color: var(--wj-dark);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--r-pill);
}
.card .heart {
  position: absolute;
  bottom: 12px;
  inset-inline-end: 12px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  color: var(--wj-blue);
}

.card .body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.card .title {
  font-size: 16px;
  font-weight: 700;
  color: var(--wj-dark);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card .loc {
  color: var(--wj-gray);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.card .specs {
  display: flex;
  gap: 14px;
  font-size: 13px;
  color: var(--wj-dark);
  padding-top: 10px;
  border-top: 1px solid var(--wj-border);
  margin-top: auto;
  flex-wrap: wrap;
}
.card .specs .spec { display: inline-flex; align-items: center; gap: 6px; }
.card .price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--wj-border);
}
.card .price {
  color: var(--wj-blue);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -.005em;
  font-family: var(--font-en);
}
.card .price-suffix {
  color: var(--wj-gray);
  font-size: 12px;
  font-weight: 500;
}

/* horizontal scroll carousel */
.carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(290px, 320px);
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 16px;
  margin: 0 calc(-1 * var(--gutter));
  padding-inline: var(--gutter);
}
.carousel .card { scroll-snap-align: start; }
.carousel::-webkit-scrollbar { height: 6px; }
.carousel::-webkit-scrollbar-thumb { background: var(--wj-border); border-radius: 4px; }

/* =============== Neighborhoods =============== */
.neigh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.neigh-card {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--r-lg);
  overflow: hidden;
  color: #fff;
  display: flex;
  align-items: end;
  padding: 24px;
  background-size: cover;
  background-position: center;
  transition: transform .2s;
}
.neigh-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,10,18,0) 30%, rgba(11,10,18,.85) 100%);
  z-index: 0;
}
.neigh-card:hover { transform: translateY(-3px); }
.neigh-card .neigh-content {
  position: relative; z-index: 1;
  width: 100%;
}
.neigh-card h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
}
.neigh-card .neigh-meta {
  display: flex;
  gap: 12px;
  font-size: 13px;
  font-weight: 500;
  opacity: .92;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.neigh-card .neigh-meta span::before {
  content: "•";
  margin-inline-end: 8px;
  color: var(--wj-yellow);
}
.neigh-card .neigh-meta span:first-child::before { content: ""; margin: 0; }
.neigh-card .neigh-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.16);
  backdrop-filter: blur(8px);
  padding: 8px 16px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,.25);
}

/* =============== Services =============== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.svc-card {
  background: #fff;
  border-radius: var(--r-lg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
  border-top: 4px solid var(--wj-cyan);
}
.svc-card:nth-child(2) { border-top-color: var(--wj-yellow); }
.svc-card:nth-child(3) { border-top-color: var(--wj-blue); }
.svc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.svc-card .svc-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: rgba(0,73,146,.08);
  color: var(--wj-blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.svc-card:nth-child(2) .svc-icon { background: rgba(247,195,46,.15); color: var(--wj-yellow-dark); }
.svc-card:nth-child(3) .svc-icon { background: rgba(3,170,243,.12); color: var(--wj-cyan); }
.svc-card h3 { font-size: 19px; font-weight: 700; }
.svc-card p { color: var(--wj-gray); font-size: 14px; line-height: 1.6; }
.svc-card .svc-link {
  margin-top: auto;
  color: var(--wj-blue);
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* =============== Articles =============== */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.article-card {
  background: #fff;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
}
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.article-card .media { aspect-ratio: 16/10; overflow: hidden; }
.article-card .media img { width: 100%; height: 100%; object-fit: cover; }
.article-card .body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; }
.article-card .meta { display: flex; gap: 12px; font-size: 12px; color: var(--wj-gray); font-weight: 500; }
.article-card .meta .tag {
  background: rgba(0,73,146,.08); color: var(--wj-blue);
  padding: 3px 10px; border-radius: var(--r-pill); font-weight: 600;
}
.article-card h3 {
  font-size: 17px; font-weight: 700; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.article-card p {
  color: var(--wj-gray); font-size: 14px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* =============== Testimonials =============== */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}
.testi-card {
  background: #fff;
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}
.testi-card::before {
  content: "“";
  position: absolute;
  top: 12px;
  inset-inline-end: 22px;
  font-size: 56px;
  font-family: serif;
  color: var(--wj-yellow);
  line-height: 1;
  opacity: .55;
}
.testi-card .stars { color: var(--wj-yellow); font-size: 14px; letter-spacing: 2px; }
.testi-card .quote { font-size: 15px; line-height: 1.7; color: var(--wj-dark); }
.testi-card .author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--wj-border);
}
.testi-card .author img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.testi-card .author .name { font-weight: 700; font-size: 14px; }
.testi-card .author .role { font-size: 12px; color: var(--wj-gray); }

/* =============== CTA banner =============== */
.cta-banner {
  background: linear-gradient(50deg, var(--wj-blue) 0%, var(--wj-blue-light) 100%);
  color: #fff;
  padding: 56px 0;
  position: relative;
  overflow: hidden;
}
.cta-banner::after {
  content: ""; position: absolute; inset: 0;
  background: url('https://images.unsplash.com/photo-1494526585095-c41746248156?w=1600&q=70') center/cover;
  opacity: .12; mix-blend-mode: overlay; z-index: 0;
}
.cta-banner .container {
  position: relative; z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-banner h2 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; max-width: 660px; }
.cta-banner p { opacity: .9; margin-top: 10px; max-width: 560px; }
.cta-banner-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-white {
  background: #fff; color: var(--wj-blue);
  padding: 14px 28px; border-radius: var(--r-pill);
  font-weight: 700; font-size: 15px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform .15s;
}
.btn-white:hover { transform: translateY(-1px); }
.btn-outline-white {
  background: transparent; color: #fff;
  padding: 14px 28px; border-radius: var(--r-pill);
  border: 1.5px solid rgba(255,255,255,.55);
  font-weight: 600; font-size: 15px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background .15s;
}
.btn-outline-white:hover { background: rgba(255,255,255,.1); }

/* =============== Footer =============== */
.footer {
  background: var(--wj-dark);
  color: #c5c8cf;
  padding: 64px 0 0;
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid #2a2933;
}
.footer h4 {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.footer .about-col img { height: 38px; margin-bottom: 16px; filter: brightness(0) invert(1); }
.footer .about-col p { line-height: 1.7; color: #9aa0a8; margin-bottom: 16px; }
.footer .social {
  display: flex; gap: 10px;
}
.footer .social a {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  transition: background .15s;
}
.footer .social a:hover { background: var(--wj-blue); color: #fff; }
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer ul a { color: #c5c8cf; transition: color .15s; }
.footer ul a:hover { color: var(--wj-yellow); }
.footer .contact-row {
  display: flex; gap: 10px; margin-bottom: 12px;
  align-items: flex-start;
}
.footer .contact-row .ico {
  flex: 0 0 18px;
  color: var(--wj-yellow);
  margin-top: 2px;
}
.regulatory {
  padding: 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: #9aa0a8;
}
.regulatory .badges { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.reg-badge {
  background: rgba(255,255,255,.06);
  padding: 8px 14px;
  border-radius: var(--r-md);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255,255,255,.08);
}
.reg-badge .label { color: #9aa0a8; }
.reg-badge .val { color: #fff; font-weight: 700; font-family: var(--font-en); }
.reg-badge .pending {
  background: rgba(247,195,46,.18);
  color: var(--wj-yellow);
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-inline-start: 8px;
}
.copyright { padding: 18px 0; border-top: 1px solid #2a2933; text-align: center; color: #6b7079; font-size: 12px; }

/* =============== Misc icons =============== */
.i {
  width: 1em; height: 1em;
  display: inline-block;
  vertical-align: -2px;
  fill: currentColor;
}

/* =============== Responsive =============== */
@media (max-width: 980px) {
  .nav-primary { display: none; }
  .search-form { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .hero { min-height: 480px; padding: 56px 0 72px; }
  section { padding: 56px 0; }
}
@media (max-width: 560px) {
  .topbar .left .hide-sm, .topbar .right .hide-sm { display: none; }
  .search-form { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 28px; }
}
