@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+TC:wght@500;600;700&family=Noto+Sans+TC:wght@400;500;600&display=swap');

:root {
  --moksha-bg: #F0EAD6;
  --moksha-panel: #FFFFFF;
  --moksha-panel-contrast: #F8F4E8;
  --moksha-panel-border: rgba(51, 51, 51, 0.08);
  --moksha-primary: #8B5A2B;
  --moksha-primary-dark: #71451C;
  --moksha-secondary: #2C2C2C;
  --moksha-accent: #5F7D8E;
  --moksha-text: #333333;
  --moksha-text-light: #666666;
  --moksha-success: #5E8B49;
  --moksha-danger: #C4514F;
  --moksha-radius-lg: 28px;
  --moksha-radius-md: 18px;
  --moksha-radius-sm: 12px;
  --moksha-shadow: 0 15px 35px rgba(47, 35, 20, 0.08);
}

body {
  font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--moksha-bg);
  color: var(--moksha-text);
  min-height: 100vh;
}

body.logged-in .site {
  background: transparent;
}

h1, h2 {
  font-family: 'Noto Serif TC', 'Noto Sans TC', serif;
  font-weight: 600;
  color: var(--moksha-primary);
}

h3, h4 {
  font-family: 'Noto Serif TC', 'Noto Sans TC', serif;
  font-weight: 500;
  color: var(--moksha-secondary);
}

.site-header,
.buddyboss-header,
.bb-header {
  background: #FFFFFF;
  border-bottom: 1px solid var(--moksha-panel-border);
}

.site #buddypress .bp-navs:not(.tabbed) {
  background: var(--moksha-panel);
  border: 1px solid var(--moksha-panel-border);
  border-radius: var(--moksha-radius-md);
}

.buddyboss-theme .site-content,
#buddypress .bp-wrap,
.buddyboss-theme .bb-grid {
  background: transparent;
}

.buddyboss-theme .bb-grid > .column,
.buddyboss-theme .bb-profile-header,
.bb-card,
.widget,
.buddyboss-theme .bb-panel {
  background: var(--moksha-panel);
  border: 1px solid var(--moksha-panel-border);
  border-radius: var(--moksha-radius-md);
  box-shadow: var(--moksha-shadow);
}

.bb-card.alt,
.widget.moksha-muted {
  background: var(--moksha-panel-contrast);
}

.bb-card .item-title,
.bb-card h1,
.bb-card h2,
.bb-card h3 {
  color: var(--moksha-primary);
}

.bb-card .item-meta,
.bb-last-activity,
.buddyboss-theme .entry-meta,
body .bb-description {
  color: var(--moksha-text-light);
}

.bb-btn,
.button,
.wp-element-button,
input[type="submit"],
button[type="submit"] {
  font-family: 'Noto Sans TC', sans-serif;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.85rem 1.8rem;
  background: linear-gradient(90deg, var(--moksha-primary), var(--moksha-primary-dark));
  border: none;
  color: #FFF7EE;
  transition: transform 160ms ease, box-shadow 160ms ease;
  box-shadow: 0 12px 24px rgba(139, 90, 43, 0.2);
}

.bb-btn.secondary,
.button.secondary,
.wp-element-button.secondary {
  background: var(--moksha-accent);
}

.bb-btn:focus,
.bb-btn:hover,
.button:hover,
.wp-element-button:hover,
input[type="submit"]:hover,
button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(139, 90, 43, 0.28);
}

/* Channel inspired blocks */
.moksha-channel-label {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--moksha-text-light);
  margin-bottom: 0.5rem;
  display: block;
}

.moksha-channel {
  border-radius: var(--moksha-radius-md);
  border: 1px solid var(--moksha-panel-border);
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
  background: #FFFFFF;
  box-shadow: 0 10px 20px rgba(32, 24, 15, 0.06);
}

.moksha-channel__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(139, 90, 43, 0.12);
  color: var(--moksha-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.moksha-channel__body h5 {
  margin: 0;
  color: var(--moksha-secondary);
  font-family: 'Noto Serif TC', serif;
  font-weight: 600;
}

.moksha-channel__body span {
  font-size: 0.85rem;
  color: var(--moksha-text-light);
}

/* Sidebar */
.buddyboss-theme .bb-dashboard-navigation ul li a {
  border-radius: var(--moksha-radius-sm);
  padding: 0.65rem 0.9rem;
  font-weight: 500;
  color: var(--moksha-text);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.buddyboss-theme .bb-dashboard-navigation ul li.current a,
.buddyboss-theme .bb-dashboard-navigation ul li a:hover {
  background: rgba(139, 90, 43, 0.12);
  color: var(--moksha-primary);
}

/* Footer */
.site-footer,
.buddyboss-footer {
  background: var(--moksha-secondary);
  color: rgba(255, 255, 255, 0.85);
}

.site-footer a {
  color: #F9EEDC;
}

/* Utility badges */
.badge,
.bp-badge,
span.label {
  border-radius: 999px;
  border: 1px solid rgba(51, 51, 51, 0.12);
  padding: 0.2rem 0.85rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge-primary,
span.label-primary {
  border-color: rgba(139, 90, 43, 0.45);
  color: var(--moksha-primary);
}

.badge-secondary {
  border-color: rgba(95, 125, 142, 0.45);
  color: var(--moksha-accent);
}

/* Mobile tweaks */
@media (max-width: 768px) {
  .site-header {
    border-bottom: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  }

  .buddyboss-theme .bb-dashboard-navigation,
  .buddyboss-theme .bb-sidebar {
    padding: 1rem;
  }

  .bb-card,
  .widget {
    border-radius: 16px;
  }
}

/* Grid layout for channels */
.moksha-channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.2rem;
  margin-top: 1rem;
}
.moksha-channel-grid > a {
  text-decoration: none !important;
  display: block;
}
.moksha-channel-grid > a:hover .moksha-channel {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(139, 90, 43, 0.12);
}
.moksha-channel {
  height: 100%;
  margin-bottom: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.moksha-hero {
  margin-bottom: 3rem;
  text-align: center;
}
.moksha-hero p {
  margin-bottom: 1.5rem;
}
.moksha-hero .bb-btn {
  display: inline-block;
  margin: 0.5rem;
}

/* Hide page title on Home */
.home header.entry-header {
  display: none !important;
}
.home .page-title {
  display: none !important;
}

body.home .site-content > .container > .bb-grid > .column > header.entry-header {
  display: none !important;
}
