/*
Theme Name: Host Mayo 2026
Theme URI: https://hostmayo.com/blog/
Author: Host Mayo LTD
Author URI: https://hostmayo.com/
Description: Blog theme for hostmayo.com/blog. Uses the same design as the main site (Bootstrap 5.3, Poppins, day/night mode): it loads /theme/css/site.css and /theme/js/site.js from the site root, so the blog follows any change to the site theme. Magazine homepage: a featured mosaic (one large tile and two small tiles), then a two-column list of article cards.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: Proprietary
Text Domain: hostmayo-2026
*/

/* The shared site styles (--hm-* variables, navbar, footer, hero, CTA, buttons) come from
   /theme/css/site.css. This file only adds what the blog needs on top of them. */

/* ---------- WordPress basics ---------- */
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0;
  position: absolute !important; word-wrap: normal !important;
}
.screen-reader-text:focus {
  clip: auto !important; clip-path: none; height: auto; width: auto; display: block;
  left: 5px; top: 5px; z-index: 100000; padding: .75rem 1rem;
  background: var(--hm-surface); color: var(--hm-ink); border-radius: 8px;
}
.hm-blog img { max-width: 100%; height: auto; }

/* site.css paints every <footer> element navy (the shared site footer is a bare <footer>).
   Inside the page body (comments, plugins, bbPress) a <footer> is just a block. */
.hm-site main footer {
  background: none; background-image: none; color: inherit;
  padding: 0; border: 0; font-size: inherit;
}
.hm-site main footer a { color: var(--hm-accent); }

/* ---------- Hero band (all blog pages) ---------- */
.hmb-hero { padding: 3rem 0 3.25rem; }
.hmb-hero h1 { margin-bottom: .6rem; }
.hmb-hero .lead { margin-bottom: 0; }
.hmb-hero-home { padding-bottom: 6.5rem; }
.hmb-hero-search { max-width: 26rem; margin-left: auto; }
.hmb-hero-search .form-control {
  background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .3); color: #fff;
}
.hmb-hero-search .form-control::placeholder { color: rgba(255, 255, 255, .7); }
.hmb-hero-search .form-control:focus { background: rgba(255, 255, 255, .18); border-color: #fff; box-shadow: 0 0 0 .2rem rgba(255, 255, 255, .2); }
.hmb-hero-search .btn { --bs-btn-color: #154785; --bs-btn-bg: #fff; --bs-btn-border-color: #fff; --bs-btn-hover-color: #0f2f63; --bs-btn-hover-bg: #e8f1ff; --bs-btn-hover-border-color: #e8f1ff; }

.hmb-crumbs { font-size: .85rem; margin-bottom: .9rem; color: #c4d6f2; }
.hmb-crumbs a { color: #fff; text-decoration: none; font-weight: 500; }
.hmb-crumbs a:hover { text-decoration: underline; }
.hmb-crumbs .sep { margin: 0 .45rem; opacity: .6; }
.hmb-hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem; color: #dbe7fb; font-size: .92rem; margin-top: 1rem; }
.hmb-hero-meta img { border-radius: 50%; width: 32px; height: 32px; }
.hmb-hero-meta i { color: #8fbcf7; margin-right: .3rem; }
.hmb-hero-meta strong { color: #fff; font-weight: 600; }
.hm-site .hmb-hero-single h1 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); max-width: 54rem; }

/* ---------- Featured mosaic (magazine top) ---------- */
.hmb-featured { margin-top: -4.75rem; position: relative; z-index: 2; }
.hmb-mosaic {
  display: grid; gap: 1.25rem;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
  height: clamp(420px, 40vw, 520px);
}
.hmb-mosaic.is-n1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.hmb-mosaic.is-n2 { grid-template-rows: 1fr; }
.hmb-tile {
  position: relative; overflow: hidden; isolation: isolate; border-radius: 18px;
  background: linear-gradient(135deg, var(--hm-hero-a), var(--hm-hero-c));
  box-shadow: var(--hm-shadow-lg);
}
.hmb-tile:first-child { grid-row: 1 / -1; }
.hmb-tile img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2;
  transition: transform .5s ease;
}
.hmb-tile::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(6, 16, 34, 0) 30%, rgba(6, 16, 34, .55) 60%, rgba(6, 16, 34, .92) 100%);
}
.hmb-tile:hover img { transform: scale(1.04); }
.hmb-tile-body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 1.25rem 1.4rem; color: #fff; pointer-events: none; }
.hmb-tile-body a { pointer-events: auto; }
.hmb-tile-cover { position: absolute; inset: 0; z-index: 1; }
.hmb-tile:first-child .hmb-tile-body { padding: 2rem 2.1rem; }
.hm-site .hmb-tile h2, .hm-site .hmb-tile h3 { color: #fff; margin: .55rem 0 0; line-height: 1.25; font-weight: 600; }
.hmb-tile h2 { font-size: clamp(1.35rem, 2.3vw, 2rem); text-shadow: 0 2px 12px rgba(0, 0, 0, .35); }
.hmb-tile h3 { font-size: 1.05rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hmb-tile a.hmb-tile-link { color: #fff; text-decoration: none; }
.hmb-tile a.hmb-tile-link:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.hmb-tile-excerpt { color: #dbe7fb; margin: .6rem 0 0; max-width: 40rem; font-size: .97rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hmb-tile-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; font-size: .8rem; color: #dbe7fb; }
.hmb-tile .hmb-cat { position: relative; z-index: 2; }
.hmb-tile-noimg { position: absolute; right: 1.25rem; top: 1rem; font-size: 3.5rem; color: rgba(255, 255, 255, .15); z-index: -1; }

/* ---------- Category pill + meta ---------- */
.hmb-cat {
  display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--hm-accent-strong); background: var(--hm-sky-2); border-radius: 999px; padding: .25rem .65rem;
  text-decoration: none; line-height: 1.3;
}
a.hmb-cat:hover { color: #fff; background: var(--hm-blue); }
.hmb-tile .hmb-cat { color: #fff; background: var(--hm-blue); }
.hmb-tile a.hmb-cat:hover { background: #fff; color: #154785; }
.hmb-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .7rem; font-size: .8rem; color: var(--hm-muted); }
.hmb-meta i { margin-right: .25rem; }

/* ---------- Section head + category chips ---------- */
.hmb-list { padding: 3.25rem 0 4rem; }
.hmb-list-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; }
.hmb-list-head h2 { font-size: clamp(1.4rem, 2.2vw, 1.8rem); margin: 0; }
.hmb-chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.hmb-chips a {
  display: inline-flex; align-items: center; gap: .4rem; text-decoration: none;
  border: 1px solid var(--hm-line); background: var(--hm-surface); color: var(--hm-text);
  padding: .35rem .85rem; border-radius: 999px; font-weight: 500; font-size: .85rem;
}
.hmb-chips a:hover, .hmb-chips a.is-active { border-color: var(--hm-accent); color: var(--hm-accent); }
.hmb-chips a span { color: var(--hm-muted); font-size: .75rem; }

/* ---------- Article card (horizontal, two per row on desktop) ---------- */
.hmb-card {
  position: relative; height: 100%; display: grid; grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
  background: var(--hm-surface); border: 1px solid var(--hm-line); border-radius: var(--hm-radius);
  box-shadow: var(--hm-shadow); overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.hmb-card:hover { transform: translateY(-3px); box-shadow: var(--hm-shadow-lg); border-color: var(--hm-accent); }
.hmb-card-thumb { position: relative; display: block; min-height: 230px; background: linear-gradient(135deg, var(--hm-hero-a), var(--hm-hero-c)); overflow: hidden; }
.hmb-card-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.hmb-card:hover .hmb-card-thumb img { transform: scale(1.05); }
.hmb-card-thumb .hmb-noimg { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.75rem; color: rgba(255, 255, 255, .35); }
.hmb-card-body { display: flex; flex-direction: column; padding: 1.25rem 1.35rem 1.2rem; min-width: 0; }
.hm-site .hmb-card-title { font-size: 1.1rem; line-height: 1.35; margin: .65rem 0 .5rem; }
.hmb-card-title a { color: var(--hm-ink); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hmb-card-title a::before { content: ""; position: absolute; inset: 0; z-index: 1; }
.hmb-card:hover .hmb-card-title a { color: var(--hm-accent); }
.hmb-card-excerpt { color: var(--hm-muted); font-size: .9rem; margin: 0 0 .9rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hmb-card-excerpt p { margin: 0; display: inline; }
.hmb-more { margin-top: auto; font-weight: 600; font-size: .875rem; color: var(--hm-accent); }
.hmb-more i { font-size: .75rem; margin-left: .3rem; transition: transform .15s ease; }
.hmb-card:hover .hmb-more i { transform: translateX(3px); }
.hmb-card .hmb-cat { position: relative; z-index: 2; }
.hmb-card.sticky { border-color: var(--hm-accent); }

/* Vertical variant (related posts) */
.hmb-card-v { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
.hmb-card-v .hmb-card-thumb { min-height: 0; aspect-ratio: 16 / 9; }
.hm-site .hmb-card-v .hmb-card-title { font-size: 1rem; }

/* ---------- Pagination ---------- */
.hmb-pagination { margin-top: 2.5rem; }
.hmb-pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; }
.hmb-pagination .page-numbers {
  display: inline-grid; place-items: center; min-width: 2.6rem; height: 2.6rem; padding: 0 .85rem;
  border: 1px solid var(--hm-line); border-radius: 999px; background: var(--hm-surface);
  color: var(--hm-text); text-decoration: none; font-weight: 500; font-size: .92rem;
}
.hmb-pagination a.page-numbers:hover { border-color: var(--hm-accent); color: var(--hm-accent); }
.hmb-pagination .page-numbers.current { background: var(--hm-blue); border-color: var(--hm-blue); color: #fff; }
.hmb-pagination .page-numbers.dots { border-color: transparent; background: none; }

/* ---------- Single post ---------- */
.hmb-single { padding: 2.75rem 0 4rem; }
.hmb-single-thumb { margin: 0 0 2rem; border-radius: 18px; overflow: hidden; border: 1px solid var(--hm-line); box-shadow: var(--hm-shadow); background: var(--hm-surface-2); }
.hmb-single-thumb img { display: block; width: 100%; height: auto; }

.hmb-entry { font-size: 1.04rem; line-height: 1.8; color: var(--hm-text); overflow-wrap: break-word; }
.hmb-entry > *:first-child { margin-top: 0; }
.hmb-entry h1, .hmb-entry h2, .hmb-entry h3, .hmb-entry h4, .hmb-entry h5, .hmb-entry h6 { color: var(--hm-ink); line-height: 1.3; }
.hmb-entry h2 { font-size: 1.55rem; margin: 2.4rem 0 .8rem; }
.hmb-entry h3 { font-size: 1.25rem; margin: 2rem 0 .7rem; }
.hmb-entry h4 { font-size: 1.08rem; margin: 1.6rem 0 .6rem; }
.hmb-entry p, .hmb-entry ul, .hmb-entry ol, .hmb-entry dl, .hmb-entry figure, .hmb-entry table { margin-bottom: 1.25rem; }
.hmb-entry ul, .hmb-entry ol { padding-left: 1.4rem; }
.hmb-entry li { margin-bottom: .4rem; }
.hmb-entry li::marker { color: var(--hm-accent); }
.hmb-entry a { color: var(--hm-accent); text-underline-offset: 2px; }
.hmb-entry a:hover { color: var(--hm-accent-strong); }
.hmb-entry strong, .hmb-entry b { color: var(--hm-ink); }
.hmb-entry img { border-radius: 10px; }
.hmb-entry hr { border-color: var(--hm-line); opacity: 1; margin: 2.25rem 0; }
.hmb-entry blockquote, .hmb-entry .wp-block-quote {
  margin: 1.75rem 0; padding: 1rem 1.25rem 1rem 1.4rem; border-left: 4px solid var(--hm-blue);
  background: var(--hm-sky); border-radius: 0 12px 12px 0; color: var(--hm-ink); font-size: 1.05rem;
}
.hmb-entry blockquote p:last-child { margin-bottom: 0; }
.hmb-entry blockquote cite { display: block; margin-top: .5rem; font-size: .85rem; color: var(--hm-muted); font-style: normal; }
.hmb-entry code { color: var(--hm-accent-strong); background: var(--hm-sky-2); padding: .1rem .35rem; border-radius: 5px; font-size: .9em; }
.hmb-entry pre {
  background: #0b1422; color: #dbe7fb; padding: 1rem 1.2rem; border-radius: 12px; overflow-x: auto;
  font-size: .88rem; line-height: 1.6; border: 1px solid var(--hm-line);
}
.hmb-entry pre code { background: none; color: inherit; padding: 0; font-size: inherit; }
.hmb-entry table:not(.tablepress) { width: 100%; border-collapse: collapse; font-size: .95rem; display: block; overflow-x: auto; }
.hmb-entry table:not(.tablepress) th, .hmb-entry table:not(.tablepress) td { border: 1px solid var(--hm-line); padding: .55rem .75rem; text-align: left; vertical-align: top; }
.hmb-entry table:not(.tablepress) th { background: var(--hm-surface-2); color: var(--hm-ink); }
.hmb-entry iframe, .hmb-entry video, .hmb-entry embed { max-width: 100%; }
.hmb-entry .wp-block-embed__wrapper iframe, .hmb-entry .wp-block-video video { width: 100%; }
.hmb-entry figure { max-width: 100%; }
.hmb-entry figcaption, .hmb-entry .wp-caption-text, .hmb-entry .wp-element-caption { font-size: .85rem; color: var(--hm-muted); text-align: center; margin-top: .5rem; line-height: 1.5; }
.hmb-entry .wp-caption { max-width: 100%; }
.hmb-entry .alignleft { float: left; margin: .35rem 1.5rem 1rem 0; }
.hmb-entry .alignright { float: right; margin: .35rem 0 1rem 1.5rem; }
.hmb-entry .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.hmb-entry .alignwide, .hmb-entry .alignfull { max-width: 100%; }
.hmb-entry::after { content: ""; display: table; clear: both; }
@media (max-width: 575.98px) { .hmb-entry .alignleft, .hmb-entry .alignright { float: none; margin: 0 auto 1rem; display: block; } }
.hmb-entry .wp-block-button__link { background: var(--hm-blue); color: #fff; border-radius: 10px; text-decoration: none; padding: .65rem 1.25rem; font-weight: 500; }
.hmb-entry .wp-block-button__link:hover { background: var(--hm-blue-600); color: #fff; }
.hmb-entry .gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .75rem; }
.hmb-entry .gallery-item { margin: 0; }
.hmb-entry .gallery-item img { width: 100%; height: 100%; object-fit: cover; }

/* Callout used in posts: <div class="hmb-callout"> */
.hmb-entry .hmb-callout { background: var(--hm-sky); border: 1px solid var(--hm-line); border-radius: var(--hm-radius); padding: 1.1rem 1.3rem; margin: 1.75rem 0; }
.hmb-entry .hmb-callout > :last-child { margin-bottom: 0; }

.hmb-tags { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin: 2rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--hm-line); }
.hmb-tags > span { font-size: .85rem; font-weight: 600; color: var(--hm-ink); margin-right: .25rem; }
.hmb-tags a { font-size: .8rem; text-decoration: none; color: var(--hm-text); border: 1px solid var(--hm-line); border-radius: 999px; padding: .2rem .7rem; }
.hmb-tags a:hover { color: var(--hm-accent); border-color: var(--hm-accent); }

.hmb-postnav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 2.5rem 0 0; }
.hmb-postnav a {
  display: flex; align-items: center; gap: .9rem; height: 100%; text-decoration: none;
  background: var(--hm-surface); border: 1px solid var(--hm-line); border-radius: var(--hm-radius); padding: .9rem 1rem;
  transition: border-color .15s ease, transform .15s ease;
}
.hmb-postnav a:hover { border-color: var(--hm-accent); transform: translateY(-2px); }
.hmb-postnav .is-next a { flex-direction: row-reverse; text-align: right; }
.hmb-postnav img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; flex: none; }
.hmb-postnav small { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--hm-accent); }
.hmb-postnav strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--hm-ink); font-weight: 600; font-size: .93rem; line-height: 1.35; }
@media (max-width: 575.98px) { .hmb-postnav { grid-template-columns: 1fr; } }

.hmb-related { margin-top: 3.5rem; }
.hmb-related h2 { font-size: 1.35rem; margin-bottom: 1.25rem; }

/* ---------- Sidebar + widgets ---------- */
.hmb-sidebar { display: flex; flex-direction: column; gap: 1.5rem; }
.hmb-widget { background: var(--hm-surface); border: 1px solid var(--hm-line); border-radius: var(--hm-radius); padding: 1.35rem; box-shadow: var(--hm-shadow); }
.hm-site .hmb-widget-title { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--hm-muted); margin: 0 0 1rem; }
.hmb-widget ul { list-style: none; padding: 0; margin: 0; }
.hmb-widget li { padding: .35rem 0; }
.hmb-widget li a { color: var(--hm-text); text-decoration: none; }
.hmb-widget li a:hover { color: var(--hm-accent); }
.hmb-widget img { border-radius: 10px; }
.hmb-widget select { width: 100%; }
.hmb-widget select, .hmb-widget input[type="text"]:not(.form-control), .hmb-widget input[type="email"]:not(.form-control), .hmb-widget input[type="search"]:not(.form-control) {
  display: block; width: 100%; padding: .55rem .8rem; font-size: .95rem; color: var(--hm-ink);
  background: var(--hm-surface); border: 1px solid var(--hm-line); border-radius: 10px;
}
.hmb-mini li { display: flex; gap: .8rem; align-items: center; padding: .55rem 0; border-bottom: 1px solid var(--hm-line); }
.hmb-mini li:last-child { border-bottom: 0; padding-bottom: 0; }
.hmb-mini li:first-child { padding-top: 0; }
.hmb-mini-thumb { flex: none; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg, var(--hm-hero-a), var(--hm-hero-c)); display: grid; place-items: center; color: rgba(255, 255, 255, .5); }
.hmb-mini-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.hmb-mini a.hmb-mini-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--hm-ink); font-weight: 600; font-size: .9rem; line-height: 1.35; }
.hmb-mini time { font-size: .78rem; color: var(--hm-muted); }
.hmb-widget-cta { border: 0; color: #fff; background: radial-gradient(400px 200px at 100% 0%, rgba(127, 176, 245, .35), transparent 60%), linear-gradient(135deg, var(--hm-hero-a), var(--hm-hero-c)); }
.hm-site .hmb-widget-cta h2 { color: #fff; font-size: 1.2rem; margin: 0 0 .4rem; }
.hmb-widget-cta p { color: #dbe7fb; font-size: .92rem; margin: 0 0 1rem; }
.hmb-widget-cta .btn-light { --bs-btn-color: #154785; --bs-btn-bg: #fff; --bs-btn-border-color: #fff; --bs-btn-hover-color: #0f2f63; --bs-btn-hover-bg: #e8f1ff; --bs-btn-hover-border-color: #e8f1ff; font-weight: 600; }
.hmb-widget-cta .btn-outline-light { border-color: rgba(255, 255, 255, .55); }

/* Search form (searchform.php, also used by the Search widget) */
.hmb-search .form-control { border-radius: 10px 0 0 10px; background: var(--hm-surface); border-color: var(--hm-line); color: var(--hm-ink); }
.hmb-search .btn { border-radius: 0 10px 10px 0; }

/* Newsletter plugin (minimal widget) */
.hmb-widget .tnp-widget-minimal form, .hmb-widget .tnp-widget form { display: flex; flex-direction: column; gap: .5rem; }
.hmb-widget .tnp-widget-minimal input.tnp-email, .hmb-widget .tnp-widget input.tnp-email { width: 100%; padding: .55rem .8rem; border: 1px solid var(--hm-line); border-radius: 10px; background: var(--hm-surface); color: var(--hm-ink); font-size: .95rem; }
.hmb-widget .tnp-widget-minimal input.tnp-submit, .hmb-widget .tnp-widget input.tnp-submit { width: 100%; padding: .55rem .8rem; border: 0; border-radius: 10px; background: var(--hm-blue); color: #fff; font-weight: 500; cursor: pointer; }
.hmb-widget .tnp-widget-minimal input.tnp-submit:hover, .hmb-widget .tnp-widget input.tnp-submit:hover { background: var(--hm-blue-600); }

/* ---------- Pages (page.php, bbPress) ---------- */
.hmb-page { padding: 2.75rem 0 4rem; }
.hmb-page .hmb-entry { max-width: 52rem; }
.hmb-page-wide .hmb-entry { max-width: none; }

/* ---------- Empty / 404 ---------- */
.hmb-empty { max-width: 36rem; margin: 0 auto; text-align: center; padding: 1rem 0 1.5rem; }
.hmb-empty .hm-ico { margin: 0 auto 1rem; }
.hmb-empty h2 { font-size: 1.4rem; }
.hmb-empty p { color: var(--hm-muted); }

/* ---------- Comments (core; wpDiscuz brings its own markup) ---------- */
.hmb-comments { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--hm-line); }
.hmb-comments h2 { font-size: 1.3rem; margin-bottom: 1.25rem; }
.hmb-comments ol.comment-list, .hmb-comments ol.children { list-style: none; padding: 0; margin: 0; }
.hmb-comments ol.children { padding-left: 1.5rem; }
.hmb-comments .comment-body { background: var(--hm-surface); border: 1px solid var(--hm-line); border-radius: var(--hm-radius); padding: 1rem 1.2rem; margin-bottom: 1rem; }
.hmb-comments .comment-meta { font-size: .85rem; color: var(--hm-muted); margin-bottom: .5rem; }
.hmb-comments .comment-author img { border-radius: 50%; margin-right: .5rem; vertical-align: middle; }
.hmb-comments .comment-author .fn { color: var(--hm-ink); font-weight: 600; font-style: normal; }
.hmb-comments .reply a { font-size: .85rem; font-weight: 600; }
.hmb-comments .comment-respond { margin-top: 1.5rem; }
.hmb-comments textarea, .hmb-comments input[type="text"], .hmb-comments input[type="email"], .hmb-comments input[type="url"] {
  display: block; width: 100%; padding: .6rem .85rem; color: var(--hm-ink); background: var(--hm-surface);
  border: 1px solid var(--hm-line); border-radius: 10px;
}
.hmb-comments .form-submit input { background: var(--hm-blue); color: #fff; border: 0; border-radius: 10px; padding: .6rem 1.3rem; font-weight: 500; }

/* ---------- Plugins in night mode ---------- */
/* TablePress 2.x exposes its colours as custom properties. */
.hm-blog .tablepress {
  --text-color: var(--hm-text); --head-text-color: var(--hm-ink); --head-bg-color: var(--hm-sky-2);
  --head-active-bg-color: var(--hm-sky-2); --head-active-text-color: var(--hm-ink);
  --odd-text-color: var(--hm-text); --odd-bg-color: var(--hm-surface);
  --even-text-color: var(--hm-text); --even-bg-color: var(--hm-surface-2);
  --hover-text-color: var(--hm-ink); --hover-bg-color: var(--hm-hover);
  --border-color: var(--hm-line); --padding: .55rem .75rem;
  font-size: .95rem;
}
.hm-blog .tablepress-table-name { color: var(--hm-ink); }

/* bbPress default skin uses fixed light greys; map them to the site palette. */
.hm-blog #bbpress-forums { font-size: .95rem; color: var(--hm-text); }
.hm-blog #bbpress-forums ul.bbp-forums, .hm-blog #bbpress-forums ul.bbp-topics, .hm-blog #bbpress-forums ul.bbp-replies,
.hm-blog #bbpress-forums ul.bbp-search-results, .hm-blog #bbpress-forums ul.bbp-lead-topic {
  border: 1px solid var(--hm-line); border-radius: var(--hm-radius); overflow: hidden; font-size: .95rem;
}
.hm-blog #bbpress-forums li.bbp-header, .hm-blog #bbpress-forums li.bbp-footer { background: var(--hm-surface-2); border-color: var(--hm-line); color: var(--hm-muted); }
.hm-blog #bbpress-forums li.bbp-body ul.forum, .hm-blog #bbpress-forums li.bbp-body ul.topic { border-top-color: var(--hm-line); }
.hm-blog #bbpress-forums div.even, .hm-blog #bbpress-forums ul.even { background-color: var(--hm-surface); }
.hm-blog #bbpress-forums div.odd, .hm-blog #bbpress-forums ul.odd { background-color: var(--hm-hover); }
.hm-blog #bbpress-forums div.bbp-forum-header, .hm-blog #bbpress-forums div.bbp-topic-header, .hm-blog #bbpress-forums div.bbp-reply-header { background-color: var(--hm-sky-2); border-top-color: var(--hm-line); }
.hm-blog #bbpress-forums .bbp-forum-title, .hm-blog #bbpress-forums .bbp-topic-permalink { font-weight: 600; color: var(--hm-ink); }
.hm-blog #bbpress-forums fieldset.bbp-form { border-color: var(--hm-line); border-radius: var(--hm-radius); }
.hm-blog #bbpress-forums fieldset.bbp-form legend { color: var(--hm-ink); }
.hm-blog #bbpress-forums input[type="text"], .hm-blog #bbpress-forums input[type="password"], .hm-blog #bbpress-forums select, .hm-blog #bbpress-forums textarea {
  background: var(--hm-surface); color: var(--hm-ink); border: 1px solid var(--hm-line); border-radius: 8px; padding: .4rem .6rem;
}
.hm-blog #bbpress-forums .bbp-breadcrumb, .hm-blog #bbpress-forums .bbp-pagination-count, .hm-blog #bbpress-forums p.bbp-topic-meta { color: var(--hm-muted); }
.hm-blog #bbpress-forums button, .hm-blog #bbpress-forums .button { background: var(--hm-blue); color: #fff; border: 0; border-radius: 8px; padding: .45rem 1rem; }
.hm-blog .bbp-template-notice { background: var(--hm-sky); border-color: var(--hm-line); color: var(--hm-text); border-radius: 10px; }
.hm-blog .bbp-template-notice li, .hm-blog .bbp-template-notice p { color: var(--hm-text); }
.hm-blog #bbpress-forums .bbp-search-form input[type="text"] { width: auto; }

/* wpDiscuz: keep its layout, swap the colours that break in night mode. */
:root[data-bs-theme="dark"] .hm-blog #wpdcom,
:root[data-bs-theme="dark"] .hm-blog #wpdcom .wpd-comment-text,
:root[data-bs-theme="dark"] .hm-blog #wpdcom .wpd-thread-info,
:root[data-bs-theme="dark"] .hm-blog #wpdcom .wpd-comment-author,
:root[data-bs-theme="dark"] .hm-blog #wpdcom .wpd-comment-author a,
:root[data-bs-theme="dark"] .hm-blog #wpdcom .wpd-thread-filter .wpdf-active,
:root[data-bs-theme="dark"] .hm-blog #wpdcom .wpd-thread-head .wpd-thread-info { color: var(--hm-text); }
:root[data-bs-theme="dark"] .hm-blog #wpdcom .wpd-form-wrap,
:root[data-bs-theme="dark"] .hm-blog #wpdcom .wpd-comment-text,
:root[data-bs-theme="dark"] .hm-blog #wpdcom .wpd-thread-list { background: transparent; }
:root[data-bs-theme="dark"] .hm-blog #wpdcom .ql-editor,
:root[data-bs-theme="dark"] .hm-blog #wpdcom .ql-container,
:root[data-bs-theme="dark"] .hm-blog #wpdcom .ql-toolbar,
:root[data-bs-theme="dark"] .hm-blog #wpdcom textarea,
:root[data-bs-theme="dark"] .hm-blog #wpdcom input[type="text"],
:root[data-bs-theme="dark"] .hm-blog #wpdcom input[type="email"],
:root[data-bs-theme="dark"] .hm-blog #wpdcom input[type="url"] { background: var(--hm-surface); color: var(--hm-ink); border-color: var(--hm-line); }
:root[data-bs-theme="dark"] .hm-blog #wpdcom .ql-editor.ql-blank::before { color: var(--hm-muted); }
:root[data-bs-theme="dark"] .hm-blog #wpdcom .ql-toolbar .ql-stroke { stroke: var(--hm-muted); }
:root[data-bs-theme="dark"] .hm-blog #wpdcom .ql-toolbar .ql-fill { fill: var(--hm-muted); }
:root[data-bs-theme="dark"] .hm-blog #wpdcom .wpd-thread-head { border-bottom-color: var(--hm-line); }

/* Super Socializer share bar */
.hm-blog .the_champ_sharing_container { margin: 1.5rem 0; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .hmb-hero-search { margin: 1.5rem 0 0; max-width: none; }
  .hmb-mosaic { height: auto; grid-template-columns: 1fr 1fr; grid-template-rows: 320px 220px; }
  .hmb-mosaic.is-n2 { grid-template-rows: 320px; }
  .hmb-mosaic.is-n1 { grid-template-columns: 1fr; grid-template-rows: 320px; }
  .hmb-tile:first-child { grid-row: auto; grid-column: 1 / -1; }
  .hmb-mosaic.is-n2 .hmb-tile:first-child { grid-column: auto; }
  .hmb-single .hmb-sidebar { margin-top: 1rem; }
}
@media (max-width: 575.98px) {
  .hmb-hero { padding: 2.25rem 0 2.5rem; }
  .hmb-hero-home { padding-bottom: 5.5rem; }
  .hmb-mosaic, .hmb-mosaic.is-n2 { grid-template-columns: 1fr; grid-template-rows: 300px 200px 200px; gap: 1rem; }
  .hmb-mosaic.is-n2 { grid-template-rows: 300px 200px; }
  .hmb-tile:first-child .hmb-tile-body { padding: 1.25rem 1.3rem; }
  .hmb-tile-excerpt { display: none; }
  .hmb-card { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .hmb-card-thumb { min-height: 0; aspect-ratio: 16 / 9; }
}
@media (prefers-reduced-motion: reduce) {
  .hmb-tile img, .hmb-card, .hmb-card-thumb img, .hmb-postnav a, .hmb-more i { transition: none; }
  .hmb-tile:hover img, .hmb-card:hover .hmb-card-thumb img { transform: none; }
  .hmb-card:hover, .hmb-postnav a:hover { transform: none; }
}
