/* Forum pages (/forum): hub, boards, posts and the Question of the Week. Loaded by app/controllers/forum.php. */

.forum-hero .lede { max-width: 70ch; }
.forum-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 0; }
.btn-small { padding: .5em 1.05em; font-size: .88rem; }

/* Question of the Week */
.qotw-feature {
  display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: start; margin: 8px 0 48px; padding: 30px 32px;
  border-radius: var(--radius); color: #e8f6fb; background: radial-gradient(120% 140% at 0% 0%, #0d4f86 0%, var(--deep) 45%, var(--abyss) 100%);
  box-shadow: var(--shadow-lg);
}
.qotw-feature .eyebrow { color: var(--glow); }
.qotw-feature h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: .4em; }
.qotw-feature h2 a { color: #fff; text-decoration: none; }
.qotw-feature h2 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.qotw-feature p { color: #cfe3ee; max-width: 72ch; }
.qotw-feature .btn-dark { background: var(--glow); color: var(--abyss); }
.qotw-feature .btn-dark:hover { background: #fff; color: var(--abyss); }
.qotw-feature .text-link { color: var(--glow); }
.qotw-links { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin: 18px 0 0; }
.qotw-badge {
  display: grid; place-items: center; width: 74px; height: 74px; border-radius: 50%;
  background: linear-gradient(140deg, var(--glow), var(--lagoon)); color: var(--abyss); box-shadow: 0 0 0 6px rgba(95, 242, 231, .15);
}
.qotw-badge span { font: 800 2.4rem/1 var(--display); }
@media (max-width: 640px) {
  .qotw-feature { grid-template-columns: 1fr; padding: 24px 20px; gap: 14px; }
  .qotw-badge { width: 54px; height: 54px; }
  .qotw-badge span { font-size: 1.7rem; }
}

/* Hub sections */
.forum-hub { padding-bottom: 40px; }
.forum-section { margin: 0 0 44px; }
.forum-section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.forum-section-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0; }
.forum-section-head h2 a { color: inherit; text-decoration: none; }
.forum-section-head h2 a:hover { color: var(--ocean); }
.forum-section > .muted { margin: 6px 0 18px; }
.forum-boards { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
@media (max-width: 900px) { .forum-boards { grid-template-columns: 1fr; } }
.board-box { padding: 24px; border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.forum-cta { padding: 28px 32px; border-radius: var(--radius); background: #eaf6f8; }
.forum-cta h2 { font-size: 1.5rem; }
.forum-cta p { margin: 0; color: var(--ink-soft); max-width: 75ch; }

/* Advice cards */
.advice-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; list-style: none; margin: 0; padding: 0; }
.advice-card { display: flex; }
.advice-card-link { display: flex; flex-direction: column; width: 100%; color: inherit; text-decoration: none; }
.advice-card-img { position: relative; display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--deep); }
.advice-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.advice-card-link:hover .advice-card-img img { transform: scale(1.05); }
.advice-card-img.no-img { background: radial-gradient(110% 120% at 20% 10%, #19b6d6 0%, #0b5aa6 40%, var(--deep) 100%); }
.advice-card-img .badge { position: absolute; top: 12px; left: 12px; }
.advice-card-body { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 18px 20px 20px; }
.advice-card-body .card-title { font-size: 1.15rem; }
.advice-card-body .card-text { flex: 1; margin: 0; }
.advice-card-link:hover .card-title { color: var(--ocean); }

/* Topic lists */
.topic-list { list-style: none; margin: 0; padding: 0; }
.topic { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.topic:last-child { border-bottom: 0; }
.topic.is-pinned { background: linear-gradient(90deg, rgba(95, 242, 231, .12), transparent 70%); }
.topic-icon {
  display: inline-grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 50%;
  background: #e6eef5; color: var(--deep); font-weight: 800;
}
.topic-icon.is-staff { background: var(--deep); color: var(--glow); }
.topic-title { font-weight: 700; color: var(--ink); text-decoration: none; line-height: 1.35; }
.topic-title:hover { color: var(--ocean); text-decoration: underline; }
.topic-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 0; font-size: .85rem; color: var(--muted); }
.topic-meta .tag { font-size: .7rem; padding: 1px 8px; }
.topic-stats { margin: 0; text-align: right; font-size: .85rem; color: var(--muted); line-height: 1.3; }
.topic-stats strong { color: var(--ink); font-size: 1.05rem; }
.topic-stats small { display: block; }
@media (max-width: 520px) {
  .topic { grid-template-columns: auto 1fr; }
  .topic-stats { grid-column: 2; text-align: left; }
  .topic-stats small { display: inline; }
}

/* Boards */
.forum-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 26px; }
.forum-tabs a { padding: 8px 16px; border-radius: 999px; background: var(--paper); box-shadow: var(--shadow); font-weight: 700; text-decoration: none; color: var(--ink-soft); }
.forum-tabs a:hover { color: var(--ocean); }
.forum-tabs a[aria-current] { background: var(--deep); color: #fff; }
.forum-board { padding-bottom: 40px; }

/* A post */
.forum-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.forum-strip form { display: inline; margin: 0; }
.link-btn { padding: 0; border: 0; background: none; font: inherit; font-weight: 800; color: var(--ocean); text-decoration: underline; cursor: pointer; }
.link-btn.danger { color: var(--danger); }
.forum-article-head { padding: 30px 0 8px; }
.forum-article-head h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); }
.byline { display: flex; align-items: center; gap: 12px; margin: 14px 0 18px; color: var(--muted); font-size: .92rem; line-height: 1.45; }
.byline strong { color: var(--ink); }
.byline .topic-icon { width: 44px; height: 44px; }
.forum-article-img { margin: 10px auto 26px; max-width: 980px; }
.forum-article-img img { width: 100%; max-height: 520px; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.forum-body { padding-bottom: 10px; }
.forum-body h3 { font-size: 1.3rem; margin-top: 1.4em; }
.forum-body img { border-radius: 12px; }
.forum-article-foot { padding: 10px 0 18px; border-bottom: 1px solid var(--line); }
.forum-ask { padding: 16px 20px; border-radius: var(--radius-sm); background: #eaf6f8; }
.share-prompt { margin: 18px 0 8px; font-weight: 700; }

/* Share buttons */
.share-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.share-label { margin-right: 4px; font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.share-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border: 0; border-radius: 999px; cursor: pointer;
  font: 700 .86rem/1 var(--body); color: #fff; background: var(--deep); text-decoration: none; transition: transform .15s, filter .15s;
}
.share-btn:hover { color: #fff; transform: translateY(-1px); filter: brightness(1.1); }
.share-facebook { background: #1877f2; }
.share-x { background: #111; }
.share-pinterest { background: #c8232c; }
.share-reddit { background: #ff4500; }
.share-copy { background: #e6eef5; color: var(--deep); }
.share-copy:hover { color: var(--deep); }
.share-native { background: var(--lagoon-ink); }
@media (max-width: 520px) { .share-btn span { display: none; } .share-btn { padding: 9px; } .share-native span { display: inline; } }

/* Replies */
.forum-replies { padding: 26px 0 30px; }
.forum-replies h2 { font-size: 1.7rem; }
.reply-list { list-style: none; margin: 0 0 24px; padding: 0; }
.reply { padding: 16px 20px; margin: 0 0 14px; border-radius: var(--radius-sm); background: var(--paper); box-shadow: var(--shadow); }
.reply.is-staff { border-left: 4px solid var(--lagoon); background: #f3fbfd; }
.reply.is-pending { outline: 2px dashed #ffd98a; }
.reply.is-hidden { opacity: .6; }
.reply-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 8px; }
.reply-head .topic-icon { width: 30px; height: 30px; font-size: .85rem; }
.reply-head a { text-decoration: none; }
.reply-body p:last-child, .reply-body ul:last-child { margin-bottom: 0; }
.reply-body { color: var(--ink-soft); overflow-wrap: anywhere; }
.reply-admin { display: flex; gap: 14px; margin-top: 10px; font-size: .85rem; }
.reply-admin form { margin: 0; }
.reply-form-box { padding: 22px; border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.reply-form .field { margin-bottom: 12px; }
.signin-prompt { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 0; }
.forum-more { padding: 10px 0 50px; }
.forum-more h2 { font-size: 1.6rem; }
.forum-body .reply-body, .forum-body { overflow-wrap: break-word; }

/* New post */
.forum-new-form { margin-bottom: 50px; }
.forum-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.forum-pick legend { grid-column: 1 / -1; }
.radio-card { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff; cursor: pointer; font-weight: 500; }
.radio-card:has(input:checked) { border-color: var(--lagoon); box-shadow: 0 0 0 4px rgba(25, 182, 214, .15); }
.radio-card input { margin-top: 4px; accent-color: var(--ocean); }
.radio-card span { display: grid; gap: 2px; }
.radio-card small { color: var(--muted); }
@media (max-width: 560px) { .forum-pick { grid-template-columns: 1fr; } }

/* Question of the Week page */
.forum-qotw { padding-bottom: 50px; }
.qotw-columns { display: grid; grid-template-columns: 1.1fr 1fr; gap: 30px; align-items: start; }
@media (max-width: 860px) { .qotw-columns { grid-template-columns: 1fr; } }
.qotw-ask, .qotw-archive { padding: 26px; border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.qotw-ask h2, .qotw-archive h2 { font-size: 1.6rem; }
.qotw-list { margin: 0; padding-left: 1.2em; }
.qotw-list li { margin-bottom: 12px; }
.qotw-list a { font-weight: 700; }
.qotw-list small { display: block; }
