/* Docurement Weekly — article page styles.
 *
 * SOURCE FILE. Edit this, then run `node build-news.js`, which copies it to
 * news/article.css and writes ar/news/article.css with RTL overrides appended.
 * Editing either generated file directly will be overwritten on the next build.
 */

:root {
  --logo-green: #2D3A2B;
  --logo-brown: #5C4A3A;
  --sand-light: #F8F5F0;
  --sand-medium: #EDE4D3;
  --sand-dark: #D4C4A8;
  --desert-orange: #C17F4E;
  --desert-red: #A65D3C;
  --warm-brown: #6B5B4F;
  --deep-brown: #3E352F;
  --cream: #FFFCF7;
  --gold: #B8956A;
  --navy-900: var(--logo-green);
  --gold-600: var(--desert-orange);
  --gold-100: var(--sand-light);
  --paper: var(--cream);
  --ink: var(--deep-brown);
  --ink-secondary: var(--warm-brown);
  --ink-muted: #9C8A78;
  --border: var(--sand-dark);
  --radius: 10px;
  --font-display: 'Cormorant Garamond', serif;
  --font-body: 'Inter', sans-serif;
  --nav-h: 86px;
  --measure: 760px;

    /* ---- shared card system -------------------------------------------
       One set of values for every card on the site, so a card looks the
       same whichever page it is on. Card grids step at 640 / 900 / 1240. */
    --card-pad: 26px;
    --card-radius: 10px;
    --card-gap: 24px;
    --gutter: 24px;
  }

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ============================== SITE NAV ============================== */

.site-nav {
  position: fixed; top: 0; width: 100%; padding: 1.2rem 5%;
  display: flex; justify-content: space-between; align-items: center;
  z-index: 1000; background: var(--logo-green);
  border-bottom: 1px solid rgba(212, 196, 168, 0.3);
}
.site-nav .logo { display: flex; align-items: center; text-decoration: none; }
.logo-text {
  font-family: 'Dubai', sans-serif; font-size: 2.3rem; font-weight: 300;
  color: var(--sand-light); letter-spacing: 0; line-height: 0.85; display: inline-block;
}
.logo-text::after {
  content: ''; display: block; width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--desert-orange), var(--gold));
  margin-top: 10px; border-radius: 2px;
}
.nav-right { display: flex; align-items: center; gap: 1.6rem; }
.lang-switch {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%; color: var(--sand-light);
  border: 1px solid rgba(248, 245, 240, 0.4); transition: all 0.3s ease; flex-shrink: 0;
}
.lang-switch svg { width: 18px; height: 18px; display: block; }
.lang-switch:hover { border-color: var(--desert-orange); color: var(--gold); background: rgba(248, 245, 240, 0.12); }
.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links a {
  text-decoration: none; color: var(--sand-light); font-weight: 500;
  font-size: 0.9rem; letter-spacing: 0.5px; position: relative; transition: color 0.3s ease;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px;
  background: var(--desert-orange); transition: width 0.3s ease;
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.menu-toggle {
  display: none; flex-direction: column; justify-content: space-between;
  width: 28px; height: 20px; background: transparent; border: none;
  cursor: pointer; padding: 0; z-index: 1001;
}
.menu-toggle span { width: 100%; height: 2px; background: var(--sand-light); transition: all 0.3s ease; border-radius: 2px; }
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(8px, 8px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(8px, -8px); }

/* Six nav items plus the wordmark overrun the bar between the desktop
   layout and the 768px hamburger breakpoint; tightening the gap holds it. */
@media (min-width: 769px) and (max-width: 1000px) { nav .nav-links { gap: 1.2rem; } }
@media (max-width: 768px) {
  .nav-right { gap: 1rem; }
  .site-nav .logo-text { font-size: 2rem; }
  .menu-toggle { display: flex; width: 36px; height: 26px; }
  .menu-toggle span { height: 3px; }
  .nav-links {
    position: fixed; top: 0; right: -100%; width: 70%; max-width: 300px; height: 100vh;
    background: var(--logo-green); flex-direction: column; justify-content: center;
    align-items: center; gap: 2.5rem; transition: right 0.4s ease;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
    border-left: 1px solid rgba(212, 196, 168, 0.3);
  }
  .nav-links.active { right: 0; }
  .nav-links a { font-size: 1.3rem; }
}

/* =========================== ARTICLE HEADER =========================== */

.article-header {
  background: var(--navy-900);
  padding: calc(var(--nav-h) + 52px) 24px 52px;
}
.article-header-inner { max-width: var(--measure); margin: 0 auto; }

.back-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 13.5px; font-weight: 600; letter-spacing: 0.02em;
  color: rgba(248, 245, 240, 0.68); text-decoration: none;
  margin-bottom: 26px; transition: gap 0.25s ease, color 0.25s ease;
}
.back-link:hover { gap: 0.65rem; color: var(--sand-light); }

.article-meta {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 12px; margin-bottom: 20px;
}
.post-cat {
  display: inline-block;
  font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.07em; text-transform: uppercase; line-height: 1.5;
  padding: 5px 13px; border-radius: 999px;
  background: rgba(248, 245, 240, 0.12);
  border: 1px solid rgba(248, 245, 240, 0.28);
  color: var(--sand-light);
}
.post-date { font-size: 13px; font-weight: 500; color: rgba(248, 245, 240, 0.62); }

/* Triage badge. Three tones, so a reader scanning the page can tell an item
   that needs action from one that is on the record for information. */
.post-action {
  display: inline-block;
  font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.07em; text-transform: uppercase; line-height: 1.5;
  padding: 5px 13px; border-radius: 999px;
  border: 1px solid transparent;
}
.action-required { background: rgba(166, 93, 60, 0.14); border-color: rgba(166, 93, 60, 0.34); color: var(--desert-red); }
.action-deadline { background: rgba(184, 149, 106, 0.18); border-color: rgba(184, 149, 106, 0.38); color: var(--logo-brown); }
.action-info     { background: rgba(107, 91, 79, 0.10); border-color: rgba(107, 91, 79, 0.24); color: var(--warm-brown); }
/* Light-on-dark variants for the green article header. */
.article-header .action-required { background: rgba(193, 127, 78, 0.22); border-color: rgba(193, 127, 78, 0.5); color: #E8B78E; }
.article-header .action-deadline { background: rgba(184, 149, 106, 0.2); border-color: rgba(184, 149, 106, 0.45); color: #D8C39B; }
.article-header .action-info     { background: rgba(248, 245, 240, 0.1); border-color: rgba(248, 245, 240, 0.26); color: rgba(248, 245, 240, 0.8); }

.article-header h1 {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(30px, 4vw, 46px); line-height: 1.18; color: #fff;
}
.article-standfirst {
  margin-top: 20px; font-size: 17px; line-height: 1.7;
  color: rgba(248, 245, 240, 0.8);
}

/* Hero artwork straddles the header band and the page below it, so the image
   reads as part of the article rather than as a banner sitting above it.
   Capped at the article measure because the artwork is 762px wide: at this
   size it runs at native resolution and lines up with the text column below.
   No aspect-ratio is set — the supplied heroes range from about 3.0:1 to
   3.75:1, so a fixed box would crop some of them. Letting each size itself
   costs nothing here, since a hero has no neighbours to line up with. */
.article-hero {
  max-width: calc(var(--measure) + 48px); margin: -40px auto 0; padding: 0 24px;
  position: relative; z-index: 1;
}
.article-media { border-radius: var(--radius); overflow: hidden; box-shadow: 0 20px 50px rgba(45, 58, 43, 0.16); }
.article-media img { display: block; width: 100%; height: auto; }
/* Only shown when a hero file is missing; roughly the shape of the real ones. */
.article-media.media-slot { aspect-ratio: 16 / 5; box-shadow: none; }

/* ============================ ARTICLE BODY ============================ */

.article-body {
  max-width: var(--measure); margin: 0 auto; padding: 56px 24px 8px;
}
.article-body > * + * { margin-top: 24px; }
.article-body p { font-size: 16.5px; line-height: 1.85; color: var(--ink-secondary); }
.article-body h2 {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(24px, 2.8vw, 30px); line-height: 1.25;
  color: var(--navy-900); margin-top: 46px;
}
.article-body h2:first-child { margin-top: 0; }
.article-body ul { padding-left: 22px; color: var(--ink-secondary); }
.article-body li { font-size: 16px; line-height: 1.8; margin-bottom: 8px; }
.article-body li::marker { color: var(--gold-600); }
.article-body strong { color: var(--ink); font-weight: 600; }
.article-body a:not(.btn) {
  color: var(--gold-600); text-decoration: underline; text-underline-offset: 3px;
  transition: color 0.25s ease;
}
.article-body a:not(.btn):hover { color: var(--navy-900); }

/* ============================ KEY TAKEAWAYS =========================== */

.takeaways {
  margin-top: 48px;
  background: #fff;
  border: 1px solid rgba(212, 196, 168, 0.6);
  border-left: 3px solid var(--gold-600);
  border-radius: var(--radius);
  padding: 28px 30px;
}
.takeaways h3 {
  font-family: var(--font-body);
  font-size: 12px; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold-600); margin-bottom: 16px;
}
.takeaways ul { list-style: none; padding: 0; }
.takeaways li {
  font-size: 15px; line-height: 1.7; color: var(--ink-secondary);
  padding: 7px 0 7px 20px; position: relative;
}
.takeaways li::before {
  content: ''; position: absolute; left: 0; top: 16px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--gold-600);
}

/* ========================= SOURCE & VERIFICATION ====================== */
/* Quieter than the takeaways box on purpose: this is the provenance record,
   read by the people who need to check the claim, not the headline message. */

.provenance {
  margin-top: 32px;
  border: 1px solid rgba(212, 196, 168, 0.6);
  border-radius: var(--radius);
  padding: 24px 26px;
  background: rgba(248, 245, 240, 0.45);
}
.provenance h3 {
  font-family: var(--font-body);
  font-size: 11.5px; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-muted); margin-bottom: 16px;
}
.provenance-facts { display: grid; gap: 10px; }
.provenance-facts > div { display: grid; grid-template-columns: 108px 1fr; gap: 12px; align-items: baseline; }
.provenance-facts dt {
  font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-muted);
}
.provenance-facts dd { font-size: 14.5px; line-height: 1.55; color: var(--ink); }
.provenance-source { margin-top: 16px; }
.provenance-source a {
  font-size: 13.5px; font-weight: 600; color: var(--gold-600);
  text-decoration: underline; text-underline-offset: 3px;
  overflow-wrap: anywhere; transition: color 0.25s ease;
}
.provenance-source a:hover { color: var(--navy-900); }
.provenance-source .ext { margin-inline-start: 4px; text-decoration: none; display: inline-block; }
/* The caveat carries a left rule so it never reads as ordinary body copy —
   where a date or rate is unconfirmed, that has to be visible at a glance. */
.verification {
  margin-top: 16px; padding: 12px 0 12px 16px;
  border-left: 2px solid var(--gold-600);
  font-size: 13.5px; line-height: 1.7; color: var(--ink-secondary);
}
.verification strong { color: var(--navy-900); font-weight: 700; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

@media (max-width: 560px) {
  .provenance-facts > div { grid-template-columns: 1fr; gap: 2px; }
}

/* =============================== CTA BAND ============================= */

.article-cta { background: var(--navy-900); margin-top: 64px; padding: 64px 24px; }
.article-cta-inner { max-width: var(--measure); margin: 0 auto; text-align: center; }
.article-cta h2 {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(22px, 2.8vw, 30px); line-height: 1.3;
  color: #fff; margin-bottom: 16px;
}
.article-cta p {
  font-size: 15.5px; line-height: 1.8;
  color: rgba(248, 245, 240, 0.78);
  max-width: 620px; margin: 0 auto 28px;
}
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.95rem 2.3rem; border-radius: 4px;
  font-size: 0.9rem; font-weight: 600; letter-spacing: 0.5px;
  text-decoration: none; color: var(--sand-light);
  border: 2px solid rgba(248, 245, 240, 0.6); transition: all 0.3s ease;
}
.btn:hover { background: var(--sand-light); color: var(--navy-900); border-color: var(--sand-light); }

/* ========================= SHARE / PAGER / NOTE ======================== */

.article-footer { max-width: var(--measure); margin: 0 auto; padding: 44px 24px 72px; }

.share { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.share-label {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--ink-muted);
}
.share-links { display: flex; gap: 8px; }
.share-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--border); background: #fff;
  color: var(--ink-secondary); cursor: pointer; padding: 0;
  transition: all 0.25s ease;
}
.share-btn svg { width: 16px; height: 16px; display: block; }
.share-btn:hover { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.share-btn.copied { background: var(--gold-600); border-color: var(--gold-600); color: #fff; }

.disclaimer {
  margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--border);
  font-size: 12.5px; line-height: 1.7; color: var(--ink-muted);
}

.pager {
  margin-top: 36px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.pager-link {
  display: block; text-decoration: none;
  border: 1px solid rgba(212, 196, 168, 0.6); border-radius: var(--radius);
  padding: 18px 20px; background: #fff;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.pager-link:hover { border-color: var(--sand-dark); transform: translateY(-2px); box-shadow: 0 12px 30px rgba(61, 79, 58, 0.1); }
.pager-next { text-align: right; }
.pager-dir {
  display: block; font-size: 11px; font-weight: 700;
  letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--gold-600); margin-bottom: 8px;
}
.pager-title {
  display: block; font-family: var(--font-display);
  font-size: 17px; line-height: 1.35; color: var(--navy-900);
}

/* ============================= IMAGE SLOTS ============================ */
/* Rendered only while the artwork named in news-data.js is missing. The
   dashed edge and the visible path are deliberate: this should read as an
   unfinished slot, never as a design element. */

.media-slot {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  background: repeating-linear-gradient(
    135deg,
    var(--sand-light), var(--sand-light) 12px,
    #ECE5D8 12px, #ECE5D8 24px
  );
  border: 1px dashed var(--sand-dark);
  border-radius: var(--radius);
  color: var(--ink-muted);
  text-align: center;
  padding: 20px;
}
.media-slot-label {
  font-size: 11px; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--warm-brown);
}
.media-slot-path {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px; color: var(--ink-muted);
  background: rgba(255, 255, 255, 0.75);
  border-radius: 4px; padding: 3px 8px;
  max-width: 100%; overflow-wrap: anywhere;
}
.media-slot-size { font-size: 10.5px; letter-spacing: 0.06em; opacity: 0.75; }

/* =============================== FOOTER =============================== */

footer { background: var(--logo-green); color: var(--sand-light); padding: 4rem 5% 2rem; border-top: 1px solid rgba(248, 245, 240, 0.15); }
.footer-content { max-width: 1200px; margin: 0 auto 3rem; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; }
.footer-brand { display: flex; flex-direction: column; gap: 1rem; }
.footer-brand p { color: rgba(248, 245, 240, 0.7); font-size: 0.9rem; line-height: 1.7; font-weight: 300; }
.footer-column h4 { color: var(--sand-light); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 1.5rem; font-weight: 800; }
.footer-column ul { list-style: none; }
.footer-column ul li { margin-bottom: 0.8rem; }
.footer-column ul li a { color: rgba(248, 245, 240, 0.7); text-decoration: none; font-size: 0.9rem; transition: color 0.3s ease; }
.footer-column ul li a:hover { color: var(--sand-light); }
.footer-bottom { border-top: 1px solid rgba(248, 245, 240, 0.15); padding-top: 2rem; text-align: center; }
.footer-bottom p { color: rgba(248, 245, 240, 0.5); font-size: 0.85rem; }

@media (max-width: 1024px) {
  .footer-content { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .article-header { padding: calc(var(--nav-h) + 30px) 24px 40px; }
  .article-hero { margin-top: -28px; }
  .article-body { padding-top: 40px; }
  .article-cta { margin-top: 48px; padding: 48px 24px; }
  .takeaways { padding: 22px 20px; }
  .pager { grid-template-columns: 1fr; }
  .pager-next { text-align: left; }
  .footer-content { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
  .footer-brand { align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .pager-link:hover { transform: none; }
}

/* Phones get tighter cards and a smaller page gutter. Declared once here
   rather than as per-component overrides on each page. */
@media (max-width: 639px) {
  :root { --card-pad: 18px; --card-gap: 16px; --gutter: 20px; }
}

/* ---- touch devices ---------------------------------------------------
   The hover-lift can never fire on a touch screen, and on some Android
   browsers the first tap resolves the hover state instead of following the
   link. Swap it for a press state, and give in-card links a 44px target. */
@media (hover: none) {
  .about-card:hover, .service-card:hover, .location-card:hover,
  .directory-card:hover, .post-card:hover, .related-card:hover,
  .pager-link:hover, .featured:hover { transform: none; box-shadow: none; }

  .about-card:active, .service-card:active, .location-card:active,
  .directory-card:active, .post-card:active, .related-card:active,
  .pager-link:active { background: var(--sand-light); }

  .learn-more, .view-service, .read-more, .back-link { min-height: 44px; align-items: center; }
  .share-btn { width: 44px; height: 44px; }
  .filter-pill { min-height: 44px; }
}

@media (max-width: 639px) {
  .takeaways, .provenance, .pager-link {
    padding: var(--card-pad); border-radius: var(--card-radius);
  }
}
