/* ============================================================
   TEMPLATE SITE STYLES
   Key variables to update for your brand:
     --accent   → brand colour
   ============================================================ */

/* Variables */
:root {
  --accent: #16a34a; /* ← change to your brand colour */
  --accent-dark: #15803d;
  --text: #111827;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --border: #e5e7eb;
  --bg: #ffffff;
  --bg-off: #f9fafb;
  --heading-font: Georgia, "Times New Roman", serif;
  --body-font:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --max-width: 1200px;
  --article-width: 720px;
}

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--body-font);
  color: var(--text);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.6;
}

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

h1,
h2,
h3,
h4,
h5 {
  font-family: var(--heading-font);
  line-height: 1.3;
  margin: 0 0 0.5em;
}

p {
  margin: 0 0 1em;
}
p:last-child {
  margin-bottom: 0;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.navbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-name {
  font-family: var(--heading-font);
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--text);
  letter-spacing: -0.01em;
}

.navbar-links {
  display: flex;
  gap: 1.5rem;
}

.navbar-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.15s;
}

.navbar-links a:hover {
  color: var(--accent);
}

/* ============================================================
   MAIN CONTAINER
   ============================================================ */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 2rem 5rem;
}

/* ============================================================
   SHARED - TAGS, META, BADGES
   ============================================================ */
.topic-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  transition: opacity 0.15s;
}

.topic-tag:hover {
  opacity: 0.75;
}

.topic-tag-small {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.meta-dot {
  color: var(--border);
  margin: 0 0.4rem;
  font-size: 0.75rem;
}

.section-title {
  font-size: 0.7rem;
  font-family: var(--body-font);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--text);
}

/* ============================================================
   ARTICLE PAGE
   ============================================================ */
.article-wrap {
  max-width: var(--article-width);
  margin: 0 auto;
}

.article-header {
  margin-bottom: 2.5rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--text-muted);
  transition: color 0.15s;
}
.breadcrumb a:hover {
  color: var(--accent);
}

.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  gap: 0;
}

.article-title {
  font-size: 2.25rem;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.article-description {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.65;
}

.article-hero {
  margin: 0 0 2.5rem;
  border-radius: 8px;
  overflow: hidden;
}

.article-hero img {
  width: 100%;
  height: 420px;
  object-fit: cover;
}

.article-body {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text);
}

.article-body h2 {
  font-size: 1.5rem;
  margin: 2.5rem 0 0.75rem;
}

.article-body h3 {
  font-size: 1.2rem;
  margin: 2rem 0 0.5rem;
}

.article-body p {
  margin-bottom: 1.25rem;
}

.article-body ul,
.article-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.article-body li {
  margin-bottom: 0.4rem;
  line-height: 1.75;
}

.article-body strong {
  font-weight: 600;
}

.article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-body blockquote {
  border-left: 3px solid var(--accent);
  margin: 1.75rem 0;
  padding: 0.5rem 1.25rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ============================================================
   HOMEPAGE - HERO
   ============================================================ */
.hero {
  display: grid;
  grid-template-columns: 1fr 0.55fr;
  gap: 3rem;
  margin-bottom: 4rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}

.featured-article .feat-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.featured-article .article-meta {
  margin-bottom: 0.75rem;
}

.featured-article h2 {
  font-size: 1.875rem;
  margin-bottom: 0.5rem;
  line-height: 1.25;
}

.featured-article h2 a {
  transition: color 0.15s;
}
.featured-article h2 a:hover {
  color: var(--accent);
}

.featured-article p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.read-more {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
}

.read-more:hover {
  color: var(--accent-dark);
}

/* Spotlight sidebar */
.spotlight-list {
  display: flex;
  flex-direction: column;
}

.spotlight-item {
  display: flex;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.spotlight-item:first-child {
  border-top: 1px solid var(--border);
}

.spotlight-item-text {
  flex: 1;
}

.spotlight-item-text .article-meta {
  margin-bottom: 0.4rem;
}

.spotlight-item-text h3 {
  font-size: 1rem;
  line-height: 1.4;
  margin-bottom: 0;
}

.spotlight-item-text h3 a {
  transition: color 0.15s;
}
.spotlight-item-text h3 a:hover {
  color: var(--accent);
}

.spotlight-item .thumb {
  width: 88px;
  height: 62px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

/* ============================================================
   HOMEPAGE - FEED
   ============================================================ */
.feed {
  display: flex;
  flex-direction: column;
}

.feed-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.75rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.feed-item .feed-img {
  width: 200px;
  height: 135px;
  object-fit: cover;
  border-radius: 6px;
}

.feed-item-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.feed-item h2 {
  font-size: 1.3125rem;
  margin-bottom: 0.4rem;
  line-height: 1.35;
}

.feed-item h2 a {
  transition: color 0.15s;
}
.feed-item h2 a:hover {
  color: var(--accent);
}

.feed-item p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 0;
}

/* ============================================================
   CARD GRID  (More Articles, Topic pages)
   ============================================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.card {
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  overflow: hidden;
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
}

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

.card-body {
  padding: 0.2rem 0.25rem 0.25rem 0.25rem;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.card-title {
  font-size: 1.0625rem;
  margin-bottom: 0.4rem;
  line-height: 1.4;
  color: var(--text);
  transition: color 0.15s;
}

.card:hover .card-title {
  color: var(--accent);
}

.card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

/* ============================================================
   MORE ARTICLES ASIDE
   ============================================================ */
.more-articles {
  max-width: var(--article-width);
  margin: 4rem auto 0;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}

.more-articles .card-grid {
  grid-template-columns: repeat(3, 1fr);
}

/* ============================================================
   TOPICS INDEX
   ============================================================ */
.page-header {
  margin-bottom: 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.4rem;
}
.page-header p {
  color: var(--text-muted);
  font-size: 1.0625rem;
  margin: 0;
}

.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 4rem;
}

.topic-card {
  display: block;
  padding: 1.5rem;
  background: var(--bg-off);
  border-radius: 8px;
  border: 1px solid var(--border);
  transition:
    border-color 0.15s,
    background 0.15s;
}

.topic-card:hover {
  border-color: var(--accent);
  background: var(--bg);
}

.topic-card-name {
  font-family: var(--heading-font);
  font-size: 1.125rem;
  color: var(--text);
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.topic-card-count {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ============================================================
   PROSE PAGES (About, Terms, Privacy)
   ============================================================ */
.prose {
  max-width: 720px;
  margin: 0 auto;
}

.prose h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.prose h2 {
  font-size: 1.375rem;
  margin: 2rem 0 0.5rem;
}
.prose h3 {
  font-size: 1.125rem;
  margin: 1.5rem 0 0.4rem;
}
.prose p {
  line-height: 1.75;
}
.prose hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}
.prose ul,
.prose ol {
  padding-left: 1.5rem;
}
.prose li {
  line-height: 1.75;
  margin-bottom: 0.3rem;
}
.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.prose strong {
  font-weight: 600;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--border);
  margin-top: 4rem;
  padding: 3rem 0;
  font-size: 0.875rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: start;
}

.footer-site-name {
  font-family: var(--heading-font);
  font-size: 1.125rem;
  font-weight: bold;
  color: var(--text);
  display: block;
  margin-bottom: 0.5rem;
}

.footer-desc {
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1rem;
  max-width: 360px;
}

.footer-copy {
  color: var(--text-light);
  margin: 0;
}

.footer-nav h3 {
  font-size: 0.68rem;
  font-family: var(--body-font);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-nav li {
  margin-bottom: 0.5rem;
}
.footer-nav a {
  color: var(--text-muted);
  transition: color 0.15s;
}
.footer-nav a:hover {
  color: var(--accent);
}

/* ============================================================
   COOKIE BANNER
   ============================================================ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--text);
  color: var(--bg);
  padding: 0.875rem 2rem;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  font-size: 0.875rem;
}

.cookie-banner p {
  margin: 0;
}
.cookie-banner a {
  color: #86efac;
  text-decoration: underline;
}

.cookie-banner button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.375rem 1.125rem;
  font-size: 0.875rem;
  cursor: pointer;
  white-space: nowrap;
  font-family: var(--body-font);
}

.cookie-banner button:hover {
  background: var(--accent-dark);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .more-articles .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .feed-item {
    grid-template-columns: 160px 1fr;
    gap: 1.25rem;
  }
  .feed-item .feed-img {
    width: 160px;
    height: 110px;
  }
}

@media (max-width: 640px) {
  .navbar-inner {
    padding: 0 1rem;
  }

  main {
    padding: 1.5rem 1rem 3rem;
  }

  .article-title {
    font-size: 1.75rem;
  }
  .article-hero img {
    height: 240px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }
  .more-articles .card-grid {
    grid-template-columns: 1fr;
  }

  .feed-item {
    grid-template-columns: 1fr;
  }
  .feed-item .feed-img {
    width: 100%;
    height: 200px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .cookie-banner {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
}

/* Tables */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  overflow-x: auto;
  display: block;
}
.article-body table th,
.article-body table td {
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.article-body table th {
  background: var(--bg-off);
  font-weight: 600;
  color: var(--text);
}
.article-body table tr:nth-child(even) td {
  background: #f5f7fa;
}
