/* ============================================================
   COMMUNITY.CSS — Community Board Page Styles
   Page-specific styles for community.html.
   ============================================================ */
/* ── Page transition ── */
body {
  opacity: 0;
}
body.page-loaded {
  opacity: 1;
  transition: opacity 0.3s ease;
}
body.page-exiting {
  opacity: 0;
  transition: opacity 0.2s ease;
}




/* ── Campus picker (copied from browse.css) ── */
.campus-banner { max-width: 1200px; margin: 12px auto 0; padding: 0 48px; display: flex; align-items: center; gap: 10px; }
.campus-banner-pill { display: inline-flex; align-items: center; gap: 8px; background: white; border: 1.5px solid var(--sand); border-radius: 100px; padding: 7px 14px; font-size: 13px; font-weight: 500; color: var(--ink); cursor: pointer; transition: all 0.2s; font-family: var(--sans); }
.campus-banner-pill:hover { border-color: var(--clay); }
.campus-banner-pill .campus-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--clay); flex-shrink: 0; }
.campus-banner-change { font-size: 12px; color: var(--clay); font-weight: 600; background: none; border: none; cursor: pointer; font-family: var(--sans); padding: 0; text-decoration: underline; text-underline-offset: 2px; }
.campus-banner-change:hover { opacity: 0.75; }
.campus-modal-overlay { position: fixed; inset: 0; background: rgba(26,22,18,0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: 500; display: none; align-items: center; justify-content: center; padding: 24px; }
.campus-modal-overlay.open { display: flex; }
.campus-modal { background: white; border-radius: 20px; padding: 28px; width: 100%; max-width: 480px; max-height: 80vh; display: flex; flex-direction: column; gap: 16px; animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.campus-modal-title { font-family: var(--serif); font-size: 20px; font-weight: 700; }
.campus-search-input { width: 100%; padding: 11px 14px; border: 1.5px solid var(--sand); border-radius: 12px; font-size: 14px; font-family: var(--sans); background: var(--cream); color: var(--ink); outline: none; transition: border-color 0.2s; box-sizing: border-box; }
.campus-search-input:focus { border-color: var(--clay); background: white; }
.campus-list { overflow-y: auto; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.campus-option { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-radius: 10px; cursor: pointer; transition: background 0.15s; border: 1.5px solid transparent; font-family: var(--sans); background: none; width: 100%; text-align: left; }
.campus-option:hover { background: var(--cream); }
.campus-option.selected { border-color: var(--clay); background: rgba(196,98,45,0.05); }
.campus-option-name { font-size: 14px; font-weight: 500; color: var(--ink); }
.campus-option-city { font-size: 12px; color: var(--warm-grey); }
.campus-option-short { font-size: 11px; font-weight: 700; color: var(--clay); background: rgba(196,98,45,0.08); padding: 2px 8px; border-radius: 100px; }
.campus-modal-footer { display: flex; gap: 10px; padding-top: 4px; border-top: 1px solid var(--sand); }
.campus-clear-btn { flex: 1; padding: 10px; background: none; border: 1px solid var(--sand); border-radius: 10px; font-size: 13px; color: var(--warm-grey); cursor: pointer; font-family: var(--sans); transition: all 0.15s; }
.campus-clear-btn:hover { border-color: var(--warm-grey); color: var(--ink); }


/* ── Hero ── */
.hero {
  padding: 56px 48px 40px;
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  flex-wrap: wrap;
}
.hero-text {}
.hero-eyebrow {
  font-size: 12px; font-weight: 600; color: var(--clay);
  letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 10px;
}
.hero-title {
  font-family: var(--serif); font-size: 44px; font-weight: 700;
  line-height: 1.15; color: var(--ink);
}
.hero-title em { font-style: italic; color: var(--clay); }
.hero-sub {
  font-size: 15px; color: var(--warm-grey); margin-top: 12px;
  line-height: 1.6; max-width: 460px;
}
.post-btn {
  flex-shrink: 0;
  padding: 15px 28px; background: var(--clay); color: white;
  border: none; border-radius: 100px; font-size: 15px; font-weight: 600;
  font-family: var(--sans); cursor: pointer;
  transition: background 0.2s, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s;
  white-space: nowrap;
}
.post-btn:hover {
  background: var(--clay-dark); transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(196,98,45,0.3);
}


/* ── Board layout ── */
.board-layout {
  max-width: 1200px; margin: 0 auto;
  padding: 0 48px 80px;
  display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: start;
}


/* ── Sidebar filters ── */
.filter-sidebar { position: sticky; top: 80px; }
.filter-group-title {
  font-size: 11px; font-weight: 700; color: var(--warm-grey);
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 10px;
}
.filter-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 28px; }
.filter-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 12px; border: 1px solid transparent;
  font-size: 14px; font-weight: 500; color: var(--warm-grey);
  cursor: pointer; background: none; text-align: left;
  font-family: var(--sans); width: 100%;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.filter-item:hover { background: white; color: var(--ink); border-color: var(--sand); transform: translateX(4px); }
.filter-item.active { background: white; color: var(--ink); border-color: var(--sand); font-weight: 600; }
.filter-item .fi-icon { font-size: 16px; width: 22px; text-align: center; flex-shrink: 0; }
.filter-item .fi-count {
  margin-left: auto; font-size: 11px; background: var(--sand); color: var(--warm-grey);
  padding: 2px 7px; border-radius: 100px; font-weight: 600;
  transition: background 0.25s ease, color 0.25s ease;
}
.filter-item.active .fi-count { background: var(--clay); color: white; }


/* ── Stats card ── */
.stats-card {
  background: white; border: 1px solid var(--sand); border-radius: 16px; padding: 18px;
  transition: box-shadow 0.3s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.stats-card:hover {
  box-shadow: 0 8px 24px rgba(26,22,18,0.06);
  transform: translateY(-2px);
}
.stats-card-title {
  font-size: 11px; font-weight: 700; color: var(--warm-grey);
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 14px;
}
.stat-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px; font-size: 13px;
}
.stat-row:last-child { margin-bottom: 0; }
.stat-label { color: var(--warm-grey); }
.stat-value { font-weight: 700; color: var(--ink); }


/* ── Posts area ── */
.posts-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 20px; flex-wrap: wrap;
}
.posts-count { font-size: 13px; color: var(--warm-grey); }
.posts-sort { display: flex; gap: 6px; }
.sort-btn {
  padding: 7px 14px; border-radius: 100px; border: 1px solid var(--sand);
  font-size: 12px; font-weight: 600; color: var(--warm-grey); background: white;
  cursor: pointer; font-family: var(--sans);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.sort-btn:hover { border-color: var(--warm-grey-light); color: var(--ink); transform: translateY(-1px); }
.sort-btn.active { background: var(--ink); color: white; border-color: var(--ink); }


/* ── Post card ── */
.post-card {
  background: white; border: 1px solid var(--sand); border-radius: 18px;
  padding: 22px 24px; margin-bottom: 14px;
  transition: box-shadow 0.3s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s;
  cursor: pointer;
}
.post-card:hover {
  box-shadow: 0 14px 40px rgba(26,22,18,0.1);
  transform: translateY(-4px);
  border-color: transparent;
}
.post-card-top { display: flex; align-items: flex-start; gap: 14px; }
.post-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 17px; font-weight: 700;
  background: linear-gradient(135deg, var(--sand), var(--warm-grey-light));
  color: var(--ink);
}
.post-meta { flex: 1; min-width: 0; }
.post-meta-top {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px;
}
.post-author { font-size: 14px; font-weight: 600; color: var(--ink); }
.post-verified {
  background: #D1FAE5; color: #065F46; font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: 4px;
}
.post-time { font-size: 12px; color: var(--warm-grey-light); }
.post-cat-pill {
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 100px;
  letter-spacing: 0.04em; flex-shrink: 0;
  transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}
.post-cat-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.post-title {
  font-family: var(--serif); font-size: 17px; font-weight: 600;
  color: var(--ink); margin-bottom: 8px; line-height: 1.35;
}
.post-body { font-size: 14px; color: #4a403a; line-height: 1.65; }
.post-body.clamp {
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}
.post-footer {
  display: flex; align-items: center; gap: 16px;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--sand);
}
.post-action {
  display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 500;
  color: var(--warm-grey); background: none; border: none; cursor: pointer;
  font-family: var(--sans); padding: 5px 10px; border-radius: 8px;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.post-action:hover { background: var(--cream); color: var(--ink); transform: translateY(-1px); }
.post-action.liked { color: var(--clay); }
.post-action.delete-btn:hover { background: #FEE2E2; color: #991B1B; }
.post-expand { margin-left: auto; font-size: 12px; color: var(--clay); font-weight: 600; }


/* ── Seed posts ── */
#seed-posts {
  position: relative;
}
#seed-posts::before {
  content: 'Recent conversations';
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--warm-grey);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}
.seed-post {
  cursor: default;
}
.seed-post .post-footer {
  pointer-events: none;
  opacity: 0.6;
}


/* ── Skeleton loader ── */
.skeleton-card {
  background: white; border: 1px solid var(--sand); border-radius: 18px;
  padding: 22px 24px; margin-bottom: 14px;
}


/* ── Empty state ── */
.empty-board { text-align: center; padding: 64px 32px; }
.empty-board-icon { font-size: 52px; margin-bottom: 16px; }
.empty-board-title {
  font-family: var(--serif); font-size: 24px; font-weight: 700; margin-bottom: 8px;
}
.empty-board-sub {
  font-size: 14px; color: var(--warm-grey); line-height: 1.65; margin-bottom: 24px;
}


/* ── Category selector (new post modal) ── */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 20px; }
.cat-option {
  padding: 12px 8px; border-radius: 12px; border: 1.5px solid var(--sand);
  text-align: center; cursor: pointer; font-family: var(--sans);
  background: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cat-option:hover { border-color: var(--clay); transform: translateY(-2px); }
.cat-option.selected { border-color: var(--clay); background: #FEF8F4; transform: translateY(-2px); }
.cat-option-icon { font-size: 22px; margin-bottom: 4px; }
.cat-option-label {
  font-size: 11px; font-weight: 700; color: var(--ink);
  text-transform: uppercase; letter-spacing: 0.04em;
}


/* ── Post modal form ── */
.modal-box {
  background: white; border-radius: 24px; padding: 40px;
  width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto;
  animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  position: relative;
}
.form-field { margin-bottom: 16px; }
.form-submit {
  width: 100%; padding: 16px; background: var(--clay); color: white;
  border: none; border-radius: 14px; font-size: 15px; font-weight: 600;
  font-family: var(--sans); cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 4px;
}
.form-submit:hover { background: var(--clay-dark); }
.form-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.form-auth-gate {
  text-align: center; padding: 16px 0;
  font-size: 14px; color: var(--warm-grey); line-height: 1.7;
}
.form-auth-gate a { color: var(--clay); font-weight: 600; text-decoration: none; }


/* ── Post detail modal ── */
.detail-modal-box {
  background: white; border-radius: 24px; padding: 40px;
  width: 100%; max-width: 600px; max-height: 90vh; overflow-y: auto;
  animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  position: relative;
}
.detail-post-title {
  font-family: var(--serif); font-size: 26px; font-weight: 700;
  line-height: 1.25; margin-bottom: 12px;
}
.detail-post-body { font-size: 15px; line-height: 1.75; color: #3d352e; white-space: pre-wrap; }
.detail-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--sand);
}


/* ================================================================
   RESPONSIVE — Community page
   ================================================================ */
@media (max-width: 900px) {
  .campus-banner { padding: 0 16px; }
  .board-layout { grid-template-columns: 1fr; padding: 0 16px 80px; }
  .filter-sidebar { position: static; display: block; margin-bottom: 16px; }
  .filter-list { flex-direction: row; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
  .filter-item { width: auto; padding: 7px 12px; }
  .filter-item .fi-count { display: none; }
  .stats-card { display: none; }
  .hero { padding: 28px 16px 20px; }
  .hero-title { font-size: 30px; }
  .hero-sub { font-size: 14px; }
  .post-btn { padding: 12px 20px; font-size: 14px; }
  .modal-box,
  .detail-modal-box {
    padding: 24px 18px; margin: 12px; border-radius: 18px; max-height: 92vh;
  }
  .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .cat-option { padding: 10px 6px; }
  .cat-option-icon { font-size: 18px; }
  .post-card { padding: 16px 16px; }
  .post-title { font-size: 16px; }
  .posts-toolbar { gap: 8px; }
  .hero { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 26px; }
  .filter-group-title { display: none; }
  .post-card-top { gap: 10px; }
  .post-avatar { width: 34px; height: 34px; font-size: 14px; flex-shrink: 0; }
  .modal-box {
    border-radius: 16px 16px 0 0; margin: 0;
    position: fixed; bottom: 0; left: 0; right: 0; max-height: 95vh;
  }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
}
