/* ============================================================
   HUB COMMONS LAYOUT CSS
   Three-column layout: left nav (200px) + center feed (flex) + right panel (240px)
   Components: billboard, post cards, poster cards, left nav, right sidebar
   Mobile: columns collapse per spec
   ============================================================ */

/* ── Layout shell ─────────────────────────────────────────── */

.hub-commons-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #080c10;
  color: #e8ecf0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.hub-commons-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  position: relative;
}

/* ── Left column ──────────────────────────────────────────── */

.hub-commons-left {
  width: 200px;
  flex-shrink: 0;
  padding: 20px 0;
  border-right: 1px solid var(--border-color, rgba(255,255,255,0.09));
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  scrollbar-width: none;
}

.hub-commons-left::-webkit-scrollbar { display: none; }

.hub-left-section-label {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted, #7a8896);
  padding: 0 16px 8px;
  margin-top: 16px;
}

.hub-left-nav-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 16px;
  color: var(--text-secondary, #b4b4c4);
  text-decoration: none;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.12s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.hub-left-nav-item:hover,
.hub-left-nav-item.active {
  background: var(--hub-accent-muted, rgba(245,158,11,0.10));
  color: var(--text-primary, #fff);
}

.hub-left-nav-item .count {
  font-size: 0.75rem;
  color: var(--text-muted, #7a8896);
  font-variant-numeric: tabular-nums;
}

.hub-left-category-header {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 12px 16px 6px;
  color: var(--hub-accent, #F59E0B);
  margin-top: 8px;
  border-top: 1px solid var(--hub-accent-border, rgba(245,158,11,0.25));
}

/* ── Center column ────────────────────────────────────────── */

.hub-commons-center {
  flex: 1;
  min-width: 0;
  padding: 20px 16px;
  max-width: 680px;
}

/* ── Billboard (featured post) ────────────────────────────── */

.hub-billboard {
  width: 100%;
  background: var(--bg-secondary, #252538);
  border: 1px solid var(--border-color, rgba(255,255,255,0.09));
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
}

.hub-billboard-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.hub-billboard-body {
  padding: 16px;
}

.hub-billboard-category {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hub-accent, #F59E0B);
  margin-bottom: 6px;
}

.hub-billboard-headline {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary, #fff);
  margin-bottom: 8px;
  line-height: 1.3;
}

.hub-billboard-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted, #7a8896);
}

/* ── Post composer ────────────────────────────────────────── */

.hub-composer {
  background: var(--bg-secondary, #252538);
  border: 1px solid var(--border-color, rgba(255,255,255,0.09));
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: border-color 0.15s;
}

.hub-composer:hover {
  border-color: var(--hub-accent-border, rgba(245,158,11,0.25));
}

.hub-composer-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--hub-accent-muted, rgba(245,158,11,0.10));
  border: 1.5px solid var(--hub-accent-border, rgba(245,158,11,0.25));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--hub-accent, #F59E0B);
}

.hub-composer-prompt {
  flex: 1;
  font-size: 0.88rem;
  color: var(--text-muted, #7a8896);
}

/* ── Post card ────────────────────────────────────────────── */

.hub-post-card {
  background: var(--bg-secondary, #252538);
  border: 1px solid var(--border-color, rgba(255,255,255,0.09));
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
}

.hub-post-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
}

.hub-post-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--hub-accent-muted, rgba(245,158,11,0.10));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--hub-accent, #F59E0B);
}

.hub-post-identity {
  flex: 1;
  min-width: 0;
}

.hub-post-entity {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--hub-accent, #F59E0B);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hub-post-category {
  font-size: 0.72rem;
  color: var(--text-muted, #7a8896);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hub-post-body {
  padding: 0 14px 12px;
  color: var(--text-secondary, #b4b4c4);
  font-size: 0.9rem;
  line-height: 1.5;
}

.hub-post-image {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  display: block;
  margin-bottom: 4px;
}

.hub-post-engagement {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 14px;
  border-top: 1px solid var(--border-color, rgba(255,255,255,0.09));
  font-size: 0.8rem;
  color: var(--text-muted, #7a8896);
}

.hub-post-engagement-btn {
  background: none;
  border: none;
  color: var(--text-muted, #7a8896);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0;
  transition: color 0.12s;
  font-family: inherit;
}

.hub-post-engagement-btn:hover {
  color: var(--hub-accent, #F59E0B);
}

.hub-empty-feed {
  padding: 48px 16px;
  text-align: center;
  color: var(--text-muted, #7a8896);
  font-size: 0.88rem;
}

.hub-empty-feed strong {
  display: block;
  font-size: 1rem;
  color: var(--text-secondary, #b4b4c4);
  margin-bottom: 8px;
}

/* ── Right column ─────────────────────────────────────────── */

.hub-commons-right {
  width: 240px;
  flex-shrink: 0;
  padding: 20px 0;
  border-left: 1px solid var(--border-color, rgba(255,255,255,0.09));
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  scrollbar-width: none;
}

.hub-commons-right::-webkit-scrollbar { display: none; }

.hub-right-section {
  padding: 0 16px;
  margin-bottom: 24px;
}

.hub-right-section-header {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hub-accent, #F59E0B);
  border-bottom: 1px solid var(--hub-accent-border, rgba(245,158,11,0.25));
  padding-bottom: 6px;
  margin-bottom: 10px;
}

.hub-right-activity-item {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 0.85rem;
  color: var(--text-secondary, #b4b4c4);
  text-decoration: none;
  cursor: pointer;
}

.hub-right-activity-item:hover {
  color: var(--hub-accent, #F59E0B);
}

.hub-right-activity-count {
  font-size: 0.78rem;
  color: var(--text-muted, #7a8896);
  font-variant-numeric: tabular-nums;
}

.hub-right-category-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 0.82rem;
  color: var(--text-secondary, #b4b4c4);
  cursor: pointer;
  text-decoration: none;
}

.hub-right-category-item:hover {
  color: var(--hub-accent, #F59E0B);
}

/* ── Poster card ──────────────────────────────────────────── */

.poster-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
  min-height: 130px;
  background: var(--bg-tertiary, #1e2030);
  border: 1px solid var(--hub-accent-border, rgba(245,158,11,0.25));
}

.poster-card-accent-stripe {
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--hub-accent, #F59E0B);
}

.poster-card-bg-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--hub-accent-muted, rgba(245,158,11,0.10)) 0%, transparent 60%);
}

.poster-card-body {
  position: relative;
  z-index: 1;
  padding: 12px 12px 10px 16px;
  display: flex;
  flex-direction: column;
  min-height: 130px;
}

.poster-card-label {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hub-accent, #F59E0B);
  margin-bottom: 6px;
}

.poster-card-quote {
  font-size: 0.82rem;
  color: var(--text-primary, #fff);
  line-height: 1.45;
  margin-bottom: 10px;
  flex: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.poster-card-footer {
  display: flex;
  align-items: center;
  gap: 6px;
}

.poster-card-entity {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--hub-accent, #F59E0B);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.poster-card-badge {
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted, #7a8896);
  background: rgba(0,0,0,0.3);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-color, rgba(255,255,255,0.09));
  white-space: nowrap;
}

.poster-card-link {
  display: block;
  text-decoration: none;
}

.poster-card-link:hover .poster-card-entity {
  text-decoration: underline;
}

/* ── Mobile responsive ────────────────────────────────────── */

@media (max-width: 1023px) {
  .hub-commons-left {
    width: 160px;
  }
  .hub-commons-right {
    width: 200px;
  }
}

@media (max-width: 768px) {
  .hub-commons-layout {
    flex-direction: column;
  }

  .hub-commons-left {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.09));
    overflow-x: auto;
    overflow-y: visible;
    display: flex;
    flex-direction: row;
    padding: 0;
    white-space: nowrap;
  }

  .hub-left-section-label { display: none; }
  .hub-left-category-header { display: none; }

  .hub-left-nav-item {
    display: inline-flex;
    padding: 10px 14px;
    border-right: 1px solid var(--border-color, rgba(255,255,255,0.09));
    white-space: nowrap;
    width: auto;
  }

  .hub-commons-center {
    max-width: 100%;
  }

  .hub-commons-right {
    width: 100%;
    height: auto;
    position: relative;
    border-left: none;
    border-top: 1px solid var(--border-color, rgba(255,255,255,0.09));
    padding: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
  }

  .hub-right-section {
    flex: 1;
    min-width: 160px;
  }

  .hub-right-section .poster-card {
    min-height: 100px;
  }
}
