/* ==========================================================================
   WEST SENECA TREE SERVICE — Blog & Article Pages
   Loaded only on the posts page, search results, category/tag archives and
   single posts (see tbts_blog_assets()).

   Covers three things:
     1. Card click targets  — the whole card is a real link again.
     2. The live-search toolbar, its loading states and the results grid.
     3. The reading-first single-post layout (no right rail) and the
        discovery block that replaces it below the article.
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Tokens local to these pages
   -------------------------------------------------------------------------- */

.sots-blog-main,
.sots-single-main {
  --blog-surface: #ffffff;
  --blog-surface-alt: #fbfaf8;
  --blog-line: rgba(28, 28, 28, 0.09);
  --blog-line-strong: rgba(28, 28, 28, 0.16);
  --blog-ink: #1c1c1c;
  --blog-ink-soft: #5c6063;
  --blog-accent: var(--tbts-primary, #dd9300);
  --blog-accent-soft: rgba(221, 147, 0, 0.1);
  --blog-radius: 18px;
  --blog-radius-lg: 24px;
  --blog-ring: 0 0 0 4px rgba(221, 147, 0, 0.18);

  /* Wider than the site's 1280px --container-max, with tighter side padding:
     the blog grid runs 3 across and the article needs a longer measure. */
  --blog-container: 1560px;
  --blog-container-px: 20px;
  --blog-measure: 88ch;
  --blog-sidebar-w: 320px;
  --blog-gutter: 44px;
}

/* Utility, in case the parent theme's version is not present. */
.sots-blog-main .screen-reader-text,
.sots-single-main .screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* The card click-target fix (.stretched-link overlay) lives in main.css — the
   homepage blog preview renders the same card and needs it too. */

/* --------------------------------------------------------------------------
   1. SEARCH / FILTER TOOLBAR
   -------------------------------------------------------------------------- */

.blog-toolbar {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 26px;
  margin-bottom: 28px;
  background: var(--blog-surface);
  border: 1px solid var(--blog-line);
  border-radius: var(--blog-radius-lg);
  box-shadow: 0 1px 2px rgba(28, 28, 28, 0.04), 0 12px 32px -18px rgba(28, 28, 28, 0.18);
}

.blog-search {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.blog-search-field {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  background: var(--blog-surface-alt);
  border: 1.5px solid var(--blog-line);
  border-radius: var(--blog-radius);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.blog-search-field:focus-within {
  background: var(--blog-surface);
  border-color: var(--blog-accent);
  box-shadow: var(--blog-ring);
}

.blog-search-icon {
  display: flex;
  align-items: center;
  padding-left: 18px;
  color: var(--blog-ink-soft);
  flex: 0 0 auto;
}

.blog-search-field:focus-within .blog-search-icon {
  color: var(--blog-accent);
}

.blog-search-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 16px 14px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--blog-ink);
  background: none;
  border: 0;
  outline: none;
  appearance: none;
}

.blog-search-input::placeholder {
  color: var(--blog-ink-soft);
  opacity: 0.75;
}

/* Kill the UA clear button — we ship our own, styled one. */
.blog-search-input::-webkit-search-cancel-button,
.blog-search-input::-webkit-search-decoration {
  appearance: none;
  display: none;
}

.blog-search-clear {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-right: 10px;
  color: var(--blog-ink-soft);
  background: rgba(28, 28, 28, 0.06);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  flex: 0 0 auto;
  transition: background 0.18s ease, color 0.18s ease;
}

.blog-search-clear:hover {
  background: rgba(28, 28, 28, 0.13);
  color: var(--blog-ink);
}

.blog-search-clear[hidden] {
  display: none;
}

/* Spinner rides inside the field while a request is in flight. */
.blog-search-spinner {
  width: 16px;
  height: 16px;
  margin-right: 16px;
  border: 2px solid var(--blog-accent-soft);
  border-top-color: var(--blog-accent);
  border-radius: 50%;
  opacity: 0;
  flex: 0 0 auto;
  transition: opacity 0.2s ease;
}

.blog-toolbar.is-loading .blog-search-spinner {
  opacity: 1;
  animation: blog-spin 0.7s linear infinite;
}

@keyframes blog-spin {
  to {
    transform: rotate(360deg);
  }
}

.blog-search-submit {
  flex: 0 0 auto;
  padding: 0 28px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--blog-ink);
  border: 0;
  border-radius: var(--blog-radius);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.blog-search-submit:hover {
  background: var(--blog-accent);
  transform: translateY(-1px);
}

.blog-search-submit:focus-visible {
  outline: none;
  box-shadow: var(--blog-ring);
}

/* ── Topic chips ────────────────────────────────────────────────────────── */

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.blog-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
  color: var(--blog-ink-soft);
  text-decoration: none;
  background: var(--blog-surface-alt);
  border: 1px solid var(--blog-line);
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease,
    transform 0.18s ease;
}

.blog-chip:hover {
  color: var(--blog-ink);
  border-color: var(--blog-line-strong);
  transform: translateY(-1px);
}

.blog-chip:focus-visible {
  outline: none;
  box-shadow: var(--blog-ring);
}

.blog-chip.is-active {
  color: #fff;
  background: var(--blog-ink);
  border-color: var(--blog-ink);
}

.blog-chip-count {
  padding: 2px 6px;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--blog-ink-soft);
  background: rgba(28, 28, 28, 0.07);
  border-radius: 999px;
}

.blog-chip.is-active .blog-chip-count {
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
}

/* ── Result summary ─────────────────────────────────────────────────────── */

.blog-results-summary {
  margin: 0 0 22px;
  font-size: 0.9375rem;
  color: var(--blog-ink-soft);
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.25s ease, max-height 0.25s ease, margin 0.25s ease;
}

.blog-results-summary.is-visible {
  opacity: 1;
  max-height: 4em;
}

/* --------------------------------------------------------------------------
   2. RESULTS GRID + LOADING
   -------------------------------------------------------------------------- */

.blog-results {
  position: relative;
  min-height: 200px;
}

.blog-results.is-loading {
  /* Skeletons carry the feedback; just take the edge off the swap. */
  opacity: 0.98;
}

/* AJAX-inserted cards start hidden (.reveal-item) — blog.js stages them in. */
.blog-results .post-card.reveal-item {
  transition-property: opacity, transform;
}

.post-card-skeleton {
  overflow: hidden;
  background: var(--blog-surface);
  border: 1px solid var(--blog-line);
  border-radius: var(--radius-lg, 20px);
}

.skeleton-thumb {
  aspect-ratio: 16 / 9;
}

.skeleton-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
}

.skeleton-line {
  display: block;
  height: 12px;
  border-radius: 6px;
}

.skeleton-line--sm {
  width: 40%;
  height: 9px;
}

.skeleton-line--md {
  width: 55%;
}

.skeleton-line--lg {
  width: 85%;
  height: 20px;
}

.skeleton-thumb,
.skeleton-line {
  background: linear-gradient(
    90deg,
    rgba(28, 28, 28, 0.05) 25%,
    rgba(28, 28, 28, 0.09) 37%,
    rgba(28, 28, 28, 0.05) 63%
  );
  background-size: 400% 100%;
  animation: blog-shimmer 1.3s ease-in-out infinite;
}

@keyframes blog-shimmer {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}

/* ── Empty state ────────────────────────────────────────────────────────── */

.no-posts-message {
  padding: 72px 32px;
  text-align: center;
  background: var(--blog-surface-alt);
  border: 1px dashed var(--blog-line-strong);
  border-radius: var(--blog-radius-lg);
}

.no-posts-icon {
  font-size: 2.5rem;
  margin-bottom: 14px;
  opacity: 0.8;
}

.no-posts-message h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.no-posts-message p {
  max-width: 46ch;
  margin: 0 auto 24px;
  color: var(--blog-ink-soft);
}

/* ── AJAX pagination ───────────────────────────────────────────────────── */

.tbts-pagination--ajax .page-numbers,
.blog-pagination-wrapper .page-numbers {
  font-family: var(--font-body);
}

.tbts-pagination--ajax ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 0;
  margin: 0;
  list-style: none;
}

.tbts-pagination--ajax button.page-numbers {
  min-width: 44px;
  padding: 11px 15px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--blog-ink-soft);
  background: var(--blog-surface);
  border: 1px solid var(--blog-line);
  border-radius: 12px;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.tbts-pagination--ajax button.page-numbers:hover {
  color: #fff;
  background: var(--blog-ink);
  border-color: var(--blog-ink);
}

.tbts-pagination--ajax span.page-numbers.current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 11px 15px;
  font-weight: 700;
  color: #fff;
  background: var(--blog-accent);
  border: 1px solid var(--blog-accent);
  border-radius: 12px;
}

.tbts-pagination--ajax span.page-numbers.dots {
  padding: 11px 4px;
  color: var(--blog-ink-soft);
}

.blog-pagination-wrapper:empty {
  display: none;
}

/* --------------------------------------------------------------------------
   3. SIDEBAR CTA (blog listing)
   -------------------------------------------------------------------------- */

.sidebar-cta-premium {
  padding: 32px;
  color: #fff;
  background: linear-gradient(155deg, #232323 0%, #141414 100%);
  border-radius: var(--blog-radius-lg);
  text-align: center;
}

.sidebar-cta-eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blog-accent);
}

.sidebar-cta-title {
  font-family: var(--font-heading);
  font-size: 1.375rem;
  line-height: 1.25;
  color: #fff;
  margin-bottom: 10px;
}

.sidebar-cta-text {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 22px;
}

.sidebar-cta-phone {
  display: block;
  margin-top: 14px;
  font-size: 1.0625rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}

.sidebar-cta-phone:hover {
  color: var(--blog-accent);
}

/* --------------------------------------------------------------------------
   4. SINGLE POST — reading-first layout
   -------------------------------------------------------------------------- */

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 100%;
  height: 3px;
  background: transparent;
  pointer-events: none;
}

.reading-progress-bar {
  display: block;
  width: 0;
  height: 100%;
  background: var(--blog-accent);
  transform-origin: left center;
  transition: width 0.1s linear;
}

/* The right rail is gone: one centred column at a readable measure. */
.post-layout--full {
  display: block;
  max-width: calc(var(--blog-measure) + 6vw);
  margin: 0 auto;
}

.post-layout--full .post-main-content {
  min-width: 0;
}

.post-layout--full .entry-content > * {
  max-width: var(--blog-measure);
  margin-left: auto;
  margin-right: auto;
}

/* Media is allowed to break the measure — it reads better wide. */
.post-layout--full .entry-content > figure,
.post-layout--full .entry-content > .wp-block-image,
.post-layout--full .entry-content > .wp-block-gallery,
.post-layout--full .entry-content > .wp-block-embed,
.post-layout--full .entry-content > table {
  max-width: 100%;
}

.post-layout--full .entry-content img {
  height: auto;
  border-radius: var(--blog-radius);
}

.post-hero--modern .post-hero-content {
  max-width: 60ch;
}

.post-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 8px 16px 8px 13px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.post-back-link:hover {
  background: var(--blog-accent);
  border-color: var(--blog-accent);
  transform: translateX(-3px);
}

/* ── Inline CTA (replaces the sidebar quote box) ───────────────────────── */

.post-inline-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin: 56px 0;
  padding: 36px;
  color: #fff;
  background: linear-gradient(140deg, #242424 0%, #131313 100%);
  border-radius: var(--blog-radius-lg);
}

.post-inline-cta-text {
  flex: 1 1 320px;
}

.post-inline-cta-eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blog-accent);
}

.post-inline-cta h3 {
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 2.4vw, 1.625rem);
  line-height: 1.25;
  color: #fff;
  margin-bottom: 8px;
}

.post-inline-cta p {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
}

.post-inline-cta-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  flex: 0 0 auto;
}

.post-inline-cta-phone {
  font-size: 0.9375rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  text-decoration: none;
}

.post-inline-cta-phone:hover {
  color: var(--blog-accent);
}

/* ── Prev / next ───────────────────────────────────────────────────────── */

.post-nav--modern {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 48px 0;
  padding: 0;
  border: 0;
}

.post-nav--modern > div {
  min-width: 0;
}

.post-nav--modern a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 22px 24px;
  text-decoration: none;
  background: var(--blog-surface-alt);
  border: 1px solid var(--blog-line);
  border-radius: var(--blog-radius);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.post-nav--modern a:hover {
  border-color: var(--blog-accent);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -20px rgba(28, 28, 28, 0.4);
}

.post-nav--modern .nav-next a {
  text-align: right;
  align-items: flex-end;
}

.post-nav--modern .nav-dir {
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blog-accent);
}

.post-nav--modern .nav-label {
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--blog-ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-nav--modern > div:empty {
  background: none;
  border: 0;
}

/* --------------------------------------------------------------------------
   5. DISCOVERY BLOCK (bottom of single posts)
   Search + topics + recommendations, i.e. everything that used to be a
   right-hand rail, moved to where it belongs after the article.
   -------------------------------------------------------------------------- */

.post-discover {
  padding: 90px 0 100px;
  background: var(--blog-surface-alt);
  border-top: 1px solid var(--blog-line);
}

.post-discover-search {
  max-width: 780px;
  margin: 0 auto 52px;
  padding: 28px;
  background: var(--blog-surface);
  border: 1px solid var(--blog-line);
  border-radius: var(--blog-radius-lg);
  box-shadow: 0 1px 2px rgba(28, 28, 28, 0.04), 0 18px 40px -26px rgba(28, 28, 28, 0.28);
}

.blog-search--compact {
  margin-bottom: 20px;
}

.post-discover-topics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--blog-line);
}

.post-discover-topics-label {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blog-ink-soft);
}

.post-discover .posts-grid {
  margin-bottom: 48px;
}

.post-discover-all {
  text-align: center;
}

/* .btn-outline in main.css keys off --tbts-green, which is not defined in the
   current palette — restate it here so this button is actually visible. */
.post-discover-all .btn-outline {
  color: var(--blog-ink);
  border: 2px solid var(--blog-ink);
  background: transparent;
}

.post-discover-all .btn-outline:hover {
  color: #fff;
  background: var(--blog-ink);
  border-color: var(--blog-ink);
}

/* --------------------------------------------------------------------------
   6. RESPONSIVE
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .post-nav--modern {
    grid-template-columns: 1fr;
  }

  .post-nav--modern .nav-next a {
    text-align: left;
    align-items: flex-start;
  }

  .post-discover {
    padding: 64px 0 72px;
  }
}

@media (max-width: 640px) {
  .blog-toolbar {
    padding: 18px;
    border-radius: var(--blog-radius);
  }

  .blog-search {
    flex-direction: column;
  }

  .blog-search-submit {
    padding: 15px 24px;
  }

  .blog-search-input {
    padding: 14px 12px;
    font-size: 0.9375rem;
  }

  /* Chips scroll sideways instead of stacking into a wall on narrow screens. */
  .blog-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    margin: 0 -18px;
    padding-left: 18px;
    padding-right: 18px;
    scrollbar-width: none;
  }

  .blog-filters::-webkit-scrollbar {
    display: none;
  }

  .blog-chip {
    flex: 0 0 auto;
  }

  .post-discover-search {
    padding: 20px;
  }

  .post-inline-cta {
    padding: 26px;
    margin: 40px 0;
  }

  .post-inline-cta-actions {
    width: 100%;
  }

  .no-posts-message {
    padding: 48px 20px;
  }
}

/* --------------------------------------------------------------------------
   7. Motion / contrast preferences
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .skeleton-thumb,
  .skeleton-line,
  .blog-toolbar.is-loading .blog-search-spinner {
    animation: none;
  }

  .blog-results .post-card.reveal-item {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .blog-chip:hover,
  .blog-search-submit:hover,
  .post-nav--modern a:hover,
  .post-back-link:hover {
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   8. LAYOUT WIDTH & GRID DENSITY

   Last in the file on purpose: several of these override base rules in
   main.css that carry the same specificity, so source order decides.
   -------------------------------------------------------------------------- */

/* ── Wider shell, tighter side padding ─────────────────────────────────── */

.sots-blog-main .container,
.sots-single-main .container {
  max-width: var(--blog-container);
  padding-inline: var(--blog-container-px);
}

/* ── Blog listing: 3 across ────────────────────────────────────────────── */

.blog-layout {
  /* minmax(0, 1fr) not 1fr — a bare 1fr floors at min-content, and one long
     unbroken title in a card would otherwise push the grid past the sidebar. */
  grid-template-columns: minmax(0, 1fr) var(--blog-sidebar-w);
  gap: var(--blog-gutter);
  padding: 72px 0 96px;
}

.posts-grid--blog {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

/* Cards get narrower at 3 across, so tighten their interior to match. */
.posts-grid--blog .post-card-content {
  padding: 26px 24px 24px;
}

.posts-grid--blog .post-card-title-v2 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.posts-grid--blog .post-card-excerpt-v2 {
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.posts-grid--blog .post-card-cat {
  top: 14px;
  left: 14px;
  padding: 5px 11px;
  font-size: 0.6875rem;
}

.posts-grid--blog .post-card-footer-v2 {
  padding-top: 16px;
}

.posts-grid--blog .post-card-link-v2 {
  font-size: 0.8125rem;
}

/* Skeletons must match the real card's column count, or the grid jumps. */
.blog-results.is-loading .posts-grid--blog {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* ── Single post: longer measure, wider media ──────────────────────────── */

.post-layout--full {
  /* The shell is wider than the text measure so images, tables and embeds
     can breathe past the paragraph column. */
  max-width: min(100%, 1140px);
}

.post-content-section {
  padding: 80px 0 96px;
}

.post-layout--full .entry-content {
  font-size: 1.1875rem;
  line-height: 1.75;
}

.post-hero--modern .post-hero-content {
  max-width: 72ch;
}

.post-discover-search {
  max-width: 900px;
}

/* ── Unified pagination ────────────────────────────────────────────────────
   Page 1 renders paginate_links() (anchors); page 2 onward is swapped in by
   AJAX (buttons). main.css styles the anchors as 44px circles, which would
   visibly change shape mid-session — so both are restyled to one look here. */

.blog-pagination-wrapper .tbts-pagination,
.tbts-pagination--ajax {
  margin-top: 56px;
}

.blog-pagination-wrapper .tbts-pagination ul,
.tbts-pagination--ajax ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 0;
  margin: 0;
  list-style: none;
}

.blog-pagination-wrapper .tbts-pagination a.page-numbers,
.blog-pagination-wrapper .tbts-pagination span.page-numbers,
.tbts-pagination--ajax button.page-numbers,
.tbts-pagination--ajax span.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 46px;
  height: auto;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--blog-ink-soft);
  text-decoration: none;
  background: var(--blog-surface);
  border: 1px solid var(--blog-line);
  border-radius: 12px;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.blog-pagination-wrapper .tbts-pagination a.page-numbers:hover,
.tbts-pagination--ajax button.page-numbers:hover {
  color: #fff;
  background: var(--blog-ink);
  border-color: var(--blog-ink);
}

.blog-pagination-wrapper .tbts-pagination span.page-numbers.current,
.tbts-pagination--ajax span.page-numbers.current {
  font-weight: 700;
  color: #fff;
  background: var(--blog-accent);
  border-color: var(--blog-accent);
}

.blog-pagination-wrapper .tbts-pagination .page-numbers.dots,
.tbts-pagination--ajax span.page-numbers.dots {
  min-width: 0;
  padding: 12px 4px;
  background: none;
  border-color: transparent;
  cursor: default;
}

.blog-pagination-wrapper .tbts-pagination .prev,
.blog-pagination-wrapper .tbts-pagination .next,
.tbts-pagination--ajax .prev,
.tbts-pagination--ajax .next {
  padding: 12px 20px;
}

/* ── Width breakpoints ─────────────────────────────────────────────────── */

@media (max-width: 1440px) {
  .sots-blog-main,
  .sots-single-main {
    --blog-sidebar-w: 300px;
    --blog-gutter: 36px;
  }

  .posts-grid--blog,
  .blog-results.is-loading .posts-grid--blog {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Below ~1024px main.css already collapses the layout to one column with
   !important; only the skeleton grid needs to follow it down. */
@media (max-width: 1024px) {
  .blog-results.is-loading .posts-grid--blog {
    grid-template-columns: 1fr;
  }

  .post-layout--full {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .sots-blog-main,
  .sots-single-main {
    --blog-container-px: 14px;
  }

  .blog-layout {
    padding: 40px 0 64px;
  }

  .post-content-section {
    padding: 48px 0 64px;
  }

  .post-layout--full .entry-content {
    font-size: 1.0625rem;
  }

  .blog-pagination-wrapper .tbts-pagination a.page-numbers,
  .blog-pagination-wrapper .tbts-pagination span.page-numbers,
  .tbts-pagination--ajax button.page-numbers,
  .tbts-pagination--ajax span.page-numbers {
    min-width: 40px;
    padding: 10px 12px;
    font-size: 0.875rem;
  }
}
