/* Mkodisha Insights — matches the marketing look: warm cream canvas,
   Playfair Display headlines, brick-red accents, sage green newsletter. */

:root {
  --cream: #faf4ee;
  --card: #ffffff;
  --ink: #2e2420;
  --muted: #8a7d74;
  --brick: #a6402c;
  --brick-dark: #8a3222;
  --sage: #4c5b4a;
  --sage-chip-bg: #dde8d5;
  --sage-chip-ink: #55684f;
  --line: #ece0d5;
  --radius: 14px;
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Jost", "Segoe UI", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

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

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, .logo { font-family: var(--font-display); }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 780px; margin-left: auto; margin-right: auto; padding: 0 24px; }

/* ---------- Buttons, pills, chips ---------- */
.btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-primary { background: var(--brick); color: #fff; }
.btn-primary:hover { background: var(--brick-dark); }
.btn-outline { border-color: var(--brick); color: var(--brick); background: transparent; }
.btn-outline:hover { background: var(--brick); color: #fff; }

.pill {
  display: inline-block;
  padding: 7px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 0.85rem;
  color: var(--ink);
  transition: border-color 0.15s ease;
}
.pill:hover { border-color: var(--brick); color: var(--brick); }
.pill.active { background: var(--brick); border-color: var(--brick); color: #fff; }

.chip {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--sage-chip-bg);
  color: var(--sage-chip-ink);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brick);
}

/* ---------- Header ---------- */
.site-header {
  background: var(--cream);
  border-bottom: 1px solid transparent;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.logo { font-size: 1.5rem; font-weight: 700; color: var(--brick); }
.logo img { height: 30px; width: auto; display: block; }

.header-actions { display: flex; gap: 10px; align-items: center; }

.site-nav { display: flex; gap: 28px; font-size: 0.92rem; }
.site-nav a { color: var(--ink); padding-bottom: 4px; }
.site-nav a:hover { color: var(--brick); }
.site-nav a.active { color: var(--brick); border-bottom: 2px solid var(--brick); }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 40px; text-align: center; }
.hero-compact { padding: 36px 0 28px; }

.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  font-weight: 700;
  margin-bottom: 12px;
}

.hero-tagline { color: var(--muted); margin-bottom: 28px; }

.search-form { max-width: 560px; margin: 0 auto 22px; }

.search-form input[type="search"],
.filters-row input,
.filters-row select {
  width: 100%;
  padding: 13px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  outline: none;
}

.search-form input[type="search"]:focus { border-color: var(--brick); }

.filters-form { max-width: 760px; }
.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  justify-content: center;
}
.filters-row input, .filters-row select { width: auto; flex: 1 1 140px; padding: 10px 16px; }
.filters-row .btn { flex: 0 0 auto; }

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* ---------- Featured card ---------- */
.featured-card {
  display: grid;
  grid-template-columns: 3fr 2fr;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(70, 45, 30, 0.06);
  margin-bottom: 48px;
}

.featured-media img { width: 100%; height: 100%; object-fit: cover; }

.featured-body {
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  align-items: flex-start;
}

.featured-title { font-size: clamp(1.4rem, 2.6vw, 1.9rem); line-height: 1.25; }
.featured-title a:hover { color: var(--brick); }
.featured-teaser { color: var(--muted); font-size: 0.95rem; }

/* ---------- Byline ---------- */
.byline { display: flex; align-items: center; gap: 12px; }

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--sage-chip-bg);
  color: var(--sage-chip-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  flex-shrink: 0;
}

.byline-name { display: block; font-weight: 500; font-size: 0.9rem; }
.byline-meta { display: block; color: var(--muted); font-size: 0.8rem; }

/* ---------- Card grid ---------- */
.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 36px;
  align-items: start;
  padding-bottom: 64px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

.card-grid-wide { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(70, 45, 30, 0.05);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(70, 45, 30, 0.1); }

.card-media img { width: 100%; aspect-ratio: 16 / 10.5; object-fit: cover; }

.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.card-title { font-size: 1.15rem; line-height: 1.3; }
.card-title a:hover { color: var(--brick); }
.card-teaser { color: var(--muted); font-size: 0.87rem; flex: 1; }

.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.load-more { text-align: center; margin-top: 36px; }

/* ---------- Sidebar ---------- */
.home-sidebar { display: flex; flex-direction: column; gap: 24px; }

.popular-box {
  background: #f3ece2;
  border-radius: var(--radius);
  padding: 26px 24px;
}

.sidebar-title { font-size: 1.15rem; margin-bottom: 16px; }

.popular-list { list-style: none; counter-reset: popular; }

.popular-list li {
  counter-increment: popular;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
  padding-left: 30px;
}
.popular-list li:last-child { border-bottom: none; }

.popular-list li::before {
  content: counter(popular, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 14px;
  font-size: 0.72rem;
  color: var(--brick);
  font-weight: 600;
}

.popular-list a { font-size: 0.88rem; font-weight: 500; line-height: 1.35; display: block; }
.popular-list a:hover { color: var(--brick); }
.popular-meta { font-size: 0.75rem; color: var(--muted); }

.newsletter-box {
  background: var(--sage);
  color: #f2f0e6;
  border-radius: var(--radius);
  padding: 30px 26px;
}

.newsletter-box h2 { font-size: 1.3rem; margin-bottom: 8px; }
.newsletter-box p { font-size: 0.87rem; opacity: 0.85; margin-bottom: 18px; }

.newsletter-box input {
  width: 100%;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-family: var(--font-body);
  margin-bottom: 12px;
  outline: none;
}
.newsletter-box input::placeholder { color: rgba(255, 255, 255, 0.6); }
.newsletter-box .btn { width: 100%; }

/* ---------- Listing ---------- */
.listing-body { padding: 8px 0 64px; }
.result-count { color: var(--muted); font-size: 0.88rem; margin-bottom: 20px; }

.breadcrumbs {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.breadcrumbs a:hover { color: var(--brick); }
.breadcrumbs [aria-current] {
  max-width: 32ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.empty-state {
  text-align: center;
  background: var(--card);
  border-radius: var(--radius);
  padding: 64px 24px;
}
.empty-state h2 { margin-bottom: 8px; }
.empty-state p { color: var(--muted); margin-bottom: 20px; }

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 40px;
}

.page-link {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 0.85rem;
}
.page-link:hover { border-color: var(--brick); color: var(--brick); }
.page-link.current { background: var(--brick); border-color: var(--brick); color: #fff; }
.page-gap { padding: 8px 4px; color: var(--muted); }

/* ---------- Article page ---------- */
.article-page { padding: 40px 0 24px; }

.article-header { text-align: center; margin-bottom: 32px; }
.article-header .chip { margin-bottom: 16px; }

.article-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.2;
  margin-bottom: 20px;
}

.article-header .byline { justify-content: center; text-align: left; }

.article-hero img {
  width: 100%;
  border-radius: var(--radius);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin-bottom: 36px;
}

.article-body { font-size: 1.05rem; }
.article-body > * + * { margin-top: 1.1em; }
.article-body h2, .article-body h3 { font-family: var(--font-display); line-height: 1.3; margin-top: 1.6em; }
.article-body img { border-radius: 10px; margin: 1.4em auto; }
.article-body a { color: var(--brick); text-decoration: underline; }
.article-body ul, .article-body ol { padding-left: 1.4em; }
.article-body blockquote {
  border-left: 3px solid var(--brick);
  padding-left: 1.2em;
  color: var(--muted);
  font-style: italic;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 32px;
  margin-top: 8px;
}

.related-section { padding: 48px 24px 72px; }
.section-title { font-size: 1.6rem; margin-bottom: 24px; }

/* ---------- Coming soon ---------- */
.coming-soon { padding: 72px 0 110px; text-align: center; }

.coming-soon-inner { max-width: 620px; }

.coming-soon .chip { margin-bottom: 20px; }

.coming-soon h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  margin-bottom: 14px;
}

.coming-soon-blurb { color: var(--muted); font-size: 1.02rem; }

.coming-soon-art {
  color: var(--brick);
  width: 120px;
  margin: 40px auto;
  opacity: 0.85;
}

.coming-soon-note {
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 40ch;
  margin: 0 auto 26px;
}

/* ---------- Error page ---------- */
.error-page { text-align: center; padding: 96px 24px 120px; }
.error-code { font-family: var(--font-display); font-size: 4.5rem; color: var(--brick); font-weight: 700; }
.error-page h1 { font-size: 1.8rem; margin: 8px 0 12px; }
.error-page p { color: var(--muted); margin-bottom: 28px; }
.error-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer {
  background: #f6efe7;
  border-top: 1px solid var(--line);
  padding: 48px 0 56px;
  margin-top: 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-brand p { color: var(--muted); font-size: 0.82rem; margin-top: 12px; max-width: 26ch; }

.site-footer h3 { font-family: var(--font-body); font-size: 0.85rem; font-weight: 600; margin-bottom: 14px; }
.site-footer div > a { display: block; font-size: 0.82rem; color: var(--muted); margin-bottom: 10px; }
.site-footer div > a:hover { color: var(--brick); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .home-layout { grid-template-columns: 1fr; }
  .featured-card { grid-template-columns: 1fr; }
  .featured-media img { max-height: 320px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .header-inner { flex-wrap: wrap; justify-content: center; gap: 12px; }
  .site-nav { gap: 18px; }
  .hero { padding: 36px 0 28px; }
  .featured-body { padding: 26px 22px; }
  .footer-grid { grid-template-columns: 1fr; }
  .header-actions { order: 3; }
}
