/*
Theme Name: Wekeza News
Theme URI: https://wekeza.co.tz/
Author: Wekeza
Description: A clean, modern news theme for Wekeza — TZ & EA investment news. Built to pair with the Wekeza Markets plugin (live DSE data in the masthead ticker and sidebar).
Version: 1.0.0
License: GPLv2 or later
Text Domain: wekeza-news
*/

:root {
  --ink: #14181f;
  --red: #c8102e;
  --red-dark: #a10d24;
  --paper: #ffffff;
  --bg: #f4f5f7;
  --line: #e4e7eb;
  --muted: #6b7280;
  --link: #0b2e4f;
  --maxw: 1180px;
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: #1f2530;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px; line-height: 1.65;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

h1, h2, h3, .headline { font-family: Georgia, "Times New Roman", serif; color: var(--ink); line-height: 1.2; }

/* Top bar */
.topbar { background: var(--ink); color: #b9c2cf; font-size: 13px; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 36px; }
.topbar a { color: #dbe3ee; }

/* Masthead */
.masthead { background: var(--paper); border-bottom: 3px solid var(--ink); }
.masthead .wrap { display: flex; align-items: center; justify-content: space-between; padding: 22px 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-family: Georgia, serif;
  font-weight: 800; font-size: 34px; color: var(--ink); letter-spacing: -.5px; }
.brand:hover { text-decoration: none; }
.brand-mark { display: inline-flex; width: 42px; height: 42px; }
.brand-mark svg { width: 42px; height: 42px; }
.brand b { color: var(--red); }
.custom-logo { max-height: 52px; width: auto; }
.brand-tag { display: block; font-family: -apple-system, sans-serif; font-size: 12px; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.masthead-cta a { display: inline-block; background: var(--red); color: #fff; padding: 10px 18px;
  border-radius: 4px; font-size: 14px; font-weight: 700; }
.masthead-cta a:hover { background: var(--red-dark); text-decoration: none; }

/* Nav */
.nav { background: var(--ink); position: sticky; top: 0; z-index: 50; }
.nav .wrap { display: flex; align-items: center; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.nav li a { display: block; color: #e7ecf2; padding: 14px 16px; font-size: 14px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px; }
.nav li a:hover, .nav li.current-menu-item a { background: var(--red); color: #fff; text-decoration: none; }
.nav .menu-toggle { display: none; }

/* Ticker strip (plugin) */
.ticker-strip { background: #0b2e4f; }
.ticker-strip .wm-ticker { margin: 0; border-radius: 0; background: transparent; }

/* Layout */
.site { max-width: var(--maxw); margin: 26px auto; padding: 0 20px; display: grid;
  grid-template-columns: 1fr 320px; gap: 34px; }
@media (max-width: 900px) { .site { grid-template-columns: 1fr; } }

/* Section head */
.sec-head { display: flex; align-items: center; gap: 12px; margin: 6px 0 18px; }
.sec-head h2 { font-size: 20px; margin: 0; text-transform: uppercase; letter-spacing: .5px; }
.sec-head::after { content: ""; flex: 1; height: 3px; background: var(--ink); }

/* Cards */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  margin-bottom: 22px; }
.thumb { display: block; aspect-ratio: 16/9; position: relative; overflow: hidden; background: #e9edf1; }
.thumb-link { position: absolute; inset: 0; display: block; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .cat-tag { position: absolute; left: 12px; top: 12px; z-index: 3; }
.thumb .ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 20px; text-align: center; overflow: hidden; }
.thumb .ph > span { font-family: Georgia, serif; font-size: 22px; font-weight: 700; color: #fff;
  opacity: .96; text-shadow: 0 1px 14px rgba(0,0,0,.28); position: relative; z-index: 1; }
.thumb .ph::before { content: "WEKEZA"; position: absolute; top: 14px; left: 0; right: 0;
  font: 700 11px/1 -apple-system, sans-serif; letter-spacing: 3px; color: #fff; opacity: .55; }
.thumb .ph::after { content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 82% 18%, rgba(255,255,255,.16), transparent 55%),
    repeating-linear-gradient(45deg, rgba(255,255,255,.05) 0 14px, transparent 14px 28px); }
.cat-tag { display: inline-block; background: var(--red); color: #fff; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .6px; padding: 4px 9px; border-radius: 3px; }
a.cat-tag:hover { background: var(--red-dark); text-decoration: none; }
.card-body { padding: 16px 18px 20px; }
.card-body h3 { margin: 8px 0 8px; font-size: 20px; }
.card-body h3 a { color: var(--ink); }
.card-body p { margin: 0; color: #4b5563; font-size: 15px; }
.meta { color: var(--muted); font-size: 13px; margin-top: 10px; }

/* Hero (lead story) */
.hero { display: grid; grid-template-columns: 1.5fr 1fr; gap: 22px; margin-bottom: 30px; }
@media (max-width: 700px) { .hero { grid-template-columns: 1fr; } }
.hero .lead .thumb { aspect-ratio: 16/9; }
.hero .lead h2 { font-size: 30px; margin: 12px 0 10px; }
.hero .lead h2 a { color: var(--ink); }
.hero .rail .mini { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.hero .rail .mini:first-child { padding-top: 0; }
.hero .rail .mini .t { flex: 0 0 96px; aspect-ratio: 4/3; border-radius: 6px; overflow: hidden; position: relative; }
.hero .rail .mini .t .thumb { position: absolute; inset: 0; aspect-ratio: auto; }
.hero .rail .mini .t .ph > span { font-size: 12px; }
.hero .rail .mini .t .ph::before { display: none; }
.hero .rail .mini h4 { font-family: Georgia, serif; margin: 0; font-size: 16px; line-height: 1.3; }
.hero .rail .mini h4 a { color: var(--ink); }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 620px) { .grid { grid-template-columns: 1fr; } }

/* Single post */
.single .post-head h1 { font-size: 34px; margin: 6px 0 10px; }
.single .post-meta { color: var(--muted); font-size: 14px; margin-bottom: 18px;
  border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.single .featured { margin: 0 0 20px; border-radius: 8px; overflow: hidden; aspect-ratio: 16/8; position: relative; }
.entry { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 28px 34px; }
.entry p { margin: 0 0 18px; }
.entry h3 { margin: 26px 0 10px; font-size: 22px; }
.page-tpl .entry { padding: 28px; }

/* Sidebar */
.sidebar .widget { background: var(--paper); border: 1px solid var(--line); border-radius: 8px;
  padding: 18px; margin-bottom: 22px; }
.sidebar .widget h4 { margin: 0 0 14px; font-size: 14px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--ink); border-bottom: 3px solid var(--red); padding-bottom: 8px; display: inline-block; }
.sidebar ul.list { list-style: none; margin: 0; padding: 0; }
.sidebar ul.list li { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.sidebar ul.list li:last-child { border-bottom: 0; }
.sidebar ul.list li a { color: var(--ink); }

/* Footer */
.site-footer { background: var(--ink); color: #aab4c2; margin-top: 40px; }
.site-footer .wrap { padding: 34px 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.site-footer .brand { color: #fff; font-size: 24px; }
.site-footer a { color: #cfd8e3; }
.site-footer small { display: block; color: #7c8899; margin-top: 8px; }

/* Category gradients for placeholder thumbnails */
.ph.c-dse { background: linear-gradient(135deg, #0b2e4f, #1789c6); }
.ph.c-east-african-markets { background: linear-gradient(135deg, #14934a, #0b6b3a); }
.ph.c-bonds-fixed-income { background: linear-gradient(135deg, #6b21a8, #9333ea); }
.ph.c-personal-finance { background: linear-gradient(135deg, #b45309, #e3b505); }
.ph.c-daily-market-recap { background: linear-gradient(135deg, #0b2e4f, #2a6f97); }
.ph.c-default { background: linear-gradient(135deg, #334155, #64748b); }

.pagination { margin: 10px 0 30px; display: flex; gap: 8px; }
.pagination a, .pagination span { padding: 8px 14px; border: 1px solid var(--line); background: #fff;
  border-radius: 4px; font-size: 14px; }
.pagination .current { background: var(--ink); color: #fff; border-color: var(--ink); }
