/*
Theme Name: Pro Real Estate Network
Theme URI: https://prorealestatenetwork.com
Author: Pro Real Estate Network
Description: The professional forum and community for real estate agents and brokers.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: pro-realestate-network
Tags: real estate, forum, community, agents, brokers
*/

/* =============================================
   DESIGN TOKENS — Pro Network Hub
   ============================================= */
:root {
  /* Navy + Emerald + Amber palette */
  --navy:         #0D1B2A;
  --navy-mid:     #142233;
  --navy-up:      #1A2E42;
  --navy-lt:      #243F58;
  --emerald:      #10B981;
  --emerald-dk:   #059669;
  --emerald-lt:   #34D399;
  --emerald-pale: #ECFDF5;
  --amber:        #F59E0B;
  --amber-dk:     #D97706;
  --amber-pale:   #FFFBEB;
  --slate:        #F1F5F9;
  --slate-dk:     #E2E8F0;
  --slate-xd:     #CBD5E1;
  --white:        #FFFFFF;
  --mist:         #94A3B8;
  --ink:          #0F172A;
  --ink-mid:      #1E293B;
  --ink-lt:       #334155;
  --text-body:    #475569;
  --border:       #E2E8F0;
  --border-dk:    #CBD5E1;
  --border-dark:  rgba(255,255,255,0.08);

  /* Category colors */
  --cat-market:   #8B5CF6;
  --cat-leads:    #10B981;
  --cat-contract: #F59E0B;
  --cat-tech:     #3B82F6;
  --cat-broker:   #EF4444;
  --cat-listings: #EC4899;

  /* Fonts — Manrope + Spectral, both new to series */
  --font-ui:      'Manrope', 'Helvetica Neue', sans-serif;
  --font-body:    'Spectral', Georgia, serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;

  /* Motion */
  --ease:       cubic-bezier(0.22, 1, 0.36, 1);
  --transition: all 0.26s var(--ease);
  --fast:       all 0.14s ease;

  /* Layout */
  --max-w:    1380px;
  --gutter:   clamp(1.25rem, 4vw, 3.5rem);
  --radius:   6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --sidebar:  300px;
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--slate);
  color: var(--ink-mid);
  font-family: var(--font-ui);
  font-size: 0.95rem;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img  { display: block; max-width: 100%; }
a    { color: var(--emerald-dk); text-decoration: none; transition: var(--fast); }
a:hover { color: var(--emerald); }
ul, ol { list-style: none; }
p { margin-bottom: 1.1em; }
p:last-child { margin-bottom: 0; }

/* =============================================
   TYPOGRAPHY
   ============================================= */
h1, h2, h3, h4 {
  font-family: var(--font-ui);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.18;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.2rem, 5vw, 4.5rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 3rem); font-weight: 700; }
h3 { font-size: clamp(1.1rem, 2vw, 1.6rem); font-weight: 700; }
h4 { font-size: 0.95rem; font-weight: 700; }

/* Forum category badge */
.cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-ui);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border-radius: 100px;
}
.cat-badge--market   { background: rgba(139,92,246,0.12); color: var(--cat-market);   border: 1px solid rgba(139,92,246,0.25); }
.cat-badge--leads    { background: rgba(16,185,129,0.1);  color: var(--cat-leads);    border: 1px solid rgba(16,185,129,0.25); }
.cat-badge--contract { background: rgba(245,158,11,0.1);  color: var(--cat-contract); border: 1px solid rgba(245,158,11,0.25); }
.cat-badge--tech     { background: rgba(59,130,246,0.1);  color: var(--cat-tech);     border: 1px solid rgba(59,130,246,0.25); }
.cat-badge--broker   { background: rgba(239,68,68,0.1);   color: var(--cat-broker);   border: 1px solid rgba(239,68,68,0.25); }
.cat-badge--listings { background: rgba(236,72,153,0.1);  color: var(--cat-listings); border: 1px solid rgba(236,72,153,0.25); }
.cat-badge--pinned   { background: rgba(245,158,11,0.12); color: var(--amber-dk);     border: 1px solid rgba(245,158,11,0.3); }

/* Section label */
.section-label {
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--emerald-dk);
  display: block;
  margin-bottom: 0.5rem;
}
.section-label--amber { color: var(--amber-dk); }
.section-label--mist  { color: var(--mist); }
.section-label--white { color: rgba(255,255,255,0.55); }

/* Rule */
.rule { display: block; width: 40px; height: 3px; background: var(--emerald); border-radius: 2px; margin: 0.85rem 0; }
.rule--amber  { background: var(--amber); }
.rule--white  { background: rgba(255,255,255,0.3); }
.rule--center { margin-left: auto; margin-right: auto; }

/* =============================================
   LAYOUT
   ============================================= */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  width: 100%;
}
.section     { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section--sm { padding: clamp(2rem, 4vw, 4rem) 0; }

/* Forum page layout: main + sidebar */
.forum-layout {
  display: grid;
  grid-template-columns: 1fr var(--sidebar);
  gap: 2rem;
  align-items: start;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.6rem;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-emerald { background: var(--emerald); color: var(--white); border-color: var(--emerald); }
.btn-emerald:hover { background: var(--emerald-dk); color: var(--white); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(16,185,129,0.35); }
.btn-navy { background: var(--navy); color: var(--white); border-color: var(--navy); }
.btn-navy:hover { background: var(--navy-mid); color: var(--white); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(13,27,42,0.35); }
.btn-amber { background: var(--amber); color: var(--ink); border-color: var(--amber); }
.btn-amber:hover { background: var(--amber-dk); color: var(--white); transform: translateY(-1px); }
.btn-outline-emerald { background: transparent; color: var(--emerald-dk); border-color: var(--emerald); }
.btn-outline-emerald:hover { background: var(--emerald); color: var(--white); transform: translateY(-1px); }
.btn-outline-navy { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline-navy:hover { background: var(--navy); color: var(--white); }
.btn-outline-white { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.4); }
.btn-outline-white:hover { background: rgba(255,255,255,0.1); border-color: var(--white); }
.btn-white { background: var(--white); color: var(--navy); border-color: var(--white); }
.btn-white:hover { background: var(--slate); color: var(--emerald-dk); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,0.12); }
.btn-slate { background: var(--slate-dk); color: var(--ink-lt); border-color: var(--border-dk); }
.btn-slate:hover { background: var(--border-dk); color: var(--ink); }
.btn-lg { padding: 0.9rem 2rem; font-size: 0.84rem; }
.btn-xl { padding: 1rem 2.2rem; font-size: 0.9rem; }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.66rem; }
.btn-arrow::after { content: ' →'; display: inline-block; transition: transform 0.16s; }
.btn-arrow:hover::after { transform: translateX(4px); }

/* =============================================
   IMAGE PLACEHOLDERS
   ============================================= */
.img-ph {
  width: 100%; height: 100%; min-height: 180px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--navy-up) 0%, var(--navy) 100%);
  position: relative; overflow: hidden;
}
.img-ph::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 50% 40% at 70% 30%, rgba(16,185,129,0.08) 0%, transparent 60%);
}
.img-ph-txt { font-family: var(--font-mono); font-size: 0.56rem; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255,255,255,0.22); z-index: 1; text-align: center; padding: 1rem; line-height: 2; }
.img-ph--light { background: linear-gradient(135deg, var(--slate) 0%, var(--slate-dk) 100%); }
.img-ph--light .img-ph-txt { color: rgba(0,0,0,0.2); }

/* =============================================
   MEMBER AVATAR
   ============================================= */
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--navy-up);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-ui); font-size: 0.78rem; font-weight: 700;
  color: var(--white); flex-shrink: 0; overflow: hidden;
}
.avatar--lg { width: 48px; height: 48px; font-size: 1rem; }
.avatar--sm { width: 28px; height: 28px; font-size: 0.65rem; }
.avatar--emerald { background: linear-gradient(135deg, var(--emerald-dk), var(--emerald)); }
.avatar--amber   { background: linear-gradient(135deg, var(--amber-dk), var(--amber)); }
.avatar--purple  { background: linear-gradient(135deg, #7C3AED, #8B5CF6); }
.avatar--blue    { background: linear-gradient(135deg, #1D4ED8, #3B82F6); }
.avatar--rose    { background: linear-gradient(135deg, #BE185D, #EC4899); }

/* Member badge chip */
.member-badge {
  font-family: var(--font-ui);
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.18rem 0.55rem;
  border-radius: 100px;
}
.member-badge--pro      { background: rgba(16,185,129,0.12);  color: var(--emerald-dk); }
.member-badge--broker   { background: rgba(245,158,11,0.12);  color: var(--amber-dk); }
.member-badge--mod      { background: rgba(139,92,246,0.12);  color: var(--cat-market); }
.member-badge--verified { background: rgba(59,130,246,0.1);   color: var(--cat-tech); }

/* Online indicator */
.online-dot { width: 8px; height: 8px; background: var(--emerald); border-radius: 50%; border: 2px solid var(--white); box-shadow: 0 0 6px rgba(16,185,129,0.6); flex-shrink: 0; }

/* =============================================
   HEADER
   ============================================= */
#site-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--navy);
  border-bottom: 1px solid var(--border-dark);
  transition: var(--transition);
}
#site-header.scrolled {
  background: rgba(13,27,42,0.97);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 var(--border-dark), 0 8px 32px rgba(0,0,0,0.4);
}
.header-accent { height: 3px; background: linear-gradient(90deg, var(--emerald) 0%, var(--emerald-lt) 50%, var(--amber) 100%); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem var(--gutter); gap: 2rem;
  max-width: var(--max-w); margin: 0 auto;
}
.site-logo { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; flex-shrink: 0; }
.logo-icon {
  width: 34px; height: 34px; background: var(--emerald); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: var(--transition);
}
.logo-icon svg { width: 20px; height: 20px; }
.site-logo:hover .logo-icon { background: var(--emerald-dk); transform: scale(1.06); }
.logo-text { line-height: 1.1; }
.logo-name { font-family: var(--font-ui); font-size: 1rem; font-weight: 800; color: var(--white); display: block; letter-spacing: -0.02em; }
.logo-name em { color: var(--emerald-lt); font-style: normal; }
.logo-sub { font-family: var(--font-ui); font-size: 0.5rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(255,255,255,0.28); display: block; }
.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-links a { font-family: var(--font-ui); font-size: 0.75rem; font-weight: 600; color: rgba(255,255,255,0.6); transition: color 0.16s; position: relative; padding-bottom: 2px; }
.nav-links a::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 2px; background: var(--emerald); border-radius: 2px; transition: width 0.2s var(--ease); }
.nav-links a:hover, .nav-links a.active { color: var(--white); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 4px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--white); border-radius: 2px; transition: var(--transition); }
.mobile-nav { position: fixed; inset: 0; background: var(--navy); z-index: 999; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.75rem; transform: translateX(-100%); transition: transform 0.4s var(--ease); }
.mobile-nav.open { transform: translateX(0); }
.mobile-nav a { font-family: var(--font-ui); font-size: 2.2rem; font-weight: 800; color: var(--white); letter-spacing: -0.03em; }
.mobile-nav a:hover { color: var(--emerald-lt); }

/* =============================================
   PAGE HERO
   ============================================= */
.page-hero { background: var(--navy); padding: clamp(4rem, 8vw, 7rem) 0 clamp(2.5rem, 4vw, 4rem); position: relative; overflow: hidden; }
.page-hero::before { content: ''; position: absolute; top: -20%; right: -5%; width: 600px; height: 600px; background: radial-gradient(circle, rgba(16,185,129,0.07) 0%, transparent 65%); pointer-events: none; }
.page-hero::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--emerald), var(--emerald-lt), var(--amber), transparent); }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: var(--white); margin-bottom: 0.75rem; }
.page-hero .hero-sub { color: rgba(255,255,255,0.5); font-size: 1rem; max-width: 580px; }
.breadcrumb { font-family: var(--font-ui); font-size: 0.6rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255,255,255,0.38); display: block; margin-bottom: 1rem; }
.breadcrumb a { color: rgba(255,255,255,0.38); }
.breadcrumb a:hover { color: var(--emerald-lt); }
.breadcrumb .sep { margin: 0 0.45rem; opacity: 0.3; }

/* =============================================
   FORUM THREAD ROW — Core UI element
   ============================================= */
.thread-list { display: flex; flex-direction: column; gap: 0; }
.thread-row {
  background: var(--white); border: 1px solid var(--border); border-bottom: none;
  padding: 1.1rem 1.4rem; display: flex; align-items: center; gap: 1.25rem;
  transition: var(--transition); position: relative;
}
.thread-row:first-child { border-radius: var(--radius-md) var(--radius-md) 0 0; }
.thread-row:last-child  { border-bottom: 1px solid var(--border); border-radius: 0 0 var(--radius-md) var(--radius-md); }
.thread-row:only-child  { border-radius: var(--radius-md); border-bottom: 1px solid var(--border); }
.thread-row:hover { background: var(--emerald-pale); border-color: rgba(16,185,129,0.2); z-index: 1; }
.thread-row.pinned { background: var(--amber-pale); }
.thread-row.pinned:hover { background: #FEF3C7; }
.thread-icon { flex-shrink: 0; width: 36px; height: 36px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.thread-icon--active { background: var(--emerald-pale); }
.thread-icon--hot    { background: rgba(239,68,68,0.1); }
.thread-icon--pinned { background: var(--amber-pale); }
.thread-icon--solved { background: rgba(16,185,129,0.1); }
.thread-main { flex: 1; min-width: 0; }
.thread-title { font-family: var(--font-ui); font-size: 0.9rem; font-weight: 700; color: var(--ink); margin-bottom: 0.25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 0.14s; }
.thread-row:hover .thread-title { color: var(--emerald-dk); }
.thread-meta { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.thread-author { font-family: var(--font-ui); font-size: 0.68rem; font-weight: 600; color: var(--mist); }
.thread-author strong { color: var(--ink-lt); }
.thread-time { font-family: var(--font-ui); font-size: 0.65rem; color: var(--mist); }
.thread-stats { display: flex; gap: 1.25rem; flex-shrink: 0; }
.thread-stat { text-align: center; }
.thread-stat-val { font-family: var(--font-ui); font-size: 0.9rem; font-weight: 700; color: var(--ink-lt); display: block; }
.thread-stat-label { font-family: var(--font-ui); font-size: 0.56rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mist); display: block; }
.thread-last { flex-shrink: 0; max-width: 160px; display: flex; align-items: center; gap: 0.5rem; }
.thread-last-info { min-width: 0; }
.thread-last-name { font-family: var(--font-ui); font-size: 0.68rem; font-weight: 600; color: var(--ink-lt); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.thread-last-time { font-family: var(--font-ui); font-size: 0.6rem; color: var(--mist); display: block; }

/* =============================================
   FORUM CATEGORY CARDS
   ============================================= */
.forum-cat-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 1.5rem; display: flex; gap: 1.1rem; align-items: flex-start;
  transition: var(--transition); text-decoration: none; position: relative; overflow: hidden;
}
.forum-cat-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; border-radius: var(--radius-md) 0 0 var(--radius-md); }
.forum-cat-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.08); transform: translateY(-2px); border-color: transparent; }
.forum-cat-icon { width: 44px; height: 44px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }
.forum-cat-body { flex: 1; min-width: 0; }
.forum-cat-name { font-family: var(--font-ui); font-size: 0.9rem; font-weight: 700; color: var(--ink); margin-bottom: 0.25rem; }
.forum-cat-desc { font-family: var(--font-ui); font-size: 0.75rem; color: var(--mist); line-height: 1.5; margin-bottom: 0.5rem; }
.forum-cat-stats { display: flex; gap: 1rem; }
.forum-cat-stat { font-family: var(--font-ui); font-size: 0.65rem; font-weight: 600; color: var(--mist); }
.forum-cat-stat strong { color: var(--ink-lt); }

/* =============================================
   BLOG POST CARDS
   ============================================= */
.post-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; transition: var(--transition); display: flex; flex-direction: column; position: relative; }
.post-card:hover { box-shadow: 0 10px 32px rgba(0,0,0,0.09); transform: translateY(-3px); border-color: transparent; }
.post-card__img { aspect-ratio: 16/9; overflow: hidden; position: relative; flex-shrink: 0; background: var(--slate); }
.post-card__img .img-ph { min-height: unset; transition: transform 0.45s var(--ease); }
.post-card:hover .post-card__img .img-ph { transform: scale(1.05); }
.post-card__body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.post-card__cat { margin-bottom: 0.55rem; }
.post-card__title { font-family: var(--font-ui); font-size: 0.95rem; font-weight: 700; color: var(--ink); line-height: 1.35; margin-bottom: 0.5rem; flex: 1; transition: color 0.16s; }
.post-card:hover .post-card__title { color: var(--emerald-dk); }
.post-card__excerpt { font-family: var(--font-body); font-style: italic; font-size: 0.85rem; color: var(--text-body); line-height: 1.65; margin-bottom: 0.85rem; }
.post-card__meta { font-family: var(--font-ui); font-size: 0.62rem; font-weight: 600; color: var(--mist); display: flex; align-items: center; gap: 0.6rem; padding-top: 0.75rem; border-top: 1px solid var(--border); margin-top: auto; }

/* Featured hero post */
.post-hero-card { border-radius: var(--radius-md); overflow: hidden; position: relative; display: flex; flex-direction: column; min-height: 360px; text-decoration: none; }
.post-hero-card-img { position: absolute; inset: 0; width: 100%; height: 100%; }
.post-hero-card-img .img-ph { min-height: unset; width: 100%; height: 100%; }
.post-hero-overlay { position: absolute; inset: 0; z-index: 1; background: linear-gradient(to right, rgba(13,27,42,0.95) 0%, rgba(13,27,42,0.55) 55%, rgba(13,27,42,0.1) 100%); }
.post-hero-body { position: relative; z-index: 2; padding: 2.5rem; margin-top: auto; max-width: 580px; }
.post-hero-title { font-family: var(--font-ui); font-size: clamp(1.3rem, 2.5vw, 2.2rem); font-weight: 800; color: var(--white); line-height: 1.2; letter-spacing: -0.02em; margin-bottom: 0.75rem; }

/* =============================================
   SIDEBAR WIDGETS
   ============================================= */
.sidebar-widget { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; margin-bottom: 1.5rem; }
.sidebar-widget:last-child { margin-bottom: 0; }
.widget-header { padding: 0.85rem 1.25rem; background: var(--slate); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.widget-title { font-family: var(--font-ui); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-lt); }
.widget-body  { padding: 1.1rem; }

/* Top member row */
.top-member { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
.top-member:last-child { border-bottom: none; }
.top-member-info { flex: 1; min-width: 0; }
.top-member-name { font-family: var(--font-ui); font-size: 0.8rem; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.top-member-role { font-family: var(--font-ui); font-size: 0.62rem; color: var(--mist); }
.top-member-posts { font-family: var(--font-ui); font-size: 0.7rem; font-weight: 700; color: var(--emerald-dk); flex-shrink: 0; }

/* Activity feed item */
.activity-item { display: flex; align-items: flex-start; gap: 0.65rem; padding: 0.65rem 0; border-bottom: 1px solid var(--border); }
.activity-item:last-child { border-bottom: none; }
.activity-text { flex: 1; font-family: var(--font-ui); font-size: 0.74rem; color: var(--text-body); line-height: 1.45; }
.activity-text strong { color: var(--ink); font-weight: 700; }
.activity-time { font-family: var(--font-ui); font-size: 0.6rem; color: var(--mist); white-space: nowrap; }

/* =============================================
   REPLY / POST CARD (single thread view)
   ============================================= */
.reply-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.5rem; display: flex; gap: 1.25rem; margin-bottom: 1.25rem; }
.reply-card.original { border-color: rgba(16,185,129,0.25); border-left: 3px solid var(--emerald); }
.reply-author { flex-shrink: 0; width: 56px; display: flex; flex-direction: column; align-items: center; gap: 0.4rem; }
.reply-author-name { font-family: var(--font-ui); font-size: 0.6rem; font-weight: 700; color: var(--ink-lt); text-align: center; word-break: break-word; }
.reply-content { flex: 1; min-width: 0; }
.reply-content-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.85rem; flex-wrap: wrap; gap: 0.5rem; }
.reply-author-full { font-family: var(--font-ui); font-size: 0.82rem; font-weight: 700; color: var(--ink); }
.reply-time { font-family: var(--font-ui); font-size: 0.65rem; color: var(--mist); }
.reply-body { font-family: var(--font-body); font-size: 0.95rem; line-height: 1.78; color: var(--ink-mid); }
.reply-body p { margin-bottom: 0.9em; }
.reply-body strong { font-weight: 700; color: var(--ink); }
.reply-footer { display: flex; align-items: center; gap: 0.75rem; margin-top: 1rem; padding-top: 0.85rem; border-top: 1px solid var(--border); flex-wrap: wrap; }
.reply-action { font-family: var(--font-ui); font-size: 0.68rem; font-weight: 600; color: var(--mist); display: flex; align-items: center; gap: 0.3rem; cursor: pointer; transition: color 0.14s; background: none; border: none; }
.reply-action:hover { color: var(--emerald-dk); }
.reply-action.liked { color: var(--emerald-dk); }

/* Solved badge */
.solved-badge { display: inline-flex; align-items: center; gap: 0.3rem; background: var(--emerald-pale); color: var(--emerald-dk); border: 1px solid rgba(16,185,129,0.3); border-radius: 100px; padding: 0.2rem 0.65rem; font-family: var(--font-ui); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }

/* =============================================
   STATS BAND
   ============================================= */
.stats-band { background: var(--navy); border-top: 1px solid var(--border-dark); border-bottom: 1px solid var(--border-dark); position: relative; overflow: hidden; }
.stats-band::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 100% at 50% 50%, rgba(16,185,129,0.06) 0%, transparent 65%); pointer-events: none; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); position: relative; z-index: 1; }
.stat-item { padding: 2.5rem 2rem; text-align: center; border-right: 1px solid var(--border-dark); }
.stat-item:last-child { border-right: none; }
.stat-val { font-family: var(--font-ui); font-size: clamp(2rem, 4vw, 4.5rem); font-weight: 800; color: var(--white); line-height: 1; display: block; letter-spacing: -0.04em; }
.stat-val em { color: var(--emerald-lt); font-style: normal; }
.stat-label { font-family: var(--font-ui); font-size: 0.6rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255,255,255,0.35); display: block; margin-top: 0.4rem; }

/* =============================================
   CTA SECTION
   ============================================= */
.cta-section { background: var(--navy); position: relative; overflow: hidden; }
.cta-section::before { content: ''; position: absolute; top: -30%; right: -5%; width: 500px; height: 500px; background: radial-gradient(circle, rgba(16,185,129,0.08) 0%, transparent 65%); pointer-events: none; }
.cta-inner { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 3rem; flex-wrap: wrap; }
.cta-inner h2 { color: var(--white); }
.cta-inner p  { color: rgba(255,255,255,0.5); margin-top: 0.4rem; }

/* =============================================
   CONTACT FORM
   ============================================= */
.contact-form { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 2.5rem; }
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-family: var(--font-ui); font-size: 0.65rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-lt); margin-bottom: 0.4rem; }
.form-group input, .form-group select, .form-group textarea { width: 100%; border: 1.5px solid var(--border); border-radius: var(--radius); background: var(--slate); color: var(--ink); padding: 0.75rem 1rem; font-family: var(--font-ui); font-size: 0.9rem; outline: none; transition: border-color 0.2s, box-shadow 0.2s; appearance: none; }
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--mist); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--emerald); box-shadow: 0 0 0 3px rgba(16,185,129,0.1); background: var(--white); }
.form-group textarea { height: 130px; resize: vertical; }
.form-group select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2310B981' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; background-color: var(--slate); padding-right: 2.5rem; }

/* =============================================
   SINGLE POST / ARTICLE
   ============================================= */
.post-content { font-family: var(--font-body); font-size: 1.02rem; line-height: 1.88; color: var(--ink-mid); }
.post-content h2 { font-family: var(--font-ui); font-size: 1.6rem; margin: 2.5rem 0 0.85rem; color: var(--navy); }
.post-content h3 { font-family: var(--font-ui); font-size: 1.2rem; margin: 2rem 0 0.7rem; }
.post-content p  { margin-bottom: 1.3em; }
.post-content ul, .post-content ol { margin: 0 0 1.3em 1.5rem; list-style: disc; }
.post-content li { margin-bottom: 0.45em; line-height: 1.75; }
.post-content strong { color: var(--ink); font-weight: 700; font-family: var(--font-ui); }
.post-content a  { color: var(--emerald-dk); border-bottom: 1px solid rgba(16,185,129,0.3); }
.post-content a:hover { color: var(--emerald); }

/* =============================================
   FOOTER
   ============================================= */
#site-footer { background: var(--navy); padding: 4.5rem 0 0; position: relative; }
#site-footer::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--emerald), var(--emerald-lt), var(--amber), transparent 80%); }
.footer-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 3rem; padding-bottom: 3.5rem; border-bottom: 1px solid var(--border-dark); }
.footer-brand p { font-family: var(--font-ui); font-size: 0.84rem; color: rgba(255,255,255,0.32); line-height: 1.72; margin-top: 1rem; max-width: 260px; }
.footer-col h5 { font-family: var(--font-ui); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(255,255,255,0.5); margin-bottom: 1.25rem; }
.footer-col ul { display: flex; flex-direction: column; gap: 0.65rem; }
.footer-col a { font-family: var(--font-ui); font-size: 0.84rem; color: rgba(255,255,255,0.3); transition: color 0.16s; }
.footer-col a:hover { color: var(--emerald-lt); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding: 1.5rem 0; gap: 1rem; flex-wrap: wrap; }
.footer-bottom p { font-family: var(--font-ui); font-size: 0.68rem; color: rgba(255,255,255,0.18); margin: 0; letter-spacing: 0.06em; }

/* =============================================
   ANIMATIONS
   ============================================= */
.fade-up { opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-up:nth-child(2) { transition-delay: 0.08s; }
.fade-up:nth-child(3) { transition-delay: 0.16s; }
.fade-up:nth-child(4) { transition-delay: 0.24s; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1100px) {
  .forum-layout { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
  .thread-stats { display: none; }
  .thread-last { display: none; }
}
@media (max-width: 900px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .form-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .reply-card { flex-direction: column; }
  .reply-author { flex-direction: row; width: auto; }
}
