/* blog.css: blog index, topic hubs, and single posts. Loaded only by the
   blog PHP pages (via $page_extra_head), after css/custom.css. */

/* ---- Search: button matches the 42px input ---------------------------- */
/* !important: the theme's mobile .btn-sm rule is (0,6,0) specific. */
.blog-toolbar .blog-search button.btn.btn-sm{
  height:42px !important;
  line-height:40px !important;
  min-width:46px;
  padding:0 16px !important;
  font-size:15px !important;
  border-radius:8px;
}

/* ---- "Read more" links in brand blue ---------------------------------- */
.blog-card .blog-card-foot a,
.blog-featured .blog-card-foot a{ color:var(--pit-primary); font-weight:600; }
.blog-card .blog-card-foot a:hover,
.blog-featured .blog-card-foot a:hover{ color:var(--pit-anchor); text-decoration:underline; }
.blog-featured .blog-card-foot{ display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 16px; font-size:14px; color:#5F6B7A; }

.blog-sort-note{ margin:-14px 0 22px; }

/* ---- Topic hub grids that fill every row ------------------------------ */
/* Index: 11 hubs. The first card spans two columns so 4, 3, and 2-column
   layouts all come out to complete rows (12 cells). */
.hub-grid.hub-grid-main{ grid-template-columns:repeat(4,minmax(0,1fr)); }
.hub-grid.hub-grid-main .hub-card:first-child{ grid-column:span 2; }
.hub-grid .hub-card h3{ overflow-wrap:break-word; hyphens:auto; }
@media (max-width:991.98px){
  .hub-grid.hub-grid-main{ grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:767.98px){
  .hub-grid.hub-grid-main{ grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
}

/* Topic page "Other topics": 10 hubs as 5 x 2, or 2 x 5 on smaller screens. */
.hub-grid.hub-grid-other{ grid-template-columns:repeat(5,minmax(0,1fr)); gap:14px; }
.hub-grid.hub-grid-other .hub-card{ padding:18px 16px 14px; }
.hub-grid.hub-grid-other .hub-card h3{ font-size:16px; line-height:1.3; margin:0; }
@media (max-width:991.98px){
  .hub-grid.hub-grid-other{ grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
}

@media (max-width:767.98px){
  .hub-grid .hub-card{ padding:16px 14px 14px; }
  .hub-grid .hub-card i{ font-size:19px; margin-bottom:8px; }
  .hub-grid .hub-card h3{ font-size:15px; line-height:1.3; }
  .hub-grid .hub-card .hub-count{ font-size:12px; margin-top:6px; }
}

/* ---- Featured post: smaller excerpt on phones -------------------------- */
@media (max-width:767.98px){
  .blog-featured .blog-featured-body{ padding:24px 20px; }
  .blog-featured .blog-featured-excerpt{ font-size:17px; line-height:1.55; }
}

/* ---- Pagination stays on one line ------------------------------------- */
.pagination-list{ flex-wrap:nowrap; }
/* The Prev/Next word is an inner <span>: undo the button-box styling it would inherit from .pagination-list span. */
.pagination-list span.pg-word{ display:inline; min-width:0; height:auto; padding:0; border:0; border-radius:0; background:none; color:inherit; font:inherit; }
@media (max-width:575.98px){
  /* Phones: Prev 1 … 8 … 16 Next with 44px buttons. The current page's
     neighbours (.pg-near) are dropped (Prev/Next reach them), which is what lets
     the row fit a 320px screen; 9 items at 36px overflowed it on middle pages. */
  .pagination-list{ gap:2px; }
  .pagination-list li.pg-near{ display:none; }
  .pagination-list a,
  .pagination-list span{ min-width:44px; height:44px; padding:0 9px; font-size:14px; border-radius:8px; }
  .pagination-list span.is-gap{ min-width:0; padding:0 1px; border:0; background:transparent; }
  .pagination-list span.pg-word{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
}

/* ---- Single post ------------------------------------------------------- */
.post-breadcrumb{ font-size:14px; color:#5F6B7A; }
.post-breadcrumb a{ color:var(--pit-primary); }
.post-breadcrumb a:hover{ text-decoration:underline; }
.post-breadcrumb span{ margin:0 4px; }

.blog-post article a[href^="mailto:"]{ overflow-wrap:anywhere; }
.blog-post .see-also{ margin-top:28px; padding-top:16px; border-top:1px solid var(--pit-border); }

.post-resource{
  display:flex;
  gap:18px;
  align-items:flex-start;
  margin:40px 0 0;
  padding:22px 24px;
  background:var(--pit-surface);
  border:1px solid var(--pit-border);
  border-left:4px solid var(--pit-primary);
  border-radius:0 12px 12px 0;
}
.post-resource > i{ flex:0 0 auto; font-size:26px; color:var(--pit-primary); margin-top:4px; }
.post-resource-label{ margin:0 0 2px; font-size:12px !important; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:var(--pit-accent); }
.post-resource .post-resource-title{ font-size:20px; line-height:1.3; margin:0 0 6px; }
.post-resource p{ margin:0 0 12px; font-size:15px; color:#44505f; }
.post-resource .post-resource-links{ display:flex; flex-wrap:wrap; align-items:center; gap:10px 18px; margin:0; }
.post-resource .post-resource-links .btn{ margin:0; }
.post-resource .post-resource-links .btn.btn-sm{ height:auto !important; min-height:44px; line-height:18px !important; font-size:13px !important; padding:10px 18px !important; white-space:normal; }  /* grows when the label wraps on phones (was clipped) */
.post-resource .post-resource-links a:not(.btn){ color:var(--pit-primary); font-weight:600; font-size:14px; }
@media (max-width:575.98px){
  .post-resource{ flex-direction:column; gap:8px; padding:18px; }
}
