/* ═══════════════════════════════════════════════════════════════
   WOLD Forum Archive — supplemental styles
   Loaded after aurora.css. Uses Aurora's --teal / --purple / --card tokens.
   ═══════════════════════════════════════════════════════════════ */

/* Push content below the fixed nav (which is 64px tall) */
.container {
  padding-top: 88px;
  padding-bottom: 96px;
}

/* ── Archive banner ─────────────────────────────────────────── */
.forum-banner {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 28px;
  font-size: 0.92rem;
  color: var(--text-dim);
  line-height: 1.55;
}
.forum-banner strong {
  color: var(--teal);
  margin-right: 10px;
  font-family: var(--heading);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ── Breadcrumb ─────────────────────────────────────────────── */
.forum-breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 0;
  margin: 0 0 24px 0;
  font-size: 0.88rem;
  color: var(--text-dim);
}
.forum-breadcrumb li::after { content: ' / '; color: var(--text-dim); margin-left: 12px; opacity: 0.4; }
.forum-breadcrumb li:last-child::after { content: none; }
.forum-breadcrumb a { color: var(--text-dim); }
.forum-breadcrumb a:hover { color: var(--teal); }
.forum-breadcrumb [aria-current="page"] { color: var(--text); }

/* ── Hero ───────────────────────────────────────────────────── */
.forum-hero {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 36px;
}
.forum-hero h1 {
  font-family: var(--heading);
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 14px;
  background: linear-gradient(135deg, var(--teal) 0%, var(--purple) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.forum-hero-lead {
  color: var(--text-dim);
  margin-bottom: 24px;
  max-width: 70ch;
}
.forum-hero-lead strong { color: var(--text); font-weight: 600; }

/* ── Search box ─────────────────────────────────────────────── */
.forum-search {
  display: flex;
  gap: 10px;
  max-width: 560px;
}
.forum-search input[type="search"] {
  flex: 1;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: rgba(0,0,0,0.25);
  color: var(--text);
  font-family: var(--body);
  font-size: 1rem;
}
.forum-search input[type="search"]:focus {
  outline: none;
  border-color: var(--teal);
  background: rgba(0,0,0,0.4);
}
.forum-search button {
  padding: 12px 22px;
  border-radius: 999px;
  border: none;
  background: var(--teal);
  color: #062a25;
  font-family: var(--heading);
  font-weight: 600;
  cursor: pointer;
  transition: 0.25s;
}
.forum-search button:hover { background: #5eead4; }
.forum-search-large { max-width: 720px; margin-top: 18px; }

/* ── Section / category grid ───────────────────────────────── */
.forum-section { margin: 40px 0; }
.forum-section h2 {
  font-family: var(--heading);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 18px;
  color: var(--text);
}

.forum-cats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.forum-cat-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 22px 24px;
  text-decoration: none;
  transition: 0.25s;
}
.forum-cat-card:hover {
  background: var(--card-hover);
  border-color: var(--teal);
  transform: translateY(-2px);
}
.forum-cat-card h3 {
  font-family: var(--heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.forum-cat-desc {
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.5;
  margin-bottom: 12px;
}
.forum-cat-stats {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin: 0;
}
.forum-cat-stats strong { color: var(--teal); font-weight: 600; }

/* ── Top-list ───────────────────────────────────────────────── */
.forum-top-list { list-style: none; padding: 0; counter-reset: top-counter; }
.forum-top-list li {
  counter-increment: top-counter;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 14px 18px 14px 56px;
  margin-bottom: 10px;
  position: relative;
}
.forum-top-list li::before {
  content: counter(top-counter);
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--teal);
  font-family: var(--heading);
  font-weight: 700;
  font-size: 1.3rem;
  min-width: 24px;
  text-align: center;
}
.forum-top-link { font-weight: 500; }
.forum-top-meta { display: block; color: var(--text-dim); font-size: 0.85rem; margin-top: 4px; }

/* ── Category page: topics table ────────────────────────────── */
.forum-category-header {
  margin-bottom: 28px;
}
.forum-category-header h1 {
  font-family: var(--heading);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.forum-category-desc { color: var(--text-dim); margin-bottom: 8px; }
.forum-category-stats { color: var(--text-dim); font-size: 0.9rem; }
.forum-category-stats strong { color: var(--teal); }

.forum-topics {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  overflow: hidden;
}
.forum-topics thead {
  background: rgba(255,255,255,0.04);
}
.forum-topics th, .forum-topics td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--card-border);
  text-align: left;
}
.forum-topics th {
  font-family: var(--heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.forum-topics tr:last-child td { border-bottom: none; }
.forum-topics .forum-th-replies, .forum-topics .forum-th-views,
.forum-topics .forum-td-num { text-align: center; width: 70px; }
.forum-topics .forum-th-last, .forum-topics .forum-td-date { width: 110px; color: var(--text-dim); font-size: 0.88rem; }
.forum-topics .forum-td-num { color: var(--text-dim); font-variant-numeric: tabular-nums; }
.forum-topics .forum-topic-link { font-weight: 500; }
.forum-topics .forum-topic-author { color: var(--text-dim); font-size: 0.82rem; margin-top: 4px; }

/* ── Topic page: posts ──────────────────────────────────────── */
.forum-topic-header {
  margin-bottom: 28px;
}
.forum-topic-header h1 {
  font-family: var(--heading);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.25;
}
.forum-topic-meta { color: var(--text-dim); font-size: 0.9rem; }

.forum-post {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 18px;
}
.forum-post-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--card-border);
}
.forum-post-author a {
  font-family: var(--heading);
  font-weight: 600;
  color: var(--teal);
}
.forum-post-meta { color: var(--text-dim); font-size: 0.85rem; }
.forum-post-meta a { color: var(--text-dim); }
.forum-post-meta a:hover { color: var(--teal); }
.forum-post-subject {
  font-family: var(--heading);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}

/* Post body: prose styling */
.forum-post-body { line-height: 1.7; color: var(--text); }
.forum-post-body p { margin-bottom: 14px; }
.forum-post-body p:last-child { margin-bottom: 0; }
.forum-post-body a {
  color: var(--teal);
  text-decoration: underline;
  text-decoration-color: rgba(45, 212, 191, 0.4);
  text-underline-offset: 3px;
}
.forum-post-body strong { color: var(--text); font-weight: 600; }
.forum-post-body em { color: var(--text); font-style: italic; }
.forum-post-body ul, .forum-post-body ol {
  margin: 12px 0 14px 24px;
  padding: 0;
}
.forum-post-body li { margin-bottom: 6px; }
.forum-post-body pre {
  background: rgba(0,0,0,0.35);
  padding: 14px 18px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 12px 0;
  font-size: 0.88rem;
}
.forum-post-body code {
  background: rgba(0,0,0,0.35);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.92em;
}
.forum-post-body pre code { background: none; padding: 0; }

/* Quoted post inside a reply */
.fa-quote {
  background: rgba(168, 85, 247, 0.06);
  border-left: 3px solid var(--purple);
  padding: 12px 16px;
  margin: 14px 0;
  border-radius: 0 8px 8px 0;
}
.fa-quote cite {
  display: block;
  font-style: normal;
  font-size: 0.82rem;
  color: var(--purple);
  font-family: var(--heading);
  font-weight: 600;
  margin-bottom: 8px;
}
.fa-quote-body { color: var(--text-dim); font-size: 0.95rem; }
.fa-quote-body p:last-child { margin-bottom: 0; }

/* User-uploaded images in posts */
.fa-img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 10px 0;
  border: 1px solid var(--card-border);
}
.fa-attachment {
  margin: 18px 0;
  padding: 12px;
  background: rgba(0,0,0,0.2);
  border-radius: 10px;
  border: 1px solid var(--card-border);
  text-align: center;
}
.fa-attachment img { margin: 0 auto; }
.fa-attachment figcaption {
  margin-top: 8px;
  color: var(--text-dim);
  font-size: 0.82rem;
  font-style: italic;
}

/* ── Topic footer ───────────────────────────────────────────── */
.forum-topic-footer {
  margin-top: 36px;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  text-align: center;
  color: var(--text-dim);
}

/* ── Pagination ─────────────────────────────────────────────── */
.forum-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 32px 0;
  font-size: 0.92rem;
}
.forum-pagination a {
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--card-border);
}
.forum-pagination a:hover { border-color: var(--teal); background: var(--card-hover); }
.forum-page-pos { color: var(--text-dim); }

/* ── Search results ─────────────────────────────────────────── */
.forum-search-header { margin-bottom: 28px; }
.forum-search-header h1 {
  font-family: var(--heading);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 14px;
}
.forum-search-error { color: #f87171; padding: 14px 18px; background: rgba(239, 68, 68, 0.1); border-radius: 8px; }
.forum-search-hint, .forum-search-empty, .forum-search-summary {
  color: var(--text-dim);
  margin-bottom: 20px;
}
.forum-search-results { list-style: none; padding: 0; }
.forum-search-result {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 18px 22px;
  margin-bottom: 14px;
}
.forum-search-title {
  font-family: var(--heading);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.forum-search-meta { color: var(--text-dim); font-size: 0.85rem; margin-bottom: 8px; }
.forum-search-snippet { color: var(--text-dim); font-size: 0.92rem; line-height: 1.55; margin: 0; }

/* ── User page ──────────────────────────────────────────────── */
.forum-user-header { margin-bottom: 28px; }
.forum-user-header h1 {
  font-family: var(--heading);
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--teal) 0%, var(--purple) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 8px;
}
.forum-user-meta { color: var(--text-dim); }
.forum-user-meta strong { color: var(--teal); }
.forum-user-posts { list-style: none; padding: 0; }
.forum-user-posts li {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 12px;
}
.forum-user-post-link { font-family: var(--heading); font-weight: 600; font-size: 1rem; }
.forum-user-post-meta { color: var(--text-dim); font-size: 0.85rem; margin: 4px 0 8px; }
.forum-user-post-snippet { color: var(--text-dim); font-size: 0.92rem; line-height: 1.55; margin: 0; }
