/* ════════════════════════════════════════════════════════
   BLOG PAGE — exact match to screenshot
════════════════════════════════════════════════════════ */

/* ── Hero ──────────────────────────────────────────── */
.blog-page-hero {
  padding: 100px 32px 48px;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}
.blog-page-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(59,130,246,.35);
  border-radius: 9999px;
  padding: 5px 18px;
  margin-bottom: 24px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--accent2);
  text-transform: uppercase;
}
.blog-page-heading {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 16px;
}
.blog-page-heading .heading-accent {
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
}
.blog-page-sub {
  font-size: 14.5px;
  line-height: 1.75;
  color:rgba(255,255,255,.55);
}

/* ── Mobile filter toggle button ─────────────────────── */
.blog-filter-toggle {
  display: none;        /* hidden on desktop — filters always visible there */
}
@media (max-width: 768px) {
  .blog-filter-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 16px 14px;
    padding: 10px 16px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 9999px;
    color: var(--text);
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
  }
  .blog-filter-toggle svg { color: #60a5fa; }
  .blog-filter-toggle[aria-expanded="true"] {
    border-color: rgba(59,130,246,.4);
    background: rgba(59,130,246,.08);
  }
  /* Filters collapsed by default on mobile */
  .blog-filters-wrap {
    display: none;
  }
  .blog-filters-wrap.is-open {
    display: block;
  }
}
body.pa-light .blog-filter-toggle {
  background: rgba(0,0,0,.03);
  border-color: rgba(0,0,0,.1);
  color: #111827;
}
body.pa-light .blog-filter-toggle[aria-expanded="true"] {
  border-color: rgba(37,99,235,.4);
  background: rgba(37,99,235,.06);
}

/* ── Search + Filters bar (matches reference: separate rounded pills) ── */
.blog-filters-wrap {
  max-width: 1180px;
  margin: 0 auto 32px;
  padding: 0 48px;
}
.blog-search-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

/* Search input — long pill */
.blog-search-wrap {
  flex: 1;
  min-width: 220px;
  position: relative;
}
.blog-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,.4);
  pointer-events: none;
  width: 15px;
  height: 15px;
}
.blog-search-input {
  width: 100%;
  height: 46px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 9999px;
  padding: 0 18px 0 44px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color .2s;
  box-sizing: border-box;
}
.blog-search-input:focus { border-color: rgba(59,130,246,.4); }
.blog-search-input::placeholder { color: rgba(255,255,255,.35); }

/* Sort pill */
.blog-sort-wrap {
  position: relative;
  display: flex;
  align-items: center;
  height: 46px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 9999px;
  padding: 0 36px 0 16px;
  flex-shrink: 0;
}
.blog-sort-icon {
  width: 15px; height: 15px;
  color: rgba(255,255,255,.5);
  flex-shrink: 0;
  margin-right: 8px;
}
.blog-sort-select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  outline: none;
  cursor: pointer;
  padding: 0;
}
.blog-sort-select option {
  background: #1a1a1a;
  color: #ffffff;
  padding: 8px;
}
body.pa-light .blog-sort-select option {
  background: #ffffff;
  color: #111827;
}
.blog-sort-caret {
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 14px;
  color: rgba(255,255,255,.4);
  pointer-events: none;
}

/* Date pills — standalone, each with calendar icon, native date input
   overlaid invisibly so clicking anywhere on the pill opens the picker */
.blog-date-pill {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 9999px;
  padding: 0 18px;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color .2s;
}
.blog-date-pill:hover { border-color: rgba(255,255,255,.25); }
.blog-date-pill svg {
  width: 15px; height: 15px;
  color: rgba(255,255,255,.5);
  flex-shrink: 0;
}
.blog-date-pill-text {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}
.blog-date-pill-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: none;
  padding: 0;
  margin: 0;
}

/* Reset filters button — appears only when at least one filter is active */
.blog-filter-reset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 46px;
  padding: 0 16px;
  border-radius: 9999px;
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.25);
  color: #f87171;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  flex-shrink: 0;
  transition: background .2s, border-color .2s;
}
.blog-filter-reset:hover {
  background: rgba(239,68,68,.15);
  border-color: rgba(239,68,68,.4);
  text-decoration: none;
  color: #f87171;
}
.blog-filter-reset svg { width: 13px; height: 13px; }
body.pa-light .blog-filter-reset {
  background: rgba(220,38,38,.06);
  border-color: rgba(220,38,38,.2);
  color: #dc2626;
}
body.pa-light .blog-filter-reset:hover {
  background: rgba(220,38,38,.12);
  color: #dc2626;
}

/* Category pills */
.blog-cat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.blog-cat-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border-radius: 9999px;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(255,255,255,.5);
  background: transparent;
  border: 1px solid rgba(255,255,255,.1);
  cursor: pointer;
  transition: all .2s;
}
.blog-cat-btn:hover {
  color: var(--white);
  border-color:rgba(255,255,255,.45);
}
.blog-cat-btn.active {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
  font-weight: 600;
}

/* ── 3-col blog card grid (column count configurable per device via admin) ── */
.blog-page-grid {
  display: grid;
  grid-template-columns: repeat(var(--blog-cols-desktop, 3), 1fr);
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 48px;
}
@media (max-width: 900px) {
  .blog-page-grid { grid-template-columns: repeat(var(--blog-cols-tablet, 2), 1fr); }
}

/* Blog card */
.blog-page-card {
  display: flex;
  flex-direction: column;
  background: rgba(17,21,32,.6);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px;
  overflow: hidden;
  isolation: isolate;
  transition: border-color .2s;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.blog-page-card:hover {
  border-color:rgba(255,255,255,.45);
  text-decoration: none;
}

/* Card image */
.blog-page-img-wrap {
  position: relative;
  overflow: hidden;
}
.blog-page-img-wrap img,
.blog-page-img-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform .5s ease;
}
.blog-page-card:hover .blog-page-img-wrap img,
.blog-page-card:hover .blog-page-img-placeholder { transform: scale(1.04); }

/* Tag on image — top left */
.blog-page-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 9999px;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  z-index: 2;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(30,30,30,.75);
  color: rgba(255,255,255,.85);
  border: 1px solid rgba(255,255,255,.12);
}

/* Card body */
.blog-page-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 16px;
}
.blog-page-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .2s;
}
.blog-page-card:hover .blog-page-title { color: var(--accent2); }
.blog-page-excerpt {
  font-size: 12.5px;
  color:rgba(255,255,255,.5);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 14px;
  flex: 1;
}

/* Meta row */
.blog-page-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.blog-page-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 10px;
  color:rgba(255,255,255,.45);
  white-space: nowrap;
}
.blog-page-meta-item svg {
  width: 11px; height: 11px;
  flex-shrink: 0;
  color:rgba(255,255,255,.45);
}

/* Read More link */
.blog-page-read-more {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  color:rgba(255,255,255,.55);
  text-transform: uppercase;
  text-decoration: none;
  align-self: flex-end;
  margin-top: auto;
  transition: color .2s;
}
.blog-page-read-more:hover { color: var(--white); text-decoration: none; }
.blog-page-read-more svg { width: 12px; height: 12px; transition: transform .2s; }
.blog-page-read-more:hover svg { transform: translateX(3px); }

/* ── Pagination ────────────────────────────────────── */
.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 0 60px;
}
.blog-pagination ul.page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.blog-pagination ul.page-numbers li {
  margin: 0;
  padding: 0;
  list-style: none;
}
.blog-pagination a,
.blog-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color:rgba(255,255,255,.5);
  border: 1px solid rgba(255,255,255,.08);
  text-decoration: none;
  transition: all .2s;
}
.blog-pagination a:hover {
  color: var(--white);
  border-color:rgba(255,255,255,.45);
  text-decoration: none;
}
.blog-pagination .current,
.blog-pagination .page-numbers.current {
  background: var(--accent);
  color: var(--white) !important;
  border-color: var(--accent);
}
.blog-pagination .prev,
.blog-pagination .next {
  font-size: 16px;
  color:rgba(255,255,255,.45);
}

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 768px) {
  .blog-search-row { flex-wrap: wrap; }
  .blog-search-wrap { flex: 1 1 100%; min-width: 0; }
  .blog-sort-wrap { flex: 1 1 calc(50% - 6px); justify-content: center; }
  .blog-date-pill { flex: 1 1 calc(50% - 6px); justify-content: center; }
  .blog-filter-reset { flex: 1 1 100%; justify-content: center; }
}
@media (max-width: 600px) {
  .blog-page-hero { padding: 90px 20px 28px; }
  .blog-page-sub { margin-bottom: 0; }
  .blog-filters-wrap { padding: 0 16px; }
  .blog-page-grid { grid-template-columns: repeat(var(--blog-cols-mobile, 2), 1fr); gap: 10px; padding: 0 16px; }
  .blog-page-grid .blog-card-img-wrap { border-radius: 10px; }
  .blog-page-grid .blog-title { font-size: .78rem; padding: 8px; -webkit-line-clamp: 2; line-height: 1.3; }
  .blog-page-grid .blog-tag { font-size: 6.5px; padding: 3px 8px; top: 8px; left: 8px; letter-spacing: .14em; }
}
/* If mobile is set to 1 column, drop to full-width single column even on
   slightly larger phones — the per-device setting always wins. */
@media (max-width: 380px) {
  .blog-page-grid { grid-template-columns: repeat(var(--blog-cols-mobile, 1), 1fr); }
}

/* ── BLOG PAGE — Light theme ──────────────────────── */
body.pa-light .blog-page-hero { background: transparent; }
body.pa-light .blog-page-badge { border-color: rgba(37,99,235,.3); color: #2563eb; }
body.pa-light .blog-page-heading { color: #111827; }
body.pa-light .blog-page-heading .heading-accent { color: #2563eb; -webkit-text-fill-color: #2563eb; }
body.pa-light .blog-page-sub { color: rgba(0,0,0,.45); }
body.pa-light .blog-search-input {
  background: #ffffff;
  border-color: rgba(0,0,0,.12);
  color: #111827;
}
body.pa-light .blog-search-input::placeholder { color: rgba(0,0,0,.4); }
body.pa-light .blog-search-input:focus { border-color: rgba(37,99,235,.4); }
body.pa-light .blog-search-icon { color: rgba(0,0,0,.45); }
body.pa-light .blog-sort-wrap {
  background: #ffffff;
  border-color: rgba(0,0,0,.12);
}
body.pa-light .blog-sort-icon,
body.pa-light .blog-sort-caret { color: rgba(0,0,0,.45); }
body.pa-light .blog-date-pill {
  background: #ffffff;
  border-color: rgba(0,0,0,.12);
}
body.pa-light .blog-date-pill:hover { border-color: rgba(0,0,0,.25); }
body.pa-light .blog-date-pill svg { color: rgba(0,0,0,.45); }
body.pa-light .blog-cat-btn {
  color: rgba(0,0,0,.5);
  border-color:rgba(0,0,0,.5);
  background: #ffffff;
}
body.pa-light .blog-cat-btn:hover { color: #111827; border-color:rgba(0,0,0,.5); }
body.pa-light .blog-cat-btn.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}
body.pa-light .blog-page-card {
  background: #ffffff;
  border-color:rgba(0,0,0,.5);
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
body.pa-light .blog-page-card:hover { border-color:rgba(0,0,0,.5); }
body.pa-light .blog-page-title { color: #111827; }
body.pa-light .blog-page-card:hover .blog-page-title { color: #2563eb; }
body.pa-light .blog-page-excerpt { color: rgba(0,0,0,.45); }
body.pa-light .blog-page-meta { border-top-color:rgba(0,0,0,.5); }
body.pa-light .blog-page-meta-item { color:rgba(0,0,0,.6); }
body.pa-light .blog-page-meta-item svg { color:rgba(0,0,0,.5); }
body.pa-light .blog-page-read-more { color:rgba(0,0,0,.6); }
body.pa-light .blog-page-read-more:hover { color: #111827; }
body.pa-light .blog-pagination a,
body.pa-light .blog-pagination span {
  color:rgba(0,0,0,.6);
  border-color:rgba(0,0,0,.5);
  background: #ffffff;
}
body.pa-light .blog-pagination a:hover { color: #111827; border-color:rgba(0,0,0,.5); }
body.pa-light .blog-pagination .current { background: #2563eb; color: #fff; border-color: #2563eb; }
