/* ============================================================
   المرفأ العقاري — Al Marfa Al Aqari
   Modern Mediterranean real-estate landing · RTL · marine blue × teal
   ============================================================ */

:root {
  --night: #073b4c;
  --night-2: #0b5266;
  --accent: #0f8fa3;
  --accent-light: #55c7d3;
  --cream: #ffffff;
  --sand: #eef8f9;
  --ink: #102b35;
  --muted: #5d737c;
  --line: #d7e6e9;
  --maxw: 72rem;
  --maxr: 44rem;
}

* { box-sizing: border-box; }
html { direction: rtl; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: "Tajawal", sans-serif;
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--ink);
  background: #f8fbfc;
  text-align: right;
}

h1, h2, h3, .btn, .brand, .kicker, .stat-num { font-family: "Changa", sans-serif; }
h1 { font-size: clamp(1.7rem, 5vw, 3rem); font-weight: 800; line-height: 1.45; margin: 0.5rem 0 1rem; }
h2 { font-size: clamp(1.35rem, 3.6vw, 2rem); font-weight: 700; line-height: 1.5; margin: 0 0 1rem; color: var(--night); }
h3 { font-size: clamp(1.08rem, 2.6vw, 1.3rem); font-weight: 600; margin: 1.4rem 0 0.5rem; color: var(--night); }
p { margin: 0 0 1rem; }

a { color: #087d94; text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
img { max-width: 100%; height: auto; display: block; }

.kicker {
  display: inline-block;
  color: #087d94;
  background: #e5f6f8;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  border: 1px solid #b7e4e9;
  padding: 0.25rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 0.8rem;
}

/* ---------- Header ---------- */
.site-header {
  background: rgba(255,255,255,.96);
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 20px rgba(7,59,76,.06);
}
.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.7rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; }
.brand-mark { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 13px; box-shadow: 0 6px 16px rgba(7,59,76,.14); }
.brand-copy { display: flex; flex-direction: column; line-height: 1.25; }
.brand .b-name { color: var(--night); font-weight: 800; font-size: 1.35rem; }
.brand .b-name span { color: var(--accent); }
.brand .b-tag { color: var(--muted); font-size: 0.7rem; font-family: "Tajawal", sans-serif; }
.brand:hover .b-name { color: #087d94; }
@media (max-width: 520px) { .brand .b-tag { display: none; } .brand-mark { width: 42px; height: 42px; flex-basis: 42px; } }

.hero .lede a { color: #087d94; font-weight: 700; text-decoration-thickness: 1px; }
.section.dark a:not(.btn) { color: #8fe3ea; }
.section.dark a:not(.btn):hover { color: #d3f7fa; }

.nav-toggle {
  background: #edf7f8; border: 1px solid #c9e5e8; color: var(--night);
  font-family: "Changa", sans-serif; font-size: 0.9rem;
  padding: 0.4rem 0.9rem; border-radius: 8px; cursor: pointer;
}
.nav { display: none; width: 100%; flex-direction: column; padding-bottom: 0.5rem; }
.nav.open { display: flex; }
.nav a {
  color: var(--night); text-decoration: none; font-weight: 600;
  padding: 0.6rem 0.2rem; border-bottom: 1px solid var(--line); font-size: 0.95rem;
}
.nav a:hover, .nav a[aria-current="page"] { color: #087d94; }
@media (min-width: 820px) {
  .nav-toggle { display: none; }
  .nav { display: flex !important; flex-direction: row; width: auto; gap: 1.5rem; padding: 0; }
  .nav a { border: none; padding: 0.2rem 0; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: #dceff2;
  color: var(--ink);
  overflow: hidden;
}
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,.08) 20%, rgba(255,255,255,.72) 58%, rgba(255,255,255,.96) 100%); }
.hero img.hero-bg { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; opacity: 1; }
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3.5rem, 9vw, 6.8rem) 1.1rem;
}
.hero h1 { color: var(--night); max-width: 31ch; }
.hero h1 em { color: #087d94; font-style: normal; }
.hero p.lede { max-width: 53ch; font-size: 1.12rem; color: #294a56; }
.accent-rule { width: 90px; height: 4px; background: var(--accent); border: none; margin: 1.2rem 0; }
@media (max-width: 680px) {
  .hero::after { background: rgba(255,255,255,.88); }
  .hero-inner { padding-top: 3rem; padding-bottom: 3.4rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.75rem 2rem;
  border-radius: 10px;
  transition: background 0.2s, transform .2s;
  margin: .25rem 0 .25rem .45rem;
}
.btn:hover { background: #08798d; color: #fff; transform: translateY(-1px); }
.btn.ghost { background: rgba(255,255,255,.78); color: var(--night); border: 1.5px solid #8bcbd3; }
.btn.ghost:hover { background: #e5f6f8; color: var(--night); }

/* ---------- Sections ---------- */
.section { padding: clamp(2.6rem, 7vw, 4.5rem) 1.1rem; }
.section.dark { background: var(--night); color: #e8f3f5; }
.section.dark h2, .section.dark h3 { color: var(--cream); }
.section.sand { background: var(--sand); }
.wrap { max-width: var(--maxw); margin: 0 auto; }
.wrap.narrow { max-width: var(--maxr); }
.center { text-align: center; }
.page-meta { max-width: var(--maxw); margin: 0 auto; padding: .75rem 1.1rem; color: var(--muted); font-size: .82rem; border-bottom: 1px solid var(--line); }
.page-meta time { color: var(--night); font-weight: 700; }

.grid { display: grid; gap: 1.4rem; }
@media (min-width: 780px) {
  .grid.cols-2 { grid-template-columns: 1fr 1fr; align-items: center; }
  .grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}

/* Cards */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem 1.5rem 1.3rem;
  border: 1px solid var(--line);
  box-shadow: 0 10px 32px rgba(7, 59, 76, 0.08);
}
.section.dark .card { background: #0d4a5d; border-color: #28697a; color: #e1eef1; }
.section.dark .card h3 { color: var(--cream); margin-top: 0; }
.card h3 { margin-top: 0; }
.card ul { padding-right: 1.2rem; margin: 0.4rem 0 0; }
.card li { margin-bottom: 0.4rem; }

/* Stats strip */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin: 1.6rem 0; }
@media (min-width: 700px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: #eaf7f8; border: 1px solid #bde2e7; border-radius: 12px; padding: 0.9rem; text-align: center; }
.stat-num { font-size: 1.5rem; font-weight: 800; color: var(--accent); display: block; }
.stat-label { font-size: 0.82rem; }

/* Figures */
figure { margin: 0; }
figure img { border-radius: 14px; box-shadow: 0 10px 34px rgba(15, 23, 32, 0.18); }
figcaption { font-size: 0.78rem; color: var(--muted); padding-top: 0.5rem; }
.section.dark figcaption { color: #93a1b0; }

/* Feature list */
.features { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.55rem; }
@media (min-width: 700px) { .features { grid-template-columns: 1fr 1fr; } }
.features li { padding-right: 1.7rem; position: relative; }
.features li::before { content: "◆"; color: var(--accent); position: absolute; right: 0; font-size: 0.8rem; top: 0.35rem; }

/* Notice (transparency) */
.notice {
  background: #eaf7f8;
  border: 1px solid #bde2e7;
  border-radius: 10px;
  padding: 0.9rem 1.2rem;
  font-size: 0.92rem;
  margin: 1.4rem 0;
}
.section.dark .notice { background: rgba(85,199,211,.09); border-color: rgba(85,199,211,.42); color: #e8f3f5; }

.route-strip { display: grid; grid-template-columns: repeat(3,1fr); gap: .8rem; margin: 1.4rem 0; }
.route-strip span { background: rgba(85,199,211,.11); border: 1px solid rgba(85,199,211,.36); border-radius: 12px; padding: .9rem; text-align: center; font-weight: 700; color: #dff7fa; }
@media (max-width: 620px) { .route-strip { grid-template-columns: 1fr; } }

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, #063b4c 0%, #087d94 100%);
  color: var(--cream);
  text-align: center;
  padding: clamp(2.6rem, 7vw, 4rem) 1.1rem;
}
.cta-band h2 { color: var(--cream); }
.cta-band p { max-width: 56ch; margin: 0 auto 1.4rem; color: #ccd5de; }

/* Breadcrumbs */
.breadcrumbs { max-width: var(--maxw); margin: 0 auto; padding: 0.9rem 1.1rem 0; font-size: 0.8rem; color: var(--muted); }
.breadcrumbs ol { list-style: none; display: flex; gap: 0.4rem; margin: 0; padding: 0; flex-wrap: wrap; }
.breadcrumbs li + li::before { content: "‹"; margin-left: 0.4rem; color: var(--accent); }
.breadcrumbs a { color: var(--muted); }

/* Footer */
.site-footer { background: #052f3d; color: #b9d0d6; font-size: 0.9rem; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 2.4rem 1.1rem 1.4rem; display: grid; gap: 1.6rem; }
@media (min-width: 760px) { .footer-inner { grid-template-columns: 1.3fr 1fr 1fr; } }
.site-footer h4 { color: var(--cream); font-family: "Changa", sans-serif; margin: 0 0 0.6rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.45rem; }
.site-footer a { color: #b9d0d6; text-decoration: none; }
.site-footer a:hover { color: var(--accent-light); }
.copyright { border-top: 1px solid #223040; text-align: center; padding: 1rem; font-size: 0.78rem; color: #7c8894; }

/* 404 */
.page-404 { max-width: var(--maxr); margin: 0 auto; padding: 4.5rem 1.1rem; text-align: center; }
.page-404 .code { font-family: "Changa", sans-serif; font-size: 5.5rem; font-weight: 800; color: var(--accent); line-height: 1; }

.skip-link { position: absolute; right: -999px; background: var(--accent); color: var(--night); padding: 0.6rem 1rem; z-index: 60; }
.skip-link:focus { right: 0.5rem; top: 0.5rem; }

/* Profile hero */
.profile-hero { padding: clamp(2.5rem,7vw,5rem) 1.1rem; background: linear-gradient(135deg,#edf9fa 0%,#fff 70%); }
.profile-hero-grid { display: grid; gap: 2rem; align-items: center; }
.profile-hero h1 em { color: #087d94; font-style: normal; }
.profile-hero .lede { color: #385963; font-size: 1.12rem; max-width: 55ch; }
.profile-portrait img { width: 100%; aspect-ratio: 1.28/1; object-fit: cover; object-position: center 18%; border-radius: 22px; box-shadow: 0 20px 45px rgba(7,59,76,.18); }
@media (min-width: 780px) { .profile-hero-grid { grid-template-columns: 1.15fr .85fr; } }
