/* ============ BLOG ============
   Shared styles for the blog index and post pages.
   Uses the site tokens from styles.css (--gold, --dark, --text, --font-heading).
   ============================================================ */

/* ---------- Hero ---------- */
.blog-hero {
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: stretch;
  overflow: hidden;
}

.blog-hero-overlay {
  position: absolute;
  inset: 0;
  background-position: center 40%;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: 0;
}

.blog-hero-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.62) 0%, rgba(0, 0, 0, 0.42) 60%, rgba(0, 0, 0, 0.25) 100%);
}

.blog-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1140px;
  margin: 0 auto;
  padding: 64px 20px;
  width: 100%;
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.blog-hero-inner h1 {
  font-family: var(--font-heading);
  font-size: 40px;
  line-height: 1.2;
  color: var(--white);
  margin-bottom: 14px;
  max-width: 820px;
}

.blog-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 10px;
}

.blog-hero-sub {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.9);
  max-width: 720px;
}

.blog-meta {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.82);
  margin-top: 12px;
}

.blog-crumbs {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 16px;
}

.blog-crumbs a { color: rgba(255, 255, 255, 0.92); text-decoration: underline; }
.blog-crumbs span { padding: 0 6px; }

/* ---------- Post body ---------- */
.post-section { padding: 56px 0 64px; }

.post-body {
  max-width: 800px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
}

.post-body h2 {
  font-family: var(--font-heading);
  font-size: 28px;
  line-height: 1.25;
  color: var(--dark);
  margin: 40px 0 14px;
}

.post-body h3 {
  font-family: var(--font-heading);
  font-size: 21px;
  color: var(--dark);
  margin: 28px 0 10px;
}

.post-body p { margin-bottom: 18px; }
.post-body ul,
.post-body ol { margin: 0 0 20px; padding-left: 22px; }
.post-body li { margin-bottom: 9px; }
.post-body a { color: var(--gold-dark); text-decoration: underline; }
.post-body a:hover { color: var(--gold); }
.post-body strong { color: var(--dark); }

/* Buttons and card links inside .post-body must not inherit the body link
   styling - without this the gold button ends up gold-on-gold */
.post-body .btn,
.post-body .blog-card a,
.post-body .post-related a { text-decoration: none; }
.post-body .btn-gold { color: var(--white); }
.post-body .btn-outline-light { color: var(--white); }
.post-body .blog-card h2 a,
.post-body .blog-card h3 a { color: var(--dark); }
.post-body .blog-card h2 a:hover,
.post-body .blog-card h3 a:hover { color: var(--gold-dark); }
.post-body .blog-card-more { color: var(--gold-dark); }
.post-body .blog-card-more:hover { text-decoration: underline; }

.post-lead { font-size: 20px; line-height: 1.6; color: #444; }

.post-hero-img {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto 36px;
  border-radius: 6px;
}

/* Table of contents */
.post-toc {
  border: 1px solid #e4e4e4;
  border-left: 4px solid var(--gold);
  border-radius: 0 6px 6px 0;
  background: var(--light-bg);
  padding: 18px 24px;
  margin: 0 0 30px;
}

.post-toc p {
  font-family: var(--font-heading);
  font-size: 18px;
  color: var(--dark);
  margin-bottom: 8px !important;
}

.post-toc ol { margin: 0; padding-left: 20px; }
.post-toc li { margin-bottom: 6px; }

/* Callout */
.post-note {
  background: var(--light-bg);
  border-left: 4px solid var(--gold);
  padding: 18px 24px;
  margin: 28px 0;
  border-radius: 0 6px 6px 0;
}

.post-note p:last-child { margin-bottom: 0; }

/* Tables */
.post-tablewrap { overflow-x: auto; margin: 26px 0; }

.post-body table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 15.5px;
}

.post-body th,
.post-body td {
  border: 1px solid #e4e4e4;
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}

.post-body thead th {
  background: var(--dark);
  color: var(--white);
  font-weight: 600;
}

.post-body tbody tr:nth-child(even) { background: #fafafa; }

/* Side-by-side figures */
.post-figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 26px 0 30px;
}

.post-figures img {
  width: 100%;
  border: 1px solid #e4e4e4;
  border-radius: 4px;
  background: #fff;
}

.post-figures figcaption {
  font-size: 14px;
  color: var(--text-light);
  margin-top: 8px;
  text-align: center;
}

/* FAQ */
.post-faq { margin-top: 42px; }

/* ---------- CTA ---------- */
.post-cta {
  background: var(--dark);
  color: var(--white);
  border-radius: 8px;
  padding: 34px 36px;
  margin: 48px 0 10px;
}

.post-cta h2 {
  font-family: var(--font-heading);
  font-size: 26px;
  color: var(--white);
  margin: 0 0 12px;
}

.post-cta p { color: rgba(255, 255, 255, 0.88); margin-bottom: 22px; }
.post-cta .btn { margin: 0 10px 8px 0; }

.btn-outline-light {
  border: 2px solid rgba(255, 255, 255, 0.75);
  color: var(--white);
  background: transparent;
}

.btn-outline-light:hover { background: rgba(255, 255, 255, 0.12); }

/* ---------- Cards (index + related) ---------- */
.blog-list-section { padding: 56px 0 64px; }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.blog-card {
  border: 1px solid #e4e4e4;
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

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

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

.blog-card-cat {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 8px;
}

.blog-card h2,
.blog-card h3 {
  font-family: var(--font-heading);
  font-size: 21px;
  line-height: 1.3;
  color: var(--dark);
  margin-bottom: 8px;
}

.blog-card h2 a:hover,
.blog-card h3 a:hover { color: var(--gold-dark); }

.blog-card-date { font-size: 13px; color: var(--text-light); margin-bottom: 12px; }
.blog-card p.blog-card-excerpt { font-size: 15px; color: var(--text-light); margin-bottom: 18px; flex: 1; }

.blog-card-more {
  align-self: flex-start;
  font-weight: 600;
  font-size: 14px;
  color: var(--gold-dark);
}

.blog-card-more:hover { text-decoration: underline; }

.post-related {
  max-width: 800px;
  margin: 50px auto 0;
  border-top: 1px solid #e4e4e4;
  padding-top: 34px;
}

.post-related > h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  color: var(--dark);
  margin-bottom: 24px;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .blog-hero-inner { padding: 44px 20px; }
  .blog-hero-inner h1 { font-size: 28px; }
  .blog-hero-sub { font-size: 15.5px; }
  .post-section { padding: 36px 0 44px; }
  .post-body { font-size: 16.5px; }
  .post-body h2 { font-size: 24px; }
  .post-lead { font-size: 18px; }
  .post-cta { padding: 26px 22px; }
}
