/* ============================================================
   WOODLEY COLLISION — BLOG ARCHIVE
   Reuses the shared hero search pattern, breadcrumb, header,
   and footer. Adds: category filter pills and the dark blog
   card grid (3-up desktop, 1-up mobile).
   ============================================================ */

/* ---- Hero (centered heading + search) — same pattern as the FAQ hero ---- */
.blog-hero {
  padding-top: 0;
  padding-bottom: 80px;
}
.blog-hero__inner {
  max-width: var(--container-outer);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-12);
}
.blog-hero__title {
  font-size: clamp(2.5rem, 1.6rem + 2.8vw, 3.875rem);   /* 40 -> 62px */
  font-weight: 600;
  line-height: 1.06;
  color: var(--gray-900);
  text-align: center;
  max-width: 960px;
}
.blog-hero__subtitle {
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.5;
  color: #555;
  text-align: center;
  max-width: 600px;
}
.blog-hero__search {
  display: flex;
  gap: var(--sp-12);
  margin-top: var(--sp-4);
}
.blog-hero__field {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  width: 343px;
  height: 54px;
  padding: var(--sp-12) var(--sp-16);
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-md);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.blog-hero__field:focus-within {
  border-color: var(--gray-400);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.04);
}
.blog-hero__field svg { width: 20px; height: 20px; color: #8d8d8d; flex-shrink: 0; }
.blog-hero__input {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: var(--fs-body);
  line-height: var(--lh-snug);
  color: var(--gray-900);
}
.blog-hero__input::placeholder { color: #8d8d8d; }
.blog-hero__input::-webkit-search-cancel-button { -webkit-appearance: none; }
.blog-hero__btn { width: 100px; flex-shrink: 0; justify-content: center; }

/* ---- Archive wrapper ---- */
.blog-archive {
  max-width: var(--container-outer);
  margin-inline: auto;
  padding-inline: var(--gutter);
  padding-bottom: 120px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ---- Category filter pills ---- */
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-12);
}
.blog-filter {
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: var(--sp-12) var(--sp-16);
  border-radius: var(--radius-round);
  border: 1px solid var(--gray-200);
  background: transparent;
  color: var(--gray-900);
  font-family: inherit;
  font-size: var(--fs-body);    /* 16px */
  font-weight: 500;
  line-height: var(--lh-snug);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.blog-filter:not(.is-active):hover { border-color: var(--color-red); color: var(--color-red); }
.blog-filter.is-active {
  background: var(--gray-900);
  border-color: var(--gray-900);
  color: var(--white);
}

/* ---- Card grid ---- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-24);
}

/* ---- Dark blog card ---- */
.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--gray-900);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 4px 2px rgba(0, 0, 0, 0.01);
  transition: box-shadow var(--dur) var(--ease);
}
.blog-card:hover {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.14);
}
.blog-card__media {
  position: relative;
  height: 200px;
  overflow: hidden;
}
.blog-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.blog-card:hover .blog-card__media img { transform: scale(1.05); }
.blog-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 60%, var(--gray-900));
  pointer-events: none;
}
.blog-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-20);
  padding: var(--sp-16) var(--sp-20);
}
.blog-card__top {
  display: flex;
  flex-direction: column;
  gap: var(--sp-12);
}
.blog-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;          /* 12px */
  font-weight: 400;
  line-height: 1.333;
  color: var(--gray-300);
}
.blog-card__heading { display: flex; flex-direction: column; gap: var(--sp-8); }
.blog-card__title {
  font-size: var(--fs-h3);     /* 24px */
  font-weight: 600;
  line-height: 1.17;
  color: var(--white);
}
.blog-card__rule {
  width: 48px;
  height: 3px;
  border-radius: 2px;
  background: var(--color-red);
}
.blog-card__excerpt {
  font-size: var(--fs-body-s);  /* 14px */
  font-weight: 400;
  line-height: 1.571;
  color: var(--gray-200);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card__foot {
  display: flex;
  flex-direction: column;
  gap: var(--sp-16);
}
.blog-card__divider {
  height: 1px;
  border: none;
  background: rgba(255, 255, 255, 0.14);
  margin: 0;
}
.blog-card__action {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.blog-card__link {
  font-size: var(--fs-body);    /* 16px */
  font-weight: 500;
  line-height: var(--lh-snug);
  color: var(--white);
  transition: color var(--dur) var(--ease);
}
.blog-card:hover .blog-card__link { color: var(--gray-200); }
.blog-card__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-round);
  border: 1px solid var(--gray-300);
  color: var(--white);
  flex-shrink: 0;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.blog-card__arrow svg { width: 20px; height: 20px; }
.blog-card:hover .blog-card__arrow {
  background: var(--white);
  border-color: var(--white);
  color: var(--gray-900);
}

/* Empty state (search/filter with no matches) */
.blog-empty {
  grid-column: 1 / -1;
  padding: var(--sp-24);
  text-align: center;
  font-size: var(--fs-body);
  color: #555;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .blog-hero { padding-bottom: 60px; }
  .blog-hero__title { font-size: clamp(2.125rem, 1.75rem + 1.6vw, 2.25rem); line-height: 1.1; }
  .blog-hero__search { flex-direction: column; width: 100%; }
  .blog-hero__field { width: 100%; height: 48px; }
  .blog-hero__btn { width: 100%; }

  .blog-archive { padding-bottom: 60px; gap: var(--sp-24); }

  /* pills scroll horizontally instead of wrapping */
  .blog-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
  }
  .blog-filters::-webkit-scrollbar { display: none; }
  .blog-filter { flex-shrink: 0; }

  .blog-grid { grid-template-columns: 1fr; gap: var(--sp-16); }
  .blog-card__media { height: 180px; }
  .blog-card__title { font-size: 1.25rem; line-height: 1.2; }   /* 20px */
}

/* ============================================================
   Pagination — centered pill layout matching site buttons
   ============================================================ */
.blog-archive .pagination {
  margin-top: 56px;
}
.blog-archive .pagination .nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}
.blog-archive .page-numbers {
  min-width: 46px;
  height: 46px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--gray-100);
  border-radius: 999px;
  background: var(--surface);
  color: var(--gray-900);
  font-family: var(--font-sans);
  font-size: var(--fs-body-s);
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.blog-archive a.page-numbers:hover,
.blog-archive a.page-numbers:focus-visible {
  background: var(--gray-900);
  border-color: var(--gray-900);
  color: var(--white);
}
.blog-archive .page-numbers.current {
  background: var(--color-red);
  border-color: var(--color-red);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(225, 26, 23, 0.30);
}
.blog-archive .page-numbers.dots {
  min-width: auto;
  padding: 0 4px;
  border: none;
  background: transparent;
  color: var(--gray-300);
}
.blog-archive .page-numbers.prev,
.blog-archive .page-numbers.next {
  padding: 0 20px;
}
.blog-archive .page-numbers svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}
@media (max-width: 600px) {
  .blog-archive .page-numbers.prev span,
  .blog-archive .page-numbers.next span {
    display: none;
  }
  .blog-archive .page-numbers.prev,
  .blog-archive .page-numbers.next {
    padding: 0 15px;
  }
}
