/* =========================================================
   TIOSH – blog (listing, archives, search, single post)
   Markup: tiosh-blog.php, tiosh-single.php, inc/blog.php.
   Hero/search/category-pill styles come from tiosh-course.css
   and tiosh-courses.css patterns (re-declared here where needed).
   ========================================================= */

.tb-page > .t-wrap, .tb-hero > .t-wrap, .tb-related > .t-wrap { padding-left: 0; padding-right: 0; max-width: none; }

/* Hero (same look as the course directory) */
.tb-hero { padding: 44px 0 52px; }
.tb-hero .t-wrap { display: flex; flex-direction: column; gap: 16px; }
.tb-hero .t-eyebrow { color: #B9C8F5; margin: 4px 0 -4px; }
.tb-hero .tc-lead { max-width: 660px; }
.td-search { display: flex; align-items: center; gap: 8px; max-width: 560px; margin-top: 8px; background: #fff; border-radius: 12px; padding: 6px 6px 6px 16px; color: var(--t-body); box-shadow: 0 18px 40px -20px rgba(0,0,0,.5); }
.td-search input[type="search"] { flex: 1; min-width: 0; height: 48px; border: 0 !important; padding: 0 6px; margin: 0; font: inherit; font-size: 16px; color: var(--t-ink); background: transparent !important; box-shadow: none !important; outline: none; }
.td-search:focus-within { box-shadow: 0 0 0 3px var(--t-amber), 0 18px 40px -20px rgba(0,0,0,.5); }
.td-search .t-btn { height: 48px; }

/* Category pills */
.tb-body { padding-top: 28px; }
.td-cats { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; margin-bottom: 24px; scrollbar-width: thin; }
.t-page a.td-cat { flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--t-line); background: #fff; color: var(--t-navy); font-weight: 700; font-size: 14px; white-space: nowrap; }
.td-cat span { min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--t-tint); color: var(--t-royal); font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.t-page a.td-cat:hover { border-color: var(--t-royal); text-decoration: none; }
.t-page a.td-cat[aria-current] { background: var(--t-navy); border-color: var(--t-navy); color: #fff; }
.td-cat[aria-current] span { background: rgba(255,255,255,.16); color: #fff; }

.tb-h { margin: 44px 0 18px; font-family: var(--t-head); font-size: 22px; color: var(--t-navy); }

/* Cards */
.tb-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.tb-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--t-line); border-radius: var(--t-radius); overflow: hidden; transition: transform .15s, box-shadow .15s, border-color .15s; }
.tb-card:hover { transform: translateY(-3px); border-color: var(--t-tint-2); box-shadow: 0 20px 40px -24px rgba(7,26,77,.45); }
.tb-card__media { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 10; }
.tb-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.tb-card:hover .tb-card__media img { transform: scale(1.03); }
.tb-card__brand { font-family: var(--t-text); font-style: italic; font-weight: 900; font-size: 34px; color: var(--t-royal); opacity: .35; }
.tb-card__body { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px 22px; flex: 1; }
.tb-card__top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.t-page a.tb-cat { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--t-royal); }
.tb-badge { font-size: 12px; font-weight: 800; background: var(--t-amber); color: var(--t-deep); padding: 3px 10px; border-radius: 999px; }
.tb-card__title { margin: 0; font-family: var(--t-head); font-size: 19px; line-height: 1.3; }
.t-page .tb-card__title a { color: var(--t-ink); }
.t-page .tb-card__title a:hover { color: var(--t-royal); text-decoration: none; }
.tb-card__excerpt { margin: 0; font-size: 15px; line-height: 1.6; color: var(--t-body); }
.tb-meta { margin: auto 0 0; padding-top: 6px; display: flex; gap: 8px; font-size: 13px; color: var(--t-body); }
.t-page a.tb-more { font-weight: 800; font-size: 14px; padding-top: 12px; border-top: 1px solid var(--t-tint); }

/* Featured (latest) card */
.tb-card--featured { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.tb-card--featured .tb-card__media { aspect-ratio: auto; min-height: 340px; height: 100%; }
.tb-card--featured .tb-card__body { padding: 36px 40px; justify-content: center; gap: 14px; }
.tb-card--featured .tb-card__title { font-size: clamp(24px, 2.4vw, 32px); line-height: 1.2; }
.tb-card--featured .tb-card__excerpt { font-size: 16.5px; }
.tb-card--featured .tb-meta { margin-top: 4px; }
.tb-card--featured .tb-more { border: 0; padding-top: 4px; }

/* Pagination (paginate_links markup) */
.tb-pages { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin: 40px 0 0; }
.tb-pages .page-numbers, .tb-pages > a, .tb-pages > span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--t-line); background: #fff; color: var(--t-navy); font-weight: 700; text-decoration: none !important; }
.tb-pages a.page-numbers:hover { border-color: var(--t-royal); }
.tb-pages .page-numbers.current { background: var(--t-navy); border-color: var(--t-navy); color: #fff; }
.tb-pages .page-numbers.dots { border: 0; min-width: 20px; padding: 0; }

/* Empty state + CTA */
.td-empty { text-align: center; padding: 56px 24px; border: 1px dashed var(--t-tint-2); border-radius: 18px; background: #FAFBFF; }
.td-empty h2 { margin: 0 0 8px; font-family: var(--t-head); font-size: 22px; color: var(--t-navy); }
.td-empty p { margin: 0 0 20px; color: var(--t-body); }
.td-help { margin: 56px 0 64px; padding: 36px 40px; border-radius: 18px; background: var(--t-navy); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.td-help h2 { margin: 0 0 6px; font-family: var(--t-head); font-size: clamp(20px, 2.2vw, 26px); color: #fff; }
.td-help p { margin: 0; color: #D6E0FF; max-width: 560px; }
.tb-cta__btns { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Single post ---------- */
.tb-narrow { max-width: 820px; margin-left: auto; margin-right: auto; }
.tb-hero--post { padding-bottom: 56px; }
.tb-hero--post.has-image { padding-bottom: 140px; }
.tb-hero--post .tc-title { font-size: clamp(30px, 3.6vw, 44px); }
.tb-byline { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.tb-avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--t-amber); color: var(--t-deep); font-family: var(--t-head); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.t-page a.tb-byline__name { color: #fff; font-weight: 800; }
.tb-byline__meta { margin: 2px 0 0; font-size: 14px; color: #C9D6FB; display: flex; gap: 6px; }

.tb-cover { margin: -100px auto 0; position: relative; z-index: 1; }
.tb-cover img { width: 100%; max-height: 480px; object-fit: cover; border-radius: 18px; box-shadow: 0 30px 60px -30px rgba(7,26,77,.55); }

.tb-article { padding: 44px 0 16px; }
.tb-prose { font-size: 18px; line-height: 1.8; color: #2E3A5C; overflow-wrap: break-word; }
.tb-prose > *:first-child { margin-top: 0; }
.tb-prose p { margin: 0 0 1.25em; }
.tb-prose p:empty { display: none; }
.tb-prose h2, .tb-prose h3, .tb-prose h4, .tb-prose h5, .tb-prose h6 { font-family: var(--t-head); color: var(--t-navy); line-height: 1.3; margin: 1.8em 0 .6em; }
.tb-prose h1 { font-family: var(--t-head); color: var(--t-navy); font-size: 32px; line-height: 1.25; margin: 1.6em 0 .6em; }
.tb-prose h2 { font-size: 28px; }
.tb-prose h3 { font-size: 23px; }
.tb-prose h4 { font-size: 19px; }
.tb-prose h5, .tb-prose h6 { font-size: 16px; }
.tb-prose a { color: var(--t-royal); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.tb-prose strong, .tb-prose b { color: var(--t-ink); }
.tb-prose ul, .tb-prose ol { margin: 0 0 1.3em; padding-left: 1.4em; }
.tb-prose li { margin: .4em 0; }
.tb-prose ul li::marker { color: var(--t-royal); }
.tb-prose ol li::marker { color: var(--t-royal); font-weight: 800; }
.tb-prose blockquote { margin: 1.6em 0; padding: 20px 26px; border-left: 4px solid var(--t-amber); background: var(--t-tint); border-radius: 0 12px 12px 0; font-size: 19px; color: var(--t-navy); }
.tb-prose blockquote p:last-child { margin-bottom: 0; }
.tb-prose blockquote cite { display: block; margin-top: 8px; font-size: 14px; font-style: normal; color: var(--t-body); }
.tb-prose img { max-width: 100%; height: auto; border-radius: 12px; }
.tb-prose figure { margin: 1.6em 0; max-width: 100%; }
.tb-prose figcaption, .tb-prose .wp-caption-text { font-size: 14px; color: var(--t-body); text-align: center; margin-top: 8px; }
.tb-prose .alignleft { float: left; margin: .3em 1.4em 1em 0; max-width: 50%; }
.tb-prose .alignright { float: right; margin: .3em 0 1em 1.4em; max-width: 50%; }
.tb-prose .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.tb-prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 16px; display: block; overflow-x: auto; }
.tb-prose th, .tb-prose td { border: 1px solid var(--t-line); padding: 10px 14px; text-align: left; }
.tb-prose th { background: var(--t-tint); color: var(--t-navy); }
.tb-prose code, .tb-prose kbd { font-size: .88em; background: var(--t-tint); padding: 2px 6px; border-radius: 5px; }
.tb-prose pre { background: var(--t-deep); color: #E6ECFF; padding: 18px 20px; border-radius: 12px; overflow-x: auto; font-size: 15px; line-height: 1.6; }
.tb-prose pre code { background: none; padding: 0; color: inherit; }
.tb-prose hr { border: 0; border-top: 1px solid var(--t-line); margin: 2em 0; }
.tb-prose::after { content: ""; display: table; clear: both; }

.tb-article__foot { margin-top: 36px; padding: 22px 0; border-top: 1px solid var(--t-line); border-bottom: 1px solid var(--t-line); display: flex; flex-direction: column; gap: 14px; }
.tb-tags, .tb-share { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--t-body); }
.tb-tags > span, .tb-share > span { font-weight: 800; color: var(--t-ink); margin-right: 4px; }
.t-page a.td-tag { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--t-tint); color: var(--t-navy); font-weight: 700; font-size: 13px; }
.t-page .tb-share a { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--t-line); color: var(--t-navy); font-weight: 700; font-size: 13px; }
.t-page .tb-share a:hover { border-color: var(--t-royal); text-decoration: none; }

.tb-prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; }
.t-page a.tb-prevnext__link { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border: 1px solid var(--t-line); border-radius: var(--t-radius); color: var(--t-ink); font-family: var(--t-head); font-weight: 700; line-height: 1.35; }
.tb-prevnext__link span { font-family: var(--t-text); font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--t-royal); }
.t-page a.tb-prevnext__link:hover { border-color: var(--t-royal); text-decoration: none; }
.tb-prevnext__link--next { text-align: right; grid-column: 2; }

/* Comments (WordPress / WPLMS comment markup) */
.tb-comments { margin-top: 44px; font-size: 15.5px; color: var(--t-body); }
.tb-comments h2, .tb-comments h3, .tb-comments .comments-title, .tb-comments #reply-title { font-family: var(--t-head); color: var(--t-navy); font-size: 22px; margin: 0 0 18px; }
.tb-comments ol, .tb-comments ul { list-style: none; margin: 0; padding: 0; }
.tb-comments li.comment, .tb-comments .commentlist > li { margin: 0 0 14px; padding: 18px 20px; border: 1px solid var(--t-line); border-radius: var(--t-radius); background: #fff; }
.tb-comments .children { margin: 14px 0 0 24px !important; }
.tb-comments img.avatar { border-radius: 50%; }
.tb-comments input[type="text"], .tb-comments input[type="email"], .tb-comments input[type="url"], .tb-comments textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--t-line); border-radius: 10px; font: inherit; color: var(--t-ink); background: #fff; }
.tb-comments textarea:focus, .tb-comments input:focus { outline: 3px solid var(--t-amber); outline-offset: 1px; }
.tb-comments input[type="submit"], .tb-comments .submit { height: 46px; padding: 0 22px; border: 0; border-radius: 8px; background: var(--t-royal); color: #fff; font: inherit; font-weight: 800; cursor: pointer; }

.tb-related { position: relative; padding: 56px 0 8px; margin-top: 48px; }
.tb-related::before { content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: 50%; width: 100vw; margin-left: -50vw; background: var(--t-tint); }
.tb-related .t-h2 { margin-bottom: 24px; }

/* Responsive */
@media (max-width: 1024px) {
  .tb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tb-card--featured { grid-template-columns: minmax(0, 1fr); }
  .tb-card--featured .tb-card__media { min-height: 0; aspect-ratio: 16 / 9; }
  .tb-card--featured .tb-card__body { padding: 26px 28px; }
}
@media (max-width: 640px) {
  .tb-grid, .tb-prevnext { grid-template-columns: minmax(0, 1fr); }
  .tb-prevnext__link--next { grid-column: 1; text-align: left; }
  .tb-prose { font-size: 17px; }
  .tb-hero--post.has-image { padding-bottom: 90px; }
  .tb-cover { margin-top: -60px; }
  .tb-prose .alignleft, .tb-prose .alignright { float: none; margin: 1em 0; max-width: 100%; }
  .td-help { padding: 28px 24px; }
}

/* WPLMS sets its own font/size on p and li – make article text inherit the reading styles. */
.tb-prose p, .tb-prose li, .tb-prose dd, .tb-prose dt, .tb-prose td, .tb-prose th { font-family: var(--t-text); font-size: inherit; line-height: inherit; color: inherit; }
.tb-prose { font-family: var(--t-text); }
.tb-hero > .t-wrap.tb-narrow { max-width: 820px; }
