/* ==========================================================================
   ORIGIN ROHAN · forums (forums.php)
   Builds on origin.css.
   ========================================================================== */

.forum-main { padding: 32px 0 clamp(48px, 7vw, 96px); }
.forum-main.is-inner { padding-top: 28px; }
.forum-flash { margin-bottom: 22px; }

/* Index intro */
.forum-intro { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.forum-intro p { color: var(--text-soft); font: 500 20px/1.45 var(--font-accent); }
.forum-intro > div { display: flex; flex-wrap: wrap; gap: 8px; }
.forum-intro .pill b { color: var(--gold-200); }

/* Board groups */
.board-group { margin-top: 38px; }
.board-group-head { display: grid; gap: 10px; margin-bottom: 16px; }
.board-list, .topic-list, .post-list { overflow: hidden; }
.board-row { display: grid; grid-template-columns: auto minmax(0, 1.5fr) 84px 84px minmax(0, 1fr); align-items: center; gap: 20px; padding: 20px 24px; color: inherit; border-top: 1px solid var(--line-soft); transition: background-color .16s ease; }
.board-row:first-child, .topic-row:first-child { border-top: 0; }
.board-row:hover, .topic-row:hover { color: inherit; background: linear-gradient(90deg, rgba(196, 155, 82, .1), rgba(196, 155, 82, .02)); }
.board-icon { display: grid; place-items: center; width: 50px; height: 50px; color: var(--gold-300); background: radial-gradient(circle at 30% 25%, rgba(196, 155, 82, .3), rgba(127, 26, 42, .28)); border: 1px solid var(--line-strong); border-radius: 50%; }
.board-main, .topic-main { display: grid; gap: 4px; min-width: 0; }
.board-main strong { color: var(--text); font: 600 19px/1.25 var(--font-display); letter-spacing: .04em; }
.board-main span, .topic-main span { color: var(--text-mute); font-size: 14.5px; }
.board-row:hover .board-main strong, .topic-row:hover .topic-main strong { color: var(--gold-200); }
.row-stat { display: grid; justify-items: center; gap: 4px; }
.row-stat b { color: var(--gold-300); font: 700 21px/1 var(--font-display); }
.row-stat small, .row-last small { color: var(--text-mute); font: 600 11.5px/1.2 var(--font-body); letter-spacing: .14em; text-transform: uppercase; }
.row-last { display: grid; gap: 4px; min-width: 0; text-align: right; }
.row-last strong { overflow: hidden; color: var(--text); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.row-last span { color: var(--text-mute); font-size: 13.5px; }

/* Board + topic headers */
.crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 20px; color: var(--text-mute); font-size: 14px; }
.crumb a { color: var(--gold-400); }
.crumb a:hover { color: var(--gold-200); }
.forum-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.forum-head > div { display: grid; gap: 12px; min-width: 0; }
.forum-head .title { overflow-wrap: anywhere; }
.forum-head .btn, .forum-head .pill { flex: 0 0 auto; }

/* Topic list */
.topic-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px 190px; align-items: center; gap: 20px; padding: 18px 24px; color: inherit; border-top: 1px solid var(--line-soft); transition: background-color .16s ease; }
.topic-main strong { color: var(--text); font-size: 17px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.topic-lock { margin-left: 6px; padding: 3px 9px; font-size: 11px; vertical-align: middle; }

/* Posts */
.post { display: grid; grid-template-columns: 220px minmax(0, 1fr); border-top: 1px solid var(--line-soft); }
.post:first-child { border-top: 0; }
.post-author { display: flex; align-items: flex-start; gap: 12px; padding: 22px; background: rgba(7, 5, 4, .42); border-right: 1px solid var(--line); }
.post-author > div { display: grid; gap: 3px; min-width: 0; }
.post-author strong { color: var(--gold-200); font-weight: 600; overflow-wrap: anywhere; }
.post-author small { color: var(--text-mute); font-size: 12.5px; }
.post-avatar { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; color: #1d1307; background: linear-gradient(180deg, #f5e3ae, #b88b41); border-radius: 50%; font: 700 17px/1 var(--font-display); }
.post-body { min-width: 0; padding: 22px 26px; color: var(--text-soft); line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.post-image { display: block; width: auto; max-width: 100%; height: auto; max-height: 640px; margin-top: 16px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow-md); }

/* Forms + empty states */
.forum-form { display: grid; gap: 18px; margin-top: 24px; scroll-margin-top: calc(var(--header-h) + 20px); }
.input-file { padding: 9px; }
.forum-empty { display: grid; justify-items: center; gap: 14px; padding: 30px 20px; color: var(--text-mute); text-align: center; }
.forum-form .forum-empty { display: block; padding: 18px 0 6px; }
.forum-empty a:not(.btn) { color: var(--gold-300); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .board-row { grid-template-columns: auto minmax(0, 1fr) 72px 72px; }
    .board-row .row-last { display: none; }
    .topic-row { grid-template-columns: minmax(0, 1fr) 80px; }
    .topic-row .row-last { display: none; }
}
@media (max-width: 680px) {
    .board-row { grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; padding: 16px; }
    .board-row .row-stat:nth-of-type(3) { display: none; }
    .board-icon { width: 42px; height: 42px; }
    .board-main strong { font-size: 17px; }
    .topic-row { padding: 16px; gap: 14px; }
    .forum-head { flex-direction: column; align-items: flex-start; }
    .post { grid-template-columns: 1fr; }
    .post-author { align-items: center; padding: 14px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
    .post-body { padding: 16px; }
}
