/* ==========================================================================
   Blog list page — hero, search + category chips, featured and recent cards,
   pagination, empty state, mobile join band.
   Shared blog styles (shell, rails, category colours): blog.css
   Markup: blog/index.php   Behaviour: assets/js/pages/blog-list.js
   ========================================================================== */

.pb-page-blog {
  --pb-bhero-1: #2b1d08;
  --pb-bhero-2: #3d2c0e;
  --pb-bhero-3: #4f3a12;
  --pb-bhero-glow: #6b5218;
  --pb-bhero-cta-hover: #ffc24d;
}

/* ── Hero ───────────────────────────────────────────────────────────────── */
.pb-bhero {
  position: relative; overflow: hidden; min-height: 227px; border-radius: var(--pb-r-xl);
  background:
    radial-gradient(circle at 70% 30%, var(--pb-bhero-glow) 0, transparent 55%),
    linear-gradient(120deg, var(--pb-bhero-1) 0%, var(--pb-bhero-2) 60%, var(--pb-bhero-3) 100%);
}
.pb-bhero__pic {
  position: absolute; right: 0; top: 0; display: block; width: 58%; height: 100%;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 32%); mask-image: linear-gradient(to right, transparent 0, #000 32%);
}
.pb-bhero__pic img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.pb-bhero__shade {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(43, 29, 8, .92) 0%, rgba(43, 29, 8, .75) 38%, rgba(43, 29, 8, .1) 62%, rgba(43, 29, 8, 0) 75%);
}
.pb-bhero__slides { position: relative; display: grid; max-width: min(520px, 75%); padding: 30px 36px 28px; }
.pb-bhero__slide {
  grid-area: 1 / 1; opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity .55s ease, transform .55s ease;
}
.pb-bhero__slide.is-active { opacity: 1; transform: none; pointer-events: auto; }
.pb-bhero__eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--pb-font-head); font-weight: 800; font-size: 13px; letter-spacing: .1em; color: #fff;
}
.pb-bhero__title {
  margin: 10px 0 0; font-family: var(--pb-font-head); font-weight: 900; font-size: 27px; line-height: 1.12;
  letter-spacing: -.01em; color: #fff; text-wrap: balance;
}
.pb-bhero__title span { color: var(--pb-amber); }
.pb-bhero__sub { max-width: 440px; margin: 12px 0 0; font-size: 16px; line-height: 1.45; color: #fff; text-wrap: pretty; }
.pb-bhero__cta {
  display: inline-flex; align-items: center; gap: 10px; height: 46px; margin-top: 20px; padding: 0 22px; border-radius: 23px;
  background: var(--pb-amber); color: var(--pb-text); box-shadow: 0 6px 18px rgba(251, 178, 49, .3);
  font-family: var(--pb-font-head); font-weight: 800; font-size: 16px;
}
.pb-bhero__cta:hover { background: var(--pb-bhero-cta-hover); color: var(--pb-text); }
.pb-bhero__cta i { font-size: 13px; }
.pb-bhero__dots { display: none; }

@container pb-blog (min-width: 760px) { .pb-bhero__title { font-size: 31px; } }
@container pb-blog (min-width: 820px) {
  .pb-bhero__pic { width: 489px; }
  .pb-bhero__slides { max-width: min(520px, 60%); }
}

@media (max-width: 899px) {
  .pb-bhero { min-height: 470px; border-radius: 20px; }
  .pb-bhero__pic {
    width: 100%; height: 300px; -webkit-mask-image: none; mask-image: none;
  }
  .pb-bhero__pic img { object-position: 45% 30%; }
  .pb-bhero__shade { background: linear-gradient(180deg, rgba(43, 29, 8, 0) 28%, rgba(43, 29, 8, .88) 52%, var(--pb-bhero-1) 64%); }
  .pb-bhero__slides { max-width: 100%; padding: 200px 18px 46px; }
  .pb-bhero__title { font-size: 27px; }
  .pb-bhero__dots { position: absolute; left: 0; right: 0; bottom: 16px; display: flex; justify-content: center; gap: 6px; }
  .pb-bhero__dots button {
    width: 7px; height: 7px; padding: 0; border: 0; border-radius: 4px; background: rgba(255, 255, 255, .55);
    transition: width .25s, background .25s;
  }
  .pb-bhero__dots button.is-active { width: 22px; background: var(--pb-amber); }
}
@media (min-width: 400px) and (max-width: 899px) {
  .pb-bhero { min-height: 500px; }
  .pb-bhero__slides { padding: 220px 22px 48px; }
  .pb-bhero__title { font-size: 30px; }
}

/* ── Search + category chips ────────────────────────────────────────────── */
.pb-btool { display: flex; flex-direction: column; gap: 14px; padding: 12px 12px 10px; border-radius: var(--pb-r-lg); background: #fff; box-shadow: var(--pb-shadow-card); }
.pb-bsearch { display: flex; gap: 10px; }
.pb-bsearch__field {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 18px;
  border: 1px solid transparent; border-radius: 24px; background: var(--pb-surface-2);
}
.pb-bsearch__field:focus-within { border-color: var(--pb-primary); background: #fff; }
.pb-bsearch__field > i { font-size: 16px; color: var(--pb-text-2); }
.pb-bsearch__field input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 15.5px; color: var(--pb-text);
  -webkit-appearance: none; appearance: none;
}
.pb-bsearch__field input::-webkit-search-cancel-button { display: none; }
.pb-bsearch__clear {
  flex: none; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%;
  background: #ecebe7; color: var(--pb-text); font-size: 12px;
}
.pb-bsearch__clear:hover { color: var(--pb-text); background: #e2e0da; }
.pb-bsearch__btn {
  flex: none; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 20px; border: 0; border-radius: 14px;
  background: #141414; color: #fff; font-family: var(--pb-font-head); font-weight: 800; font-size: 16px;
}
.pb-bsearch__btn:hover { background: #2b2b30; }
.pb-bsearch__btn i { font-size: 14px; }

.pb-bchips { position: relative; }
.pb-bchips__track { display: flex; gap: 14px; overflow-x: auto; scroll-behavior: smooth; padding: 4px 44px 6px; }
.pb-bchip {
  flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; min-width: 76px;
  color: var(--pb-text);
}
.pb-bchip:hover { color: var(--pb-text); }
.pb-bchip__ico {
  display: flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 50%;
  background: #fff; border: 1px solid var(--pb-border); box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
  transition: transform .15s;
}
.pb-bchip:hover .pb-bchip__ico { transform: translateY(-2px); }
.pb-bchip__ico i { font-size: 21px; color: var(--c); }
.pb-bchip__lbl { font-size: 13px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.pb-bchip.is-active .pb-bchip__ico { background: var(--pb-primary); border-color: transparent; box-shadow: 0 6px 14px rgba(144, 109, 2, .3); }
.pb-bchip.is-active .pb-bchip__ico i { color: #fff; }
.pb-bchip.is-active .pb-bchip__lbl { color: var(--pb-link-hover); }
.pb-bchips__nav {
  position: absolute; top: 50%; margin-top: -17px; width: 34px; height: 34px; padding: 0; border: 1px solid #ececec; border-radius: 50%;
  background: #fff; color: var(--pb-text); box-shadow: 0 2px 8px rgba(0, 0, 0, .08); font-size: 12px; transition: opacity .2s;
}
.pb-bchips__nav--prev { left: 0; }
.pb-bchips__nav--next { right: 0; }
.pb-bchips__nav:disabled { opacity: .4; cursor: default; }

@media (max-width: 899px) {
  .pb-btool { padding: 0; background: transparent; box-shadow: none; }
  .pb-bsearch__field { background: #fff; border-color: var(--pb-border-3); }
  .pb-bsearch__btn { display: none; }
  .pb-bchips__track { gap: 8px; }
  .pb-bchip { min-width: 72px; }
  .pb-bchip__ico { width: 56px; height: 56px; }
  .pb-bchip__ico i { font-size: 22px; }
}

/* ── Section headings ───────────────────────────────────────────────────── */
.pb-bsec { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: calc(var(--pb-header-h) + 20px); }
.pb-bsec__hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 4px; }
.pb-bsec__title { display: flex; align-items: center; gap: 12px; min-width: 0; font-weight: 800; font-size: 20px; }
.pb-bsec__star { color: var(--pb-amber); font-size: 20px; }
.pb-bsec__badge {
  flex: none; display: flex; align-items: center; justify-content: center; width: 24px; height: 26px; border-radius: 6px;
  background: var(--pb-blog-gold); color: #fff; font-size: 12px;
}
.pb-bsec__tools { display: flex; align-items: center; gap: 16px; flex: none; }
.pb-bsec__count { font-size: 15px; color: var(--pb-text-3); white-space: nowrap; }
.pb-bsort__sel { position: relative; display: flex; align-items: center; }
.pb-bsort__sel select {
  appearance: none; -webkit-appearance: none; height: 40px; padding: 0 36px 0 16px; border: 1px solid var(--pb-border-3);
  border-radius: 12px; background: #fff; font-size: 15px; font-weight: 700; color: var(--pb-text); cursor: pointer;
}
.pb-bsort__sel i { position: absolute; right: 14px; font-size: 11px; pointer-events: none; }
@media (max-width: 899px) { .pb-bsec__count { display: none; } .pb-bsec__tools { gap: 0; } }

/* ── Cards ──────────────────────────────────────────────────────────────── */
.pb-bcard {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid var(--pb-blog-line); border-radius: 14px; box-shadow: var(--pb-shadow-card);
  transition: transform .2s ease, box-shadow .2s ease;
}
.pb-bcard:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(60, 40, 0, .1); }
.pb-bcard__media { position: relative; overflow: hidden; }
.pb-bcard__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pb-bcard__media .pb-btag { position: absolute; left: 8px; top: 8px; max-width: calc(100% - 16px); box-shadow: 0 2px 6px rgba(0, 0, 0, .15); }
.pb-bcard__body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.pb-bcard__title {
  display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden;
  font-weight: 800; line-height: 1.3; color: var(--pb-text);
}
.pb-bcard__link { color: var(--pb-text); }
.pb-bcard__link:hover { color: var(--pb-text); }
.pb-bcard__link::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.pb-bcard__link:focus-visible { outline: none; }
.pb-bcard__link:focus-visible::after { outline: 2px solid var(--pb-primary); outline-offset: -2px; border-radius: 14px; }
.pb-bcard__excerpt {
  display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.45; color: var(--pb-text-3); overflow-wrap: anywhere;
}
.pb-bcard__meta { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 12px; color: #4a4a50; }
.pb-bcard__by { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-bcard__views { flex: none; display: flex; align-items: center; gap: 6px; white-space: nowrap; margin-left: auto; }
.pb-bav {
  flex: none; display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--pb-text); color: var(--pb-amber); font-family: var(--pb-font-head); font-weight: 800; font-size: 10px;
}
.pb-bav--paw { width: 22px; height: 22px; }
.pb-bav--paw i { font-size: 10px; }

/* featured */
.pb-bfeat { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.pb-bcard--feat .pb-bcard__media { height: 190px; }
.pb-bcard--feat .pb-bcard__body { padding: 14px 14px 12px; }
.pb-bcard--feat .pb-bcard__title { font-size: 16.5px; -webkit-line-clamp: 2; }
.pb-bcard--feat .pb-bcard__excerpt { margin-top: 8px; font-size: 14.5px; -webkit-line-clamp: 3; }
.pb-bcard--feat .pb-bcard__meta { font-size: 13.5px; }
.pb-bcard--feat .pb-bcard__views i { font-size: 13px; }
@container pb-blog (min-width: 700px) {
  .pb-bfeat { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pb-bcard--feat .pb-bcard__media { height: 112px; }
}

/* recent grid (desktop = vertical cards; phones = one white list card) */
.pb-bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.pb-bcard--row .pb-bcard__media { height: 100px; }
.pb-bcard--row .pb-bcard__body { padding: 12px 14px 0; }
.pb-bcard--row .pb-bcard__title { font-size: 15.5px; -webkit-line-clamp: 2; }
.pb-bcard--row .pb-bcard__excerpt { margin-top: 6px; font-size: 13.5px; -webkit-line-clamp: 3; }
.pb-bcard--row .pb-bcard__meta { padding: 12px 14px 12px; font-size: 13px; }
.pb-bcard--row .pb-bcard__views i { font-size: 12px; }
.pb-bcard__more {
  flex: none; margin-left: auto; display: flex; align-items: center; gap: 6px; white-space: nowrap;
  font-family: var(--pb-font-head); font-weight: 800; font-size: 13.5px; color: var(--pb-link);
}
.pb-bcard__more i { font-size: 11px; }
.pb-bcard--row .pb-bcard__views { margin-left: 0; }
.pb-btag--inline { display: none; }

@media (min-width: 900px) {
  @container pb-blog (min-width: 540px) and (max-width: 899px) { .pb-bcard--row .pb-bcard__views { display: none; } }
}

@media (max-width: 899px) {
  .pb-bgrid {
    grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 16px 14px; border-radius: var(--pb-r-lg);
    background: #fff; box-shadow: var(--pb-shadow-card);
  }
  .pb-bcard--row {
    display: grid; grid-template-columns: 104px minmax(0, 1fr); column-gap: 12px; row-gap: 12px; align-items: start;
    padding: 0 0 16px; border: 0; border-bottom: 1px solid var(--pb-blog-line); border-radius: 0; box-shadow: none; overflow: visible;
  }
  .pb-bcard--row:last-child { border-bottom: 0; padding-bottom: 0; }
  .pb-bcard--row:hover { transform: none; box-shadow: none; }
  .pb-bcard--row .pb-bcard__media { height: 128px; border-radius: 12px; }
  .pb-bcard--row .pb-btag--overlay { display: none; }
  .pb-bcard--row .pb-bcard__body { padding: 0; }
  .pb-btag--inline { display: inline-flex; align-self: flex-start; height: 24px; margin-bottom: 8px; padding: 0 10px; font-size: 10.5px; }
  .pb-bcard--row .pb-bcard__title { font-size: 15.5px; -webkit-line-clamp: 3; }
  .pb-bcard--row .pb-bcard__excerpt { font-size: 13.5px; -webkit-line-clamp: 2; }
  .pb-bcard--row .pb-bcard__meta { grid-column: 1 / -1; margin-top: 0; padding: 0; font-size: 13.5px; }
  .pb-bcard--row .pb-bav--paw { width: 24px; height: 24px; }
  .pb-bcard--row .pb-bcard__views { margin-left: auto; }
  .pb-bcard--row .pb-bcard__views i { font-size: 13px; }
  .pb-bcard__more { display: none; }
  .pb-bcard__link::after { border-radius: 0; }
}

/* ── Pagination ─────────────────────────────────────────────────────────── */
.pb-bpager { display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 6px; }
.pb-bpager__row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; }
.pb-bpager__btn, .pb-bpager__num {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; border: 1px solid var(--pb-border-3);
  border-radius: 10px; background: #fff; color: var(--pb-text);
}
.pb-bpager__btn { padding: 0 12px; font-size: 14px; font-weight: 600; color: var(--pb-text-3); }
.pb-bpager__btn--next { padding: 0 14px; font-family: var(--pb-font-head); font-weight: 800; font-size: 15px; color: var(--pb-text); }
.pb-bpager__btn i { font-size: 10px; }
.pb-bpager__num { min-width: 38px; padding: 0 8px; font-family: var(--pb-font-head); font-weight: 800; font-size: 15px; }
a.pb-bpager__btn:hover, a.pb-bpager__num:hover { background: var(--pb-amber-soft); color: var(--pb-text); }
.pb-bpager__num.is-active { background: var(--pb-primary); border-color: var(--pb-primary); color: #fff; }
.pb-bpager__num.is-gap { cursor: default; }
.pb-bpager__btn.is-disabled { opacity: .45; }
.pb-bpager__info { font-size: 13.5px; color: var(--pb-text-muted); }

/* ── Empty state ────────────────────────────────────────────────────────── */
.pb-bempty { padding: 40px 20px; border-radius: var(--pb-r-lg); background: #fff; box-shadow: var(--pb-shadow-card); text-align: center; }
.pb-bempty > i { font-size: 34px; color: #fbe1a6; }
.pb-bempty h3 { margin-top: 10px; font-size: 19px; }
.pb-bempty p { margin-top: 4px; font-size: 15px; color: var(--pb-text-muted); }
.pb-bempty__btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 16px; }

/* ── Join band (phones only) ────────────────────────────────────────────── */
.pb-bband {
  overflow: hidden; border-radius: 20px; padding: 26px 20px 0; text-align: center;
  background: linear-gradient(180deg, #fff3d9 0%, var(--pb-blog-promo-2) 100%);
}
.pb-bband h2 { font-weight: 900; font-size: 22px; line-height: 1.2; text-wrap: balance; }
.pb-bband p { margin-top: 10px; font-size: 15px; line-height: 1.45; color: var(--pb-text-3); text-wrap: pretty; }
.pb-bband__btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.pb-bband__btns .pb-btn { height: 46px; padding: 0 20px; border-radius: 23px; }
.pb-bband img { display: block; width: 100%; max-width: 360px; height: auto; margin: 14px auto 0; }
@media (min-width: 900px) { .pb-bband { display: none; } }
