/* ══ Blog Listing Page ═══════════════════════════════════════
   Uses bp-* class names (generated by js/blog.js)
   ═══════════════════════════════════════════════════════════ */

/* ── Page header ─────────────────────────────────────────── */
.blog-header {
  background: hsl(220, 60%, 25%);
  padding: 56px 48px 64px;
  position: relative;
  overflow: hidden;
}
.blog-header::before {
  content: '';
  position: absolute;
  top: -20%;
  right: 0;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, hsl(200 85% 60% / 0.18), transparent 60%);
  filter: blur(80px);
  pointer-events: none;
}
.blog-header__inner {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
}
.blog-header__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: hsl(215, 30%, 65%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-bottom: 24px;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  transition: color 0.2s;
  text-decoration: none;
}
.blog-header__back:hover { color: hsl(200, 85%, 60%); }
.blog-header__title {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.25rem);
  color: #fff;
  letter-spacing: -0.03em;
  margin: 0 0 10px;
}
.blog-header__sub {
  color: hsl(215, 25%, 68%);
  font-size: 1.0625rem;
  margin: 0;
}

/* ── Controls ─────────────────────────────────────────────── */
.blog-controls-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 48px 0;
}
.blog-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
#bp-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.bp-filter-btn {
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 99px;
  border: 1.5px solid hsl(220 60% 25% / 0.2);
  background: transparent;
  color: hsl(220, 60%, 25%);
  cursor: pointer;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.bp-filter-btn.active,
.bp-filter-btn:hover {
  background: hsl(220, 60%, 25%);
  color: hsl(200, 85%, 60%);
  border-color: hsl(220, 60%, 25%);
}

.bp-search-wrap {
  position: relative;
  flex: 1;
  max-width: 320px;
}
.bp-search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: hsl(220, 15%, 50%);
  pointer-events: none;
  display: flex;
  align-items: center;
}
#bp-search {
  width: 100%;
  padding: 9px 16px 9px 38px;
  border-radius: 99px;
  border: 1.5px solid hsl(220 60% 25% / 0.2);
  background: white;
  font-size: 0.875rem;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  color: hsl(220, 60%, 22%);
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
#bp-search:focus { border-color: hsl(220 60% 25% / 0.5); }

/* ── Grid ─────────────────────────────────────────────────── */
.blog-grid-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 48px;
}
#bp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding: 40px 0 60px;
}
.bp-empty {
  text-align: center;
  color: hsl(220, 15%, 50%);
  padding: 64px 0;
  font-size: 1rem;
  grid-column: 1 / -1;
}
.bp-card {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  border: 1.5px solid hsl(220 60% 25% / 0.08);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: default;
}
.bp-linked {
  cursor: pointer;
}
.bp-linked:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px hsl(220 60% 25% / 0.12);
}
.bp-linked:hover .bp-card__title {
  color: hsl(200, 75%, 40%);
}
.bp-linked:hover .bp-card__img {
  transform: scale(1.05);
}
.bp-card__img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: hsl(220 60% 25% / 0.08);
  flex-shrink: 0;
}
.bp-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  display: block;
}
.bp-soon-badge {
  position: absolute;
  inset: 0;
  background: hsl(220 60% 25% / 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: hsl(200, 85%, 70%);
  backdrop-filter: blur(2px);
}
.bp-card__body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.bp-cat-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 11px;
  border-radius: 99px;
  background: hsl(220, 60%, 25%);
  color: hsl(200, 85%, 60%);
  margin-bottom: 12px;
  width: fit-content;
}
.bp-card__title {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.0625rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: hsl(220, 60%, 22%);
  transition: color 0.2s;
  margin: 0 0 10px;
}
.bp-card__excerpt {
  font-size: 0.875rem;
  color: hsl(220, 15%, 45%);
  line-height: 1.6;
  margin: 0 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.bp-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid hsl(220 60% 25% / 0.08);
}
.bp-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: hsl(220, 15%, 52%);
}
.bp-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: hsl(220, 15%, 60%);
  display: inline-block;
}
.bp-read-time {
  display: flex;
  align-items: center;
  gap: 4px;
}
.bp-read-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: hsl(220, 60%, 25%);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  transition: color 0.2s;
}
.bp-soon-label {
  font-size: 0.8125rem;
  color: hsl(220, 15%, 55%);
  font-weight: 600;
}

/* ── Pagination ───────────────────────────────────────────── */
#bp-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-bottom: 64px;
}
.bp-page-btn {
  width: 38px;
  height: 38px;
  border-radius: 99px;
  border: 1.5px solid hsl(220 60% 25% / 0.2);
  background: transparent;
  color: hsl(220, 60%, 25%);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  transition: background 0.18s, color 0.18s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bp-page-btn.active,
.bp-page-btn:hover:not(:disabled) {
  background: hsl(220, 60%, 25%);
  color: hsl(200, 85%, 60%);
  border-color: hsl(220, 60%, 25%);
}
.bp-page-btn:disabled { opacity: 0.35; cursor: default; }
.bp-page-arrow {
  width: 38px;
  height: 38px;
  border-radius: 99px;
  border: 1.5px solid hsl(220 60% 25% / 0.2);
  background: transparent;
  color: hsl(220, 60%, 25%);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, color 0.18s;
}
.bp-page-arrow:hover:not(:disabled) {
  background: hsl(220, 60%, 25%);
  color: hsl(200, 85%, 60%);
}
.bp-page-arrow:disabled { opacity: 0.35; cursor: default; }

/* ── Count display ────────────────────────────────────────── */
#bp-count {
  font-size: 0.875rem;
  color: hsl(220, 15%, 52%);
  font-weight: 500;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  #bp-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 580px) {
  .blog-header { padding: 40px 24px 48px; }
  .blog-controls-wrap { padding: 20px 24px 0; }
  .blog-grid-wrap { padding: 0 24px; }
  #bp-grid { grid-template-columns: 1fr; }
  .blog-controls { flex-direction: column; align-items: stretch; }
  .bp-search-wrap { max-width: 100%; }
  #bp-filters { overflow-x: auto; padding-bottom: 4px; flex-wrap: nowrap; }
}
