/* ============================================================
   المشهد العقاري — Al Mashhad Al Aqari
   Editorial real-estate magazine · RTL · Mobile-first
   Palette: sea petrol / limestone paper / copper accent / link blue
   ============================================================ */

:root {
  --sea: #0e4653;
  --sea-deep: #0a333d;
  --ink: #1b2a30;
  --paper: #f6f1e7;
  --stone: #ece4d2;
  --stone-line: #d9cdb4;
  --copper: #b4682b;
  --copper-soft: #f3e2d0;
  --link: #1258a7;
  --link-visited: #0f4a8d;
  --white: #fffdf8;
  --max-article: 46rem;
  --max-wide: 68rem;
}

* { box-sizing: border-box; }

html {
  direction: rtl;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Naskh Arabic", "Amiri", serif;
  font-size: 1.0625rem;
  line-height: 1.95;
  text-align: right;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4,
.badge, .meta, .site-brand, .nav, .topic-strip, .btn, .breadcrumbs,
.facts-box h3, .story-card, footer {
  font-family: "Alexandria", "Cairo", sans-serif;
}

h1 { font-weight: 800; line-height: 1.5; font-size: clamp(1.55rem, 4.6vw, 2.5rem); margin: 0.6rem 0 0.8rem; color: var(--sea-deep); }
h2 { font-weight: 700; line-height: 1.6; font-size: clamp(1.25rem, 3.4vw, 1.7rem); color: var(--sea); margin: 2.6rem 0 0.9rem; }
h3 { font-weight: 600; font-size: clamp(1.08rem, 2.8vw, 1.25rem); color: var(--ink); margin: 1.8rem 0 0.6rem; }
p { margin: 0 0 1.15rem; }

a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
a:visited { color: var(--link-visited); }
a:hover { color: var(--copper); }
a:focus-visible { outline: 3px solid var(--copper); outline-offset: 2px; border-radius: 2px; }

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

/* ---------- Header ---------- */
.site-header {
  background: var(--sea-deep);
  color: var(--white);
  border-bottom: 4px solid var(--copper);
}
.header-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-brand { display: flex; flex-direction: column; text-decoration: none; color: var(--white); }
.site-brand:visited { color: var(--white); }
.site-brand .brand-name { font-weight: 800; font-size: 1.45rem; letter-spacing: 0; }
.site-brand .brand-tag { font-weight: 400; font-size: 0.72rem; color: #cfe3e2; }

.nav-toggle {
  background: transparent;
  border: 2px solid #3f707c;
  color: var(--white);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.45rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
}
.nav-toggle:focus-visible { outline: 3px solid var(--copper); outline-offset: 2px; }

.nav {
  display: none;
  width: 100%;
  flex-direction: column;
  gap: 0.15rem;
  padding-bottom: 0.6rem;
}
.nav.open { display: flex; }
.nav a {
  color: var(--white);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.6rem 0.4rem;
  border-bottom: 1px solid #1b4c58;
}
.nav a:visited { color: var(--white); }
.nav a:hover { color: #f0c896; }
.nav a[aria-current="page"] { color: #f0c896; }

@media (min-width: 800px) {
  .header-inner { flex-wrap: nowrap; }
  .nav-toggle { display: none; }
  .nav {
    display: flex !important;
    flex-direction: row;
    width: auto;
    gap: 1.4rem;
    padding-bottom: 0;
  }
  .nav a { border-bottom: none; padding: 0.3rem 0; }
}
@media (max-width: 799px) {
  .header-inner { flex-wrap: wrap; }
}

/* Topic strip (visual, not links) */
.topic-strip {
  background: var(--sea);
  color: #cfe3e2;
  font-size: 0.78rem;
  overflow-x: auto;
  white-space: nowrap;
}
.topic-strip ul {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0.45rem 1rem;
  list-style: none;
  display: flex;
  gap: 1.4rem;
}
.topic-strip li::before { content: "•"; color: var(--copper); margin-left: 0.5rem; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  max-width: var(--max-article);
  margin: 0 auto;
  padding: 1rem 1rem 0;
  font-size: 0.8rem;
  color: #6b6252;
}
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.breadcrumbs li + li::before { content: "‹"; margin-left: 0.35rem; color: var(--copper); }
.breadcrumbs a { color: #6b6252; }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--max-article);
  margin: 0 auto;
  padding: 1.6rem 1rem 0.4rem;
}
.badge {
  display: inline-block;
  background: var(--copper);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.28rem 0.85rem;
  border-radius: 3px;
  letter-spacing: 0.02em;
}
.lede {
  font-size: 1.16rem;
  line-height: 2.05;
  color: #33413f;
}
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.3rem;
  font-size: 0.78rem;
  color: #6b6252;
  border-top: 1px solid var(--stone-line);
  border-bottom: 1px solid var(--stone-line);
  padding: 0.65rem 0;
  margin: 1.1rem 0 1.4rem;
}
.meta strong { color: var(--sea); font-weight: 600; }

/* ---------- Article ---------- */
.article {
  max-width: var(--max-article);
  margin: 0 auto;
  padding: 0 1rem 3rem;
}
figure { margin: 1.6rem 0; }
figure img { border-radius: 6px; border: 1px solid var(--stone-line); }
figcaption { font-size: 0.78rem; color: #6b6252; padding-top: 0.45rem; font-family: "Alexandria", sans-serif; }

.section-divider {
  border: none;
  height: 3px;
  width: 72px;
  background: var(--copper);
  margin: 3rem auto 3rem 0;
  border-radius: 2px;
}

/* Key facts box */
.facts-box {
  background: var(--stone);
  border-right: 5px solid var(--copper);
  border-radius: 6px;
  padding: 1.1rem 1.3rem;
  margin: 1.6rem 0;
}
.facts-box h3 { margin: 0 0 0.6rem; font-size: 0.95rem; color: var(--copper); font-weight: 700; }
.facts-box ul { margin: 0; padding-right: 1.1rem; }
.facts-box li { margin-bottom: 0.4rem; font-size: 0.98rem; }

/* Highlight box */
.highlight-box {
  background: var(--copper-soft);
  border: 1px solid #e0c3a4;
  border-radius: 6px;
  padding: 1rem 1.3rem;
  margin: 1.6rem 0;
  font-size: 0.98rem;
}
.highlight-box strong { color: var(--copper); }

/* Tables */
.table-wrap { overflow-x: auto; margin: 1.6rem 0; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  background: var(--white);
  border: 1px solid var(--stone-line);
}
caption {
  text-align: right;
  font-family: "Alexandria", sans-serif;
  font-size: 0.8rem;
  color: #6b6252;
  padding: 0.4rem 0.2rem;
}
th, td { padding: 0.65rem 0.8rem; border: 1px solid var(--stone-line); text-align: right; vertical-align: top; }
th { background: var(--sea); color: var(--white); font-family: "Alexandria", sans-serif; font-weight: 600; font-size: 0.85rem; }
tbody tr:nth-child(even) { background: #f9f5ec; }

/* Related story card */
.story-card {
  display: block;
  background: var(--sea-deep);
  color: var(--white);
  text-decoration: none;
  border-radius: 8px;
  padding: 1.3rem 1.4rem;
  margin: 2.4rem 0;
  border-right: 6px solid var(--copper);
}
.story-card:visited { color: var(--white); }
.story-card .card-label { font-size: 0.72rem; color: #f0c896; font-weight: 700; display: block; margin-bottom: 0.4rem; }
.story-card .card-title { font-size: 1.12rem; font-weight: 700; line-height: 1.7; display: block; }
.story-card .card-more { font-size: 0.8rem; color: #cfe3e2; display: block; margin-top: 0.55rem; }
.story-card:hover { background: var(--sea); color: var(--white); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--sea-deep);
  color: #cfe3e2;
  margin-top: 2rem;
  border-top: 4px solid var(--copper);
  font-size: 0.9rem;
}
.footer-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 2.2rem 1rem 1.4rem;
  display: grid;
  gap: 1.6rem;
}
.site-footer h4 { color: var(--white); font-weight: 700; margin: 0 0 0.6rem; font-size: 1.05rem; }
.site-footer p { font-size: 0.86rem; line-height: 1.9; margin: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.45rem; }
.site-footer a { color: #cfe3e2; text-decoration: none; }
.site-footer a:visited { color: #cfe3e2; }
.site-footer a:hover { color: #f0c896; text-decoration: underline; }
.copyright {
  border-top: 1px solid #1b4c58;
  text-align: center;
  padding: 1rem;
  font-size: 0.78rem;
  color: #9dbcbb;
}
@media (min-width: 700px) {
  .footer-inner { grid-template-columns: 1.4fr 1fr; }
}

/* 404 */
.page-404 {
  max-width: var(--max-article);
  margin: 0 auto;
  padding: 4rem 1rem;
  text-align: center;
}
.page-404 .code {
  font-family: "Alexandria", sans-serif;
  font-weight: 800;
  font-size: 5rem;
  color: var(--copper);
  line-height: 1;
}

/* Skip link */
.skip-link {
  position: absolute;
  right: -999px;
  background: var(--copper);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 50;
}
.skip-link:focus { right: 0.5rem; top: 0.5rem; }
