/* ================================================================
   WESTKATE SAFARIS — Blog Page Styles
   assets/css/blog.css
   Requires: global.css loaded first
================================================================ */

#heroBgBlog {
  background-image: url("../img/blogs.jpg");
}

/* ── HERO BACKGROUND ──────────────────────────────────────────── */
.blog-hero-bg {
  background:
    linear-gradient(
      to bottom,
      rgba(26, 20, 9, 0.08) 0%,
      rgba(26, 20, 9, 0.78) 100%
    ),
    url("https://images.unsplash.com/photo-1547036967-23d11aacaee0?w=1800&q=85")
      center/cover no-repeat;
}

/* ── CATEGORY FILTER BAR ──────────────────────────────────────── */
.cat-filter {
  position: sticky;
  top: 62px;
  z-index: 50;
  background: var(--ivory);
  border-bottom: 1px solid var(--border);
}
.cat-filter-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 5%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.cat-filter-inner::-webkit-scrollbar {
  display: none;
}
.cat-btn {
  flex-shrink: 0;
  padding: 1rem 1.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-family: var(--sans);
  transition: all 0.3s;
  white-space: nowrap;
}
.cat-btn:hover {
  color: var(--earth);
}
.cat-btn.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ── FEATURED POST ────────────────────────────────────────────── */
.featured-section {
  padding: 5rem 5% 0;
}
.featured-inner {
  max-width: 1400px;
  margin: 0 auto;
}
.featured-eyebrow {
  margin-bottom: 2rem;
}
.featured-card {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  border-radius: 6px;
  overflow: hidden;
  background: var(--sand);
  border: 1px solid var(--border);
  transition: box-shadow 0.35s var(--ease);
  text-decoration: none;
  color: inherit;
}
.featured-card:hover {
  box-shadow: 0 20px 60px rgba(45, 36, 22, 0.12);
}
.featured-img {
  position: relative;
  overflow: hidden;
  min-height: 460px;
}
.featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.featured-card:hover .featured-img img {
  transform: scale(1.04);
}
.featured-tag {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  background: var(--gold);
  color: var(--ivory);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border-radius: 2px;
}
.featured-body {
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
}
.featured-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}
.post-cat-tag {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
}
.post-date {
  font-size: 0.75rem;
  color: var(--muted);
}
.post-read {
  font-size: 0.75rem;
  color: var(--muted);
}
.featured-title {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 300;
  color: var(--earth);
  line-height: 1.15;
  margin-bottom: 1rem;
}
.featured-title em {
  font-style: italic;
  color: var(--gold);
}
.featured-excerpt {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 2rem;
}
.featured-cta {
  margin-bottom: 1.5rem;
}
.featured-author {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--ivory);
  flex-shrink: 0;
}
.author-name {
  font-size: 0.82rem;
  color: var(--earth);
  font-weight: 500;
}
.author-role {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

/* ── BUTTON SIZES ─────────────────────────────────────────────── */
.btn-sm {
  padding: 0.6rem 1.2rem !important;
  font-size: 0.72rem !important;
}

/* ── MAIN BLOG LAYOUT ─────────────────────────────────────────── */
.blog-layout {
  max-width: 1400px;
  margin: 0 auto;
  padding: 4rem 5%;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 4rem;
  align-items: start;
}
.posts-col {
  min-width: 0;
}

/* ── POSTS GRID ───────────────────────────────────────────────── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}
.post-card {
  background: var(--ivory);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  transition: all 0.35s var(--ease);
  text-decoration: none;
  color: inherit;
  display: block;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(45, 36, 22, 0.1);
  border-color: rgba(200, 136, 42, 0.25);
}
.post-img {
  position: relative;
  overflow: hidden;
  height: 220px;
}
.post-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.post-card:hover .post-img img {
  transform: scale(1.06);
}
.post-img-cat {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(26, 20, 9, 0.75);
  color: var(--ivory);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border-radius: 2px;
  backdrop-filter: blur(4px);
}
.post-body {
  padding: 1.5rem;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.post-title {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--earth);
  line-height: 1.25;
  margin-bottom: 0.75rem;
  transition: color 0.3s;
}
.post-card:hover .post-title {
  color: var(--gold);
}
.post-excerpt {
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}
.post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* Author mini — used in post cards */
.post-author-sm {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.author-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 0.75rem;
  color: var(--ivory);
  flex-shrink: 0;
}
.post-author-name {
  font-size: 0.75rem;
  color: var(--earth);
}

/* Read More link */
.read-more {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: gap 0.3s;
}
.read-more:hover {
  gap: 0.7rem;
}

/* ── PAGINATION ───────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding-top: 3rem;
}
.pg-btn {
  width: 40px;
  height: 40px;
  border-radius: 3px;
  border: 1.5px solid var(--border);
  background: transparent;
  font-size: 0.82rem;
  color: var(--earth);
  cursor: pointer;
  transition: all 0.3s;
  font-family: var(--sans);
}
.pg-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.pg-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ivory);
}
.pg-btn.pg-next {
  width: auto;
  padding: 0 1.2rem;
}
.pg-ellipsis {
  font-size: 0.9rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 0.25rem;
}

/* ── SIDEBAR ──────────────────────────────────────────────────── */
.sidebar {
  position: sticky;
  top: 100px;
}
.sidebar-widget {
  background: var(--sand);
  border-radius: 6px;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
}
.widget-title {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--earth);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.search-wrap {
  display: flex;
  gap: 0.5rem;
}
.search-input {
  flex: 1;
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 3px;
  font-size: 0.82rem;
  font-family: var(--sans);
  background: var(--ivory);
  color: var(--earth);
  outline: none;
  transition: border-color 0.3s;
}
.search-input:focus {
  border-color: var(--gold);
}
.search-btn {
  padding: 0.7rem 1rem;
  background: var(--gold);
  color: var(--ivory);
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.search-btn:hover {
  background: var(--gold-dk);
}

/* Categories sidebar list */
.cat-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.cat-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.9rem;
  border-radius: 3px;
  font-size: 0.8rem;
  color: var(--earth);
  cursor: pointer;
  font-family: var(--sans);
  transition: all 0.3s;
}
.cat-list-item:hover {
  background: rgba(200, 136, 42, 0.08);
  color: var(--gold);
}
.cat-count {
  font-size: 0.7rem;
  color: var(--muted);
  background: rgba(45, 36, 22, 0.08);
  padding: 0.1rem 0.5rem;
  border-radius: 10px;
}

/* Popular posts sidebar */
.popular-item {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin-bottom: 1rem;
  text-decoration: none;
  color: inherit;
}
.popular-item:last-child {
  margin-bottom: 0;
}
.pop-img {
  width: 64px;
  height: 64px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}
.pop-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pop-title {
  font-size: 0.82rem;
  color: var(--earth);
  line-height: 1.4;
  font-weight: 500;
  transition: color 0.3s;
}
.popular-item:hover .pop-title {
  color: var(--gold);
}
.pop-meta {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.3rem;
}

/* Newsletter sidebar widget */
.newsletter-widget {
  background: var(--earth) !important;
  border-color: transparent !important;
  text-align: center;
}
.newsletter-widget .widget-title {
  color: var(--ivory);
  border-bottom-color: rgba(250, 247, 242, 0.12);
}
.nl-desc {
  font-size: 0.8rem;
  color: rgba(250, 247, 242, 0.5);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}
.nl-input {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(250, 247, 242, 0.06);
  border: 1.5px solid rgba(250, 247, 242, 0.12);
  border-radius: 3px;
  font-size: 0.85rem;
  color: var(--ivory);
  outline: none;
  font-family: var(--sans);
  margin-bottom: 0.75rem;
  transition: border-color 0.25s;
}
.nl-input::placeholder {
  color: rgba(250, 247, 242, 0.28);
}
.nl-input:focus {
  border-color: var(--gold);
}
.nl-btn {
  width: 100%;
  padding: 0.85rem;
  background: var(--gold);
  color: var(--ivory);
  border: none;
  border-radius: 3px;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: var(--sans);
  transition: background 0.3s;
}
.nl-btn:hover {
  background: var(--gold-dk);
}

/* Tags cloud */
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tag-pill {
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: var(--ivory);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.3s;
  font-family: var(--sans);
}
.tag-pill:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* Sidebar CTA banner */
.sidebar-cta {
  background: var(--gold);
  border-radius: 6px;
  padding: 2rem;
  text-align: center;
}
.sidebar-cta-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--ivory);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}
.sidebar-cta-sub {
  font-size: 0.82rem;
  color: rgba(250, 247, 242, 0.75);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}
.sidebar-cta-btn {
  width: 100%;
  justify-content: center;
}

/* Skeleton card shimmer */
.skeleton {
  pointer-events: none;
}

.skel-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #e8e2d9;
  border-radius: 3px 3px 0 0;
}

.skel-line {
  height: 14px;
  background: #e8e2d9;
  border-radius: 3px;
  margin: 10px 0;
  animation: shimmer 1.4s infinite;
}
.skel-short {
  width: 40%;
}
.skel-medium {
  width: 70%;
}

@keyframes shimmer {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
  100% {
    opacity: 1;
  }
}

/* Empty / error states */
.posts-empty,
.posts-error {
  grid-column: 1 / -1;
  padding: 3rem 1rem;
  text-align: center;
  font-family: "DM Sans", sans-serif;
  color: #888;
  font-size: 0.95rem;
}
.posts-error small {
  display: block;
  margin-top: 0.4rem;
  color: #bbb;
}

/* ── RESPONSIVE ───────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .blog-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
  }
  .featured-card {
    grid-template-columns: 1fr;
  }
  .featured-img {
    min-height: 300px;
  }
}
@media (max-width: 760px) {
  .posts-grid {
    grid-template-columns: 1fr;
  }
  .featured-body {
    padding: 2rem;
  }
  .featured-section {
    padding: 3rem 5% 0;
  }
}
@media (max-width: 480px) {
  .blog-layout {
    padding: 2.5rem 5%;
  }
  .featured-body {
    padding: 1.5rem;
  }
}
