/* =====================================================
   ND Hub – Shared Stylesheet
   Designed with neurodivergent users in mind:
   clear hierarchy, generous spacing, calm palette
   ===================================================== */

/* ---------- CSS Custom Properties ---------- */
:root {
  --clr-primary:     #7C3AED;
  --clr-primary-lt:  #EDE9FE;
  --clr-secondary:   #0EA5E9;
  --clr-accent:      #10B981;
  --clr-warn:        #F59E0B;
  --clr-danger:      #EF4444;

  --clr-bg:          #F5F3FF;
  --clr-surface:     #FFFFFF;
  --clr-border:      #DDD6FE;

  --clr-text:        #1E1B4B;
  --clr-text-muted:  #6B7280;
  --clr-text-light:  #9CA3AF;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:  0 4px 12px rgba(124,58,237,.12);
  --shadow-lg:  0 10px 30px rgba(124,58,237,.15);

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-full: 9999px;

  --font-sans:  'Inter', system-ui, -apple-system, sans-serif;
  --font-serif: 'Georgia', 'Times New Roman', serif;

  --transition: 0.18s ease;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  background: var(--clr-bg);
  color: var(--clr-text);
  line-height: 1.65;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a  { color: var(--clr-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5 {
  line-height: 1.25;
  font-weight: 700;
  color: var(--clr-text);
}
h1 { font-size: clamp(1.8rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem);    }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem);  }
h4 { font-size: 1.1rem; }

p { color: var(--clr-text); max-width: 70ch; }

.text-muted  { color: var(--clr-text-muted); }
.text-center { text-align: center; }
.text-sm     { font-size: .875rem; }
.text-xs     { font-size: .75rem; }

/* ---------- Layout Helpers ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.grid-2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.25rem; }

.flex     { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }

/* ---------- Navigation ---------- */
.nav {
  background: var(--clr-surface);
  border-bottom: 2px solid var(--clr-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.nav-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: .6rem;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--clr-primary);
  text-decoration: none;
}
.nav-brand svg { flex-shrink: 0; }
.nav-brand span em {
  font-style: normal;
  background: linear-gradient(135deg, #7C3AED, #0EA5E9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: .25rem;
}

.nav-links { flex: 1; }
.nav-links a {
  padding: .45rem .9rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
  font-size: .9rem;
  font-weight: 500;
  color: var(--clr-text-muted);
  transition: all var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--clr-primary);
  background: var(--clr-primary-lt);
  text-decoration: none;
}

.nav-cta {
  background: var(--clr-primary) !important;
  color: #fff !important;
  padding: .45rem 1.1rem !important;
}
.nav-cta:hover { background: #6D28D9 !important; opacity: 1; }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--clr-text);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ---------- Page Header ---------- */
.page-header {
  background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 50%, #0EA5E9 100%);
  color: #fff;
  padding: 3.5rem 0 3rem;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.page-header h1, .page-header p { color: #fff; position: relative; }
.page-header p { opacity: .9; font-size: 1.1rem; max-width: 56ch; margin-top: .5rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .6rem 1.3rem;
  border-radius: var(--radius-full);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--clr-primary);
  color: #fff;
  border-color: var(--clr-primary);
}
.btn-primary:hover { background: #6D28D9; border-color: #6D28D9; text-decoration: none; }

.btn-outline {
  background: transparent;
  color: var(--clr-primary);
  border-color: var(--clr-primary);
}
.btn-outline:hover { background: var(--clr-primary-lt); text-decoration: none; }

.btn-ghost {
  background: transparent;
  color: var(--clr-text-muted);
  border-color: var(--clr-border);
}
.btn-ghost:hover { border-color: var(--clr-primary); color: var(--clr-primary); text-decoration: none; }

.btn-sm { padding: .35rem .85rem; font-size: .8rem; }
.btn-lg { padding: .8rem 1.8rem; font-size: 1rem; }

/* ---------- Cards ---------- */
.card {
  background: var(--clr-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--clr-border);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card-body { padding: 1.5rem; }
.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--clr-border);
  background: #FAFAFA;
}

/* ---------- Badges / Tags ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .2rem .65rem;
  border-radius: var(--radius-full);
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.badge-purple  { background: #EDE9FE; color: #5B21B6; }
.badge-blue    { background: #E0F2FE; color: #0369A1; }
.badge-green   { background: #D1FAE5; color: #065F46; }
.badge-amber   { background: #FEF3C7; color: #92400E; }
.badge-rose    { background: #FFE4E6; color: #9F1239; }
.badge-gray    { background: #F3F4F6; color: #374151; }
.badge-teal    { background: #CCFBF1; color: #134E4A; }

/* ---------- Section ---------- */
.section { padding: 4rem 0; }
.section-header { margin-bottom: 2.5rem; }
.section-header p { color: var(--clr-text-muted); margin-top: .4rem; }

.divider {
  height: 3px;
  width: 50px;
  background: linear-gradient(90deg, var(--clr-primary), var(--clr-secondary));
  border-radius: var(--radius-full);
  margin: .75rem 0 0;
}

/* ---------- Hero (index.html) ---------- */
.hero {
  background: linear-gradient(135deg, #4C1D95 0%, #7C3AED 40%, #0EA5E9 100%);
  color: #fff;
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--clr-bg);
  clip-path: ellipse(55% 100% at 50% 100%);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
}
.hero-content h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 3.2rem); line-height: 1.15; }
.hero-content h1 span {
  display: block;
  background: linear-gradient(90deg, #C4B5FD, #7DD3FC);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-content p { color: rgba(255,255,255,.85); font-size: 1.1rem; margin: 1.25rem 0 2rem; max-width: 48ch; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-actions .btn-primary { background: #fff; color: var(--clr-primary); border-color: #fff; }
.hero-actions .btn-primary:hover { background: #EDE9FE; }
.hero-actions .btn-outline { border-color: rgba(255,255,255,.6); color: #fff; }
.hero-actions .btn-outline:hover { background: rgba(255,255,255,.1); }

.hero-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  position: relative;
}
.hero-stat {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  backdrop-filter: blur(8px);
  color: #fff;
}
.hero-stat .stat-number { font-size: 2rem; font-weight: 800; }
.hero-stat .stat-label  { font-size: .8rem; opacity: .8; margin-top: .1rem; }
.hero-stat:first-child  { grid-column: 1 / -1; }

/* ---------- Feature Cards (index) ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}
.feature-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 1.75rem 1.5rem;
  text-align: center;
  transition: all var(--transition);
}
.feature-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1rem;
}
.feature-card h3 { font-size: 1.05rem; margin-bottom: .35rem; }
.feature-card p  { font-size: .875rem; color: var(--clr-text-muted); max-width: none; }

/* ---------- Blog Cards ---------- */
.blog-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.blog-card-img {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
}
.blog-card-body { padding: 1.25rem; flex: 1; }
.blog-card-body h3 { font-size: 1.05rem; margin: .6rem 0 .4rem; line-height: 1.35; }
.blog-card-body h3 a:hover { text-decoration: underline; }
.blog-card-body p  { font-size: .85rem; color: var(--clr-text-muted); max-width: none; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.blog-card-meta { display: flex; align-items: center; gap: .75rem; margin-top: 1rem; }
.blog-card-meta .avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.blog-card-meta-info .name { font-size: .8rem; font-weight: 600; }
.blog-card-meta-info .date { font-size: .75rem; color: var(--clr-text-light); }

/* ---------- Resource Cards ---------- */
.resource-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  transition: all var(--transition);
}
.resource-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--clr-primary); }
.resource-icon {
  font-size: 1.75rem;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.resource-card h4 { font-size: .95rem; margin-bottom: .2rem; }
.resource-card p  { font-size: .8rem; color: var(--clr-text-muted); max-width: none; line-height: 1.5; }
.resource-card .resource-footer { display: flex; align-items: center; justify-content: space-between; margin-top: .75rem; flex-wrap: wrap; gap: .5rem; }

/* ---------- Category Filter ---------- */
.filter-bar {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.filter-btn {
  padding: .35rem .9rem;
  border-radius: var(--radius-full);
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid var(--clr-border);
  background: var(--clr-surface);
  color: var(--clr-text-muted);
  transition: all var(--transition);
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--clr-primary);
  border-color: var(--clr-primary);
  color: #fff;
}

/* ---------- Forum ---------- */
.thread-item {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  transition: all var(--transition);
  margin-bottom: .75rem;
}
.thread-item:hover { border-color: var(--clr-primary); box-shadow: var(--shadow-md); }
.thread-votes {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .15rem;
  min-width: 44px;
}
.vote-btn {
  background: none;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: .7rem;
  color: var(--clr-text-muted);
  transition: all var(--transition);
}
.vote-btn:hover { border-color: var(--clr-primary); color: var(--clr-primary); }
.vote-count { font-weight: 700; font-size: .85rem; }
.thread-content { flex: 1; min-width: 0; }
.thread-title { font-weight: 600; font-size: 1rem; color: var(--clr-text); margin-bottom: .3rem; }
.thread-title:hover { color: var(--clr-primary); text-decoration: underline; }
.thread-excerpt { font-size: .85rem; color: var(--clr-text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: none; }
.thread-meta { display: flex; align-items: center; gap: 1rem; margin-top: .6rem; flex-wrap: wrap; }
.thread-meta span { font-size: .75rem; color: var(--clr-text-light); display: flex; align-items: center; gap: .25rem; }
.thread-stats { display: flex; flex-direction: column; align-items: center; gap: .4rem; min-width: 60px; text-align: center; }
.thread-stats .stat { font-size: .75rem; color: var(--clr-text-muted); }
.thread-stats .stat strong { display: block; font-size: 1rem; color: var(--clr-text); }

/* ---------- Events / Calendar ---------- */
.calendar-wrap {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--clr-border);
}
.calendar-header h3 { font-size: 1.1rem; }
.cal-nav { background: none; border: 1.5px solid var(--clr-border); border-radius: var(--radius-sm); width: 34px; height: 34px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: .9rem; color: var(--clr-text-muted); transition: all var(--transition); }
.cal-nav:hover { border-color: var(--clr-primary); color: var(--clr-primary); }
.calendar-grid { padding: 1rem 1.5rem 1.5rem; }
.cal-days-header { display: grid; grid-template-columns: repeat(7, 1fr); gap: .25rem; margin-bottom: .5rem; }
.cal-day-name { text-align: center; font-size: .72rem; font-weight: 600; color: var(--clr-text-muted); text-transform: uppercase; padding: .25rem 0; }
.cal-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: .25rem; }
.cal-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: .85rem;
  position: relative;
  transition: all var(--transition);
  padding: .2rem;
  min-height: 40px;
}
.cal-day:hover { background: var(--clr-primary-lt); }
.cal-day.empty { cursor: default; }
.cal-day.empty:hover { background: none; }
.cal-day.today { background: var(--clr-primary); color: #fff; font-weight: 700; }
.cal-day.today:hover { background: #6D28D9; }
.cal-day.has-event::after {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--clr-accent);
}
.cal-day.today.has-event::after { background: #fff; }

.event-list-item {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-left: 4px solid var(--clr-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1rem 1.25rem;
  margin-bottom: .75rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  transition: all var(--transition);
}
.event-list-item:hover { box-shadow: var(--shadow-md); transform: translateX(3px); }
.event-date-box {
  min-width: 52px;
  text-align: center;
  flex-shrink: 0;
}
.event-date-box .day   { font-size: 1.6rem; font-weight: 800; color: var(--clr-primary); line-height: 1; }
.event-date-box .month { font-size: .7rem; text-transform: uppercase; font-weight: 600; color: var(--clr-text-muted); letter-spacing: .05em; }
.event-info h4  { font-size: .95rem; margin-bottom: .25rem; }
.event-info p   { font-size: .82rem; color: var(--clr-text-muted); max-width: none; }
.event-info .event-meta { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }

/* ---------- Sidebar ---------- */
.layout-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
}
.sidebar-widget {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.sidebar-widget-header {
  padding: .9rem 1.25rem;
  border-bottom: 1px solid var(--clr-border);
  background: var(--clr-primary-lt);
}
.sidebar-widget-header h4 { font-size: .9rem; color: var(--clr-primary); }
.sidebar-widget-body { padding: 1rem 1.25rem; }

/* ---------- Search Bar ---------- */
.search-bar {
  display: flex;
  gap: .5rem;
  margin-bottom: 1.5rem;
}
.search-input {
  flex: 1;
  padding: .6rem 1rem;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-full);
  font-size: .9rem;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color var(--transition);
  background: var(--clr-surface);
}
.search-input:focus { border-color: var(--clr-primary); }

/* ---------- Footer ---------- */
.footer {
  background: var(--clr-text);
  color: rgba(255,255,255,.8);
  padding: 3rem 0 2rem;
  margin-top: 5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
.footer-brand { font-size: 1.2rem; font-weight: 800; color: #fff; margin-bottom: .75rem; display: block; }
.footer p { color: rgba(255,255,255,.6); font-size: .875rem; max-width: 28ch; }
.footer h5 { color: #fff; font-size: .9rem; margin-bottom: .85rem; }
.footer-links li { margin-bottom: .4rem; }
.footer-links a { color: rgba(255,255,255,.6); font-size: .85rem; transition: color var(--transition); }
.footer-links a:hover { color: #fff; text-decoration: none; }
.footer-social { margin-top: 1.25rem; }
.footer-social-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: rgba(255,255,255,.75);
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  padding: .45rem .9rem;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 20px;
  transition: all var(--transition);
}
.footer-social-link:hover {
  background: rgba(255,255,255,.12);
  color: #fff;
  border-color: rgba(255,255,255,.5);
  text-decoration: none;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-bottom p { color: rgba(255,255,255,.45); font-size: .8rem; margin: 0; max-width: none; }

/* ---------- Neurodiversity Color Stripe ---------- */
.nd-stripe {
  height: 5px;
  background: linear-gradient(90deg,
    #FF0000 0%,
    #FF7700 14.28%,
    #FFDD00 28.57%,
    #00CC00 42.86%,
    #0099FF 57.14%,
    #8844FF 71.43%,
    #FF44CC 85.71%,
    #FF0000 100%
  );
}

/* ---------- Accessibility helpers ---------- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}
:focus-visible {
  outline: 3px solid var(--clr-primary);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---------- Empty / Placeholder States ---------- */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--clr-text-muted);
}
.empty-state .icon { font-size: 3rem; margin-bottom: .75rem; }
.empty-state h3 { font-size: 1.1rem; margin-bottom: .4rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .layout-sidebar { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .nav-links { display: none; flex-direction: column; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 68px;
    left: 0; right: 0;
    background: var(--clr-surface);
    border-bottom: 1px solid var(--clr-border);
    padding: 1rem;
    box-shadow: var(--shadow-md);
    z-index: 99;
  }
  .nav-hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr; }
  .thread-item { flex-wrap: wrap; }
  .thread-stats { flex-direction: row; min-width: unset; }
  .hero { padding: 3.5rem 0 3rem; }
  .section { padding: 2.5rem 0; }
}

/* ---------- bbPress Forum Styles ---------- */
#bbpress-forums {
  width: 100%;
  font-family: var(--font-sans);
}
#bbpress-forums li.bbp-header,
#bbpress-forums li.bbp-footer {
  background: var(--clr-primary-lt);
  border-radius: var(--radius-sm);
  padding: .6rem 1rem;
}
#bbpress-forums li.bbp-header span,
#bbpress-forums li.bbp-footer span {
  font-weight: 600;
  font-size: .82rem;
  color: var(--clr-primary);
  text-transform: uppercase;
  letter-spacing: .04em;
}
#bbpress-forums ul.bbp-forums,
#bbpress-forums ul.bbp-topics,
#bbpress-forums ul.bbp-replies {
  width: 100%;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--clr-surface);
}
#bbpress-forums li.bbp-forum,
#bbpress-forums li.bbp-topic,
#bbpress-forums li.bbp-reply {
  border-bottom: 1px solid var(--clr-border);
  padding: 1rem 1.25rem;
  transition: background var(--transition);
}
#bbpress-forums li.bbp-forum:last-child,
#bbpress-forums li.bbp-topic:last-child,
#bbpress-forums li.bbp-reply:last-child {
  border-bottom: none;
}
#bbpress-forums li.bbp-forum:hover,
#bbpress-forums li.bbp-topic:hover {
  background: var(--clr-bg);
}
#bbpress-forums .bbp-forum-title a,
#bbpress-forums .bbp-topic-title a {
  font-weight: 600;
  font-size: 1rem;
  color: var(--clr-text);
}
#bbpress-forums .bbp-forum-title a:hover,
#bbpress-forums .bbp-topic-title a:hover {
  color: var(--clr-primary);
  text-decoration: underline;
}
#bbpress-forums .bbp-forum-content,
#bbpress-forums .bbp-topic-content {
  font-size: .875rem;
  color: var(--clr-text-muted);
  margin-top: .25rem;
}
#bbpress-forums .bbp-topic-meta,
#bbpress-forums .bbp-forum-meta {
  font-size: .78rem;
  color: var(--clr-text-light);
  margin-top: .35rem;
}
/* Search bar */
#bbp-search-form input[type="text"] {
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-full);
  padding: .5rem 1rem;
  font-family: var(--font-sans);
  font-size: .9rem;
  outline: none;
  transition: border-color var(--transition);
}
#bbp-search-form input[type="text"]:focus {
  border-color: var(--clr-primary);
}
#bbp-search-form input[type="submit"] {
  background: var(--clr-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  padding: .5rem 1.1rem;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  margin-left: .4rem;
  transition: background var(--transition);
}
#bbp-search-form input[type="submit"]:hover {
  background: #6D28D9;
}
/* Hide sub-menus by default */
.nav-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 999;
    list-style: none;
    padding: 0;
    margin: 0;
    border-radius: 6px;
}

/* ── User nav dropdown ───────────────────────── */
.user-nav { position: relative; margin-left: .5rem; }
.user-nav-btn {
  display: flex; align-items: center; gap: .5rem;
  background: none; border: none; cursor: pointer;
  padding: .35rem .6rem; border-radius: var(--radius-full);
  color: var(--clr-text); font-size: .9rem; font-weight: 500;
  transition: all var(--transition);
}
.user-nav-btn:hover { background: var(--clr-primary-lt); color: var(--clr-primary); }
.user-nav-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.user-nav-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-nav-chevron { transition: transform var(--transition); flex-shrink: 0; }
.user-nav-btn[aria-expanded="true"] .user-nav-chevron { transform: rotate(180deg); }
.user-nav-dropdown {
  display: none; position: absolute; top: calc(100% + .5rem); right: 0;
  background: var(--clr-bg); border: 1px solid var(--clr-border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-md);
  min-width: 180px; padding: .4rem 0; list-style: none; z-index: 200;
}
.user-nav-dropdown a {
  display: block; padding: .55rem 1rem; font-size: .875rem;
  color: var(--clr-text); text-decoration: none; white-space: nowrap;
  transition: background var(--transition);
}
.user-nav-dropdown a:hover { background: var(--clr-primary-lt); color: var(--clr-primary); }
.user-nav-divider { height: 1px; background: var(--clr-border); margin: .4rem 0; }
.user-nav.open .user-nav-dropdown { display: block; }

/* Show on hover */
.nav-menu li:hover > .sub-menu {
    display: block;
}

/* Sub-menu item styles */
.nav-menu .sub-menu li a {
    display: block;
    padding: 10px 16px;
    white-space: nowrap;
}

/* Make the parent item position:relative so sub-menu anchors to it */
.nav-menu li {
    position: relative;
}

