/* ═══════════════════════════════════════════════
   BLOG HUB — Shared styles for blog index,
   category, and tag listing pages.
═══════════════════════════════════════════════ */

/* Hero (blog index, category, tag) */
.blog-hero,
.cat-hero,
.tag-hero {
  padding: 140px 48px 32px;
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
}
.blog-hero h1,
.cat-hero h1,
.tag-hero h1 { margin-top: 16px; margin-bottom: 12px; }
.blog-hero h1 { margin-bottom: 20px; }
.blog-hero .body-lg,
.cat-hero .body-lg { max-width: 700px; margin: 0 auto; }
.tag-hero .body-lg { max-width: 900px; margin: 0 auto; }

/* Search bar (blog index) */
.blog-search-wrap {
  max-width: 560px;
  margin: 32px auto 0;
  position: relative;
}
.blog-search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  pointer-events: none;
}
.blog-search {
  width: 100%;
  padding: 14px 20px 14px 52px;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  border: 1px solid var(--gray-200);
  border-radius: 100px;
  background: var(--white);
  color: var(--black);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.blog-search::placeholder { color: var(--gray-400); }
.blog-search:focus {
  border-color: var(--black);
  box-shadow: 0 0 0 3px rgba(0,0,0,.06);
}

/* Category filters */
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto 32px;
  padding: 0 48px;
}
.blog-filter {
  padding: 8px 18px;
  border-radius: 100px;
  border: 1px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-500);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
  text-decoration: none;
}
.blog-filter:hover {
  border-color: var(--gray-300);
  color: var(--black);
}
.blog-filter.active {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}
.blog-filter-count {
  font-size: 11px;
  font-weight: 700;
  opacity: .5;
  margin-left: 4px;
}

/* Results info */
.blog-results-info {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-400);
  margin-bottom: 24px;
  display: none;
}

/* No results */
.blog-no-results {
  text-align: center;
  padding: 80px 20px;
  color: var(--gray-400);
  display: none;
}
.blog-no-results h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-500);
  margin-bottom: 8px;
}

/* Featured post (blog index) */
.featured-post {
  background: var(--black);
  border-radius: var(--radius-xl);
  padding: 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  transition: all .3s var(--ease-out);
  text-decoration: none;
  color: inherit;
}
.featured-post:hover { box-shadow: 0 24px 64px rgba(0,0,0,.2); }
.featured-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.featured-category {
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  color: var(--bib-blue);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.featured-date {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-400);
}
.featured-post h2 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.3;
  color: var(--white);
  margin-bottom: 16px;
}
.featured-post p {
  font-size: 16px;
  line-height: 26px;
  color: var(--gray-400);
}
.featured-visual {
  background: linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}
.featured-visual-icon { font-size: 72px; }
.featured-read {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
  margin-top: 24px;
  transition: gap .2s;
}
.featured-post:hover .featured-read { gap: 12px; }

/* Blog grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* Blog card */
.blog-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .3s var(--ease-out);
}
@media (hover: hover) {
  .blog-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
  }
}
.blog-card.hidden { display: none; }

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.blog-card-category {
  font-size: 12px;
  font-weight: 700;
  color: var(--bib-blue);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.blog-card-date {
  font-size: 13px;
  color: var(--gray-400);
  font-weight: 500;
}
.blog-card h3 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 24px;
  margin-bottom: 12px;
  color: var(--black);
}
.blog-card p {
  font-size: 14px;
  line-height: 22px;
  color: var(--gray-500);
  flex: 1;
}
.blog-card-read {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--black);
  margin-top: 20px;
  transition: gap .2s;
}
.blog-card:hover .blog-card-read { gap: 10px; }

/* Blog card thumbnails */
.blog-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

/* Count / back / divider helpers (category & tag pages) */
.cat-count,
.tag-count {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-400);
  margin-bottom: 24px;
}
.tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-500);
  letter-spacing: 0.5px;
}
.tag-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-400);
  margin-bottom: 32px;
  transition: color .2s;
  text-decoration: none;
}
.tag-back:hover { color: var(--black); }
.tag-related-divider {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 48px 0 16px;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 24px;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE: 1024px
═══════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .featured-post { grid-template-columns: 1fr; padding: 48px; }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ═══════════════════════════════════════════════
   RESPONSIVE: 768px
═══════════════════════════════════════════════ */
@media (max-width: 768px) {
  .blog-hero,
  .cat-hero,
  .tag-hero { padding: 120px 20px 32px; }
  .blog-hero { padding-bottom: 60px; }
  .featured-post { padding: 36px; }
  .featured-post h2 { font-size: 22px; }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-filters { padding: 0 20px; }
  .blog-search-wrap { margin-left: 20px; margin-right: 20px; }
}

/* ═══════════════════════════════════════════════
   RESPONSIVE: 480px (small phones)
═══════════════════════════════════════════════ */
@media (max-width: 480px) {
  .blog-hero,
  .cat-hero,
  .tag-hero { padding: 100px 16px 28px; }
  .blog-filters { padding: 0 16px; gap: 6px; }
  .blog-search-wrap { margin-left: 16px; margin-right: 16px; }
  .featured-post { padding: 24px; }
  .featured-post h2 { font-size: 20px; }
  .blog-card { padding: 28px 20px; }
}

/* ═══════════════════════════════════════════════
   RESPONSIVE: 360px (very small phones)
═══════════════════════════════════════════════ */
@media (max-width: 360px) {
  .blog-hero,
  .cat-hero,
  .tag-hero { padding: 100px 14px 24px; }
  .blog-filters { padding: 0 14px; }
  .blog-search-wrap { margin-left: 14px; margin-right: 14px; }
  .featured-post { padding: 20px; }
}

/* ═══════════════════════════════════════════════
   DARK THEME — Blog Hub
��══════════════════════════════════════════════ */
[data-theme="dark"] .blog-search {
  background: #18181b;
  border-color: rgba(255,255,255,.1);
  color: #f4f4f5;
}
[data-theme="dark"] .blog-search::placeholder { color: #52525b; }
[data-theme="dark"] .blog-search:focus {
  border-color: #f4f4f5;
  box-shadow: 0 0 0 3px rgba(255,255,255,.06);
}
[data-theme="dark"] .blog-search-icon { color: #52525b; }
[data-theme="dark"] .blog-filter {
  background: #18181b;
  border-color: rgba(255,255,255,.1);
  color: #a1a1aa;
}
[data-theme="dark"] .blog-filter:hover {
  border-color: #52525b;
  color: #f4f4f5;
}
[data-theme="dark"] .blog-filter.active {
  background: #f4f4f5;
  color: #09090b;
  border-color: #f4f4f5;
}
[data-theme="dark"] .blog-card {
  background: #18181b;
  border-color: rgba(255,255,255,.08);
}
[data-theme="dark"] .blog-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,.4); }
[data-theme="dark"] .blog-card h3 { color: #f4f4f5; }
[data-theme="dark"] .blog-card p { color: #71717a; }
[data-theme="dark"] .blog-card-date { color: #52525b; }
[data-theme="dark"] .blog-card-read { color: #a1a1aa; }
[data-theme="dark"] .cat-count,
[data-theme="dark"] .tag-count { color: #52525b; }
[data-theme="dark"] .tag-related-divider { color: #52525b; border-bottom-color: rgba(255,255,255,.08); }
[data-theme="dark"] .tag-back { color: #71717a; }
[data-theme="dark"] .tag-back:hover { color: #f4f4f5; }
