/*
Theme Name: The Herald Middelburg Redesign
Theme URI: https://theheraldmiddelburg.co.za
Author: The Herald Middelburg
Description: A bold, responsive local-news theme designed for The Herald Middelburg.
Version: 1.0.0
Text Domain: herald-redesign
*/

:root {
  --red: #c71920;
  --red-dark: #8f0e13;
  --ink: #171717;
  --muted: #6b6b6b;
  --paper: #ffffff;
  --soft: #f5f3f1;
  --line: #dedbd8;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.65;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
.wrap { width: min(calc(100% - 32px), var(--max)); margin-inline: auto; }
.top-strip { padding: 7px 0; color: #fff; background: var(--ink); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.top-strip .wrap { display: flex; justify-content: space-between; gap: 16px; }
.masthead { border-bottom: 5px solid var(--red); background: #fff; }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; min-height: 116px; }
.brand { display: flex; align-items: center; gap: 16px; }
.custom-logo { max-height: 78px; width: auto; }
.brand-name { margin: 0; color: var(--red); font-family: Georgia, 'Times New Roman', serif; font-size: clamp(2.2rem, 6vw, 4.6rem); font-weight: 900; letter-spacing: -.055em; line-height: .9; }
.brand-tagline { margin: 8px 0 0; color: var(--muted); font-size: .84rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.ad-cta { display: inline-flex; padding: 12px 18px; border: 2px solid var(--red); color: var(--red); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.ad-cta:hover { color: #fff; background: var(--red); }
.site-nav { background: var(--red); color: #fff; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 0; margin: 0; padding: 0; list-style: none; }
.site-nav a { display: block; padding: 14px 18px; font-size: .88rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.site-nav a:hover { background: var(--red-dark); }
.breaking { border-bottom: 1px solid var(--line); background: var(--soft); }
.breaking .wrap { display: flex; align-items: center; min-height: 44px; }
.breaking-label { align-self: stretch; display: flex; align-items: center; padding: 0 16px; color: #fff; background: var(--ink); font-size: .76rem; font-weight: 900; text-transform: uppercase; }
.breaking-text { padding: 0 16px; font-weight: 700; }
.hero { padding: 38px 0 28px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, .8fr); gap: 30px; }
.lead-card { position: relative; min-height: 470px; overflow: hidden; background: #242424; }
.lead-card img { width: 100%; height: 470px; object-fit: cover; opacity: .76; }
.lead-card.no-image { background: linear-gradient(135deg, #171717, #5b0c0f); }
.lead-overlay { position: absolute; inset: auto 0 0; padding: clamp(24px, 5vw, 46px); color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.9)); }
.kicker { display: inline-block; margin-bottom: 12px; padding: 5px 9px; color: #fff; background: var(--red); font-size: .72rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.lead-title { margin: 0; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.02; }
.lead-title a:hover { color: #ffd9d9; }
.lead-excerpt { max-width: 760px; margin: 16px 0 0; color: #eee; }
.side-stack { display: grid; gap: 18px; }
.side-card { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.side-card img { width: 100%; height: 155px; margin-bottom: 12px; object-fit: cover; }
.side-card h3 { margin: 0; font-family: Georgia, 'Times New Roman', serif; font-size: 1.32rem; line-height: 1.15; }
.meta { margin-top: 8px; color: var(--muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; }
.section { padding: 34px 0 52px; }
.section.alt { background: var(--soft); }
.section-title { display: flex; align-items: center; gap: 15px; margin: 0 0 24px; font-family: Georgia, 'Times New Roman', serif; font-size: 1.8rem; }
.section-title::after { content: ''; flex: 1; height: 4px; background: var(--red); }
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.news-card { background: #fff; border: 1px solid var(--line); }
.news-card img, .thumb-placeholder { width: 100%; height: 205px; object-fit: cover; }
.thumb-placeholder { background: linear-gradient(135deg, #2a2a2a, var(--red-dark)); }
.card-body { padding: 20px; }
.news-card h3 { margin: 0; font-family: Georgia, 'Times New Roman', serif; font-size: 1.45rem; line-height: 1.16; }
.news-card p { margin-bottom: 0; color: #4f4f4f; font-size: .94rem; }
.archive-link { display: inline-flex; margin-top: 28px; padding: 12px 18px; color: #fff; background: var(--red); font-weight: 800; text-transform: uppercase; }
.content-shell { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 44px; padding: 48px 0 60px; }
.article-title { margin: 0 0 10px; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1.03; }
.article-content { font-family: Georgia, 'Times New Roman', serif; font-size: 1.12rem; }
.article-content a { color: var(--red); text-decoration: underline; }
.article-content img { margin: 24px auto; }
.sidebar-box { padding: 22px; border-top: 5px solid var(--red); background: var(--soft); }
.sidebar-box h2 { margin-top: 0; font-family: Georgia, 'Times New Roman', serif; }
.sidebar-box ul { padding-left: 18px; }
.site-footer { padding: 42px 0 20px; color: #ddd; background: #161616; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
.site-footer h2, .site-footer h3 { color: #fff; font-family: Georgia, 'Times New Roman', serif; }
.site-footer ul { padding: 0; list-style: none; }
.site-footer li { margin: 8px 0; }
.site-footer a:hover { color: #fff; }
.copyright { margin-top: 32px; padding-top: 18px; border-top: 1px solid #3b3b3b; color: #999; font-size: .82rem; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }

@media (max-width: 860px) {
  .masthead-inner { align-items: flex-start; flex-direction: column; padding: 24px 0; }
  .hero-grid, .content-shell { grid-template-columns: 1fr; }
  .side-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .top-strip .wrap { flex-direction: column; gap: 2px; }
  .ad-cta { display: none; }
  .site-nav ul { display: grid; grid-template-columns: 1fr 1fr; }
  .site-nav a { padding: 11px 12px; }
  .breaking-label { display: none; }
  .lead-card, .lead-card img { min-height: 420px; height: 420px; }
  .side-stack, .news-grid, .footer-grid { grid-template-columns: 1fr; }
}
