/* Blog listing & detail — shared with blogs.html, blog-detail.html */

.page-hero--blog {
  position: relative;
  color: var(--cream);
  text-align: center;
  padding: 4.5rem 1rem 3.75rem;
  margin-top: 0;
  background: var(--forest-deep) center/cover no-repeat;
  background-image: linear-gradient(
      135deg,
      rgba(15, 35, 24, 0.82),
      rgba(28, 58, 42, 0.72)
    ),
    url("../images/gallery-safari.jpg");
}

.page-hero--blog .page-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
}

.page-hero--blog h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 0.5rem;
}

.page-hero--blog .page-hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.75rem;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.page-hero--blog .page-hero__lead {
  opacity: 0.9;
  max-width: 560px;
  margin: 0 auto;
}

.blog-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.5rem 1rem 4rem;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2.5rem;
  align-items: start;
}

.blog-sidebar {
  position: sticky;
  top: 6rem;
}

.blog-sidebar h2 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted-fg);
  margin-bottom: 1rem;
  font-family: Lato, sans-serif;
  font-weight: 700;
}

.blog-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.blog-sidebar a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--fg);
  border-left: 3px solid transparent;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.blog-sidebar a:hover {
  background: rgba(191, 144, 48, 0.08);
  color: var(--gold);
}

.blog-sidebar a.active {
  background: rgba(191, 144, 48, 0.12);
  border-left-color: var(--gold);
  color: var(--forest-deep);
  font-weight: 700;
}

.blog-sidebar a.all-posts {
  margin-bottom: 0.5rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
}

.blog-main {
  min-width: 0;
}

.cat-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.cat-bar button {
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--fg);
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
}

.cat-bar button.active,
.cat-bar button:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--forest-deep);
  font-weight: 700;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.blog-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.3s;
  text-decoration: none;
  color: inherit;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
  border-color: rgba(191, 144, 48, 0.35);
}

.blog-card img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  background: hsl(140, 20%, 88%);
}

.blog-card .body {
  padding: 1.25rem 1.35rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card .cat {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: 0.35rem;
}

.blog-card h2 {
  font-size: 1.15rem;
  line-height: 1.35;
  margin-bottom: 0.5rem;
  font-family: "Playfair Display", serif;
}

.blog-card p {
  font-size: 0.9rem;
  color: var(--muted-fg);
  flex: 1;
}

.blog-card .meta {
  margin-top: 1rem;
  font-size: 0.78rem;
  color: var(--muted-fg);
}

.blog-loading,
.blog-empty {
  text-align: center;
  color: var(--muted-fg);
  padding: 3rem 1rem;
  grid-column: 1 / -1;
}

/* Detail page */
.page-hero-mini {
  background: linear-gradient(135deg, var(--forest-deep), var(--forest-mid));
  color: var(--cream);
  padding: 1.25rem 1rem;
  text-align: center;
}

.page-hero-mini a {
  color: var(--gold-light);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  text-decoration: none;
}

.page-hero-mini a:hover {
  color: var(--gold);
}

.article-hero img {
  width: 100%;
  border-radius: 8px;
  margin: 1.5rem 0;
  max-height: 420px;
  object-fit: cover;
}

.article .meta {
  font-size: 0.85rem;
  color: var(--muted-fg);
  margin-bottom: 1rem;
}

.article .cat {
  display: inline-block;
  background: rgba(191, 144, 48, 0.15);
  color: var(--gold);
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.article h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 0.75rem;
}

.article-content {
  font-size: 1.05rem;
  line-height: 1.75;
}

.article-content a {
  color: var(--gold);
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.article-content h2 {
  margin: 1.75rem 0 0.75rem;
  font-size: 1.5rem;
}

.article-content p {
  margin-bottom: 1rem;
}

.article-content ul,
.article-content ol {
  margin: 0 0 1rem 1.25rem;
}

.loading,
.error {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--muted-fg);
}

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

  .blog-sidebar {
    position: static;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.25rem;
  }

  .blog-sidebar nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .blog-sidebar a {
    border-left: none;
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    font-size: 0.82rem;
  }

  .blog-sidebar a.active {
    border-color: var(--gold);
  }

  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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