/* Forum theme for zanoza-news.com — modern card+thread layout.
   Sits on top of /assets/application-*.css which provides chrome (header/footer/nav). */

:root {
  --fbg: #f6f7f9;
  --fbg-card: #fff;
  --fborder: #e5e7eb;
  --fmuted: #6b7280;
  --ftext: #1f2937;
  --faccent: #d33;       /* Zanoza red */
  --faccent-soft: #fde8e8;
  --fshadow: 0 1px 2px rgba(0,0,0,.04), 0 1px 3px rgba(0,0,0,.06);
}

body.page-forum { background: var(--fbg); }
.forum-main { padding: 26px 20px 60px; max-width: 1100px; margin: 0 auto; box-sizing: border-box; }
.forum-main h1, .forum-main h2 { font-family: Muli, system-ui, sans-serif; color: var(--ftext); }
.forum-main a { display: inline; }  /* defend against global a{display:block} site reset */

/* ---------- breadcrumbs ---------- */
.breadcrumbs { font-size: .92em; color: var(--fmuted); margin: 0 0 18px; }
.breadcrumbs a { color: var(--fmuted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--faccent); }

/* ---------- hero & subhero ---------- */
.forum-hero {
  background: var(--fbg-card); border: 1px solid var(--fborder); border-radius: 12px;
  padding: 24px 26px; box-shadow: var(--fshadow); margin-bottom: 22px;
}
.forum-hero h1 { font-size: 1.85em; font-weight: 800; margin: 0 0 8px; letter-spacing: -0.01em; }
.forum-hero p  { color: #444; margin: 0; max-width: 760px; line-height: 1.55; }
.forum-stats { display: flex; gap: 22px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--fborder); font-size: .92em; color: var(--fmuted); }
.forum-stats b { color: var(--ftext); font-weight: 800; }

.forum-subhero {
  background: var(--fbg-card); border: 1px solid var(--fborder); border-radius: 12px;
  padding: 20px 22px; box-shadow: var(--fshadow); margin-bottom: 18px;
  display: flex; align-items: center; gap: 18px;
}
.forum-subhero__icon { font-size: 2.6em; line-height: 1; }
.forum-subhero h1 { font-size: 1.6em; margin: 0 0 4px; font-weight: 800; }
.forum-subhero p  { color: var(--fmuted); margin: 0; }

/* ---------- subforum grid (index) ---------- */
.forum-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px;
}
@media (max-width: 720px) { .forum-grid { grid-template-columns: 1fr; } }

.forum-card {
  display: flex !important; gap: 14px; background: var(--fbg-card); border: 1px solid var(--fborder);
  border-radius: 12px; padding: 16px 18px; box-shadow: var(--fshadow);
  text-decoration: none; color: var(--ftext); transition: border-color .12s, transform .12s;
  width: 100%; box-sizing: border-box; min-width: 0;
}
.forum-card:hover { border-color: var(--faccent); }
.forum-card__icon { font-size: 1.9em; line-height: 1; flex-shrink: 0; padding-top: 2px; }
.forum-card__inner { flex: 1; min-width: 0; }
.forum-card__title { font-size: 1.1em; font-weight: 800; margin: 0 0 4px; }
.forum-card__desc  { color: var(--fmuted); font-size: .92em; margin: 0 0 10px; line-height: 1.45; }
.forum-card__meta  { font-size: .82em; color: var(--fmuted); font-weight: 600; }
.forum-card__last  { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--fborder); font-size: .88em; }
.forum-card__last a { color: var(--faccent); text-decoration: none; font-weight: 600; }
.forum-card__last a:hover { text-decoration: underline; }
.forum-card__last-meta { display: block; color: var(--fmuted); font-size: .82em; margin-top: 2px; }

/* ---------- thread list (subforum page) ---------- */
.thread-list { background: var(--fbg-card); border: 1px solid var(--fborder); border-radius: 12px; overflow: hidden; box-shadow: var(--fshadow); }
.thread-row { display: flex; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--fborder); text-decoration: none; color: var(--ftext); transition: background .12s; align-items: flex-start; }
.thread-row:hover { background: #fafbfc; }
.thread-row:last-child { border-bottom: 0; }
.thread-row__avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.thread-row__inner { flex: 1; min-width: 0; }
.thread-row__title { font-weight: 700; font-size: 1.02em; line-height: 1.35; margin-bottom: 4px; }
.thread-row__meta  { font-size: .85em; color: var(--fmuted); }
.thread-row__meta a { color: var(--ftext); text-decoration: none; font-weight: 600; display: inline; }
.thread-row__meta a:hover { color: var(--faccent); }
.thread-row__stats { display: flex; flex-direction: column; gap: 3px; font-size: .82em; color: var(--fmuted); min-width: 200px; text-align: right; flex-shrink: 0; }
.thread-row__stats b { color: var(--ftext); font-weight: 800; }
.thread-row__stats .stat { font-size: .82em; }
.thread-row__last { font-size: .78em; opacity: .85; }
.thread-row__last a { color: var(--faccent); text-decoration: none; }
@media (max-width: 720px) {
  .thread-row { flex-wrap: wrap; }
  .thread-row__stats { min-width: 0; flex-direction: row; gap: 10px; text-align: left; flex-basis: 100%; padding-top: 6px; border-top: 1px dashed var(--fborder); margin-top: 6px; }
}

.empty { padding: 30px; text-align: center; color: var(--fmuted); }

/* ---------- thread (single thread page) ---------- */
.thread { background: var(--fbg-card); border: 1px solid var(--fborder); border-radius: 12px; overflow: hidden; box-shadow: var(--fshadow); }
.thread__head { padding: 22px 26px 14px; border-bottom: 1px solid var(--fborder); }
.thread__head h1 { font-size: 1.55em; line-height: 1.3; font-weight: 800; margin: 0 0 8px; letter-spacing: -0.01em; }
.thread__meta { display: flex; gap: 18px; font-size: .85em; color: var(--fmuted); }
.thread__posts { padding: 0; }

.post { display: flex; gap: 20px; padding: 22px 26px; border-bottom: 1px solid var(--fborder); }
.post:last-child { border-bottom: 0; }
.post--op { background: #fefcfa; }

.post__author { width: 140px; flex-shrink: 0; text-align: center; }
.post__avatar { width: 70px; height: 70px; border-radius: 50%; margin: 0 auto 8px; display: block; }
.post__name { display: block; font-weight: 800; color: var(--ftext); text-decoration: none; margin-bottom: 4px; }
.post__name:hover { color: var(--faccent); }
.post__joined, .post__postcount { display: block; font-size: .77em; color: var(--fmuted); }

.post__main { flex: 1; min-width: 0; }
.post__head { display: flex; justify-content: space-between; font-size: .82em; color: var(--fmuted); margin-bottom: 8px; }
.post__id { color: var(--fmuted); font-weight: 600; }
.post__body { font-size: 1em; line-height: 1.62; color: var(--ftext); }
.post__body p { margin: 0 0 10px; }
.post__body p:last-child { margin-bottom: 0; }
.post__foot { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--fborder); font-size: .85em; color: var(--fmuted); }
.post__likes { color: var(--faccent); font-weight: 700; }

@media (max-width: 720px) {
  .post { flex-direction: column; gap: 12px; padding: 18px; }
  .post__author { width: auto; text-align: left; display: flex; align-items: center; gap: 12px; }
  .post__avatar { width: 44px; height: 44px; margin: 0; }
  .post__name { display: inline; }
  .post__joined, .post__postcount { display: inline; margin-left: 8px; }
}

/* ---------- profile page ---------- */
.profile { display: flex; gap: 22px; }
.profile__side {
  width: 260px; flex-shrink: 0;
  background: var(--fbg-card); border: 1px solid var(--fborder); border-radius: 12px;
  padding: 22px; box-shadow: var(--fshadow); text-align: center;
}
.profile__avatar { width: 130px; height: 130px; border-radius: 50%; margin: 0 auto 12px; display: block; }
.profile__name { font-size: 1.3em; font-weight: 800; margin: 0 0 2px; }
.profile__handle { color: var(--fmuted); font-size: .9em; margin-bottom: 12px; }
.profile__joined { font-size: .85em; color: var(--fmuted); margin-bottom: 14px; }
.profile__stats { display: flex; justify-content: space-around; padding-top: 14px; border-top: 1px solid var(--fborder); }
.profile__stats > div { font-size: .82em; color: var(--fmuted); }
.profile__stats b { display: block; font-size: 1.4em; color: var(--ftext); font-weight: 800; }
.profile__stats span { display: block; }

.profile__main { flex: 1; min-width: 0; }
.profile__bio, .profile__activity {
  background: var(--fbg-card); border: 1px solid var(--fborder); border-radius: 12px;
  padding: 20px 22px; box-shadow: var(--fshadow); margin-bottom: 14px;
}
.profile__bio h2, .profile__activity h2 { font-size: 1.05em; font-weight: 800; margin: 0 0 10px; }
.profile__bio p { margin: 0; line-height: 1.6; }
.profile__activity ul { list-style: none; padding: 0; margin: 0; }
.profile__activity li { padding: 7px 0; border-bottom: 1px solid var(--fborder); font-size: .95em; line-height: 1.45; }
.profile__activity li:last-child { border: 0; }
.profile__activity li a { color: var(--ftext); font-weight: 600; text-decoration: none; }
.profile__activity li a:hover { color: var(--faccent); text-decoration: underline; }
.profile__activity .muted { color: var(--fmuted); font-size: .85em; font-weight: 400; }

@media (max-width: 720px) {
  .profile { flex-direction: column; }
  .profile__side { width: auto; }
}

/* ---------- members grid ---------- */
.members-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 880px) { .members-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .members-grid { grid-template-columns: 1fr; } }
.member-card {
  display: flex; gap: 14px; align-items: center; padding: 14px 16px;
  background: var(--fbg-card); border: 1px solid var(--fborder); border-radius: 12px;
  text-decoration: none; color: var(--ftext); box-shadow: var(--fshadow); transition: border-color .12s;
}
.member-card:hover { border-color: var(--faccent); }
.member-card__avatar { width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0; }
.member-card__name { font-weight: 800; }
.member-card__handle { font-size: .82em; color: var(--fmuted); }
.member-card__stats { font-size: .8em; color: var(--fmuted); margin-top: 2px; }

/* ---------- utilities ---------- */
.muted { color: var(--fmuted); }
