/* Forum + classified inbox (“community hub”), Terrain Tactics */

.community-hub-page-bg {
  background: linear-gradient(165deg, #eef1f7 0%, #f9fafb 12%, #ffffff 38%);
  padding-bottom: 3rem;
}

/* Classified inbox: extra side gutters + max width so thread cards don’t span ultra-wide viewports */
.community-hub-page-bg--classified-inbox .community-hub-inner {
  padding-left: clamp(1.15rem, 5vw, 3.25rem);
  padding-right: clamp(1.15rem, 5vw, 3.25rem);
}

.community-hub-page-bg--classified-inbox .community-hub-shell--wide {
  max-width: min(52rem, 100%);
  margin-inline: auto;
}

/* Forum topic: topic body_image or kind hero (never general-other). Pattern/gradient via ::before when no photo. */

.community-hub-page-bg.forum-topic-page--decorated {
  position: relative;
  width: 100%;
  min-height: 100vh;
  /* Only clear color; avoid `background: transparent` shorthand — it can reset background-image in some cases */
  background-color: transparent;
  background-image: none;
}

.community-hub-page-bg.forum-topic-page--decorated::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* Three radials (pattern) + base gradient: explicit sizes avoid “cover” washing radials to gray */
  background-image: var(--forum-topic-bg-pattern), var(--forum-topic-bg-fallback-gradient);
  background-repeat: no-repeat;
  background-size:
    min(140vw, 72rem) min(90vh, 52rem),
    min(120vw, 58rem) min(85vh, 44rem),
    min(130vw, 64rem) min(95vh, 36rem),
    100% 100%;
  background-position:
    -18% -25%,
    108% -8%,
    52% 108%,
    50% 50%;
}

/* With a hero: inline background-image on the element wins; hide gradient ::before */
.community-hub-page-bg.forum-topic-page--decorated.forum-topic-page--has-photo::before {
  display: none;
}

.community-hub-page-bg.forum-topic-page--decorated > .community-hub-inner {
  position: relative;
  z-index: 1;
}

.forum-topic-page--kind-general-other {
  --forum-topic-bg-fallback-gradient: linear-gradient(168deg, #f0f2f6 0%, #f5f7fa 55%, #fafbfc 100%);
  --forum-topic-bg-pattern:
    radial-gradient(ellipse 90% 70% at 10% 12%, rgba(100, 116, 139, 0.09) 0%, transparent 55%),
    radial-gradient(ellipse 80% 60% at 90% 88%, rgba(148, 163, 184, 0.06) 0%, transparent 52%);
}

.forum-topic-page--kind-custom-builds {
  --forum-topic-bg-fallback-gradient: linear-gradient(168deg, #e3d7c4 0%, #efe9df 38%, #f7f5f1 100%);
  --forum-topic-bg-pattern:
    radial-gradient(ellipse 110% 85% at 0% 0%, rgba(154, 52, 18, 0.42) 0%, transparent 50%),
    radial-gradient(ellipse 90% 70% at 100% 30%, rgba(234, 88, 12, 0.28) 0%, transparent 46%),
    radial-gradient(ellipse 75% 55% at 40% 100%, rgba(124, 45, 18, 0.22) 0%, transparent 44%);
}

.forum-topic-page--kind-4x4-trails {
  --forum-topic-bg-fallback-gradient: linear-gradient(168deg, #b8d4c4 0%, #d4e8da 32%, #e8f2eb 72%, #f4faf6 100%);
  --forum-topic-bg-pattern:
    radial-gradient(ellipse 120% 90% at 5% 5%, rgba(21, 128, 61, 0.55) 0%, transparent 50%),
    radial-gradient(ellipse 100% 75% at 95% 20%, rgba(34, 197, 94, 0.35) 0%, transparent 46%),
    radial-gradient(ellipse 85% 60% at 50% 100%, rgba(22, 101, 52, 0.32) 0%, transparent 44%);
}

.forum-topic-page--kind-camping {
  --forum-topic-bg-fallback-gradient: linear-gradient(168deg, #c5d6e4 0%, #dde8f0 40%, #eef4f8 100%);
  --forum-topic-bg-pattern:
    radial-gradient(ellipse 100% 80% at 15% 10%, rgba(3, 105, 161, 0.4) 0%, transparent 50%),
    radial-gradient(ellipse 90% 70% at 85% 85%, rgba(14, 165, 233, 0.3) 0%, transparent 46%),
    radial-gradient(ellipse 60% 50% at 55% 40%, rgba(13, 148, 136, 0.22) 0%, transparent 48%);
}

.forum-topic-page--kind-events {
  --forum-topic-bg-fallback-gradient: linear-gradient(168deg, #edd5dc 0%, #f4e6ea 38%, #fbf5f7 100%);
  --forum-topic-bg-pattern:
    radial-gradient(ellipse 95% 80% at 8% 15%, rgba(190, 24, 93, 0.38) 0%, transparent 50%),
    radial-gradient(ellipse 85% 70% at 92% 70%, rgba(244, 63, 94, 0.28) 0%, transparent 46%),
    radial-gradient(ellipse 70% 55% at 50% 0%, rgba(251, 113, 133, 0.22) 0%, transparent 44%);
}

.forum-topic-page--kind-recovery-gear {
  --forum-topic-bg-fallback-gradient: linear-gradient(168deg, #d4d0e4 0%, #e6e4ef 42%, #f3f2f8 100%);
  --forum-topic-bg-pattern:
    radial-gradient(ellipse 100% 85% at 0% 50%, rgba(55, 48, 163, 0.42) 0%, transparent 52%),
    radial-gradient(ellipse 90% 75% at 100% 100%, rgba(99, 102, 241, 0.32) 0%, transparent 48%),
    radial-gradient(ellipse 55% 45% at 70% 20%, rgba(79, 70, 229, 0.24) 0%, transparent 46%);
}

.forum-topic-page--kind-vehicles-mods {
  --forum-topic-bg-fallback-gradient: linear-gradient(168deg, #ddd5eb 0%, #ebe6f2 40%, #f6f4fa 100%);
  --forum-topic-bg-pattern:
    radial-gradient(ellipse 110% 88% at 10% 90%, rgba(91, 33, 182, 0.45) 0%, transparent 52%),
    radial-gradient(ellipse 95% 72% at 95% 15%, rgba(139, 92, 246, 0.3) 0%, transparent 48%),
    radial-gradient(ellipse 65% 50% at 35% 25%, rgba(109, 40, 217, 0.22) 0%, transparent 46%);
}

.forum-topic-page--kind-classifieds-swap {
  --forum-topic-bg-fallback-gradient: linear-gradient(168deg, #e0e8f0 0%, #eaf0f7 42%, #f5f8fc 100%);
  --forum-topic-bg-pattern:
    radial-gradient(ellipse 100% 82% at 0% 100%, rgba(180, 83, 9, 0.45) 0%, transparent 50%),
    radial-gradient(ellipse 90% 78% at 100% 0%, rgba(245, 158, 11, 0.3) 0%, transparent 48%),
    radial-gradient(ellipse 70% 55% at 45% 45%, rgba(217, 119, 6, 0.22) 0%, transparent 46%);
}

.forum-topic-page--kind-tech-mechanical {
  --forum-topic-bg-fallback-gradient: linear-gradient(168deg, #c8dae6 0%, #dde8f0 40%, #eef4f8 100%);
  --forum-topic-bg-pattern:
    radial-gradient(ellipse 105% 85% at 12% 8%, rgba(8, 145, 178, 0.45) 0%, transparent 52%),
    radial-gradient(ellipse 92% 72% at 88% 88%, rgba(6, 182, 212, 0.32) 0%, transparent 48%),
    radial-gradient(ellipse 60% 48% at 50% 50%, rgba(14, 116, 144, 0.22) 0%, transparent 48%);
}

.forum-topic-op-card__question-kind {
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(31, 31, 31, 0.07);
  border: 1px solid rgba(31, 31, 31, 0.1);
}

/* Forum index topic row: colour-coded pills (kind / province / tags) */
.forum-topic-card__pill {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  padding: 0.38em 0.72rem;
  line-height: 1.2;
}

.forum-topic-card__pill--custom-builds {
  background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
  color: #9a3412;
  border-color: rgba(154, 52, 18, 0.28);
}

.forum-topic-card__pill--4x4-trails {
  background: linear-gradient(180deg, #f0fdf4 0%, #dcfce7 100%);
  color: #166534;
  border-color: rgba(22, 101, 52, 0.28);
}

.forum-topic-card__pill--camping {
  background: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 100%);
  color: #075985;
  border-color: rgba(7, 89, 133, 0.26);
}

.forum-topic-card__pill--events {
  background: linear-gradient(180deg, #fdf2f8 0%, #fce7f3 100%);
  color: #9d174d;
  border-color: rgba(157, 23, 77, 0.26);
}

.forum-topic-card__pill--recovery-gear {
  background: linear-gradient(180deg, #eef2ff 0%, #e0e7ff 100%);
  color: #3730a3;
  border-color: rgba(55, 48, 163, 0.28);
}

.forum-topic-card__pill--vehicles-mods {
  background: linear-gradient(180deg, #f5f3ff 0%, #ede9fe 100%);
  color: #5b21b6;
  border-color: rgba(91, 33, 182, 0.28);
}

.forum-topic-card__pill--classifieds-swap {
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
  color: #854d0e;
  border-color: rgba(133, 77, 14, 0.28);
}

.forum-topic-card__pill--tech-mechanical {
  background: linear-gradient(180deg, #ecfeff 0%, #cffafe 100%);
  color: #0e7490;
  border-color: rgba(14, 116, 144, 0.28);
}

.forum-topic-card__pill--loc-south-africa {
  background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
  color: #334155;
  border-color: rgba(51, 65, 85, 0.22);
}

.forum-topic-card__pill--loc-western-cape {
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  color: #1e40af;
  border-color: rgba(30, 64, 175, 0.24);
}

.forum-topic-card__pill--loc-eastern-cape {
  background: linear-gradient(180deg, #ecfeff 0%, #cffafe 100%);
  color: #0f766e;
  border-color: rgba(15, 118, 110, 0.24);
}

.forum-topic-card__pill--loc-northern-cape {
  background: linear-gradient(180deg, #fffbeb 0%, #fef9c3 100%);
  color: #a16207;
  border-color: rgba(161, 98, 7, 0.26);
}

.forum-topic-card__pill--loc-free-state {
  background: linear-gradient(180deg, #f0fdf4 0%, #dcfce7 100%);
  color: #15803d;
  border-color: rgba(21, 128, 61, 0.24);
}

.forum-topic-card__pill--loc-gauteng {
  background: linear-gradient(180deg, #faf5ff 0%, #f3e8ff 100%);
  color: #7e22ce;
  border-color: rgba(126, 34, 206, 0.24);
}

.forum-topic-card__pill--loc-kwazulu-natal {
  background: linear-gradient(180deg, #fdf4ff 0%, #fae8ff 100%);
  color: #a21caf;
  border-color: rgba(162, 28, 175, 0.24);
}

.forum-topic-card__pill--loc-limpopo {
  background: linear-gradient(180deg, #fef2f2 0%, #fee2e2 100%);
  color: #b91c1c;
  border-color: rgba(185, 28, 28, 0.22);
}

.forum-topic-card__pill--loc-mpumalanga {
  background: linear-gradient(180deg, #ecfccb 0%, #d9f99d 100%);
  color: #3f6212;
  border-color: rgba(63, 98, 18, 0.28);
}

.forum-topic-card__pill--loc-north-west {
  background: linear-gradient(180deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  border-color: rgba(146, 64, 14, 0.26);
}
.community-hub-inner {
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  /* No extra top gutter: breadcrumbs sit snug under navbar (gradient already adds air). */
  padding: 0 clamp(0.85rem, 4vw, 2.75rem) 2.5rem;
}

@media (min-width: 768px) {
  .community-hub-inner {
    padding-bottom: 3rem;
  }
}

.community-hub-shell {
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.community-hub-shell--wide {
  max-width: 100%;
}

/* Forum index: side rails for skyscraper / sponsored placements (xl+) */
.community-hub-inner--forum-rails {
  padding-left: clamp(0.65rem, 2.2vw, 1.35rem);
  padding-right: clamp(0.65rem, 2.2vw, 1.35rem);
}

/* Forum index: full-width breadcrumb strip above the hub grid */
.community-hub-breadcrumb-bar {
  width: 100%;
  margin-left: calc(-1 * clamp(0.65rem, 2.2vw, 1.35rem));
  margin-right: calc(-1 * clamp(0.65rem, 2.2vw, 1.35rem));
  padding-left: clamp(0.65rem, 2.2vw, 1.35rem);
  padding-right: clamp(0.65rem, 2.2vw, 1.35rem);
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(31, 31, 31, 0.08);
}

.community-hub-breadcrumb-bar__nav .breadcrumb {
  margin-bottom: 0;
  margin-top: 0;
  padding-top: 0.35rem;
  font-size: 0.875rem;
}

.community-hub-breadcrumb-bar .breadcrumb > .breadcrumb-item a {
  color: #5c636a;
  text-decoration: none;
}

.community-hub-breadcrumb-bar .breadcrumb > .breadcrumb-item a:hover {
  color: var(--tt4x4-red);
}

.community-hub-three-col {
  display: grid;
  gap: clamp(1rem, 2.4vw, 1.65rem);
  width: 100%;
  margin-inline: auto;
  align-items: start;
}

@media (max-width: 1199.98px) {
  .community-hub-ad-rail {
    display: none;
  }

  .community-hub-three-col {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1200px) {
  .community-hub-three-col {
    grid-template-columns: minmax(152px, 210px) minmax(0, 56rem) minmax(152px, 210px);
    max-width: min(1280px, 100%);
    margin-inline: auto;
  }

  .community-hub-ad-rail {
    position: sticky;
    top: calc(4.75rem + env(safe-area-inset-top, 0px));
  }

  .community-hub-shell--forum-main {
    width: 100%;
    min-width: 0;
    max-width: 56rem;
    margin-inline: auto;
  }
}

.community-hub-ad-rail {
  min-width: 0;
}

.community-hub-ad-slot {
  min-height: min(560px, 72vh);
  border-radius: 0.85rem;
}

/* Quiet reserve until an ad snippet mounts inside the slot */
.community-hub-ad-slot:empty {
  background: rgba(255, 255, 255, 0.28);
}

.community-hub-ad-slot:not(:empty) {
  min-height: 0;
  background: transparent;
}

/* Forum index: vertical rails + FAB */
.community-hub-page-bg--forum-index {
  padding-bottom: max(5.25rem, calc(3.5rem + env(safe-area-inset-bottom, 0px)));
}

.forum-rail-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 0;
}

.forum-rail-banner {
  display: block;
  border-radius: 0.65rem;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(31, 31, 31, 0.06);
  box-shadow: 0 1px 3px rgba(31, 31, 31, 0.05);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

a.forum-rail-banner--listing:hover {
  border-color: rgba(31, 31, 31, 0.12);
  box-shadow: 0 6px 20px rgba(31, 31, 31, 0.08);
  color: inherit;
}

.forum-rail-banner__media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 118px;
  background: #f1f3f6;
  overflow: hidden;
}

.forum-rail-banner__media--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b0b8c2;
  font-size: 1.15rem;
}

.forum-rail-banner__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.forum-rail-banner__body {
  padding: 0.55rem 0.65rem 0.65rem;
}

.forum-rail-banner__title {
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.35;
  color: #1f2328;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.forum-rail-banner__price {
  font-size: 0.72rem;
  font-weight: 700;
  color: #3d4450;
  margin: 0.2rem 0 0;
}

.forum-rail-banner--cta {
  padding: 0.85rem 0.7rem 0.95rem;
  text-align: center;
  background: #fafbfc;
  border: 1px dashed rgba(31, 31, 31, 0.12);
}

.forum-rail-banner__cta-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #1f2328;
  margin: 0 0 0.35rem;
  line-height: 1.3;
}

.forum-rail-banner__cta-text {
  font-size: 0.68rem;
  color: #6c757d;
  line-height: 1.35;
  margin: 0 0 0.55rem;
}

.forum-rail-banner__cta-subtle {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.65rem;
  color: #6c757d;
  text-decoration: none;
}

.forum-rail-banner__cta-subtle:hover {
  color: var(--tt4x4-red);
}

.forum-index-fab {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right, 0px));
  bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  z-index: 1040;
  padding: 0.85rem 1.2rem;
  box-shadow: 0 10px 36px rgba(196, 31, 37, 0.35) !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.forum-index-fab:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.85);
  outline-offset: 3px;
}

@media (min-width: 1200px) {
  .forum-index-fab {
    right: max(1.25rem, calc(1rem + env(safe-area-inset-right, 0px)));
    bottom: max(1.25rem, calc(1rem + env(safe-area-inset-bottom, 0px)));
  }
}

/* Comfortable reading measure for threads */
.community-hub-shell--readable {
  max-width: min(42rem, 100%);
}

@media (min-width: 768px) {
  .community-hub-shell--readable {
    max-width: min(46rem, 100%);
  }
}

/* Breadcrumb + Forum/Inbox toggle on one strip */
.community-hub-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1.25rem;
  margin-bottom: 1.1rem;
}

.community-hub-topbar .community-hub-breadcrumb {
  margin-bottom: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.community-hub-topbar .community-hub-tabs-wrap {
  margin-bottom: 0;
}

@media (max-width: 576px) {
  .community-hub-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .community-hub-topbar .community-hub-tabs {
    width: 100%;
    justify-content: center;
  }
}

/* Segmented tabs: Forum | Inbox */
.community-hub-tabs-wrap {
  margin-bottom: 1.25rem;
}

.community-hub-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.35rem;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(31, 31, 31, 0.08);
  border-radius: 999px;
  box-shadow: 0 2px 12px rgba(31, 31, 31, 0.05);
}

.community-hub-tabs__item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 1.1rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  color: #444;
  border: 1px solid transparent;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    transform 0.12s ease;
}

.community-hub-tabs__item i {
  font-size: 0.92rem;
  opacity: 0.85;
}

.community-hub-tabs__item:hover {
  background: rgba(196, 31, 37, 0.08);
  color: var(--tt4x4-red);
}

.community-hub-tabs__item.is-active {
  background: var(--tt4x4-red);
  color: #fff;
  border-color: rgba(196, 31, 37, 0.45);
}

.community-hub-tabs__item.is-active i {
  color: inherit;
}

.community-hub-tabs__item--ghost {
  opacity: 0.75;
}

.community-hub-tabs__item--ghost:hover {
  opacity: 1;
}

/* Hero card */
.community-hub-hero {
  background: #fff;
  border: 1px solid rgba(31, 31, 31, 0.07);
  border-radius: 1rem;
  box-shadow: 0 8px 30px rgba(31, 31, 31, 0.07);
  padding: 1.5rem 1.5rem 1.65rem;
  margin-bottom: 1.75rem;
  position: relative;
  overflow: hidden;
}

.community-hub-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--tt4x4-red), #ff6b54 55%, rgba(255, 196, 0, 0.55));
  border-radius: 1rem 1rem 0 0;
}

.community-hub-hero__title {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--tt4x4-black);
  margin-bottom: 0.35rem;
}

.community-hub-hero__lead {
  color: #5c636a;
  font-size: 0.95rem;
  max-width: 36rem;
  margin-bottom: 1.1rem;
}

.community-hub-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

/* Breadcrumb on hub pages: first row under header; space before tabs */
.community-hub-breadcrumb {
  margin-top: 0.35rem;
  margin-bottom: 0.65rem;
}

.community-hub-breadcrumb .breadcrumb {
  margin-bottom: 0;
  margin-top: 0;
  padding-top: 0;
  font-size: 0.875rem;
}

.community-hub-breadcrumb .breadcrumb > .breadcrumb-item a {
  color: #5c636a;
  text-decoration: none;
}

.community-hub-breadcrumb .breadcrumb > .breadcrumb-item a:hover {
  color: var(--tt4x4-red);
}

/* Topic list */
.forum-topic-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.forum-topic-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid rgba(31, 31, 31, 0.07);
  border-radius: 0.85rem;
  padding: 1.1rem 1.2rem;
  box-shadow: 0 2px 10px rgba(31, 31, 31, 0.04);
  transition:
    transform 0.14s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.forum-topic-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(31, 31, 31, 0.1);
  border-color: rgba(196, 31, 37, 0.2);
}

.forum-topic-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--tt4x4-black);
  margin: 0 0 0.35rem;
  line-height: 1.35;
}

.forum-topic-card__meta {
  font-size: 0.8rem;
  color: #6c757d;
}

.forum-topic-card__badge {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.35em 0.65rem;
  border-radius: 999px;
  background: #eef1f7;
  color: #3d4450;
}

.forum-topic-card:hover .forum-topic-card__badge {
  background: rgba(196, 31, 37, 0.1);
  color: var(--tt4x4-red);
}

.community-hub-empty {
  background: linear-gradient(135deg, #fafbfc, #ffffff);
  border: 1px dashed rgba(31, 31, 31, 0.12);
  border-radius: 1rem;
  padding: 1.65rem 1.5rem;
  text-align: center;
}

.community-hub-empty p {
  margin: 0;
  color: #5c636a;
}

.pagination.forum-pagination .page-link {
  border-radius: 0.5rem;
  margin: 0 0.15rem;
}

.pagination.forum-pagination .page-item.active .page-link {
  background-color: var(--tt4x4-red);
  border-color: var(--tt4x4-red);
}

/* Inbox thread rows (reuse card feel) */
.inbox-thread-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid rgba(31, 31, 31, 0.07);
  border-radius: 0.85rem;
  padding: 1rem 1.15rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 2px 10px rgba(31, 31, 31, 0.04);
  transition:
    transform 0.14s ease,
    box-shadow 0.18s ease;
}

.inbox-thread-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(31, 31, 31, 0.09);
}

.inbox-thread-card__thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 0.65rem;
  border: 1px solid rgba(31, 31, 31, 0.06);
}

.inbox-thread-card__ph {
  width: 72px;
  height: 72px;
  border-radius: 0.65rem;
  background: linear-gradient(135deg, #f0f2f6, #e8ebf0);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9aa3ad;
}

@media (max-width: 576px) {
  .community-hub-hero {
    padding: 1.25rem 1.15rem;
  }

  .community-hub-tabs {
    width: 100%;
    justify-content: center;
  }
}

/* --- Forum topic (thread view) --- */

.forum-topic-op-card {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
  border: 1px solid rgba(31, 31, 31, 0.08);
  border-radius: 1.15rem;
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.85) inset,
    0 18px 48px rgba(24, 32, 45, 0.08),
    0 4px 14px rgba(24, 32, 45, 0.04);
  padding: clamp(1.25rem, 3vw, 1.85rem);
  margin-bottom: 2rem;
  overflow: hidden;
}

.forum-topic-op-card__ribbon {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--tt4x4-red), #ff6b54 52%, rgba(255, 196, 0, 0.55));
  border-radius: 1.15rem 1.15rem 0 0;
  pointer-events: none;
}

.forum-topic-op-card__header {
  margin-bottom: 1.1rem;
}

.forum-topic-op-card__eyebrow {
  margin: 0 0 0.45rem;
}

.forum-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.32em 0.65rem;
}

.forum-badge--starter {
  background: rgba(196, 31, 37, 0.1);
  color: var(--tt4x4-red);
  border: 1px solid rgba(196, 31, 37, 0.18);
}

.forum-topic-op-card__title {
  font-size: clamp(1.35rem, 2.9vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.2;
  color: var(--tt4x4-black);
  margin: 0;
}

.forum-post-row {
  display: flex;
  align-items: flex-start;
  gap: clamp(0.65rem, 2vw, 1.05rem);
}

.forum-post-row__rail {
  flex-shrink: 0;
}

.forum-post-row__body {
  flex: 1;
  min-width: 0;
}

.forum-post-row--op .forum-post-row__rail {
  padding-top: 0.2rem;
}

.forum-post-row--reply .forum-post-row__rail {
  padding-top: 0.85rem;
}

.forum-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #3d4552;
  background: linear-gradient(145deg, #eef1f7, #e2e7f1);
  border: 1px solid rgba(31, 31, 31, 0.08);
  box-shadow: 0 2px 6px rgba(31, 31, 31, 0.05);
}

.forum-avatar--starter {
  width: 3rem;
  height: 3rem;
  font-size: 0.82rem;
  border-radius: 50%;
  color: var(--tt4x4-red);
  background: linear-gradient(155deg, #fff6f6, #fdeaea);
  border-color: rgba(196, 31, 37, 0.22);
  box-shadow: 0 4px 12px rgba(196, 31, 37, 0.12);
}

/* Profile photos (`users.avatar` → `/admin/uploads/...`): replaces initials pills */
.forum-avatar-photo {
  display: inline-flex;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(238, 241, 247, 0.9);
  border: 1px solid rgba(31, 31, 31, 0.1);
  box-shadow: 0 2px 8px rgba(31, 31, 31, 0.08);
}

.forum-avatar-photo .forum-avatar__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.forum-avatar-photo.forum-avatar-photo--starter,
.forum-avatar-photo.forum-avatar-photo--op {
  width: 3.15rem;
  height: 3.15rem;
  border-radius: 50%;
  border-color: rgba(196, 31, 37, 0.22);
  box-shadow: 0 4px 14px rgba(196, 31, 37, 0.12);
}

.forum-avatar-photo.forum-avatar-photo--reply {
  width: 2.5rem;
  height: 2.5rem;
}

.forum-avatar-photo.forum-avatar-photo--topic-list {
  width: 2.85rem;
  height: 2.85rem;
}

.forum-topic-op-card__province {
  font-size: 0.75rem;
  font-weight: 700;
}

.forum-topic-op-card__topic-tag {
  font-size: 0.75rem;
  font-weight: 600;
}

/* Topic page: tag chips as branded CTAs → forum filter */
a.forum-topic-tag-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 100%;
  padding: 0.22rem 0.65rem 0.22rem 0.28rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: #fff !important;
  background: linear-gradient(145deg, var(--tt4x4-red) 0%, #b01822 48%, #9a1520 100%);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.22) inset,
    0 4px 14px rgba(196, 31, 37, 0.28);
  transition:
    transform 0.12s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease;
}

a.forum-topic-tag-cta:hover {
  color: #fff !important;
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.28) inset,
    0 8px 22px rgba(196, 31, 37, 0.38);
}

a.forum-topic-tag-cta:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 2px;
}

.forum-topic-tag-cta__thumb {
  flex-shrink: 0;
  width: 1.62rem;
  height: 1.62rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.forum-topic-tag-cta__glyph {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.62rem;
  height: 1.62rem;
  border-radius: 50%;
  font-size: 0.65rem;
  background: rgba(0, 0, 0, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.forum-topic-tag-cta__label {
  min-width: 0;
  white-space: normal;
}

.forum-tag-fieldset legend {
  color: var(--tt4x4-black);
}

.forum-post-meta {
  font-size: 0.845rem;
  color: #6c757d;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
}

.forum-post-meta--op {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px dashed rgba(31, 31, 31, 0.1);
}

.forum-post-meta__author {
  font-weight: 600;
  color: #2f343b;
}

.forum-post-meta__dot::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #c9ced6;
  vertical-align: middle;
}

.forum-post-meta--compact time {
  color: #7a8490;
}

.forum-post-meta__num {
  margin-left: 0.15rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #8b95a4;
  background: rgba(138, 153, 168, 0.12);
  padding: 0.2em 0.45rem;
  border-radius: 0.35rem;
}

.forum-body--thread {
  font-size: 1.04rem;
  line-height: 1.72;
  color: #282c33;
}

.forum-body--reply {
  font-size: 0.98rem;
  line-height: 1.65;
  margin-top: 0.65rem;
  color: #2f343b;
}

.forum-body-link {
  word-break: break-word;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  color: #0b5fff;
}

.forum-body-link:hover {
  color: var(--tt4x4-red);
}

.forum-post-body-image-wrap {
  max-width: min(680px, 100%);
}

.forum-post-body-image-link {
  display: inline-block;
  max-width: 100%;
}

.forum-post-body-image {
  display: block;
  max-height: min(70vh, 520px);
  width: auto;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.forum-post-actions {
  padding-top: 1rem;
  border-top: 1px solid rgba(31, 31, 31, 0.06);
}

.forum-replies-region {
  margin-bottom: 0.35rem;
}

.forum-replies-region__toolbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 2px solid rgba(31, 31, 31, 0.06);
}

.forum-replies-region__title {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--tt4x4-black);
  margin: 0;
}

.forum-replies-region__count {
  font-size: 0.8rem;
  font-weight: 700;
  color: #5c6470;
  background: rgba(238, 241, 247, 0.95);
  border: 1px solid rgba(31, 31, 31, 0.06);
  padding: 0.38em 0.72rem;
  border-radius: 999px;
  white-space: nowrap;
}

.forum-replies-empty {
  /* Let the page backdrop show through — solid fills looked like a broken “gray slab” */
  background: transparent;
  border: 1px dashed rgba(31, 31, 31, 0.12);
  border-radius: 1rem;
  padding: 2.25rem 1.5rem 2rem;
  text-align: center;
  margin-bottom: 1rem;
}

.forum-replies-empty__icon {
  font-size: 1.85rem;
  color: rgba(196, 31, 37, 0.35);
  margin-bottom: 0.85rem;
}

.forum-replies-empty__title {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.45rem;
  color: var(--tt4x4-black);
}

.forum-replies-empty__text {
  margin: 0;
  font-size: 0.92rem;
  color: #5c6470;
  max-width: 22rem;
  margin-inline: auto;
  line-height: 1.5;
}

.forum-reply-stack {
  scroll-margin-top: calc(72px + 1rem);
  margin-bottom: 0.5rem;
}

/* Classified enquiry blocks (avoid doubling styles when paired with --styled) */
.forum-reply-card:not(.forum-reply-card--styled) {
  background: #fff;
  border: 1px solid rgba(31, 31, 31, 0.07);
  border-radius: 0.85rem;
  padding: 1.15rem 1.25rem;
  margin-bottom: 0.85rem;
  box-shadow: 0 2px 12px rgba(31, 31, 31, 0.04);
}

.forum-reply-card--styled {
  background: #fff;
  border: 1px solid rgba(31, 31, 31, 0.07);
  border-radius: 0.95rem;
  padding: 1rem 1.15rem 1.05rem;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 10px 28px rgba(24, 32, 45, 0.06);
  transition:
    border-color 0.18s ease,
    box-shadow 0.2s ease;
}

.forum-reply-stack:hover .forum-reply-card--styled {
  border-color: rgba(196, 31, 37, 0.15);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 14px 36px rgba(24, 32, 45, 0.09);
}

.forum-reply-card__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem 1rem;
}

.forum-report-link {
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  color: #9aa3ae;
}

.forum-report-link:hover {
  color: var(--tt4x4-red);
}

.forum-reply-form-card {
  border-radius: 1rem;
}

.forum-reply-form-card--elevated {
  border: 1px solid rgba(196, 31, 37, 0.16);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 16px 40px rgba(196, 31, 37, 0.08),
    0 6px 18px rgba(31, 31, 31, 0.05);
}

.forum-reply-form-card__heading {
  color: var(--tt4x4-black);
}

.forum-reply-form-card__accent {
  display: inline-block;
  width: 3px;
  height: 1.1em;
  margin-right: 0.55rem;
  border-radius: 2px;
  vertical-align: -0.12em;
  background: linear-gradient(180deg, var(--tt4x4-red), #ffa08a);
}

.forum-reply-form-card__hint {
  max-width: 16rem;
  text-align: right;
}

.forum-textarea-enhanced {
  border: 1px solid rgba(31, 31, 31, 0.1);
  background: linear-gradient(180deg, #fcfcfd, #fafbfc);
  font-size: 0.95rem;
  line-height: 1.55;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.forum-textarea-enhanced:focus {
  border-color: rgba(196, 31, 37, 0.35);
  box-shadow: 0 0 0 3px rgba(196, 31, 37, 0.12);
  background: #fff;
}

.forum-btn-post {
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}

.forum-btn-post:hover {
  transform: translateY(-1px);
}

.community-link-accent {
  color: var(--tt4x4-red);
}

.community-link-accent:hover {
  color: var(--tt4x4-red-dark, #a01820);
}

.forum-topic-footer {
  margin-top: 2.25rem;
  padding-top: 1rem;
}

.forum-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: #5c636a;
  text-decoration: none;
}

.forum-back-link:hover {
  color: var(--tt4x4-red);
}

.forum-back-link--chip {
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(31, 31, 31, 0.07);
  box-shadow: 0 4px 14px rgba(31, 31, 31, 0.05);
}

.forum-back-link--chip:hover {
  border-color: rgba(196, 31, 37, 0.25);
}

/* My forum activity (my-forum.php) */
.my-forum-page .my-forum-page__h-icon--topics {
  color: var(--tt4x4-red);
}

.my-forum-page .my-forum-page__h-icon--replies {
  color: #b45309;
}

.my-forum-page .my-forum-page__link-cta {
  color: var(--tt4x4-red);
  font-weight: 600;
  text-decoration: none;
}

.my-forum-page .my-forum-page__link-cta:hover {
  color: var(--tt4x4-red-dark, #a01820);
  text-decoration: underline;
}

.my-forum-page .my-forum-page__btn-view {
  border: 2px solid var(--tt4x4-red);
  color: var(--tt4x4-red);
  background: rgba(196, 31, 37, 0.07);
  font-weight: 600;
  pointer-events: none;
}

.my-forum-page a.forum-topic-card:hover .my-forum-page__btn-view {
  background: var(--tt4x4-red);
  color: #fff;
  border-color: var(--tt4x4-red);
}

.my-forum-page .my-forum-page__btn-open-thread {
  font-weight: 600;
  color: #fff;
  border: none;
  background: linear-gradient(145deg, #9a3412 0%, #c2410c 52%, #d97706 100%);
  box-shadow: 0 4px 14px rgba(154, 52, 18, 0.28);
}

.my-forum-page .my-forum-page__btn-open-thread:hover {
  color: #fff;
  filter: brightness(1.06);
}

.my-forum-page .my-forum-page__btn-open-thread:focus-visible {
  box-shadow: 0 0 0 0.2rem rgba(194, 65, 12, 0.35);
}

.my-forum-page .my-forum-page__back.forum-back-link--chip {
  border-color: rgba(196, 31, 37, 0.38);
  color: var(--tt4x4-red);
  font-weight: 700;
}

.my-forum-page .my-forum-page__back.forum-back-link--chip i {
  color: var(--tt4x4-red);
}

.my-forum-page .my-forum-page__back.forum-back-link--chip:hover {
  background: rgba(196, 31, 37, 0.08);
  color: var(--tt4x4-red-dark, #a01820);
}

.forum-guest-nudge.community-hub-empty {
  background: rgba(255, 255, 255, 0.75);
}

@media (max-width: 576px) {
  .forum-post-row--reply {
    gap: 0.55rem;
  }

  .forum-avatar {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 0.68rem;
  }

  .forum-avatar--starter {
    width: 2.65rem;
    height: 2.65rem;
  }

  .forum-avatar-photo.forum-avatar-photo--starter,
  .forum-avatar-photo.forum-avatar-photo--op {
    width: 2.85rem;
    height: 2.85rem;
  }

  .forum-avatar-photo.forum-avatar-photo--reply {
    width: 2.35rem;
    height: 2.35rem;
  }

  .forum-avatar-photo.forum-avatar-photo--topic-list {
    width: 2.65rem;
    height: 2.65rem;
  }

  .forum-reply-form-card__hint {
    text-align: left;
    max-width: none;
    width: 100%;
    order: 3;
  }
}

.community-hub-form-card {
  background: #fff;
  border: 1px solid rgba(31, 31, 31, 0.08);
  border-radius: 1rem;
  box-shadow: 0 8px 28px rgba(31, 31, 31, 0.07);
  padding: 1.5rem 1.5rem;
}

/* Forum index filter: two calm rows: search+area+actions, then topic chips */
.forum-filter-form {
  padding: 1.1rem 1.2rem;
  border-radius: 1rem;
}

.forum-filter-form__row--top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.75rem;
}

.forum-filter-form__search {
  flex: 1 1 14rem;
  min-width: min(100%, 10rem);
}

.forum-filter-form__search-inner {
  position: relative;
  display: block;
}

.forum-filter-form__search-icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9aa3ae;
  font-size: 0.88rem;
  pointer-events: none;
}

.forum-filter-form__search-input {
  padding-left: 2.45rem;
  padding-top: 0.52rem;
  padding-bottom: 0.52rem;
  border-radius: 0.75rem;
  border-color: rgba(31, 31, 31, 0.12);
  font-size: 0.92rem;
}

.forum-filter-form__search-input:focus {
  border-color: rgba(196, 31, 37, 0.35);
  box-shadow: 0 0 0 3px rgba(196, 31, 37, 0.1);
}

.forum-filter-form__area {
  flex: 0 1 220px;
  min-width: min(100%, 200px);
}

.forum-filter-form__area-select {
  border-radius: 0.75rem;
  border-color: rgba(31, 31, 31, 0.12);
  padding-top: 0.52rem;
  padding-bottom: 0.52rem;
  font-size: 0.92rem;
}

.forum-filter-form__area-select:focus {
  border-color: rgba(196, 31, 37, 0.35);
  box-shadow: 0 0 0 3px rgba(196, 31, 37, 0.1);
}

.forum-filter-form__row--chips {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(31, 31, 31, 0.06);
}

.forum-filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.forum-filter-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin: 0;
  cursor: pointer;
  user-select: none;
}

.forum-filter-chip__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.forum-filter-chip__text {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(31, 31, 31, 0.09);
  background: #f6f7fa;
  color: #3d4450;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.forum-filter-chip:hover .forum-filter-chip__text {
  border-color: rgba(196, 31, 37, 0.22);
  color: var(--tt4x4-black);
  background: #fff;
}

.forum-filter-chip__input:focus-visible + .forum-filter-chip__text {
  outline: 2px solid rgba(196, 31, 37, 0.45);
  outline-offset: 2px;
}

.forum-filter-chip__input:checked + .forum-filter-chip__text {
  background: rgba(196, 31, 37, 0.1);
  border-color: rgba(196, 31, 37, 0.32);
  color: var(--tt4x4-red-dark, #a01820);
  box-shadow: 0 1px 6px rgba(196, 31, 37, 0.1);
}
