/* ===== SOUTH AFRICA SDR — BLOG STYLES ===== */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

:root {
  --green:       #02403D;
  --forest:      #012B28;
  --gold:        #DAA866;
  --gold-dark:   #B8945A;
  --green-support: #3A7A72;
  --cream:       #FAF8F2;
  --sand:        #F1ECE1;
  --ink:         #1E2622;
  --muted:       #6B7168;
  --white:       #FFFFFF;
  --radius:      9px;
  --font-display: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-sans:    "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

/* ── BLOG HEADER ── */
.blog-site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(2, 64, 61, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(218, 168, 102, 0.15);
}

.blog-site-header .wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 20px;
}

.blog-site-header .brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.blog-site-header .brand img {
  height: 32px;
  width: auto;
}

.blog-site-header nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 24px;
}

.blog-site-header nav ul li a {
  color: rgba(250, 248, 242, 0.85);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.2s;
}

.blog-site-header nav ul li a:hover,
.blog-site-header nav ul li a.active {
  color: var(--gold);
}

.blog-site-header .btn-gold {
  background: var(--gold);
  color: var(--forest);
  padding: 8px 20px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.blog-site-header .btn-gold:hover {
  background: #e8c48a;
  transform: translateY(-1px);
}

.blog-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.blog-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--cream);
  border-radius: 2px;
}

.blog-mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 16px 28px 24px;
  background: var(--forest);
  border-top: 1px solid rgba(218, 168, 102, 0.12);
}

.blog-mobile-menu a {
  color: rgba(250, 248, 242, 0.85);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 10px 0;
  font-weight: 500;
}

.blog-mobile-menu a.active { color: var(--gold); }
.blog-mobile-menu .btn-gold { margin-top: 8px; text-align: center; }

@media (max-width: 900px) {
  .blog-site-header nav { display: none; }
  .blog-site-header .wrap > .btn-gold { display: none; }
  .blog-hamburger { display: flex; }
  .blog-mobile-menu:not([hidden]) { display: flex; }
}

/* ── BLOG LISTING ── */
.blog-listing-page {
  background: var(--sand);
  min-height: 80vh;
}

.blog-hero {
  background: var(--green);
  padding: calc(var(--header-offset, 82px) + 28px) 28px 56px;
  text-align: center;
}

.blog-hero h1 {
  font-family: var(--font-display);
  color: var(--cream);
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0 0 16px;
  font-weight: 700;
}

.blog-hero p {
  color: rgba(250, 248, 242, 0.75);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

.blog-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 28px 80px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 56px;
}

@media (max-width: 900px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 580px) {
  .blog-grid { grid-template-columns: 1fr; }
}

.blog-card {
  background: var(--white);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(2, 64, 61, 0.08);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s, box-shadow 0.25s;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.5s ease forwards;
  position: relative;
  cursor: pointer;
  border: 0.5px solid rgba(2, 64, 61, 0.08);
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(2, 64, 61, 0.14);
}

.blog-card-overlay-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

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

.blog-card-img-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-support) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
}

.blog-card-body {
  padding: 20px 22px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.blog-card-meta .tag {
  background: rgba(218, 168, 102, 0.14);
  color: var(--gold-dark);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.blog-card h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--green);
  margin: 0 0 10px;
  line-height: 1.45;
  font-weight: 600;
}

.blog-card p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.65;
  flex: 1;
  margin: 0 0 18px;
}

.blog-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold-dark);
  font-size: 0.85rem;
  font-weight: 600;
  transition: color 0.2s, gap 0.2s;
}

.blog-card:hover .blog-card-link { color: var(--green); gap: 10px; }

.blog-empty {
  text-align: center;
  padding: 80px 28px;
  color: var(--muted);
}

.blog-empty .empty-emoji { font-size: 3rem; margin-bottom: 16px; }
.blog-empty h2 { font-family: var(--font-display); color: var(--green); margin: 0 0 10px; }

/* ── PAGINATION ── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  border: 1px solid transparent;
}

.pagination a {
  background: var(--white);
  color: var(--green);
  border-color: rgba(2, 64, 61, 0.12);
}

.pagination a:hover {
  background: var(--green);
  color: var(--cream);
  border-color: var(--green);
}

.pagination span.current {
  background: var(--gold);
  color: var(--forest);
}

.pagination .pag-prev,
.pagination .pag-next {
  width: auto;
  padding: 0 16px;
  font-size: 0.82rem;
}

/* ── BLOG POST PAGE ── */
.blog-post-page {
  background: var(--white);
  min-height: 80vh;
}

.post-hero {
  background: var(--green);
  padding: calc(var(--header-offset, 82px) + 20px) 28px 48px;
  text-align: center;
}

.post-hero-emoji {
  font-size: 3rem;
  margin-bottom: 20px;
  display: block;
}

.post-tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.post-tag {
  background: rgba(218, 168, 102, 0.18);
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.post-hero h1 {
  font-family: var(--font-display);
  color: var(--cream);
  font-size: clamp(1.7rem, 3.5vw, 2.6rem);
  max-width: 780px;
  margin: 0 auto 20px;
  line-height: 1.35;
  font-weight: 700;
}

.post-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: rgba(250, 248, 242, 0.65);
  font-size: 0.82rem;
}

.post-featured-image {
  max-height: 480px;
  width: 100%;
  object-fit: cover;
  display: block;
}

.post-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 56px 28px 80px;
}

.blog-post-body {
  color: var(--ink);
  line-height: 1.8;
  font-size: 1.05rem;
}

.blog-post-body h2 {
  font-family: var(--font-display);
  color: var(--green);
  font-size: 1.55rem;
  margin: 2.2em 0 0.6em;
  font-weight: 700;
}

.blog-post-body h3 {
  font-family: var(--font-display);
  color: var(--green);
  font-size: 1.2rem;
  margin: 1.8em 0 0.5em;
  font-weight: 600;
}

.blog-post-body p { margin: 0 0 1.3em; }
.blog-post-body ul, .blog-post-body ol { padding-left: 1.4em; margin: 0 0 1.3em; }
.blog-post-body li { margin-bottom: 0.4em; }
.blog-post-body a { color: var(--gold-dark); text-decoration: underline; }
.blog-post-body a:hover { color: var(--green); }
.blog-post-body blockquote {
  border-left: 3px solid var(--gold);
  margin: 1.6em 0;
  padding: 0.6em 0 0.6em 1.2em;
  color: var(--muted);
  font-style: italic;
  background: var(--sand);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.blog-post-body img { max-width: 100%; border-radius: var(--radius); margin: 1.2em 0; display: block; }
.blog-post-body pre {
  background: var(--forest);
  color: #e8e8e8;
  border-radius: var(--radius);
  padding: 1.2em 1.4em;
  overflow-x: auto;
  margin: 1.4em 0;
}
.blog-post-body code { font-size: 0.88em; }
.blog-post-body p code, .blog-post-body li code {
  background: var(--sand);
  color: var(--green);
  padding: 1px 5px;
  border-radius: 3px;
}
.blog-post-body hr { border: none; border-top: 1px solid var(--sand); margin: 2.4em 0; }

.post-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: none;
  margin-bottom: 32px;
  transition: color 0.2s;
}

.post-back:hover { color: var(--gold-dark); }

.related-posts {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--sand);
}

.related-posts h3 {
  font-family: var(--font-display);
  color: var(--green);
  font-size: 1.3rem;
  margin: 0 0 24px;
  font-weight: 700;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 700px) {
  .related-grid { grid-template-columns: 1fr; }
}

.related-card {
  background: var(--sand);
  border-radius: var(--radius);
  padding: 18px;
  text-decoration: none;
  display: block;
  transition: background 0.2s;
  border: 1px solid rgba(2, 64, 61, 0.08);
}

.related-card:hover { background: var(--cream); }
.related-card-date { font-size: 0.75rem; color: var(--muted); margin-bottom: 6px; }
.related-card-title {
  font-family: var(--font-display);
  color: var(--green);
  font-size: 1rem;
  line-height: 1.4;
  font-weight: 600;
}

/* ── CTA STRIP ── */
.blog-cta {
  background: var(--green);
  padding: 56px 28px;
  text-align: center;
}

.blog-cta h2 {
  font-family: var(--font-display);
  color: var(--cream);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  margin: 0 0 12px;
  font-weight: 700;
}

.blog-cta p {
  color: rgba(250, 248, 242, 0.75);
  font-size: 1rem;
  margin: 0 0 28px;
}

.btn-gold {
  background: var(--gold);
  color: var(--forest);
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s, transform 0.15s;
}

.btn-gold:hover { background: #e8c48a; transform: translateY(-2px); }

/* ── BLOG FOOTER ── */
.blog-site-footer {
  background: var(--forest);
  color: rgba(250, 248, 242, 0.7);
  font-size: 0.85rem;
}

.blog-site-footer .wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 28px 24px;
}

.blog-site-footer .foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}

@media (max-width: 900px) {
  .blog-site-footer .foot-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 540px) {
  .blog-site-footer .foot-grid { grid-template-columns: 1fr; }
}

.blog-site-footer .foot-brand .brand {
  display: inline-flex;
  margin-bottom: 14px;
}

.blog-site-footer .foot-brand .brand img {
  height: 28px;
  width: auto;
}

.blog-site-footer .foot-brand p {
  color: rgba(250, 248, 242, 0.65);
  line-height: 1.6;
  max-width: 280px;
}

.blog-site-footer h5 {
  color: var(--gold);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 14px;
}

.blog-site-footer ul { list-style: none; margin: 0; padding: 0; }
.blog-site-footer ul li { margin-bottom: 8px; }
.blog-site-footer ul li a {
  color: rgba(250, 248, 242, 0.65);
  text-decoration: none;
  transition: color 0.2s;
}
.blog-site-footer ul li a:hover { color: var(--gold); }

.blog-site-footer .foot-bottom {
  border-top: 1px solid rgba(250, 248, 242, 0.08);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.78rem;
  color: rgba(250, 248, 242, 0.4);
}

.blog-site-footer .foot-bottom a {
  color: inherit;
  text-decoration: none;
}

.blog-site-footer .foot-bottom a:hover {
  color: rgba(250, 248, 242, 0.65);
}
