
:root {
  --green:#0B5D3B; --green-dark:#07402A; --gold:#C9A326; --gold-soft:#E8C766;
  --red:#B91C1C; --red-dark:#7f1d1d;
  --bg:#ffffff; --card:#ffffff; --ink:#111111; --muted:#5f5a52; --line:#e5e0d8;
  --shadow:0 1px 3px rgba(31,27,22,.06); --shadow-lg:0 8px 22px rgba(31,27,22,.10);
  --afs:18px;
  --font-head:'Noto Sans Arabic','Noto Naskh Arabic',sans-serif;
  --font-body:'Noto Naskh Arabic','Noto Sans Arabic',serif;
}
html[data-theme="dark"] {
  --bg:#141210; --card:#1f1c19; --ink:#f2ede3; --muted:#a89f92; --line:#38322b;
  --shadow:0 1px 3px rgba(0,0,0,.4); --shadow-lg:0 8px 22px rgba(0,0,0,.5);
}
html { scroll-behavior:smooth; }
body { font-family:var(--font-body); background:var(--bg); color:var(--ink); line-height:2; font-size:17px; }
h1,h2,h3 { font-family:var(--font-head); line-height:1.65; font-weight:700; }
a { color:inherit; text-decoration:none; }
a:hover { color:var(--green); }
.wrap { max-width:1140px; margin:0 auto; padding:0 16px; }
#progress { position:fixed; top:0; right:0; height:4px; background:linear-gradient(90deg,var(--gold),var(--green)); width:0%; z-index:99; }

/* breaking ticker */
.ticker { background:var(--red); color:#fff; display:flex; align-items:stretch; overflow:hidden; }
.ticker-label { background:var(--red-dark); padding:6px 16px; font-weight:700; white-space:nowrap; display:flex; align-items:center; font-size:15px; font-family:var(--font-head); }
.ticker-view { overflow:hidden; flex:1; display:flex; align-items:center; }
.ticker-track { display:inline-flex; white-space:nowrap; animation:tick 60s linear infinite; }
.ticker-track span { padding:0 28px; font-size:15px; }
.ticker-track b { color:#ffe9a8; }
@keyframes tick { from { transform:translateX(0); } to { transform:translateX(50%); } }
.ticker-view:hover .ticker-track { animation-play-state:paused; }

/* utility bar — Figma "The News" top bar */
.utilbar { border-bottom:1px solid var(--line); font-size:14px; color:var(--muted); }
.utilbar .wrap { display:flex; align-items:center; justify-content:space-between; padding-top:7px; padding-bottom:7px; }
.utilbar b { color:var(--ink); font-family:var(--font-head); }
.theme-btn { background:transparent; color:var(--ink); border:1px solid var(--line); border-radius:20px; padding:2px 14px; font-family:var(--font-body); font-size:13px; cursor:pointer; }
.theme-btn:hover { border-color:var(--gold); }

/* masthead — big centered masthead over Faisal Mosque dusk photo */
.masthead { position:relative; background:linear-gradient(135deg,rgba(4,32,20,.88),rgba(7,64,42,.80) 55%,rgba(11,93,59,.75)),url(/images/header-bg.jpg) center 32%/cover no-repeat; color:#fff; text-align:center; padding:46px 16px 34px; border-bottom:4px solid var(--gold); }
.masthead h1 { font-size:64px; line-height:1.4; font-weight:800; text-shadow:0 2px 16px rgba(0,0,0,.6); }
.masthead h1 .gold { color:var(--gold-soft); }
.masthead .tagline { font-size:18px; opacity:.95; line-height:1.9; text-shadow:0 1px 8px rgba(0,0,0,.55); }
.masthead .photo-credit { position:absolute; bottom:8px; left:14px; font-size:11px; opacity:.8; }
.masthead .photo-credit a { color:#ffe9a8; text-decoration:underline; }

/* nav — white, hairline rules */
nav.mainnav { background:var(--card); border-bottom:1px solid var(--line); position:sticky; top:0; z-index:50; box-shadow:0 1px 4px rgba(0,0,0,.06); }
nav.mainnav .wrap { display:flex; flex-wrap:wrap; gap:2px; justify-content:center; align-items:center; }
nav.mainnav a { color:var(--ink); padding:11px 16px; font-size:16px; display:block; font-family:var(--font-head); font-weight:600; }
nav.mainnav a:hover { color:var(--green); background:rgba(11,93,59,.06); }

/* filter pills + search */
.toolbar { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin:20px 0 4px; }
.pills { display:flex; flex-wrap:wrap; gap:8px; flex:1; }
.pill { border:1px solid var(--line); background:var(--card); color:var(--ink); border-radius:22px; padding:4px 16px; font-family:var(--font-head); font-size:15px; cursor:pointer; }
.pill.active { background:var(--green); color:#fff; border-color:var(--green); }
.searchbar { display:flex; gap:8px; margin:10px 0 6px; }
.searchbar input { flex:1; padding:10px 16px; font-family:var(--font-body); font-size:16px; border:1px solid var(--line); border-radius:8px; background:var(--card); color:var(--ink); }
.searchbar input:focus { outline:2px solid var(--gold); }

/* thumbnail strip — 4 small stories */
.strip { display:grid; grid-template-columns:repeat(4,1fr); gap:18px; margin:20px 0 6px; padding-bottom:18px; border-bottom:1px solid var(--line); }
.strip-item { display:flex; gap:12px; align-items:flex-start; }
.strip-item img { width:84px; height:64px; object-fit:cover; border-radius:6px; flex:none; }
.strip-item .cat { font-size:12px; font-weight:700; color:var(--green); font-family:var(--font-head); }
.strip-item h3 { font-size:15.5px; line-height:1.6; font-weight:700; }
.strip-item h3 a:hover { color:var(--green); }

/* hero — full-width photo + big headline */
.hero-full { margin:22px 0 8px; }
.hero-full .hero-img-big { border-radius:8px; overflow:hidden; }
.hero-full .hero-img-big img { width:100%; max-height:460px; object-fit:cover; display:block; }
.hero-full .hero-body { padding:18px 4px 6px; }
.hero-full h2 { font-size:34px; line-height:1.55; font-weight:800; }
.hero-full h2 a:hover { color:var(--green); }
.hero-full p { font-size:17px; color:var(--muted); line-height:1.95; margin-top:8px; }
.badge { display:inline-block; color:#fff; font-size:12.5px; padding:3px 12px; border-radius:4px; margin-bottom:8px; line-height:1.8; font-family:var(--font-head); font-weight:700; }
.meta { color:var(--muted); font-size:14px; margin-top:8px; }
.readmore { display:inline-block; margin-top:10px; color:var(--green); font-weight:700; font-size:15px; font-family:var(--font-head); }
.readmore:hover { color:var(--gold); }

/* top 5 */
.top5 { background:var(--card); border:1px solid var(--line); border-right:5px solid var(--gold); border-radius:10px; padding:18px 24px; margin:24px 0 6px; }
.top5 h2 { font-size:24px; margin-bottom:10px; font-weight:800; }
.top5 ol { list-style:none; }
.top5 li { display:flex; gap:14px; align-items:flex-start; padding:9px 0; border-bottom:1px dashed var(--line); }
.top5 li:last-child { border-bottom:none; }
.top5 .num { flex:none; width:34px; height:34px; border-radius:50%; background:var(--green); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:16px; margin-top:4px; font-family:var(--font-head); }
.top5 li:first-child .num { background:var(--gold); color:#211d19; }
.top5 h3 { font-size:19px; }
.top5 .meta { margin-top:0; }

/* latest news — big + stacked */
.latest { margin:30px 0 6px; }
.latest-grid { display:grid; grid-template-columns:1.5fr 1fr; gap:22px; }
.latest-big .big-img { border-radius:8px; overflow:hidden; }
.latest-big .big-img img { width:100%; height:320px; object-fit:cover; display:block; }
.latest-big h3 { font-size:24px; line-height:1.6; font-weight:800; margin-top:12px; }
.latest-list { display:flex; flex-direction:column; gap:16px; }
.latest-item { display:flex; gap:14px; align-items:flex-start; padding-bottom:16px; border-bottom:1px solid var(--line); }
.latest-item:last-child { border-bottom:none; padding-bottom:0; }
.latest-item img { width:110px; height:82px; object-fit:cover; border-radius:6px; flex:none; }
.latest-item h3 { font-size:17px; line-height:1.6; font-weight:700; }
.latest-item .meta { margin-top:2px; font-size:13px; }

/* section headers — Figma style: bold title + hairline rule */
.sec-head { display:flex; align-items:baseline; justify-content:space-between; border-bottom:2px solid var(--ink); padding-bottom:6px; margin-bottom:16px; }
.sec-head h2 { font-size:26px; font-weight:800; }
.sec-head h2 .count { font-size:14px; color:var(--muted); font-family:var(--font-body); font-weight:400; }
.sec-head .viewall { font-size:14px; font-family:var(--font-head); font-weight:700; color:var(--green); white-space:nowrap; }
section.cat { margin:30px 0; }
.grid { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:8px; overflow:hidden; display:flex; flex-direction:column; }
.card:hover { border-color:var(--green); }
.card .tile { height:120px; display:flex; flex-direction:column; align-items:center; justify-content:center; color:rgba(255,255,255,.96); font-size:27px; font-weight:700; font-family:var(--font-head); }
.card .tile small { font-size:13px; opacity:.85; font-family:var(--font-body); letter-spacing:1px; }
.card .body { padding:14px 18px 18px; flex:1; display:flex; flex-direction:column; }
.card h3 { font-size:20px; line-height:1.6; font-weight:700; }
.card p { font-size:15.5px; color:var(--muted); line-height:1.9; flex:1; }
.tile { background-image:radial-gradient(circle at 85% 15%, rgba(255,255,255,.28), transparent 42%), radial-gradient(circle at 8% 92%, rgba(0,0,0,.22), transparent 46%), repeating-linear-gradient(45deg, rgba(255,255,255,.05) 0 10px, transparent 10px 20px); }
.tile-img { padding:0; overflow:hidden; }
.tile img { width:100%; height:100%; object-fit:cover; display:block; }
.hero-img { border-radius:8px; overflow:hidden; margin-bottom:18px; box-shadow:var(--shadow); }
.hero-img img { width:100%; max-height:420px; object-fit:cover; display:block; }
.img-credit { font-size:13px; color:var(--muted); margin:-10px 0 14px; }
.img-credit a { color:var(--green); text-decoration:underline; }

/* article page */
.crumb { font-size:14px; color:var(--muted); margin:20px 0 4px; }
.article { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:28px 32px; margin-bottom:22px; }
.article h1 { font-size:33px; line-height:1.6; font-weight:800; margin:8px 0 4px; }
.article .byline { border-top:1px solid var(--line); border-bottom:1px solid var(--line); padding:8px 0; margin:12px 0 18px; color:var(--muted); font-size:14.5px; }
.article .lead { font-size:19px; color:var(--muted); border-right:4px solid var(--gold); padding-right:16px; margin:14px 0 20px; line-height:2; }
.article p { margin-bottom:14px; font-size:var(--afs); line-height:2.2; }
.article h2 { font-size:24px; line-height:1.7; font-weight:800; margin:26px 0 10px; padding-bottom:4px; border-bottom:2px solid var(--gold); }
.keypoints { background:var(--card); border:1px solid var(--gold); border-right:5px solid var(--gold); border-radius:10px; padding:16px 22px; margin:18px 0 22px; }
html[data-theme="dark"] .keypoints { background:#2a251c; }
.keypoints h3 { font-size:20px; margin-bottom:6px; color:var(--green); font-weight:800; }
.keypoints ul { padding-right:20px; }
.keypoints li { font-size:16.5px; line-height:2; margin-bottom:4px; }
.sources { border-top:1px dashed var(--line); margin-top:22px; padding-top:12px; }
.sources h3 { font-size:19px; margin-bottom:6px; }
.sources a { display:block; font-size:14.5px; color:var(--green); line-height:2; word-break:break-all; }
.tags { display:flex; flex-wrap:wrap; gap:8px; margin-top:16px; align-items:center; }
.tags .lbl { font-weight:700; font-size:15px; }
.tag { border:1px solid var(--line); background:var(--bg); border-radius:18px; padding:2px 14px; font-size:14px; }
.article-tools { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:16px 0 4px; }
.tool-btn { border:1px solid var(--line); background:var(--card); color:var(--ink); border-radius:20px; padding:4px 14px; font-family:var(--font-body); font-size:14px; cursor:pointer; }
.tool-btn:hover { border-color:var(--gold); }
.share-row { display:flex; flex-wrap:wrap; gap:8px; margin:14px 0 4px; align-items:center; }
.share-row .lbl { font-weight:700; font-size:15px; }
.share-btn { display:inline-block; color:#fff !important; border-radius:20px; padding:5px 16px; font-size:14px; }
.share-wa { background:#25D366; } .share-fb { background:#1877F2; } .share-x { background:#111; } .share-copy { background:var(--green); }
.related h2 { font-size:23px; margin-bottom:12px; }
.backlink { display:inline-block; margin:6px 0 20px; color:var(--green); font-weight:700; }

/* about */
.about { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:28px 32px; margin:22px 0; }
.about h1 { font-size:29px; margin-bottom:10px; font-weight:800; }
.about p { margin-bottom:12px; font-size:17px; }
.about ul { padding-right:22px; }
.about li { margin-bottom:8px; font-size:16px; }

/* footer — Figma style: white, masthead, hairlines */
footer { background:var(--card); color:var(--ink); border-top:3px solid var(--ink); margin-top:36px; padding:28px 0 20px; }
footer .foot-mast { font-family:var(--font-head); font-size:30px; font-weight:800; text-align:center; padding-bottom:14px; border-bottom:1px solid var(--line); margin-bottom:18px; }
footer .foot-mast .gold { color:var(--green); }
footer .cols { display:grid; grid-template-columns:1.4fr 1fr 1fr; gap:24px; }
footer h3 { color:var(--green); font-size:19px; margin-bottom:8px; font-weight:800; }
footer p, footer a { font-size:14.5px; line-height:2; color:var(--muted); }
footer a { display:block; }
footer a:hover { color:var(--green); }
footer .copy { text-align:center; border-top:1px solid var(--line); margin-top:20px; padding-top:14px; font-size:13px; color:var(--muted); }

#toTop { position:fixed; bottom:22px; left:22px; z-index:60; width:48px; height:48px; border-radius:50%; border:none; background:var(--green); color:#fff; font-size:22px; cursor:pointer; box-shadow:var(--shadow-lg); display:none; }
#toTop:hover { background:var(--gold); color:#211d19; }

@media (max-width:820px) {
  .masthead h1 { font-size:40px; }
  .masthead { padding:34px 16px 26px; }
  .strip { grid-template-columns:1fr 1fr; }
  .hero-full h2 { font-size:26px; }
  .latest-grid { grid-template-columns:1fr; }
  .grid { grid-template-columns:1fr; }
  footer .cols { grid-template-columns:1fr; }
  .article { padding:20px 18px; }
  .article h1 { font-size:26px; }
  .ticker-label { font-size:13px; padding:6px 10px; }
}
@media (max-width:480px) {
  .strip { grid-template-columns:1fr; }
}
