/* =========================================
   1. CSS RESET & BASE ELEMENTS
   ========================================= */
*, *::before, *::after {
  box-sizing: border-box;
}

html,
body {
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-text);
  background: var(--color-surface);
  font-weight: 400;
}

/* =========================================
   2. DESIGN TOKENS (SIMPLIFIED)
   ========================================= */
:root {
  /* ── Primary Brand Color ── */
  --color-primary:        #218c74;
  --color-primary-dark:   #1a6b5a;
  --color-primary-20:     rgba(33, 140, 116, 0.2);
  --color-primary-10:     rgba(33, 140, 116, 0.1);
  --color-primary-5:      rgba(33, 140, 116, 0.05);

  /* Legacy aliases */
  --color-primary-hover:  var(--color-primary-dark);
  --color-primary-light:  var(--color-primary-10);
  --color-primary-border: var(--color-primary-20);

  /* ── Accent Color ── */
  --color-accent:      #ffb142;
  --color-accent-dark: #e69a2e;
  --color-accent-10:   rgba(255, 177, 66, 0.1);
  /* Legacy aliases */
  --color-accent-hover: var(--color-accent-dark);
  --color-accent-light: var(--color-accent-10);

  /* ── CTA (maps to Accent) ── */
  --color-cta:       var(--color-accent);
  --color-cta-hover: var(--color-accent-dark);

  /* ── Semantic Colors ── */
  --color-help-green:      var(--color-primary);
  --color-help-green-dark: var(--color-primary-dark);
  --color-success: #4CAF50;
  --color-warning: #FFC107;
  --color-error:   #F44336;
  --color-info:    #2196F3;

  /* ── Surface & Text ── */
  --color-surface-light:   #f8f9fa;
  --color-surface-white:   #ffffff;
  --color-white:           #ffffff;
  --color-black:           #000000;
  --color-border:          #e5e7eb;
  --color-border-50:       rgba(229, 231, 235, 0.5);
  --color-text-primary:    #2b2b2b;
  --color-text-secondary:  #6b7280;
  --color-text-tertiary:   #9ca3af;

  /* Legacy aliases */
  --color-surface:          var(--color-surface-light);
  --color-surface-elevated: var(--color-surface-white);
  --color-border-light:     var(--color-border-50);
  --color-text:             var(--color-text-primary);
  --color-text-muted:       var(--color-text-tertiary);

  /* ── Footer ── */
  --color-footer-bg:       #2b2b2b;
  --color-footer-text-100: #ffffff;
  --color-footer-text-80:  rgba(255, 255, 255, 0.8);
  --color-footer-text-70:  rgba(255, 255, 255, 0.7);
  --color-footer-text-60:  rgba(255, 255, 255, 0.6);

  /* ── Overlays ── */
  --overlay-dark-light:   rgba(0, 0, 0, 0.05);
  --overlay-white-subtle: rgba(255, 255, 255, 0.1);
  --overlay-white-weak:   rgba(255, 255, 255, 0.2);
  --overlay-white-medium: rgba(255, 255, 255, 0.4);
  --overlay-white-strong: rgba(255, 255, 255, 0.6);

  /* ── Typography Scale ── */
  --font-size-xs:   0.75rem;   /* 12px */
  --font-size-sm:   0.875rem;  /* 14px */
  --font-size-base: 1rem;      /* 16px */
  --font-size-lg:   1.125rem;  /* 18px */
  --font-size-xl:   1.25rem;   /* 20px */
  --font-size-2xl:  1.5rem;    /* 24px */
  --font-size-3xl:  1.875rem;  /* 30px */
  --font-size-4xl:  2.25rem;   /* 36px */

  /* ── Font Weights ── */
  --font-weight-regular:  400;
  --font-weight-normal:   400;
  --font-weight-medium:   500;
  --font-weight-semibold: 600;
  --font-weight-semi:     600; /* legacy alias */
  --font-weight-bold:     700;
  --font-weight-extra:    800;

  /* ── Spacing — semantic names ── */
  --space-xs:  0.25rem;  /* 4px  */
  --space-sm:  0.5rem;   /* 8px  */
  --space-md:  1rem;     /* 16px */
  --space-lg:  1.5rem;   /* 24px */
  --space-xl:  2rem;     /* 32px */
  --space-2xl: 2.5rem;   /* 40px */
  --space-3xl: 3rem;     /* 48px */
  --space-4xl: 4rem;     /* 64px */

  /* Numeric aliases (matches theme.css) */
  --space-1:  var(--space-xs);
  --space-2:  var(--space-sm);
  --space-4:  var(--space-md);
  --space-6:  var(--space-lg);
  --space-8:  var(--space-xl);
  --space-10: var(--space-2xl);
  --space-12: var(--space-3xl);
  --space-16: var(--space-4xl);

  /* ── Border Radius ── */
  --radius-none: 0;
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   20px;
  --radius-full: 9999px;

  /* ── Shadows ── */
  --shadow-sm:            0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md:            0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg:            0 10px 25px rgba(0, 0, 0, 0.1);
  --shadow-xl:            0 20px 40px rgba(0, 0, 0, 0.15);
  --shadow-focus-primary: 0 0 0 3px rgba(33, 140, 116, 0.15);
  --shadow-focus-accent:  0 0 0 3px rgba(255, 177, 66, 0.15);

  /* ── Transitions ── */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;

  /* ── Z-Index ── */
  --z-dropdown: 1000;
  --z-sticky:   1020;
  --z-fixed:    1030;
  --z-modal:    1040;
  --z-popover:  1050;
  --z-tooltip:  1060;
}

/* =========================================
   3. SIMPLIFIED THEME SYSTEM
   ========================================= */
/* Use primary color consistently across all pages */
.main-page,
.help-page,
.forum-page {
  --theme-primary: var(--color-primary);
  --theme-primary-hover: var(--color-primary-hover);
  --hover-bg: var(--color-primary-light);
}

/* =========================================
   4. UTILITIES
   ========================================= */
.transition-base { transition: var(--transition-base); }

.elevate-hover {
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.elevate-hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.is-hoverable:hover { 
  background: var(--hover-bg);
}

.form-control {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  font: inherit;
  font-size: var(--font-size-base);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}
.form-control:focus {
  outline: none;
  border-color: var(--theme-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-primary) 30%, transparent);
}

.grid-2 { 
  display: grid; 
  grid-template-columns: repeat(2, 1fr); 
}
@media (max-width: 768px) { 
  .grid-2 { 
    grid-template-columns: 1fr; 
  } 
}

/* =========================================
   5. TYPOGRAPHY & TEXT COLORS
   ========================================= */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-md) 0;
  font-weight: var(--font-weight-bold);
  line-height: 1.3;
  color: var(--color-text);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

p {
  margin: 0 0 var(--space-md) 0;
  line-height: 1.6;
  color: var(--color-text);
}

a {
  color: var(--theme-primary, var(--color-primary));
  text-decoration: none;
  transition: var(--transition-base);
}

a:not(.btn):hover,
a:not(.btn):focus {
  color: var(--theme-primary-hover, var(--color-primary-hover));
}

a.accent,
.link--accent {
  color: var(--theme-primary, var(--color-primary));
}

a.accent:hover,
.link--accent:hover {
  color: var(--theme-primary-hover, var(--color-primary-hover));
}

/* Typography Utilities */
.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-2xl { font-size: var(--font-size-2xl); }
.text-3xl { font-size: var(--font-size-3xl); }
.font-medium { font-weight: var(--font-weight-medium); }
.font-semi { font-weight: var(--font-weight-semi); }
.font-bold { font-weight: var(--font-weight-bold); }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-primary { color: var(--color-text); }
.text-secondary { color: var(--color-text-secondary); }
.text-accent { color: var(--theme-primary, var(--color-primary)); }
.text-cta { color: var(--color-cta); }

/* =========================================
   6. LAYOUT FUNDAMENTALS
   ========================================= */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-xl);
  overflow: visible; /* Allow dropdowns and overlays to extend */
}

/* Flexbox Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

/* Grid Utilities */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-auto-fit { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* Gap Utilities */
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }
.gap-2xl { gap: var(--space-2xl); }

/* =========================================
   7. SPACING & VISUAL UTILITIES
   ========================================= */

/* Margin */
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }
.mb-3xl { margin-bottom: var(--space-3xl); }

/* Padding */
.p-lg { padding: var(--space-lg); }
.py-xl { padding-top: var(--space-xl); padding-bottom: var(--space-xl); }
.py-2xl { padding-top: var(--space-2xl); padding-bottom: var(--space-2xl); }
.py-3xl { padding-top: var(--space-3xl); padding-bottom: var(--space-3xl); }

/* Background Colors */
.bg-surface { background-color: var(--color-surface); }
.bg-surface-elevated { background-color: var(--color-surface-elevated); }

/* Border Utilities */
.rounded-lg { border-radius: var(--radius-lg); }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.border { border: 1px solid var(--color-border); }
.border-t { border-top: 1px solid var(--color-border); }
.border-b { border-bottom: 1px solid var(--color-border); }

/* =========================================
   8. BUTTON COMPONENTS
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semi);
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-base);
}

.btn:active {
  transform: translateY(0);
}

/* Button Sizes */
.btn--sm {
  padding: var(--space-xs) var(--space-md);
  font-size: var(--font-size-sm);
}
.btn--lg {
  padding: var(--space-md) var(--space-xl);
  font-size: var(--font-size-lg);
}

.btn:disabled,
.btn--disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}

/* Button Variants */
.btn--primary {
  background: var(--theme-primary, var(--color-primary));
  color: var(--color-white);
  font-weight: var(--font-weight-bold);
}
.btn--primary:hover {
  background: var(--theme-primary-hover, var(--color-primary-hover));
  box-shadow: var(--shadow-md);
}

.btn--secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn--secondary:hover {
  border-color: var(--theme-primary, var(--color-primary));
  color: var(--theme-primary, var(--color-primary));
  background: var(--color-primary-10);
}

.btn--cta {
  background: var(--color-cta);
  color: var(--color-white);
  font-weight: var(--font-weight-bold);
}
.btn--cta:hover {
  background: var(--color-cta-hover);
}

.btn--ghost {
  background: transparent;
  color: var(--theme-primary, var(--color-primary));
}
.btn--ghost:hover {
  background: var(--color-primary-10);
  color: var(--theme-primary-hover, var(--color-primary-hover));
  border-color: var(--color-primary);
}

.btn--ghost.btn--on-dark {
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn--ghost.btn--on-dark:hover {
  background: var(--color-primary-10);
  border-color: var(--color-primary);
}

/* Profile action buttons inherit from btn--ghost.btn--on-dark */
[data-action="userProfileActions"] button {
  background: transparent;
  color: var(--color-white);
  border: 1px solid var(--overlay-white-medium);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semi);
  transition: var(--transition-base);
  cursor: pointer;
}

[data-action="userProfileActions"] button:hover {
  background: var(--overlay-white-weak);
  border-color: var(--overlay-white-strong);
}

[data-action="userProfileActions"] button[aria-label="More options"] {
  padding: var(--space-sm);
  height: 40px;
  width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-action="userProfileActions"] {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
}


/* =========================================
   9. CARD COMPONENTS
   ========================================= */
.card {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
}

.card--interactive {
  cursor: pointer;
}

.card--interactive:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card__header {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border-light);
}

.card__title,
.topic-title,
.featured-category-title,
.quick-action-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-sm);
}

.card__subtitle {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  margin: 0;
}

.card__body {
  margin-bottom: var(--space-lg);
}

/* Loading Spinner */
.loading__spinner {
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: var(--radius-full);
  animation: spin 1s linear infinite;
  display: inline-block;
  margin-right: var(--space-sm);
}

/* List Reset */
.list-reset {
  list-style: none;
  margin: 0;
  padding: 0;
}

.homepage-hero {
  position: relative;
  overflow: visible;
  z-index: 10;
  padding: var(--space-4xl) 0 var(--space-3xl);
  text-align: center;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(33,140,116,.08), transparent 60%),
    linear-gradient(180deg, var(--color-surface) 0%, #f1f5f4 100%);
}

.homepage-hero::before,
.homepage-hero::after {
  content: none;
}


/* Search bar */
/* =========================================
   HERO SEARCH + INSTANT SEARCH (DROP-IN)
   ========================================= */

/* Ensure the hero content is above any background layers */
.homepage-hero .hero-content {
  position: relative;
  z-index: 2;
}

/* Search bar wrapper */
.homepage-hero .hero-search-bar {
  position: relative;             /* anchor for absolute dropdown if needed */
  z-index: 50;                    /* above buttons below */
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-2xl);
}

/* The form */
.homepage-hero .search-bar--hero {
  position: relative;             /* anchor dropdown */
  width: 100%;
  max-width: 720px;               /* adjust as desired */
  display: flex;
  align-items: stretch;

  border-radius: var(--radius-lg);
  overflow: visible;              /* KEY: allow dropdown to extend */
  background: var(--color-surface-elevated, #fff);
  box-shadow: var(--shadow-lg);
  transition: transform .3s ease, box-shadow .3s ease;
}

.homepage-hero .search-bar--hero:hover,
.homepage-hero .search-bar--hero:focus-within {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

/* Input */
.homepage-hero .search-bar__input {
  flex: 1;
  height: 56px;
  padding: 0 var(--space-lg);
  border: 1px solid var(--color-border);
  border-right: none;

  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  font-size: 16px;
  color: var(--color-text, #111827);

  border-top-left-radius: var(--radius-lg);
  border-bottom-left-radius: var(--radius-lg);
}

.homepage-hero .search-bar__input:focus {
  outline: none;
  border-color: var(--color-primary);
  background: #fff;
}

.homepage-hero .search-bar__input::placeholder {
  color: var(--color-text-secondary, #6b7280);
}

/* Button */
.homepage-hero .search-bar__button {
  width: 56px;
  border: 1px solid var(--color-border);
  border-left: none;

  display: flex;
  align-items: center;
  justify-content: center;

  background: var(--color-primary);
  color: #fff;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;

  border-top-right-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}

.homepage-hero .search-bar__button:hover {
  background: var(--color-primary-dark);
}

/* =========================================
   INSTANT SEARCH DROPDOWN (Zendesk internal)
   Your markup: <div class="instant-search" hidden>...
   ========================================= */

/* Make the instant search panel sit on top of everything */
.homepage-hero .instant-search {
  position: absolute;  /* keep your current behavior */
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 9999;       /* key */
}

/* Optional: if the next section has its own stacking context */
.main-content,
.main-content > .container,
.section,
.section--primary {
  position: relative;
  z-index: 1;
}


/* Result items (adjust selectors if your JS uses different structure) */
.homepage-hero .instant-search__list a,
.homepage-hero .instant-search__list [role="option"],
.homepage-hero .instant-search__list .instant-search-result {
  display: block;
  padding: 12px 14px;
  text-decoration: none;
  color: var(--color-text, #111827);
  background: #fff;
  border-bottom: 1px solid rgba(17, 24, 39, 0.06);
}

.homepage-hero .instant-search__list a:hover,
.homepage-hero .instant-search__list [role="option"]:hover,
.homepage-hero .instant-search__list .instant-search-result:hover {
  background: var(--color-primary-5);
}

.homepage-hero .instant-search__list a:last-child,
.homepage-hero .instant-search__list [role="option"]:last-child,
.homepage-hero .instant-search__list .instant-search-result:last-child {
  border-bottom: none;
}

/* Optional: cap height and scroll */
.homepage-hero .instant-search__list {
  max-height: min(420px, 55vh);
  overflow-y: auto;
}


/* Instant search dropdown */
.instant-search {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  background: var(--color-surface-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 999999 !important; /* Must be very high to appear above all elements */
  overflow: visible;
  min-width: 300px;
}

.search-bar {
  position: relative; /* anchors the dropdown */
}

.instant-search__item {
  display: block;
  padding: 12px 14px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #f3f4f6;
}

.instant-search__item:last-child {
  border-bottom: none;
}

.instant-search__item:hover,
.instant-search__item:focus {
  background: #f9fafb;
  outline: none;
}

.instant-search__meta {
  display: block;
  font-size: 12px;
  opacity: 0.7;
  margin-top: 2px;
}

.instant-search__heading {
  padding: 10px 14px 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
}

/* Instant search list with proper overflow handling */
.instant-search__list {
  max-height: min(420px, 55vh);
  overflow-y: auto;
  overflow-x: hidden;
}

/* Ensure search bars allow dropdown to overflow */
.search-bar,
.search-bar--hero {
  position: relative;
  overflow: visible;
}

/* Ensure parent containers don't clip dropdowns */
.sub-nav,
.sub-nav__actions {
  overflow: visible;
}

/* Additional z-index for search results page */
.search-page .search-bar {
  position: relative;
  z-index: 100;
}

/* Popular searches */
.homepage-hero .popular-searches {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  opacity: 0;
  transform: translateY(20px);
  animation: popularSearchesSlideIn 0.8s ease-out 1s forwards;
}

.homepage-hero .popular-searches-label {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  margin-right: var(--space-sm);
}

/* Popular links use base .popular-link styles defined later */

/* Hero actions */
.homepage-hero .hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-xl);
  opacity: 0;
  transform: translateY(20px);
  animation: heroActionsSlideIn 0.8s ease-out 0.8s forwards;
}

.homepage-hero .btn {
  box-shadow: var(--shadow-md);
  transition: transform .2s ease, box-shadow .2s ease;
  position: relative;
  overflow: hidden;
  padding: var(--space-md) var(--space-xl);
  font-weight: var(--font-weight-semi);
  isolation: isolate;
}

.homepage-hero .btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.homepage-hero .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  transition: left 0.5s ease;
  z-index: -1;
  pointer-events: none;
}

.homepage-hero .btn:hover::before {
  left: 100%;
}

/* Responsive */
/* === Mobile tweaks: keep chips & buttons centered === */
@media (max-width: 768px) {
  /* Popular chips */
  .homepage-hero .popular-searches {
    justify-content: center;              /* center the chip cloud */
    row-gap: var(--space-sm);             /* nicer multi-line spacing */
  }
  .homepage-hero .popular-searches-label {
    flex-basis: 100%;                     /* put "Popular:" on its own line */
    text-align: center;
    margin: 0 0 var(--space-sm);
  }
  .homepage-hero .popular-link {
    display: inline-flex;                 /* consistent sizing & centering */
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.9rem;              /* slightly larger touch target */
  }

  /* Hero buttons */
  .homepage-hero .hero-actions {
    flex-direction: column;               /* stack */
    align-items: center;                  /* center the stack (not stretch) */
    gap: var(--space-md);
  }
  .homepage-hero .hero-actions .btn {
    width: clamp(220px, 80vw, 340px);     /* readable width on phones */
    text-align: center;                   /* ensure text stays centered */
    margin: 0 auto;                       /* belt + suspenders */
  }
}

/* Accessibility */
.homepage-hero .search-bar__button:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .homepage-hero::before { animation: none; }
  .homepage-hero .hero-title,
  .homepage-hero .hero-subtitle,
  .homepage-hero .hero-search-bar,
  .homepage-hero .hero-actions,
  .homepage-hero .popular-searches {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* =========================================
   CONSISTENT SECTION STYLING
   ========================================= */
.section {
  padding: var(--space-3xl) 0;
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section__title {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-md);
  line-height: 1.3;
}

.section__subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.section__footer {
  text-align: center;
  margin-top: var(--space-2xl);
}

@media (max-width: 768px) {
  .section {
    padding: var(--space-2xl) 0;
  }

  .section__title {
    font-size: var(--font-size-2xl);
  }

  .section__subtitle {
    font-size: var(--font-size-base);
  }
}

/* ===== BASE HERO STYLES ===== */
.hero,
.hero-enhanced {
  position: relative;
  overflow: visible; /* Changed from hidden - Allow instant search dropdown to extend */
  padding: var(--space-4xl) 0 var(--space-3xl);
  border-bottom: 1px solid var(--color-border-light);
  text-align: center;
  z-index: 10; /* Ensure hero is above content below */
}

.hero-content {
  position: relative;
  z-index: 2; /* Ensure hero content is above background */
}

.hero-content * {
  z-index: 0;
}

.hero-search-bar,
.hero-search-bar * {
  z-index: 100000 !important;
}

/* Ensure sections below hero don't overlap instant search */
.section,
.main-content {
  position: relative;
  z-index: 1; /* Below hero */
}


/* ===== SIMPLIFIED HERO BACKGROUNDS ===== */
/* Use consistent teal/green theme matching sviservice.com */
.hero,
.hero-enhanced,
.main-page .hero,
.help-page .hero,
.forum-page .hero {
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(33,140,116,.08), transparent 60%),
    linear-gradient(135deg, var(--color-surface) 0%, #f1f5f4 100%);
}

.hero::before,
.hero-enhanced::before {
  background-image:
    radial-gradient(circle at 25% 25%, var(--color-primary-border) 2px, transparent 2px),
    radial-gradient(circle at 75% 75%, var(--color-primary-light) 1px, transparent 1px);
}

/* ===== STANDARDIZED HERO TYPOGRAPHY ===== */
.hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: var(--font-weight-extra, 800);
  color: var(--color-text);
  margin: 0 0 var(--space-lg);
  line-height: 1.3;
  opacity: 0;
  transform: translateY(30px);
  animation: heroTitleSlideIn 0.8s ease-out 0.2s forwards;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-2xl);
  line-height: 1.6;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0;
  transform: translateY(20px);
  animation: heroSubtitleSlideIn 0.8s ease-out 0.4s forwards;
}

/* ===== EYEBROW/BADGE STYLES ===== */
.hero .eyebrow,
.hero .category-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: var(--theme-primary, var(--color-primary));
  color: white;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-lg);
}

/* ===== HERO SEARCH BAR ===== */
.hero-search-bar {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-2xl);
  opacity: 0;
  transform: translateY(20px);
  animation: heroActionsSlideIn 0.8s ease-out 0.6s forwards;
}

.hero .search-bar--hero,
.hero-enhanced .search-bar--hero { 
  display: flex; 
  max-width: 600px; 
  width: 100%;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: visible;
  background: white;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-lg);
}

.hero .search-bar--hero:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.hero .search-bar--hero:focus-within {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.hero .search-bar__input,
.hero-enhanced .search-bar__input {
  flex: 1; 
  height: 54px; 
  padding: 0 var(--space-lg); 
  border: none;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  font-size: 16px;
  color: var(--color-text);
}

.hero .search-bar__input:focus,
.hero-enhanced .search-bar__input:focus { 
  outline: none;
  background: white;
}

.hero .search-bar__input::placeholder,
.hero-enhanced .search-bar__input::placeholder {
  color: var(--color-text-secondary);
}

.hero .search-bar__button,
.hero-enhanced .search-bar__button {
  display: flex; 
  align-items: center; 
  justify-content: center; 
  width: 32px;
  height: 32px; 
  border: none;
  background: var(--theme-primary, var(--color-primary)); 
  color: white; 
  cursor: pointer;
  transition: var(--transition-base);
}

/* Allow instant search dropdown to escape the hero */
.hero-search-bar {
  position: relative;
  overflow: visible;
  z-index: 100000; /* Very high to ensure dropdown appears above all content */
}

.hero-search-bar .search-bar {
  position: relative;
  overflow: visible;
}

.hero-search-bar .instant-search {
  z-index: 999999 !important; /* Highest z-index to appear above everything */
  position: absolute;
}


/* ===== POPULAR SEARCHES ===== */
.popular-searches {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  opacity: 0;
  transform: translateY(20px);
  animation: popularSearchesSlideIn 0.8s ease-out 1s forwards;
}

.popular-searches-label {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  margin-right: var(--space-sm);
}

.popular-link {
  background: var(--color-primary-light);
  color: var(--color-text);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  border: 1px solid var(--color-primary-border);
  text-decoration: none;
  transition: var(--transition-slow);
}

.popular-link:hover {
  background: var(--theme-primary, var(--color-primary));
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Main page popular links use base .popular-link styles */

/* ===== HERO ACTIONS ===== */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-xl);
  opacity: 0;
  transform: translateY(20px);
  animation: heroActionsSlideIn 0.8s ease-out 0.8s forwards;
}

.btn-hero {
  padding: var(--space-md) var(--space-xl);
  font-weight: var(--font-weight-semi);
}

.hero .btn {
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.hero .btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.hero .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.hero .btn:hover::before {
  left: 100%;
}

/* ===== ANIMATION KEYFRAMES ===== */
@keyframes heroTitleSlideIn {
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

@keyframes heroSubtitleSlideIn {
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

@keyframes heroActionsSlideIn {
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

@keyframes popularSearchesSlideIn {
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero {
    padding: var(--space-3xl) 0 var(--space-2xl);
  }
  
  .hero .search-bar--hero {
    max-width: 100%;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-md);
  }
  
  .popular-searches {
    justify-content: flex-start;
  }
  
  .popular-searches-label {
    width: 100%;
    margin-bottom: var(--space-sm);
  }
}

/* ===== ACCESSIBILITY ===== */
.hero .search-bar__button:focus {
  outline: 2px solid var(--theme-primary, var(--color-primary));
  outline-offset: 2px;
}

/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero::before {
    animation: none;
  }
  
  .hero-title,
  .hero-subtitle,
  .hero-search-bar,
  .hero-actions,
  .popular-searches {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
/* =========================================
   11. SITE HEADER
   ========================================= */

/* Header Container */
.site-header {
  background: var(--color-surface-white);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease;
  overflow: visible; /* Allow instant search dropdown to extend */
}

.site-header .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
  overflow: visible;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  gap: var(--space-lg); /* Reduced from 2rem for tighter spacing */
  overflow: visible; /* Allow dropdowns to extend */
}

/* Logo & Brand */
.header-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--color-text-primary);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-xl);
  transition: opacity var(--transition-base);
}

.header-logo:hover {
  opacity: 0.8;
  text-decoration: none;
}

.logo-icon {
  width: 40px;
  height: 40px;
  margin-right: 12px;
  border-radius: 8px;
}

.site-title {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

/* Primary Navigation */
.header-nav {
  flex: 1;
  max-width: 550px; /* Increased to accommodate Internal link */
  overflow: visible; /* Allow dropdowns to extend */
}

.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.nav-links li {
  margin: 0;
}

.nav-links li::before {
  content: none;
}

.main-nav__link {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 400;
  font-size: 15px;
  padding: 8px 12px;
  position: relative;
  transition: color 0.2s ease;
}

.main-nav__link:hover {
  color: var(--color-primary);
  text-decoration: none;
}

/* Add underline animation */
.main-nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--color-primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.main-nav__link:hover::after {
  transform: scaleX(1);
}

/* Header Search */
.header-search {
  position: relative;
  z-index: 1000; /* Ensure search and its dropdown are above other header elements */
}

.header-search .search-bar {
  position: relative;
  display: flex;
  align-items: center;
  overflow: visible; /* Allow dropdown to extend */
}

.header-search .search-bar__input {
  background: var(--color-surface-light);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 10px 45px 10px 16px;
  width: 200px;
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
  transition: var(--transition-base);
}

.header-search .search-bar__input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-focus-primary);
  background: var(--color-surface-white);
}

.header-search .search-bar__input::placeholder {
  color: var(--color-text-tertiary);
}

.header-search .search-bar__button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  transition: var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-search .search-bar__button:hover {
  color: var(--color-primary);
  background: var(--color-accent-10);
}

/* Header instant search dropdown styling */
.header-search .instant-search {
  min-width: 320px;
  left: auto;
  right: 0; /* Align to right edge of search box */
  margin-top: 4px;
}

.header-search .instant-search__list {
  max-height: 400px;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  overflow: visible; /* Allow dropdowns to extend */
}

/* User Menu & Dropdown */
.user-menu {
  position: relative;
}

.user-menu__toggle {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 6px 12px;
  cursor: pointer;
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
  transition: var(--transition-base);
}

.user-menu__toggle:hover {
  border-color: var(--color-primary);
  background: var(--color-accent-10);
}

.user-menu__name {
  font-weight: 500;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown-icon {
  transition: transform var(--transition-base);
  color: var(--color-text-tertiary);
}

.user-menu__toggle[aria-expanded="true"] .dropdown-icon {
  transform: rotate(180deg);
}

/* Avatar Styles */
.avatar {
  border-radius: 50%;
  object-fit: cover;
}

.avatar--md {
  width: 32px;
  height: 32px;
}

.icon-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

.icon-circle--primary {
  background: var(--color-primary);
  color: white;
}

/* Dropdown Menu */
.dropdown__menu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 180px;
  background: var(--color-surface-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-sm) 0;
  margin-top: var(--space-sm);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition-base);
  z-index: var(--z-dropdown);
}

.dropdown.active .dropdown__menu,
.user-menu__toggle[aria-expanded="true"] + .dropdown__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown__item {
  display: block;
  padding: 10px 16px;
  color: var(--color-text-primary);
  text-decoration: none;
  font-size: var(--font-size-sm);
  transition: background-color var(--transition-base);
}

.dropdown__item:hover {
  background: var(--color-surface-light);
  color: var(--color-primary);
  text-decoration: none;
}

.dropdown__divider {
  height: 1px;
  background: var(--color-border);
  margin: var(--space-sm) 0;
}

/* Sign In Link (when not logged in) */
.header-actions a[href*="sign_in"] {
  background: var(--color-primary);
  color: white;
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s ease;
}

.header-actions a[href*="sign_in"]:hover {
  background: var(--color-accent-dark);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-focus-accent);
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  cursor: pointer;
  color: var(--color-text-primary);
  transition: var(--transition-base);
}

.mobile-menu-toggle:hover {
  border-color: var(--color-primary);
  background: var(--color-accent-10);
}

.mobile-menu-toggle[aria-expanded="true"] .menu-icon {
  display: none;
}

.mobile-menu-toggle[aria-expanded="true"] .close-icon {
  display: block !important;
}

.menu-icon {
  width: 24px;
  height: 24px;
}

[role="menu"] {
  z-index: 9999 !important;
  position: absolute !important;
  background: white;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* Header scroll effect */
.site-header.scrolled {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Mobile Responsive */
@media (max-width: 1024px) {
  .header-search .search-bar__input {
    width: 180px;
  }

  .nav-links {
    gap: 1rem; /* Reduce gap on smaller desktop screens */
  }
}

@media (max-width: 900px) {
  .nav-links {
    gap: 0.75rem; /* Further reduce gap on smaller screens */
  }

  .main-nav__link {
    padding: 8px 10px; /* Reduce padding on smaller screens */
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  .header-container {
    gap: 1rem;
    position: relative;
  }

  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    order: 3;
  }

  .header-nav {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
    flex: none;
    background: white;
    border-bottom: none;
    box-shadow: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, border-bottom 0.3s ease, box-shadow 0.3s ease;
    z-index: 101;
  }

  .header-nav.active {
    max-height: 500px;
    overflow-y: auto;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
  }

  .nav-links {
    flex-direction: column;
    padding: 1rem;
    gap: 0;
  }

  .nav-links li {
    width: 100%;
    border-bottom: 1px solid var(--color-border);
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .main-nav__link {
    display: block;
    padding: 1rem;
    width: 100%;
  }

  .main-nav__link::after {
    display: none;
  }

  .header-search {
    order: 2;
  }

  .header-search .search-bar__input {
    width: 140px;
    font-size: 13px;
  }

  .header-actions {
    order: 4;
  }

  .user-menu__name {
    display: none;
  }

  .site-title {
    font-size: 1.1rem;
  }

  .logo-icon {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 480px) {
  .header-container {
    height: 70px;
  }

  .header-nav {
    top: 70px;
  }

  .header-search .search-bar__input {
    width: 100px;
  }

  .header-search .search-bar__input::placeholder {
    content: "Search...";
  }
}

/* =========================================
   12. SEARCH BAR SYSTEM
   ========================================= */
.search-bar {
  position: relative;
  width: 100%;
  max-width: 500px;
}

.search-bar__input {
  width: 100%;
  height: 44px;
  font-size: var(--font-size-base);
  padding: var(--space-sm) var(--space-xl) var(--space-sm) var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-elevated);
  transition: var(--transition-base);
}

.search-bar__input:focus {
  outline: none;
  border-color: var(--theme-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-primary) 15%, transparent);
}

.search-bar__button {
  position: absolute;
  top: 50%;
  right: var(--space-sm);
  transform: translateY(-50%);
  background: var(--color-cta);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-base);
  width: 32px;
  height: 32px;
  padding: 0;
}

.search-bar__button svg {
  width: 16px;
  height: 16px;
}

.form-control--select {
  height: 44px;
  font-size: var(--font-size-base);
}

/* Search Bar Variants */
.search-bar--sm {
  max-width: 280px;
}

.search-bar--lg {
  max-width: 600px;
}


.search-bar--hero {
  box-shadow: var(--shadow-xl);
}

.search-bar--hero .search-bar__input {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
}

.search-bar--transparent .search-bar__input {
  background: transparent;
  border: none;
}

.search-bar--compact .search-bar__input {
  background: var(--color-surface);
  border-color: var(--color-border-light);
  font-size: var(--font-size-sm);
}

.search-bar--compact .search-bar__button {
  background: transparent;
  color: var(--color-text-secondary);
}

.search-bar--compact .search-bar__button:hover {
  background: var(--color-border-light);
  color: var(--theme-primary);
}

.clear-button {
  display: none;
}

/* Search Results */
.search-results-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.search-result-item {
  margin: 0;
}

.search-results-pagination {
  display: flex;
  justify-content: center;
  margin-block: var(--space-xl);
}

/* Search No Results */
.search-no-results .icon-circle {
  margin-inline: auto;
}

.search-no-results .search-bar.search-bar--hero {
  justify-content: center;
  max-width: 500px;
  margin: 0 auto var(--space-xl);
  box-shadow: var(--shadow-xl);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.search-no-results .search-bar__input {
  flex: 1;
  border: none;
  border-radius: 0;
  padding: var(--space-md);
}

.search-no-results .search-bar__button {
  border-radius: 0;
  background: var(--color-cta);
  color: var(--color-white);
  width: 56px;
  transition: background var(--transition-base);
}

.search-no-results .search-bar__button:hover {
  background: var(--color-cta-hover);
}

.search-no-results .card {
  margin-bottom: var(--space-3xl);
}

.search-no-results .popular-searches .popular-link {
  color: var(--color-text);
  background: var(--overlay-dark-light);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.4rem 0.8rem;
  transition: background var(--transition-base), color var(--transition-base);
}

.search-no-results .popular-searches .popular-link:hover {
  background: var(--theme-primary);
  color: var(--color-white);
}

/* Search Page Theme Styles */
.search-page .sub-nav {
  background: linear-gradient(135deg, var(--color-surface) 0%, rgba(33, 140, 116, 0.05) 100%);
  border-bottom: 2px solid var(--color-primary);
}

.search-page-header {
  color: var(--color-primary);
}

.search-icon-circle {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--color-primary), #1a6b5a);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
}

.search-page .search-bar {
  position: relative;
}

.search-page .search-bar__input {
  border-color: var(--color-primary);
}

.search-page .search-bar__button {
  background: var(--color-primary);
}

.search-result-card {
  border-left: 4px solid transparent;
  transition: var(--transition-slow);
}

.search-result-card .link--accent {
  color: var(--color-primary);
  position: relative;
  background-image: linear-gradient(to right, var(--color-primary), var(--color-primary));
  background-size: 0% 2px;
  background-position: left bottom;
  background-repeat: no-repeat;
  transition: background-size var(--transition-slow);
}

.search-result-card .link--accent:hover {
  background-size: 100% 2px;
}

.search-page .load-more-btn {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.search-page .load-more-btn:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.search-no-results-card {
  background: linear-gradient(135deg, var(--color-surface-elevated) 0%, rgba(33, 140, 116, 0.02) 100%);
  border: 2px solid rgba(33, 140, 116, 0.1);
}

.search-no-results-icon {
  background: linear-gradient(135deg, rgba(33, 140, 116, 0.1) 0%, rgba(33, 140, 116, 0.05) 100%);
  color: var(--color-primary);
  border: 3px solid rgba(33, 140, 116, 0.2);
}

.search-no-results h2 {
  color: var(--color-primary);
}

.search-no-results .search-bar--hero {
  display: flex;
  max-width: 500px;
  margin: 0 auto var(--space-xl);
  box-shadow: 0 10px 30px rgba(33, 140, 116, 0.2);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.search-no-results form {
  display: flex;
  width: 100%;
}

.search-no-results .search-bar__input {
  flex: 1;
  border: none;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: var(--space-md);
}

.search-no-results .search-bar__button {
  width: 56px;
  border-radius: 0;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-page-home-btn {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

/* Home Page Theme Styles */
.home-page .forum-cta-btn {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

/* DecorPro Quick Action Icon */
.decorpro-icon {
  background-color: var(--color-surface-elevated);
  color: var(--color-black);
}

/* =========================================
   13. DROPDOWNS & MENUS
   ========================================= */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown__toggle {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  color: var(--color-text);
  transition: var(--transition-base);
}

@media (hover: hover) {
  .dropdown__toggle:hover {
    background: var(--color-surface);
  }
}

.dropdown__toggle:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus-primary);
}

.dropdown__menu,
.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 200px;
  z-index: var(--z-dropdown);
  padding: var(--space-sm);
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: var(--transition-base);
}

.dropdown--active .dropdown__menu,
.user-menu.active .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown__item,
.dropdown-menu a {
  display: block;
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  color: var(--color-text);
  text-decoration: none;
  transition: var(--transition-base);
}

@media (hover: hover) {
  .dropdown__item:hover,
  .dropdown-menu a:hover {
    background: var(--color-surface);
    color: var(--theme-primary, var(--color-primary));
  }
}

.dropdown__divider {
  height: 1px;
  margin: var(--space-sm) 0;
  background: var(--color-border);
}

@media (max-width: 768px) {
  .help-page .search-filter-wrapper {
    flex-direction: column;
    width: 100%;
  }

  .help-page .search-bar--lg {
    width: 100%;
  }

  .help-page .form-control--select {
    width: 100%;
  }
}


/* =========================================
   14. AVATARS & ICONS
   ========================================= */
.avatar,
.icon-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  object-fit: cover;
  background: var(--color-surface);
  flex-shrink: 0;
  width: 48px;
  height: 48px;
}

/* Avatar sizes */
.avatar--sm { width: 32px; height: 32px; }
.avatar--md { width: 48px; height: 48px; }
.avatar--lg, .icon-circle--lg { width: 64px; height: 64px; }
.icon-circle--xl { width: 96px; height: 96px; }

/* Avatar variants */
.icon-circle--primary {
  background: var(--theme-primary, var(--color-primary));
  color: var(--color-white);
}

.icon-circle--accent {
  background: var(--color-accent);
  color: var(--color-white);
}

.icon-circle--surface {
  background: var(--color-surface);
  color: var(--color-text-secondary);
}

.avatar-fallback[data-name] {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-weight-bold);
}

/* =========================================
   15. BREADCRUMBS & NAVIGATION
   ========================================= */
.breadcrumb-nav {
  background: var(--color-surface);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--color-border-light);
}

.breadcrumbs {
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin: 0;
  padding: 0;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.breadcrumbs li + li::before {
  content: "›";
  color: var(--color-text-muted);
  margin-right: var(--space-sm);
}

.breadcrumbs a {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: var(--transition-base);
}

.breadcrumbs a:hover {
  color: var(--theme-primary, var(--color-primary));
}
 
/* Sub Navigation */
.sub-nav {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-md) 0; /* already minimal */
  margin-top: var(--space-md); 
  margin-bottom: var(--space-md); /* tighten space below */
}

.sub-nav__container {
  display: flex;
  justify-content: space-between;
  align-items: center; 
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.sub-nav__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-xs);
}

.sub-nav__actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-left: auto; 
}

.sub-nav__search {
  display: none;
}

/* =========================================
   16. MODERN EVERGREEN FOOTER
   ========================================= */

.footer-evergreen {
  background: var(--color-footer-bg);
  color: var(--color-footer-text-80);
  padding: var(--space-16) 0 0;
  margin-top: 0;
}

/* Add margin when footer appears without CTA section above it */
body:not(.forum-page) .footer-evergreen,
.main-content + .footer-evergreen {
  margin-top: 6rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Footer Grid */
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem 2rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--overlay-white-subtle);
}

/* Footer Columns */
.footer-column {
  display: flex;
  flex-direction: column;
}

.footer-heading {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-footer-text-100);
  margin: 0 0 var(--space-md);
  letter-spacing: -0.01em;
}

/* Footer Lists */
.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.footer-list li {
  line-height: 1.6;
}

.footer-list a {
  color: var(--color-footer-text-70);
  text-decoration: none;
  font-size: var(--font-size-sm);
  transition: color var(--transition-base);
  display: inline-block;
}

.footer-list a:hover {
  color: var(--color-footer-text-100);
}

/* Footer Description */
.footer-description {
  color: var(--color-footer-text-70);
  font-size: var(--font-size-sm);
  line-height: 1.6;
  margin: 0;
}

/* Footer Bottom */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copyright {
  margin: 0;
  font-size: var(--font-size-sm);
  color: var(--color-footer-text-60);
}

.footer-powered {
  margin: 0;
  font-size: var(--font-size-sm);
  color: var(--color-footer-text-60);
}

.footer-powered-link {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-powered-link:hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
}

/* Tablet Styles */
@media screen and (max-width: 989px) {
  .footer-evergreen {
    padding: 3rem 0 0;
    margin-top: 4rem;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem 1.5rem;
    padding-bottom: 2.5rem;
  }

  .footer-container {
    padding: 0 1.5rem;
  }
}

/* Mobile Styles */
@media screen and (max-width: 640px) {
  .footer-evergreen {
    padding: 2.5rem 0 0;
    margin-top: 3rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-bottom: 2rem;
  }

  .footer-container {
    padding: 0 1rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.25rem 0;
    gap: 0.5rem;
  }
}

/* Dark Mode Optimization */
@media (prefers-color-scheme: dark) {
  .footer-evergreen {
    background: #1a1a1a;
  }
}

/* Print Styles */
@media print {
  .footer-evergreen {
    background: white;
    color: black;
    padding: 1rem 0;
    margin-top: 2rem;
  }

  .footer-list a,
  .footer-description {
    color: black;
  }

  .footer-powered-link {
    color: black;
  }
}


/* =========================================
   18. CTA SECTIONS
   ========================================= */
.cta-section {
  width: 100%;
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: var(--space-4xl) 0;
  margin: 0;
  color: var(--color-white);
  background: linear-gradient(135deg, var(--theme-primary, var(--color-primary)) 0%, var(--theme-primary-hover, var(--color-primary-hover)) 100%);
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 1px, transparent 1px),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.08) 2px, transparent 2px);
  background-size: 60px 60px, 100px 100px;
  animation: ctaPatternMove 20s linear infinite;
  pointer-events: none;
}

.cta-section--community {
  background: linear-gradient(135deg, var(--color-primary) 0%, #5a4fcf 100%);
  color: white;
  margin-bottom: 0;
}

.cta-section--forum {
  background: linear-gradient(135deg, var(--color-primary) 0%, #1a5a7a 100%);
  color: white;
  margin-bottom: 0;
}

.cta-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
  margin: 0 auto;
}

.cta-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-lg);
  font-size: var(--font-size-2xl);
  animation: ctaIconFloat 3s ease-in-out infinite;
  background: rgba(255, 255, 255, 0.15);
}

.cta-title {
  color: white;
  font-size: clamp(var(--font-size-2xl), 4vw, var(--font-size-3xl));
  font-weight: var(--font-weight-bold);
  margin: 0 0 var(--space-md);
}

.cta-description {
  color: white;
  font-size: var(--font-size-lg);
  opacity: 0.9;
  line-height: 1.6;
  margin: 0 0 var(--space-xl);
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
}

/* =========================================
   19. QUICK ACTIONS (SIMPLIFIED)
   ========================================= */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
  max-width: 800px;
  margin: 0 auto;
}

.quick-action-card {
  display: block;
  padding: var(--space-2xl);
  background: var(--color-surface-elevated);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: var(--transition-base);
  text-align: center;
}

.quick-action-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.quick-action-card__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.quick-action-card__title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin: 0;
}

.quick-action-card__description {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  margin: 0;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .quick-actions-grid {
    grid-template-columns: 1fr;
  }
}

.page-spacer {
  height: var(--space-3xl);
}


/* =========================================
   20. WELCOME CALLOUTS
   ========================================= */
.community-welcome-callout {
  padding: var(--space-xl) 0;
  border-top: 1px solid color-mix(in srgb, var(--theme-primary) 10%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--theme-primary) 10%, transparent);
}

.welcome-card {
  display: flex;
  align-items: center;
  gap: var(--space-2xl);
  background: var(--color-surface-elevated);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border: 1px solid color-mix(in srgb, var(--theme-primary) 15%, transparent);
  position: relative;
  overflow: hidden;
  animation: welcomeFadeIn 0.6s ease-out;
}

.welcome-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--theme-primary), var(--color-accent));
}

.welcome-content {
  flex: 1;
}

.welcome-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: color-mix(in srgb, var(--theme-primary) 15%, transparent);
  color: var(--theme-primary);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semi);
  margin-bottom: var(--space-md);
  border: 1px solid color-mix(in srgb, var(--theme-primary) 25%, transparent);
}

.welcome-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-md);
  line-height: 1.3;
}

.welcome-description {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-xl);
  max-width: 480px;
}

.welcome-actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  align-items: center;
}

.welcome-illustration {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.illustration-circle {
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--theme-primary) 10%, transparent),
    color-mix(in srgb, var(--theme-primary) 5%, transparent));
  border-radius: var(--radius-full);
  color: var(--theme-primary);
  border: 2px solid color-mix(in srgb, var(--theme-primary) 20%, transparent);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.illustration-circle::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--theme-primary), var(--color-accent));
  opacity: 0.1;
  z-index: -1;
}

/* =========================================
   21. FEATURED CATEGORIES
   ========================================= */
/* New Feature Card */
.new-feature-card {
  display: block;
  background: var(--color-surface-elevated);
  padding: var(--space-lg);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-cta);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.new-feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-left-color: var(--color-cta-hover);
}

.new-feature-card:hover .new-feature-icon {
  background: var(--color-cta-hover);
  transform: scale(1.05);
}

.new-feature-card:hover .new-feature-badge {
  background: var(--color-cta-hover);
}

.new-feature-card:focus {
  outline: none;
  box-shadow: var(--shadow-lg), 0 0 0 3px rgba(255, 177, 66, 0.3);
}

.new-feature-icon {
  background: var(--color-cta);
  color: white;
  border-radius: var(--radius-full);
  padding: var(--space-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  transition: all var(--transition-base);
}

.new-feature-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.new-feature-content {
  flex: 1;
  min-width: 0;
}

.new-feature-badge {
  display: inline-block;
  background: var(--color-cta);
  color: white;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.025em;
  margin-bottom: var(--space-xs);
  transition: background var(--transition-base);
}

.new-feature-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  margin: 0 0 var(--space-xs) 0;
  color: var(--color-text);
  line-height: 1.3;
}

.new-feature-description {
  color: var(--color-text-secondary);
  margin: 0;
  line-height: 1.5;
}




.featured-categories {
  background: var(--color-surface-elevated);
}

.featured-categories-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
}

@media (min-width: 768px) {
  .featured-categories-grid {
    flex-wrap: nowrap;
    justify-content: center;
  }
}

.featured-category-link {
  display: block;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: var(--transition-base);
}

.featured-category-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.featured-category-image {
  position: relative;
  height: 200px;
  overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.category-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.featured-category-link:hover .category-image {
  transform: scale(1.05);
}

.featured-category-content {
  padding: var(--space-xl);
}

.category-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semi);
  margin-bottom: var(--space-md);
  background: var(--color-accent-light);
  color: var(--color-text);
}

.category-badge--new {
  background: rgba(255, 177, 66, 0.15);
  color: var(--color-accent);
}

.category-badge--archive {
  background: var(--color-border-50);
  color: var(--color-text-secondary);
}

.featured-category-description {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-lg);
}

.featured-category-stats {
  display: flex;
  gap: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}

/* =========================================
   22. RECENT ACTIVITY
   ========================================= */
.recent-activity {
  background: var(--color-surface);
  padding: var(--space-3xl) 0;
  min-height: 200px;
  position: relative;
}

.recent-activity-wrapper {
  margin-top: var(--space-xl);
}

.recent-activity-wrapper:empty::after {
  content: 'Loading recent activity...';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--color-text-secondary);
  font-style: italic;
}

.recent-activity-item,
.recent-activity li,
.activity li {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  transition: var(--transition-base);
}

.recent-activity-item:hover,
.recent-activity li:hover,
.activity li:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.empty-state {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
}

/* =========================================
   23. FORM COMPONENTS
   ========================================= */
.form-actions,
.form-buttons {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-md);
}

textarea,
.form-textarea {
  min-height: 100px;
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  padding: var(--space-md);
  font-family: inherit;
  font-size: var(--font-size-base);
  resize: vertical;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

textarea:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--theme-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-primary) 20%, transparent);
}

/* Form field types */
.form-input,
.form-select,
.form-multiselect {
  display: block;
  width: 100%;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  font-size: var(--font-size-base);
  background: var(--color-surface-elevated);
  min-height: 48px;
  transition: var(--transition-base);
}

.form-input:focus,
.form-select:focus,
.form-multiselect:focus {
  outline: none;
  border-color: var(--theme-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-primary) 20%, transparent);
}

.form-input--large {
  font-size: var(--font-size-lg);
  padding: var(--space-lg);
}

.form-textarea {
  min-height: 200px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.6;
}

.form-field {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  margin-bottom: var(--space-xl);
}

.form-label {
  margin-bottom: var(--space-sm);
}


/* Comment Forms */
.comment-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.comment-form-wrapper {
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border-light);
  max-width: 800px;
}

.comment-form-layout {
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
}

.comment-form-content {
  flex: 1;
  min-width: 0;
}

.comment-form .cancel-btn {
  min-width: 100px;
  text-align: center;
}

.comment-form .form-actions {
  display: flex !important;
  flex-direction: row !important;
  justify-content: flex-end !important;
  align-items: center;
  gap: var(--space-md);
}

.comment-form .form-actions .btn {
  width: auto !important;
  min-width: 120px;
  max-width: 100%;
  flex-shrink: 0;
}


/* Form Options */
.form-options {
  margin-bottom: var(--space-md);
}

.form-field-inline {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.checkbox-label {
  font-size: var(--font-size-sm);
  color: var(--color-text);
  cursor: pointer;
  user-select: none;
}

/* Form Actions */
.form-actions {
  padding-top: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.form-actions-main {
  display: flex;
  gap: var(--space-md);
  justify-content: flex-end;
}

.form-actions-info {
  display: flex;
  justify-content: center;
}

/* === NEW REQUEST PAGE STYLES === */

/* Space so the footer doesn't crowd the form */
#new-request-form,
#main-content.form {
  padding-bottom: 3rem;
}

@media (min-width: 768px) {
  #new-request-form,
  #main-content.form {
    padding-bottom: 4rem;
  }
}

/* Make the submit button use brand green */
#new-request-form button[type="submit"],
#new-request-form [type="submit"].c-btn,
#new-request-form [data-garden-id="buttons.button"][type="submit"],
#new-request-form .c-btn.c-btn--primary {
  background-color: var(--color-help-green, #28a745) !important;
  border-color: var(--color-help-green, #28a745) !important;
  color: #fff !important;
}

/* Simple hover/focus for Garden buttons */
#new-request-form button[type="submit"]:hover,
#new-request-form [type="submit"].c-btn:hover,
#new-request-form [data-garden-id="buttons.button"][type="submit"]:hover {
  filter: brightness(0.95);
}

#new-request-form button[type="submit"]:focus-visible,
#new-request-form [type="submit"].c-btn:focus-visible,
#new-request-form [data-garden-id="buttons.button"][type="submit"]:focus-visible {
  outline: 2px solid rgba(0,0,0,0.2);
  outline-offset: 2px;
}

#new-request-form button[type="submit"] {
  margin-bottom: 1rem;
}

/* Support Intent Banner */
.support-intent-banner {
  --accent: var(--color-accent);
  background: #fff8ec;
  border: 1px solid rgba(0,0,0,.08);
  border-left: 6px solid var(--accent);
  border-radius: 12px;
  padding: 16px 18px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px 16px;
  color: #1f2937;
  margin: 12px 0 20px;
}

.support-intent-banner__icon {
  color: var(--accent);
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.support-intent-banner__body h2 {
  margin: 0 0 .35rem;
  font-size: 1.05rem;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -.01em;
}

.support-intent-banner__body p {
  margin: 0 0 .6rem;
}

.support-intent-banner__links {
  margin: .25rem 0 .5rem 1.1rem;
}

.support-intent-banner__links li {
  margin: .25rem 0;
}

.support-intent-banner__links a {
  color: #0b66ff;
  text-decoration: underline;
}

.support-intent-banner__tip {
  font-size: .9rem;
  color: #4b5563;
}

/* =========================================
   24. COMMENTS SYSTEM
   ========================================= */
.comments {
  padding-top: var(--space-xl);
  margin-top: var(--space-2xl);
  border-top: 1px solid var(--color-border-light);
  max-width: 100%;
}

.comments-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-border-light);
}

.comment-list {
  max-width: 800px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.comment-item {
  display: block;
  padding-bottom: var(--space-xl);
  margin-bottom: var(--space-xl);
  border-bottom: 1px solid var(--color-border);
}

.comment-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.comment-layout {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
}

.comment-content {
  flex: 1;
  min-width: 0;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
}

.comment-author-info {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.comment-author {
  font-weight: var(--font-weight-semi);
}

.comment-body {
  line-height: 1.6;
}

.comment-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xl) 0;
  font-size: var(--font-size-md);
  color: var(--color-text-secondary);
  text-align: center;
}

.comment-empty-state .icon-circle {
  display: none;
}

.comment-empty-state p {
  margin: 0;
  line-height: 1.4;
}

/* === REQUEST PAGE STYLES === */

/* Layout + spacing */
.request-breadcrumbs {
  margin: 12px 0 8px;
  font-size: .875rem;
  color: var(--color-text-secondary, #6b7280);
}

.request-title {
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  font-weight: 800;
  margin: .25rem 0 1rem;
}

.request-container {
  display: grid;
  gap: 24px;
}

@media (min-width: 960px) {
  .request-container {
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
  }
}

/* Comment list/cards for request page */
.request-main .comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.request-main .comment {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}

.comment-wrapper {
  padding: 16px 18px;
}

.request-main .comment-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.comment-avatar .user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.icon-agent {
  color: var(--color-help-green, #22c55e);
  margin-right: 6px;
}

.comment-meta span {
  font-weight: 600;
}

.meta-group {
  color: var(--color-text-secondary, #6b7280);
  font-size: .85rem;
}

.request-main .comment-body {
  margin-top: 10px;
  line-height: 1.6;
}

/* Attachments */
.attachments {
  list-style: none;
  padding: 8px 0 0;
  margin: 8px 0 0;
  display: grid;
  gap: 6px;
}

.attachment-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .9rem;
}

.attachment-icon {
  color: var(--color-text-secondary, #6b7280);
}

.attachment-meta {
  margin-left: auto;
  display: flex;
  gap: 10px;
  font-size: .8rem;
  color: var(--color-text-secondary, #6b7280);
}

/* Follow-up callout spacing */
.request-follow-up {
  margin: 24px 0;
}

/* Comment form */
.comment-form.hbs-form {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
  padding: 16px;
}

.comment-form .comment-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-fields {
  margin-top: 8px;
}

.comment-attachments {
  margin-top: 8px;
}

/* Controls row */
.comment-form-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}

/* Primary submit button -> brand green */
.comment-form .button.button-large {
  background: var(--color-help-green, #22c55e);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: .75rem 1.1rem;
  box-shadow: 0 6px 16px rgba(34,197,94,.25);
  transition: transform .15s ease, box-shadow .15s ease, background-color .2s ease;
}

.comment-form .button.button-large:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(34,197,94,.28);
}

.comment-form .button.button-large:active {
  transform: none;
  box-shadow: 0 4px 10px rgba(34,197,94,.22);
}

/* "Mark as solved" stays neutral */
.mark-as-solved.button-secondary {
  background: #fff;
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  padding: .65rem 1rem;
}

.mark-as-solved.button-secondary:hover {
  background: #f9fafb;
}

/* Sidebar panel */
.request-sidebar {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
  padding: 16px;
  position: sticky;
  top: calc(var(--header-height, 64px) + 16px);
}

.collapsible-sidebar-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 .5rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.request-details {
  margin: 12px 0;
}

.request-details dt {
  font-size: .8rem;
  color: var(--color-text-secondary, #6b7280);
  margin-bottom: 3px;
}

.request-details dd {
  margin: 0 0 10px;
  font-weight: 600;
}

/* Status chips */
.status-label {
  border-radius: 999px;
  padding: .2rem .5rem;
  font-size: .8rem;
}

.status-label-open {
  background: rgba(34,197,94,.12);
  color: #166534;
}

.status-label-solved {
  background: #e5e7eb;
  color: #374151;
}

/* Pagination spacing */
.pagination,
.pagination-wrapper {
  margin-top: 16px;
}

/* Ensure pagination buttons are clickable on mobile */
.pagination a,
.pagination button,
.pagination-wrapper a,
.pagination-wrapper button {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm) var(--space-md);
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(0,0,0,0.1);
}

/* Load more button styling */
.pagination .button,
.pagination-wrapper .button,
button[data-action="load-more"],
.load-more-button {
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: var(--font-weight-semi);
  cursor: pointer;
  transition: var(--transition-base);
  min-height: 48px;
  padding: var(--space-md) var(--space-xl);
}

.pagination .button:hover,
.pagination-wrapper .button:hover,
button[data-action="load-more"]:hover,
.load-more-button:hover {
  background: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Bottom padding so the footer doesn't crowd the form */
.request-container {
  margin-bottom: 24px;
}

/* 1) Core: make media responsive inside the post card */
.post-content-wrapper img,
.post-content-wrapper video,
.post-content-wrapper iframe,
.comment-body img,
.comment-body video,
.comment-body iframe {
  display: block;
  max-width: 100%;
  width: 100%;          /* ensures it can shrink to the card width */
  height: auto;         /* keep aspect ratio for images & videos */
}

/* 1b) Defuse inline width/height coming from the editor or pasted HTML */
.post-content-wrapper img[style*="width"],
.post-content-wrapper img[width],
.comment-body img[style*="width"],
.comment-body img[width] {
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
}

/* 2) Nice spacing so images don’t crash into text */
.post-content-wrapper img,
.comment-body img {
  margin: var(--space-md, 16px) 0;
  border-radius: var(--radius-md, 8px);
}

/* 3) Tables: prevent sideways overflow on mobile */
.post-content-wrapper table,
.comment-body table {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  display: block;
}

/* 4) Code blocks: wrap long lines and allow horizontal scroll if needed */
.post-content-wrapper pre,
.comment-body pre {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
  max-width: 100%;
}

/* 5) Long unbroken URLs/strings */
.post-content-wrapper,
.comment-body {
  overflow-wrap: anywhere;
}

/* 6) Optional: safety net so nothing visually bleeds outside the card */
.card .card__body {
  overflow: hidden;
}

/* 7) If you have YouTube/Vimeo iframes without wrappers,
   give them a sane height that scales */
.post-content-wrapper iframe,
.comment-body iframe {
  aspect-ratio: 16 / 9;
  height: auto;
}

/* If your browser support needs a fallback, you can use:
.post-content-wrapper iframe,
.comment-body iframe { width: 100%; height: clamp(200px, 56.25vw, 60vh); }
*/


/* =========================================
   25. HELP CENTER COMPONENTS
   ========================================= */
.help-page .category-controls,
.help-page .section-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}

.help-page .search-filter-wrapper {
  display: flex;
  gap: var(--space-md);
  align-items: stretch;
  flex-wrap: nowrap;
  justify-content: center;
  max-width: 600px;
}

.category-controls input.input,
.category-controls select.select,
.help-page .form-control--select {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  height: 48px;
  background: var(--color-surface-elevated);
}

.category-controls input.input:focus,
.category-controls select.select:focus,
.help-page .form-control--select:focus {
  border-color: var(--theme-primary);
  box-shadow: 0 0 0 3px rgba(33, 140, 116, 0.1);
}

.help-page .form-control--select {
  padding: 0 var(--space-md) 0 var(--space-sm);
  min-width: 220px;
  max-width: 220px;
  cursor: pointer;
  flex-shrink: 0;
}

.help-page .search-bar--lg {
  flex: 1;
  min-width: 300px;
  max-width: 400px;
}

.help-page .search-bar--lg .search-bar__input {
  padding: var(--space-sm) var(--space-lg);
}

.help-page .sort-btn,
.help-page .filter-btn {
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--font-size-sm);
  min-width: 120px;
  justify-content: center;
}

/* Content containers */
.help-page .article-list-container,
.help-page .section-article-list {
  max-width: 800px;
  margin: 0 auto;
}

.help-page .category-section,
.help-page .section-content {
  margin-bottom: var(--space-3xl);
}

.help-page .article-list {
  margin-bottom: var(--space-2xl);
}

.help-page .cta-section {
  margin-top: var(--space-3xl);
}

/* Subsection Cards */
.subsection-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.subsection-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--theme-primary);
}

.subsection-link {
  font-weight: var(--font-weight-semi);
  color: var(--color-text);
  text-decoration: none;
}

.subsection-link:hover {
  color: var(--theme-primary);
}

.subsection-arrow {
  color: var(--color-text-secondary);
  transition: transform var(--transition-base), color var(--transition-base);
}

.subsection-card:hover .subsection-arrow {
  color: var(--theme-primary);
  transform: translateX(4px);
}

.section-cards {
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-2xl);
}

/* Article List Items */
.article-list-item {
  padding: var(--space-md);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  margin-bottom: var(--space-sm);
  transition: background var(--transition-base), border-color var(--transition-base);
}

.article-list-item:hover {
  background: rgba(33, 140, 116, 0.05);
  border-color: rgba(33, 140, 116, 0.2);
}

.article-list-item--promoted {
  background: rgba(255, 177, 66, 0.05);
  border-color: rgba(255, 177, 66, 0.2);
}

.article-list-link {
  color: var(--color-text);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
}

.article-list-item:hover .article-list-link {
  color: var(--theme-primary);
}

.promoted-star {
  color: var(--color-accent);
}

.internal-lock {
  color: var(--color-text-secondary);
}

/* Article Table */
.article-table-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  background: var(--color-surface-elevated);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.article-table {
  width: 100%;
  border-collapse: collapse;
}

.article-table__header {
  background: var(--color-surface);
  color: var(--theme-primary);
  font-weight: var(--font-weight-semi);
  padding: var(--space-lg);
  text-align: left;
  border-bottom: 2px solid var(--color-border);
}

.article-row {
  transition: background-color var(--transition-base);
}

.article-row:hover {
  background: rgba(33, 140, 116, 0.05);
}

.article-title-cell,
.article-section-cell,
.article-date-cell {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--color-border-light);
}

.article-title-cell {
  font-weight: var(--font-weight-medium);
}

.article-section-cell,
.article-date-cell {
  color: var(--color-text-secondary);
}

.promoted-indicator {
  color: var(--color-accent);
  margin-right: var(--space-xs);
  vertical-align: middle;
}

/* Help Page Comment Layout */
.help-page .comment-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-md);
}

.help-page .comment-author-section {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
}

.help-page .comment-avatar {
  flex-shrink: 0;
}

.help-page .comment-author-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.help-page .comment-author {
  font-weight: var(--font-weight-semi);
  color: var(--color-text);
  line-height: 1.2;
  margin: 0;
}

.help-page .comment-time {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: 1.2;
  margin: 0;
}

.help-page .comment-actions {
  flex-shrink: 0;
}

.help-page .comment-actions button,
.help-page .comment-actions .btn {
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
  padding: var(--space-xs);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 0;
}

.help-page .comment-actions button:hover,
.help-page .comment-actions .btn:hover {
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 10%, transparent);
}

.help-page .comment-actions button::before,
.help-page .comment-actions .btn::before {
  content: "⋮";
  font-size: 18px;
  line-height: 1;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* === CATEGORY PAGE STYLES === */

/* Help Center Theme Variables */
.help-page {
  --svi-gold: #b5985a;
  --svi-ink: #151515;
  --svi-blue: #2b4b7d;
  --svi-green: #218c74;
  --theme-primary: var(--svi-green);
  --theme-hover: var(--color-primary-dark);
}

/* Category Hero Section */
.category-hero {
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(33,140,116,.08), transparent 60%),
    linear-gradient(135deg, var(--color-surface) 0%, #f1f5f4 100%);
  padding: var(--space-3xl) 0 var(--space-2xl);
  border-bottom: 1px solid var(--color-border-light);
  position: relative;
  overflow: hidden;
}

.category-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 25% 25%, rgba(33,140,116,0.04) 2px, transparent 2px),
    radial-gradient(circle at 75% 75%, rgba(33,140,116,0.03) 1px, transparent 1px);
  background-size: 80px 80px, 120px 120px;
  animation: heroPattern 20s linear infinite;
  pointer-events: none;
}

@keyframes heroPattern {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-10px, -5px); }
}

.category-hero .container {
  position: relative;
  z-index: 2;
}

.category-hero .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  color: var(--theme-primary);
  margin: 0 0 var(--space-sm);
  font-weight: 600;
}

.category-hero .hero-title {
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.1;
  margin: 0 0 var(--space-md);
  color: var(--svi-ink);
  font-weight: 700;
}

.category-hero .hero-subtitle {
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-xl);
  font-size: 18px;
  max-width: 600px;
  line-height: 1.6;
}

/* Enhanced Search Bar for Hero */
.search-bar--hero {
  display: flex;
  max-width: 600px;
  position: relative;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: white;
}

.search-bar--hero .search-bar__input {
  flex: 1;
  height: 54px;
  padding: 0 var(--space-lg);
  border: none;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  font-size: 16px;
  color: var(--color-text);
}

.search-bar--hero .search-bar__input:focus {
  outline: none;
  background: white;
}

.search-bar--hero .search-bar__input::placeholder {
  color: var(--color-text-secondary);
}

.search-bar--hero .search-bar__button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--theme-primary);
  color: white;
  cursor: pointer;
  transition: var(--transition-base);
}

.search-bar--hero .search-bar__button:hover {
  background: var(--theme-hover);
}

/* Section Titles */
.section-title {
  font-size: 24px;
  font-weight: 700;
  margin: var(--space-3xl) 0 var(--space-xl);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  color: var(--svi-ink);
}

.accent-bar {
  width: 32px;
  height: 4px;
  background: var(--theme-primary);
  border-radius: 999px;
  display: inline-block;
}

/* Section Grid */
.section-grid {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-3xl);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
}

.section-card {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.section-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--theme-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}

.section-card:hover::before {
  transform: scaleX(1);
}

.section-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--theme-primary);
}

.section-card__link {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-xl);
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.section-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(33,140,116,.1);
  color: var(--theme-primary);
  flex-shrink: 0;
  transition: var(--transition-base);
}

.section-card:hover .section-card__icon {
  background: var(--theme-primary);
  color: white;
  transform: scale(1.05);
}

.section-card__body {
  flex: 1;
  min-width: 0;
}

.section-card__title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 var(--space-xs);
  color: var(--svi-ink);
  line-height: 1.3;
}

.section-card__meta {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin: 0;
}

.section-card__chevron {
  margin-left: auto;
  opacity: 0.5;
  transition: var(--transition-base);
  flex-shrink: 0;
}

.section-card:hover .section-card__chevron {
  opacity: 1;
  transform: translateX(4px);
}

/* Section Groups */
.articles-by-section {
  margin-bottom: var(--space-3xl);
}

.section-group {
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--color-border-light);
}

.section-group:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.section-group__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 var(--space-lg);
  flex-wrap: wrap;
  gap: var(--space-md);
}

.section-group__title {
  font-size: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: 0;
}

.section-group__title a {
  color: var(--svi-ink);
  text-decoration: none;
  transition: var(--transition-base);
}

.section-group__title a:hover {
  color: var(--theme-primary);
}

.section-group__viewall {
  font-size: 14px;
  color: var(--theme-primary);
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  transition: var(--transition-base);
}

.section-group__viewall:hover {
  text-decoration: underline;
  transform: translateX(2px);
}

/* Article List */
.article-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
}

.article-card {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  transition: var(--transition-base);
  position: relative;
}

.article-card:hover {
  border-color: var(--theme-primary);
  background: rgba(33,140,116,.02);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.article-card__content {
  flex: 1;
  min-width: 0;
}

.article-card__link {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.4;
  transition: var(--transition-base);
}

.article-card:hover .article-card__link {
  color: var(--theme-primary);
}

.article-card__meta {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-top: var(--space-xs);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.pill {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  font-weight: 500;
  white-space: nowrap;
}

.pill--promoted {
  background: rgba(181,152,90,.12);
  border-color: rgba(181,152,90,.4);
  color: #7b642f;
}

/* Empty State */
.empty-hint {
  color: var(--color-text-secondary);
  font-style: italic;
  text-align: center;
  padding: var(--space-xl);
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin: var(--space-lg) 0;
}

/* Category Page Responsive */
@media (max-width: 768px) {
  .category-hero {
    padding: var(--space-2xl) 0 var(--space-xl);
  }

  .category-hero .hero-title {
    font-size: 32px;
  }

  .search-bar--hero {
    max-width: 100%;
  }

  .section-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .article-list {
    grid-template-columns: 1fr;
  }

  .section-group__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .article-card {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Accessibility Focus States */
.section-card:focus-within,
.article-card:focus-within {
  outline: 2px solid var(--theme-primary);
  outline-offset: 2px;
}

.search-bar--hero .search-bar__button:focus {
  outline: 2px solid var(--theme-primary);
  outline-offset: 2px;
}

/* === SECTION PAGE STYLES === */

/* Section Hero (similar to category hero) */
.section-hero {
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(33,140,116,.08), transparent 60%),
    linear-gradient(135deg, var(--color-surface) 0%, #f1f5f4 100%);
  padding: var(--space-3xl) 0 var(--space-2xl);
  border-bottom: 1px solid var(--color-border-light);
  position: relative;
  overflow: visible; /* Allow instant search dropdown to extend */
}

.section-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 25% 25%, rgba(33,140,116,0.04) 2px, transparent 2px),
    radial-gradient(circle at 75% 75%, rgba(33,140,116,0.03) 1px, transparent 1px);
  background-size: 80px 80px, 120px 120px;
  animation: heroPattern 20s linear infinite;
  pointer-events: none;
}

.section-hero .container {
  position: relative;
  z-index: 2;
}

.section-hero .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  color: var(--theme-primary);
  margin: 0 0 var(--space-sm);
  font-weight: 600;
}

.section-hero .hero-title {
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.1;
  margin: 0 0 var(--space-md);
  color: var(--svi-ink);
  font-weight: 700;
}

.section-hero .hero-subtitle {
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-xl);
  font-size: 18px;
  max-width: 600px;
  line-height: 1.6;
}

.section-subtitle {
  font-size: 16px;
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-xl);
  max-width: 600px;
  line-height: 1.6;
}

/* Subsection Grid */
.subsection-grid {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-3xl);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.subsection-card__link {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-lg);
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.subsection-card__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(33,140,116,.08);
  color: var(--theme-primary);
  flex-shrink: 0;
  transition: var(--transition-base);
}

.subsection-card:hover .subsection-card__icon {
  background: var(--theme-primary);
  color: white;
  transform: scale(1.05);
}

.subsection-card__body {
  flex: 1;
  min-width: 0;
}

.subsection-card__title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 var(--space-xs);
  color: var(--svi-ink);
  line-height: 1.3;
}

.subsection-card__meta {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin: 0;
  line-height: 1.4;
}

.subsection-card__chevron {
  opacity: 0.5;
  transition: var(--transition-base);
  flex-shrink: 0;
}

.subsection-card:hover .subsection-card__chevron {
  opacity: 1;
  transform: translateX(4px);
}

/* Articles Section */
.articles-section {
  margin-bottom: var(--space-3xl);
}

/* =========================================
   26. ARTICLE PAGE LAYOUT
   ========================================= */
.article-container {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: var(--space-2xl);
  max-width: 1200px;
  margin: 0 auto;
  align-items: start;
}

/* Table of Contents Sidebar */
.article-toc-sidebar {
  position: sticky;
  top: calc(80px + var(--space-xl));
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  background: var(--color-surface-elevated);
  padding: var(--space-lg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.sidebar__title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semi);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

.article-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.article-toc li + li {
  margin-top: var(--space-sm);
}

.article-toc a {
  color: var(--color-text);
  font-size: var(--font-size-sm);
  text-decoration: none;
  display: block;
  padding: var(--space-sm);
  border-radius: var(--radius-sm);
  transition: var(--transition-base);
}

.article-toc a:hover,
.article-toc a.active {
  font-weight: var(--font-weight-semi);
  color: var(--color-primary);
  background: var(--color-primary-light);
}

/* Main Article */
.article--main {
  width: 100%;
  padding: var(--space-2xl);
  background: var(--color-surface-elevated);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* Simplified Article Meta */
.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border-light);
}

.article-meta__author {
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
}

.article-meta__author a {
  color: var(--color-text);
  text-decoration: none;
}

.article-meta__author a:hover {
  color: var(--color-primary);
}

.article-meta__separator {
  color: var(--color-border);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .article-container {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .article-toc-sidebar {
    position: relative;
    top: 0;
    max-height: none;
    order: 2;
  }

  .article--main {
    padding: var(--space-lg);
    order: 1;
  }
}

/* Article Body Content */
.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4,
.article-body h5,
.article-body h6 {
  font-weight: var(--font-weight-bold);
  scroll-margin-top: 100px;
  color: var(--color-text);
}

.article-body h1 {
  font-size: var(--font-size-3xl);
  border-bottom: 3px solid var(--theme-primary);
  padding-bottom: var(--space-md);
  margin: var(--space-3xl) 0 var(--space-lg) 0;
}

.article-body h2 {
  font-size: var(--font-size-2xl);
  margin: var(--space-2xl) 0 var(--space-md) 0;
  color: var(--theme-primary);
}

.article-body h3 {
  font-size: var(--font-size-xl);
  margin: var(--space-xl) 0 var(--space-md) 0;
}

.article-body h4,
.article-body h5,
.article-body h6 {
  font-size: var(--font-size-lg);
  margin: var(--space-lg) 0 var(--space-sm) 0;
}

.article-body p {
  margin-bottom: var(--space-md);
  line-height: 1.7;
  color: var(--color-text);
  font-size: 1.125rem;
}

.article-body ul,
.article-body ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-xl);
  line-height: 1.7;
  font-size: 1.125rem;
}

.article-body li {
  margin-bottom: var(--space-sm);
}

.article-body a {
  color: var(--theme-primary);
  text-decoration: none;
  background-image: linear-gradient(to right, var(--theme-primary), var(--theme-primary));
  background-size: 0% 2px;
  background-position: left bottom;
  background-repeat: no-repeat;
  transition: background-size 0.3s ease;
}

.article-body a:hover {
  background-size: 100% 2px;
}

.article-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: var(--space-xl) auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  cursor: zoom-in;
  transition: box-shadow var(--transition-base);
}

.article-body img:hover {
  box-shadow: var(--shadow-md);
}

/* Image Lightbox */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  padding: var(--space-xl);
}

.lightbox-overlay.lightbox-open {
  opacity: 1;
  visibility: visible;
}

.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: transform 0.25s ease;
  cursor: default;
}

.lightbox-overlay.lightbox-open img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: var(--radius-full);
  color: white;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-base);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
  .lightbox-overlay {
    padding: var(--space-md);
  }

  .lightbox-overlay img {
    max-width: 95vw;
    max-height: 85vh;
  }

  .lightbox-close {
    top: var(--space-md);
    right: var(--space-md);
  }
}

.wysiwyg-image-wrapper {
  display: flex;
  align-items: center;
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-xl) 0;
  background: var(--color-surface-elevated);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.article-body th,
.article-body td {
  padding: var(--space-md);
  border-bottom: 1px solid var(--color-border-light);
  text-align: left;
  vertical-align: top;
}

.article-body th {
  background: var(--color-surface);
  font-weight: var(--font-weight-semi);
  color: var(--theme-primary);
}

.article-body tr:last-child td {
  border-bottom: none;
}

.article-body pre {
  background: var(--color-surface);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: var(--space-xl) 0;
  border-left: 4px solid var(--theme-primary);
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: var(--font-size-sm);
  line-height: 1.5;
}

.article-body code {
  background: var(--color-surface);
  padding: 0.2em 0.4em;
  border-radius: var(--radius-sm);
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 0.9em;
}

.article-body blockquote {
  margin: var(--space-xl) 0;
  padding: var(--space-lg);
  background: var(--color-surface);
  border-left: 4px solid var(--theme-primary);
  border-radius: var(--radius-md);
  font-style: italic;
  color: var(--color-text-secondary);
}

.article-body iframe {
  max-width: 100%;
  width: 100%;
  display: block;
  margin: var(--space-xl) 0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

/* Article Voting & Actions */
.article-votes {
  text-align: center;
  margin: var(--space-2xl) auto;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  border: 1px solid var(--color-border);
}

.article-votes-controls {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.article-votes-controls .btn {
  background: var(--theme-primary);
  color: var(--color-white);
  border: none;
}

.article-votes-controls .btn:hover {
  background: var(--theme-primary-hover, var(--color-primary-hover));
}

.article-votes small {
  display: block;
  margin-top: var(--space-sm);
  color: var(--color-text-secondary);
}

.article-actions {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  justify-content: center;
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border-light);
}

/* Simplified Tags & Attachments */
.content-tags,
.article-attachments {
  padding-top: var(--space-xl);
  margin: var(--space-xl) 0;
  border-top: 1px solid var(--color-border-light);
}

.content-tags__title,
.attachments__title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semi);
  margin-bottom: var(--space-md);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: var(--font-size-sm);
}

.enhanced-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

li.enhanced-tag {
  list-style: none;
}

.enhanced-tags .tag {
  background: var(--color-surface);
  color: var(--color-text);
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  text-decoration: none;
  transition: var(--transition-base);
  border: 1px solid var(--color-border);
}

.enhanced-tags .tag:hover {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

/* Simplified Attachments */
.attachment-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.attachment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--color-text);
  transition: var(--transition-base);
}

.attachment-item:hover {
  border-color: var(--color-primary);
  background: var(--color-surface-elevated);
}

.attachment-name {
  font-weight: var(--font-weight-medium);
  flex: 1;
}

.attachment-size {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}


/* =========================================
   27. FORUM COMPONENTS
   ========================================= */

/* Ensure SVG icons maintain proper colors */
.post-list svg,
.topic-list svg,
.community-post svg,
.post-header svg,
.topic-header svg {
  flex-shrink: 0;
}

/* Forum icon circle colors */
.post-list .icon-circle,
.topic-list .icon-circle {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

/* Maintain contrast for forum icons */
.post-status-icon,
.topic-status-icon {
  color: currentColor;
}

.sidebar-section {
  margin-bottom: var(--space-xl);
}

.forum-page .contribute-sidebar {
  border-left: 4px solid var(--color-primary);
}

.new-post-sidebar:hover,
.new-post-form-card:hover {
  box-shadow: none;
  transform: none;
}

.sticky-sidebar-card {
  position: sticky;
  top: calc(80px + var(--space-xl));
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  background: var(--color-surface-elevated);
  padding: var(--space-md);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--theme-primary);
  border-radius: var(--radius-md);
  height: max-content;
  box-shadow: none;
  transform: none;
}

.tips-list {
  list-style: none;
  padding-left: 0;
  margin: 0; /* optional, if you want to remove default top/bottom spacing too */
}


.forum-page .topic-info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-border-light);
}

.forum-page .topic-info-item:last-child {
  border-bottom: none;
}

.forum-page .topic-info-label {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  font-weight: var(--font-weight-medium);
}

.forum-page .topic-info-value {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semi);
  color: var(--color-text);
}

.post-author-info,
.forum-page .post-author-section {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  flex: 1;
}

.forum-page .post-header-content {
  flex: 1;
  min-width: 0;
}

.forum-page .comments-title-section {
  flex: 1;
}

/* Topic Pages - Community Forum Cards */
/* Force topics cards to stretch full container width */
.quick-actions-grid.quick-actions-grid--2x3 {
  width: 100%;
  max-width: none !important;
  justify-content: stretch !important; /* overrides centering */
  justify-items: stretch;              /* cards stretch inside grid cells */

  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)); /* key: flexible columns */
  gap: 24px; /* adjust if you want tighter */
}

.quick-actions-grid.quick-actions-grid--2x3 .quick-action-link {
  width: 100%;
  max-width: none !important;
}

/* Responsive */
@media (max-width: 900px) {
  .quick-actions-grid.quick-actions-grid--2x3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .quick-actions-grid.quick-actions-grid--2x3 {
    grid-template-columns: 1fr;
  }
}


.quick-actions-grid--2x3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, auto);
  gap: var(--space-xl);
}

.quick-actions-grid--2x3 .quick-action-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-2xl);
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.quick-actions-grid--2x3 .quick-action-link:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.quick-actions-grid--2x3 .quick-action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: var(--space-md);
  color: #000;
}

.quick-action-icon svg,
.quick-action-icon svg * {
  stroke: currentColor;
  fill: none !important;
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quick-actions-grid--2x3 .quick-action-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin: 0 0 var(--space-sm);
}

.quick-actions-grid--2x3 .quick-action-description {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin: 0;
  line-height: 1.5;
}

@media (max-width: 1024px) {
  .quick-actions-grid--2x3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .quick-actions-grid--2x3 {
    grid-template-columns: 1fr;
  }
}

.topic-description {
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin: 0;
}

.topic-stats {
  display: flex;
  gap: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.stat-value {
  font-weight: var(--font-weight-semi);
  color: var(--theme-primary);
}

.topic-page-title {
  line-height: 1.2;
}

.topic-toolbar {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.topic-toolbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-xl);
}

.topic-actions-left,
.topic-actions-right {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.topic-stat-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.topic-follow button,
.topic-follow a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  padding: 6px 12px;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semi);
  border-radius: var(--radius-md);
  line-height: 1;
  transition: var(--transition-base);
  vertical-align: middle;
  position: relative;
  top: -1px;
  text-decoration: none;
  cursor: pointer;
}

.topic-follow button:hover,
.topic-follow a:hover {
  background: var(--color-primary);
  color: white;
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

/* Post Cards & Lists */
.posts-section {
  margin-bottom: var(--space-2xl);
}

.posts-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.post-card {
  border-left: 4px solid transparent;
  transition: var(--transition-base);
}

.post-card:hover {
  border-left-color: var(--theme-primary);
  transform: translateX(2px);
}

.forum-page .post-card:hover,
.forum-page .community-post-card:hover {
  border-color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 5%, transparent);
  border-left-color: var(--color-primary);
}

.forum-page .post-card:hover .post-title,
.forum-page .community-post-card:hover .post-title {
  color: var(--color-primary);
}

.post-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-lg);
  margin-bottom: var(--space-md);
}

.author-details {
  flex: 1;
}

.post-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  margin: 0 0 var(--space-xs);
  line-height: 1.3;
}

.post-link {
  color: var(--color-text);
  text-decoration: none;
  transition: var(--transition-base);
}

.post-link:hover {
  color: var(--theme-primary);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.post-stats {
  display: flex;
  gap: var(--space-lg);
  flex-shrink: 0;
}

.post-stat {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.post-excerpt {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border-light);
}

.post-excerpt p {
  margin: 0;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

.new-post-main {
  margin-bottom: var(--space-2xl); 
}

.new-post-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

.sidebar-section {
  margin-bottom: var(--space-xl);
}

/* Duplicate .forum-page .contribute-sidebar removed - defined earlier */

/* Duplicate .forum-page .topic-info-* styles removed - defined earlier */

.post-header-enhanced {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.post-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-left: auto;
  gap: var(--space-sm);
}

.post-voting-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.post-action-menu {
  margin-top: var(--space-xs);
}


/* Voting container */
.post-voting-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xxs);
  margin-left: auto;
  margin-right: var(--space-md);
}

/* Basic vote button styling */
.vote-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.vote-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #888888; /* default gray */
  transition: color 0.2s ease, transform 0.2s ease;
}

.vote-btn:hover {
  transform: scale(1.1);
}

.vote-btn--active.vote-up {
  color: #1d594a; /* green (your brand color) */
}

.vote-btn--active.vote-down {
  color: #ef767a; /* red/pink (your brand accent) */
}

.vote-sum {
  font-weight: bold;
  font-size: 14px;
  color: #222;
}



.post-action-menu {
  margin-left: var(--space-md);
}

.post-action-menu .dropdown-toggle,
.post-action-menu .dropdown__toggle,
.post-action-menu button {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--color-text-secondary);
  padding: 0.25rem;
  font-size: 1rem;
}

/* Article Collapsible/Accordion Items - Improved for Responsiveness

   USAGE EXAMPLES:

   1. Using native HTML <details> (recommended):
   <details class="article-collapsible">
     <summary>Click to expand</summary>
     <div class="collapsible-content">
       <p>Content goes here...</p>
     </div>
   </details>

   2. Using custom divs (requires JavaScript):
   <div class="article-collapsible">
     <div class="collapsible-trigger">Click to expand</div>
     <div class="collapsible-content">
       <p>Content goes here...</p>
     </div>
   </div>

   Add 'is-open' class to start expanded:
   <div class="article-collapsible is-open">
*/
.article-collapsible {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  overflow: hidden;
  transition: var(--transition-base);
}

.article-collapsible:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

/* Collapsible Header/Trigger */
.article-collapsible summary,
.article-collapsible .collapsible-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  cursor: pointer;
  user-select: none;
  font-weight: var(--font-weight-semi);
  color: var(--color-text);
  background: var(--color-surface-elevated);
  transition: var(--transition-base);
  list-style: none;
  min-height: 48px;
  -webkit-tap-highlight-color: transparent;
}

.article-collapsible summary::-webkit-details-marker {
  display: none;
}

.article-collapsible summary:hover,
.article-collapsible .collapsible-trigger:hover {
  background: var(--color-surface);
  color: var(--color-primary);
}

.article-collapsible summary:focus,
.article-collapsible .collapsible-trigger:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
}

/* Collapsible Icon */
.article-collapsible summary::after,
.article-collapsible .collapsible-trigger::after {
  content: '';
  width: 24px;
  height: 24px;
  background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%23666' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: var(--space-md);
}

.article-collapsible[open] summary::after,
.article-collapsible.is-open .collapsible-trigger::after {
  transform: rotate(180deg);
}

/* Collapsible Content */
.article-collapsible .collapsible-content,
.article-collapsible > *:not(summary):not(.collapsible-trigger) {
  padding: 0 var(--space-lg) var(--space-lg);
  animation: collapsibleSlideDown 0.3s ease;
}

@keyframes collapsibleSlideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Links inside collapsible */
.article-collapsible a {
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition-base);
}

.article-collapsible a:hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .article-collapsible summary,
  .article-collapsible .collapsible-trigger {
    padding: var(--space-md);
    font-size: var(--font-size-base);
    min-height: 56px;
  }

  .article-collapsible .collapsible-content,
  .article-collapsible > *:not(summary):not(.collapsible-trigger) {
    padding: 0 var(--space-md) var(--space-md);
  }

  .article-collapsible ul,
  .article-collapsible ol {
    padding-left: var(--space-lg);
    margin-left: var(--space-sm);
  }

  .article-collapsible summary::after,
  .article-collapsible .collapsible-trigger::after {
    width: 28px;
    height: 28px;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .article-collapsible summary,
  .article-collapsible .collapsible-trigger {
    min-height: 60px;
    padding: var(--space-lg);
  }
}

/* Hide horizontal rules between collapsibles - only target HR elements */
.article-collapsible + hr,
.article-body .article-collapsible + hr,
details.article-collapsible + hr,
.article-body details.article-collapsible + hr {
  display: none;
  margin: 0;
  border: none;
}

/* Profile Hero Text Color Fix */
.hero .profile-avatar-large ~ .hero-title,
.hero .profile-avatar-large ~ .hero-subtitle {
  color: var(--color-text);
  opacity: 1;
}

.hero .profile-actions .btn {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: transparent;
}

.hero .profile-actions .btn:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.hero .profile-badge {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border: 1px solid var(--color-primary-border);
}

.hero .hero-title {
  color: var(--color-text);
  margin-bottom: var(--space-md);
}

.hero .hero-subtitle {
  color: var(--color-text);
  opacity: 0.9;
}

/* Profile Actions Styling */
.hero .profile-actions .btn--ghost.btn--on-dark,
.hero .profile-actions .btn {
  color: var(--color-white) !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  background: var(--color-primary) !important;
}

.hero .profile-actions .btn--ghost.btn--on-dark:hover,
.hero .profile-actions .btn:hover {
  background: var(--color-primary-hover) !important;
  border-color: rgba(255, 255, 255, 0.6) !important;
}
/* ===== SHARED PROFILE COMPONENTS ===== */
.profile-avatar-large {
  margin-bottom: var(--space-lg);
}

.avatar-xl {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-full);
  border: 4px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.profile-name {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  margin: 0 0 var(--space-md);
  color: white;
}

.profile-name a:hover {
  text-decoration: underline;
}

.profile-badges-hero {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.profile-badge {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semi);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.profile-description {
  font-size: var(--font-size-lg);
  color: rgba(255, 255, 255, 0.9);
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto var(--space-xl);
  line-height: 1.6;
}

/* Profile action button styles defined earlier in Button Components section */
/* Dropdown Actions */
.forum-page .profile-actions .dropdown__toggle,
.forum-page .profile-actions button[aria-label="More options"] {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-base);
  cursor: pointer;
  font-size: 0;
}

.forum-page .profile-actions .dropdown__toggle:hover,
.forum-page .profile-actions button[aria-label="More options"]:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

.forum-page .profile-actions .dropdown__toggle::before,
.forum-page .profile-actions button[aria-label="More options"]::before {
  content: "⋮";
  font-size: 20px;
  line-height: 1;
  font-weight: bold;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.forum-page .profile-actions .dropdown__toggle > *,
.forum-page .profile-actions button[aria-label="More options"] > * {
  display: none;
}

.forum-page .profile-actions .dropdown__menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: var(--space-sm);
  min-width: 180px;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-sm);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: var(--transition-base);
  z-index: var(--z-dropdown);
}

.forum-page .profile-actions .dropdown--active .dropdown__menu,
.forum-page .profile-actions .active .dropdown__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.forum-page .profile-actions .dropdown__item {
  display: block;
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  text-decoration: none;
  font-size: var(--font-size-sm);
  color: var(--color-text);
  transition: var(--transition-base);
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
}

.forum-page .profile-actions .dropdown__item:hover {
  background: var(--color-surface);
  color: var(--theme-primary);
}

.forum-page .profile-actions .dropdown__divider {
  height: 1px;
  margin: var(--space-sm) 0;
  background: var(--color-border);
}

/* Ensure avatar fallback displays correctly */
.hero .avatar-fallback,
.profile-hero .avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* Stats Section */
.profile-stats-section {
  background: var(--color-surface-elevated);
  padding: var(--space-xl) 0;
  margin-top: calc(-1 * var(--space-xl));
  position: relative;
  z-index: 3;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-md);
  max-width: 900px;
  margin: 0 auto;
}

.stat-box {
  background: var(--color-surface-elevated);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  text-align: center;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
}

.stat-box:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--theme-primary);
}

.stat-number {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--theme-primary);
  margin-bottom: var(--space-xs);
  line-height: 1.2;
}

.stat-label {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  font-weight: var(--font-weight-medium);
  text-transform: capitalize;
}

/* Profile Tabs */
.profile-tabs {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-lg) 0;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.tabs-list {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

.tab-button {
  background: none;
  border: none;
  padding: var(--space-md) var(--space-xl);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition-base);
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: 48px;
}

.tab-button:hover {
  color: var(--theme-primary);
  background: color-mix(in srgb, var(--theme-primary) 8%, transparent);
  transform: translateY(-1px);
}

.tab-button.tab-active {
  color: var(--theme-primary);
  background: color-mix(in srgb, var(--theme-primary) 12%, transparent);
  font-weight: var(--font-weight-semi);
  border: 1px solid color-mix(in srgb, var(--theme-primary) 25%, transparent);
}

.tab-button.tab-active::after {
  content: '';
  position: absolute;
  bottom: -17px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid var(--theme-primary);
}

.tab-count {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-normal);
  background: color-mix(in srgb, var(--theme-primary) 15%, transparent);
  color: var(--theme-primary);
  padding: 2px 6px;
  border-radius: var(--radius-full);
  min-width: 20px;
  text-align: center;
  opacity: 0.7;
}

.tab-active .tab-count {
  background: var(--theme-primary);
  color: white;
  opacity: 1;
}

/* Tab Content */
.tab-content {
  animation: fadeInUp 0.4s ease-out;
}

.content-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-border-light);
}

.content-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.content-subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  margin: 0;
}

.activity-overview {
  margin-bottom: var(--space-lg);
}

/* Activity Timeline */
.activity-timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.activity-timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-border);
}

.timeline-item {
  position: relative;
  margin-bottom: var(--space-2xl);
  padding-left: 60px;
}

.timeline-marker {
  position: absolute;
  left: 11px;
  top: 20px;
  width: 18px;
  height: 18px;
  background: var(--theme-primary);
  border-radius: var(--radius-full);
  border: 3px solid var(--color-surface-elevated);
  box-shadow: 0 0 0 3px var(--color-border);
  z-index: 2;
}

.timeline-content {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
}

.timeline-content:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--theme-primary);
  transform: translateX(4px);
}

.timeline-header {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  align-items: flex-start;
}

.timeline-avatar {
  flex-shrink: 0;
}

.timeline-avatar .avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
}

.timeline-info {
  flex: 1;
}

.timeline-action {
  font-weight: var(--font-weight-medium);
  margin: 0 0 var(--space-xs);
  color: var(--color-text);
}

.timeline-action a,
.timeline-item .article-link {
  color: var(--theme-primary);
  text-decoration: none;
  font-weight: var(--font-weight-semi);
}

.timeline-action a:hover,
.timeline-item .article-link:hover {
  text-decoration: underline;
}

.timeline-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  margin: 0 0 var(--space-sm);
  line-height: 1.3;
}

.timeline-title a {
  color: var(--theme-primary);
  text-decoration: none;
}

.timeline-title a:hover {
  text-decoration: underline;
}

.timeline-excerpt {
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0;
}

.timeline-item .comment-on-article {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* Badge and Contribution Lists */
.badges-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

.badge-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-lg);
  padding: var(--space-lg);
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.badge-icon img,
.badge-icon svg {
  width: 40px;
  height: 40px;
  color: var(--theme-primary);
}

.badge-name {
  font-size: var(--font-size-lg);
  font-weight: bold;
  margin: 0;
}

.badge-description {
  margin: var(--space-xs) 0;
  color: var(--color-text-secondary);
}

.badge-date {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.contributions-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

.contribution-item {
  padding: var(--space-lg);
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.contribution-title a {
  font-weight: 600;
  font-size: var(--font-size-lg);
  color: var(--color-text);
}

.contribution-excerpt {
  margin: var(--space-sm) 0;
  color: var(--color-text-secondary);
}

.contribution-meta {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  display: flex;
  gap: var(--space-md);
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero .profile-actions,
  .profile-hero .profile-actions {
    flex-direction: column;
    gap: var(--space-sm);
    width: 100%;
  }
  
  .hero .profile-actions .btn,
  .hero .profile-actions button,
  .hero .profile-actions [data-action="edit-profile"],
  .profile-hero .profile-actions .btn,
  .profile-hero .profile-actions button,
  .profile-hero .profile-actions [data-action="edit-profile"] {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
  
  .hero .profile-badges-hero,
  .profile-hero .profile-badges-hero {
    justify-content: center;
    text-align: center;
  }
}

/* =========================================
   29. THEME-SPECIFIC FIXES
   ========================================= */

/* Main Page Theme Fixes */
.main-page .popular-tags,
.main-page .relevant-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.main-page .tag-link {
  background: var(--color-surface);
  color: var(--color-text);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-md);
  text-decoration: none;
  font-size: var(--font-size-sm);
  border: 1px solid var(--color-border);
  transition: var(--transition-base);
}

.main-page .tag-link:hover {
  background: var(--color-primary);
  color: var(--color-text);
  border-color: var(--color-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.main-page .join-community-btn {
  background: var(--color-primary);
  color: var(--color-text);
  border: 1px solid var(--color-primary);
}

.main-page .join-community-btn:hover {
  background: #1a5a7a;
  border-color: #1a5a7a;
}

.main-page .join-discussion-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2px;
}

.main-page .subscriptions-link,
.main-page .nav-links a[href*="subscriptions"] {
  color: var(--color-text);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
}

.main-page .subscriptions-link:hover,
.main-page .nav-links a[href*="subscriptions"]:hover {
  color: var(--color-primary);
}

.main-page .error-action-card {
  text-align: center;
  transition: none;
}

.main-page .error-action-card:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
}

.main-page .error-action-icon {
  margin: 0 auto var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-page .error-page-footer .cta-section {
  background: var(--color-primary);
  color: var(--color-text);
}

.main-page .error-hero-icon::before {
  content: "👀";
  font-size: var(--font-size-4xl);
}

/* Search Results Fixes */
.main-page .popular-searches {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.main-page .popular-searches-label {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  margin-right: var(--space-sm);
  align-self: center;
}

.main-page .popular-link {
  background: var(--color-surface);
  color: var(--color-text);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  border: 1px solid var(--color-border);
  text-decoration: none;
  transition: var(--transition-base);
}

.main-page .popular-link::before {
  display: none;
}

.main-page .popular-link:hover {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.main-page .search-result-author,
.main-page .search-result-date {
  display: none;
}

.main-page .product-search-result {
  border-left: 4px solid var(--color-accent);
  background: color-mix(in srgb, var(--color-accent) 5%, transparent);
}

.main-page .product-badge {
  background: var(--color-accent);
  color: var(--color-text);
  font-size: var(--font-size-xs);
  padding: 2px var(--space-xs);
  border-radius: var(--radius-sm);
  font-weight: var(--font-weight-semi);
}

.main-page .search-results-card {
  margin-bottom: var(--space-3xl);
}

/* =========================================
   30. UTILITY CLASSES
   ========================================= */
.w-full {
  width: 100%;
}

.ml-md {
  margin-left: var(--space-md);
}

/* =========================================
   31. ANIMATIONS
   ========================================= */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Keyframe animations defined in section 31 */

@keyframes ctaIconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

@keyframes welcomeFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================
   33. ACCESSIBILITY
   ========================================= */
.btn:focus-visible,
.form-control:focus-visible,
.search-bar__input:focus-visible {
  outline: 2px solid var(--theme-primary);
  outline-offset: 2px;
}


@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* =========================================
   34. SUBSCRIPTIONS
   ========================================= */
/* =========================================
   SUBSCRIPTIONS PAGE STYLING
   ========================================= */

/* Header Section */
.my-activities-header {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-border);
}

.my-activities-header h1 {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin: 0;
}

/* Filter Dropdown Section */
.my-activities-following-header {
  display: flex;
  justify-content: flex-start;
  margin-bottom: var(--space-xl);
}

.my-activities-following-header .dropdown {
  position: relative;
}

.my-activities-following-header .dropdown-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: var(--transition-base);
}

.my-activities-following-header .dropdown-toggle:hover {
  border-color: var(--theme-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-primary) 10%, transparent);
}

.my-activities-following-header .dropdown-chevron-icon {
  color: var(--color-text-secondary);
  transition: transform var(--transition-base);
}

.my-activities-following-header .dropdown.active .dropdown-chevron-icon {
  transform: rotate(180deg);
}

/* Dropdown Menu */
.my-activities-following-header .dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  margin-top: var(--space-xs);
  padding: var(--space-sm);
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-dropdown);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: var(--transition-base);
}

.my-activities-following-header .dropdown.active .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.my-activities-following-header .dropdown-menu a {
  display: block;
  padding: var(--space-sm) var(--space-md);
  color: var(--color-text);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  transition: var(--transition-base);
}

.my-activities-following-header .dropdown-menu a:hover,
.my-activities-following-header .dropdown-menu a[aria-checked="true"] {
  background: var(--theme-primary);
  color: white;
}

/* Table Styling */
.subscriptions-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface-elevated);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.subscriptions-table th {
  background: var(--color-surface);
  color: var(--color-text);
  font-weight: var(--font-weight-semi);
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--space-lg);
  text-align: left;
  border-bottom: 2px solid var(--color-border);
}

.subscriptions-table td {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--color-border-light);
  vertical-align: middle;
}

.subscriptions-table tr:last-child td {
  border-bottom: none;
}

.subscriptions-table tr:hover {
  background: color-mix(in srgb, var(--theme-primary) 3%, transparent);
}

/* Table Content */
.subscriptions-table .user-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  object-fit: cover;
  margin-right: var(--space-sm);
  vertical-align: middle;
  border: 2px solid var(--color-border-light);
}

.subscriptions-table .striped-list-title {
  color: var(--theme-primary);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
  transition: var(--transition-base);
}

.subscriptions-table .striped-list-title:hover {
  color: var(--theme-primary-hover);
  text-decoration: underline;
}

.subscriptions-table td:nth-child(2),
.subscriptions-table td:nth-child(3) {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

/* Subscribe/Unsubscribe Actions */
.subscriptions-subscribe {
  text-align: right;
  white-space: nowrap;
}

.subscriptions-subscribe a,
.subscriptions-subscribe button {
  padding: var(--space-xs) var(--space-md);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  border-radius: var(--radius-md);
  text-decoration: none;
  border: 1px solid var(--theme-primary);
  color: var(--theme-primary);
  background: transparent;
  cursor: pointer;
  transition: var(--transition-base);
}

.subscriptions-subscribe a:hover,
.subscriptions-subscribe button:hover {
  background: var(--theme-primary);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* Empty State */
.no-activities {
  text-align: center;
  padding: var(--space-4xl) var(--space-xl);
  color: var(--color-text-secondary);
  font-size: var(--font-size-lg);
  font-style: italic;
  background: var(--color-surface-elevated);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}

/* Responsive Design */
@media (max-width: 768px) {
  .subscriptions-table {
    font-size: var(--font-size-sm);
  }
  
  .subscriptions-table th,
  .subscriptions-table td {
    padding: var(--space-md);
  }
  
  .subscriptions-table th:nth-child(2),
  .subscriptions-table td:nth-child(2) {
    display: none; /* Hide type column on mobile */
  }
  
  .my-activities-header h1 {
    font-size: var(--font-size-2xl);
  }
}

/* =========================================
   34. PRINT STYLES
   ========================================= */
@media print {
  .site-header,
  .site-footer,
  .hero,
  .cta-section,
  .mobile-menu-toggle,
  .search-bar,
  .btn {
    display: none;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.5;
    color: var(--color-text);
    background: white;
  }
  
  .container {
    max-width: none;
    padding: var(--space-md);
  }
  
  .article,
  .card {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}

.hero-title,
.hero-subtitle,
.hero-actions,
.popular-searches {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
}


/* =========================================
   32. RESPONSIVE DESIGN 
   ========================================= */

@media (max-width: 992px) {
  .article-container {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  /* Header */
  .header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    padding: var(--space-md) 0;
  }

  .header-logo {
    flex-shrink: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
  }

  .header-actions {
    margin-left: 0;
    flex-shrink: 0;
  }

  .header-search {
    display: none !important;
  }

    .collapsible-nav {
    flex-direction: row;
  }
  
  .collapsible-nav-border {
    border-top: 0;
  }
  
  .collapsible-nav-list {
    flex-direction: row;
  }

  .logo-icon {
    height: 48px;
    width: auto;
  }

  .user-menu__name {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .wysiwyg-table-resized {
    display: block;
  }

  /* Hero */
  .hero {
    padding: var(--space-3xl) var(--space-md);
    min-height: auto;
    text-align: center;
  }

  .hero-content {
    padding: var(--space-md);
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 280px;
  }
  

  /* Quick Actions */
  .quick-actions-grid {
    justify-content: center;
  }

  .quick-actions-grid--2x3 {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  /* Welcome Card & Feature Cards */
  .welcome-card,
  .new-feature-card .card__body {
    flex-direction: column;
    text-align: center;
    gap: var(--space-xl);
    padding: var(--space-xl);
  }

  /* Help Page Filters */
  .help-page .search-filter-wrapper {
    flex-wrap: wrap;
  }

  /* TOC Sidebar */
  .article-toc-sidebar {
    display: none !important;
  }

  /* Sub-navigation */
  .sub-nav__container {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }

  .sub-nav__search,
  .sub-nav__search .search-bar {
    display: none;
  }

  .breadcrumbs {
    font-size: var(--font-size-xs);
    flex-wrap: wrap;
    gap: var(--space-xs);
  }

  .breadcrumbs li {
    white-space: nowrap;
  }

  /* Post Header Layout */
  .post-header-enhanced,
  .post-author-section {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }

  .post-controls {
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
  }

  .post-voting-wrapper {
    margin-left: 0;
    margin-right: auto;
  }

  /* Comments Layout */
  .comment-layout,
  .comment-form-layout,
  .form-actions,
  .form-buttons {
    flex-direction: column;
    gap: var(--space-md);
    align-items: stretch;
  }

  .comment-form-avatar {
    align-self: flex-start;
  }

  .form-buttons .btn {
    width: 100%;
  }

  .comment-actions {
    align-self: flex-end;
  }

  /* New Post Layout */
  .new-post-layout {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xl);
  }

  .new-post-sidebar {
    order: 2;
  }

  .new-post-form-card {
    order: 1;
    width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  /* CKEditor Fixes */
  .ck.ck-editor__main,
  .ck.ck-editor,
  .ck.ck-editor__editable,
  .ck.ck-editor__top,
  .ck.ck-content,
  .ck-editor__editable_inline,
  .ck-editor__editable[role="textbox"],
  .ck-toolbar,
  .ck-toolbar__items,
  .comment-form-wrapper,
  .comment-form,
  .form-field {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .ck-toolbar,
  .ck-toolbar__items {
    flex-wrap: wrap !important;
    overflow-x: auto !important;
  }

  .post-content-wrapper {
    overflow-x: auto;
    max-width: 100%;
  }

  .post-content-wrapper img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: var(--space-lg) auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
  }

  .main-content,
  .container {
    overflow: visible;
  }
  @media (max-width: 768px) {

  /* Welcome */
  .welcome-title {
    font-size: var(--font-size-xl);
  }

  .welcome-description {
    max-width: none;
  }

  .welcome-actions {
    justify-content: center;
    width: 100%;
  }

  .welcome-actions .btn {
    flex: 1;
    justify-content: center;
  }

  .illustration-circle {
    width: 80px;
    height: 80px;
  }

  /* Stats Grid */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Profile */
  .tabs-list {
    gap: var(--space-sm);
    justify-content: center;
    padding-bottom: var(--space-sm);
  }

  .tab-button {
    padding: var(--space-sm) var(--space-lg);
    white-space: nowrap;
    flex-shrink: 0;
  }

  .timeline-item {
    padding-left: 40px;
  }

  .timeline-marker {
    left: 6px;
    width: 12px;
    height: 12px;
  }

  .activity-timeline::before {
    left: 12px;
  }

      /* ===== SUB-NAV HEADER SECTION ===== */
  .sub-nav__container {
    flex-direction: column;
    gap: var(--space-lg);
    text-align: center;
  }
  
  .topic-header-info {
    order: 1;
  }
  
  .topic-page-title {
    font-size: var(--font-size-2xl);
    line-height: 1.3;
    margin-bottom: var(--space-sm);
  }
  
  .topic-description {
    font-size: var(--font-size-base);
    color: var(--color-text-secondary);
    line-height: 1.5;
    max-width: none;
  }
  
  .sub-nav__search {
    order: 2;
    display: block;
    max-width: 400px;
    margin: 0 auto;
  }
  
  /* ===== TOPIC TOOLBAR CONTAINER ===== */
  .topic-toolbar {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
  }
  
  /* ===== TOPIC TOOLBAR CONTENT LAYOUT ===== */
  .topic-toolbar-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    align-items: stretch;
  }
  
  
  /* ===== LEFT ACTIONS (FOLLOW + STATS) ===== */
  .topic-actions-left {
    order: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    align-items: center;
  }
  
  /* Follow button styling */
  .topic-follow {
    width: 100%;
    text-align: center;
  }
  
  .topic-follow .btn,
  .topic-follow button {
    width: 100%;
    max-width: 200px;
    justify-content: center;
    padding: var(--space-sm) var(--space-lg);
  }
  
  /* ===== TOPIC STATS MOBILE LAYOUT ===== */
  .topic-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-2xl);
    padding: var(--space-md) 0;
    border-top: 1px solid var(--color-border-light);
    border-bottom: 1px solid var(--color-border-light);
    width: 100%;
  }
  
  .topic-stat-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    text-align: center;
  }
  
  .topic-stat-item svg {
    color: var(--theme-primary);
    flex-shrink: 0;
  }
  
  .topic-stat-item .stat-label {
    font-weight: var(--font-weight-medium);
    color: var(--color-text);
    white-space: nowrap;
  }
  
  /* ===== RIGHT ACTIONS (CONTROLS + NEW POST) ===== */
  .topic-actions-right {
    order: 2;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    align-items: stretch;
  }
  
  /* Controls row (filter + sort) */
  .topic-controls {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
  }
  
  .topic-controls .dropdown {
    flex: 1;
    max-width: 150px;
  }
  
  .topic-controls .dropdown__toggle {
    width: 100%;
    justify-content: space-between;
    font-size: var(--font-size-sm);
    padding: var(--space-sm);
  }
  
  .topic-controls .dropdown__toggle svg:first-child {
    order: -1;
    margin-right: var(--space-xs);
  }
  
  .topic-controls .dropdown__toggle svg:last-child {
    margin-left: auto;
  }
  
  /* New Post button */
  .topic-actions-right > .btn {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    justify-content: center;
    padding: var(--space-md) var(--space-lg);
    font-weight: var(--font-weight-semi);
  }
  
  
  /* ===== POSTS SECTION MOBILE ===== */
  .posts-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
  }
  
  .post-card {
    padding: var(--space-md);
  }
  
  .post-header {
    flex-direction: column;
    gap: var(--space-md);
    align-items: flex-start;
  }
  
  .post-author-info {
    width: 100%;
  }
  
  .post-stats {
    align-self: flex-start;
    gap: var(--space-md);
  }
  
  .post-stat {
    font-size: var(--font-size-sm);
  }
  
  /* ===== COMPACT LAYOUT FOR VERY SMALL SCREENS ===== */
  @media (max-width: 480px) {
    .topic-toolbar {
      padding: var(--space-sm);
      margin-bottom: var(--space-md);
    }
    
    .topic-page-title {
      font-size: var(--font-size-xl);
    }
    
    .topic-stats {
      gap: var(--space-lg);
    }
    
    .topic-stat-item {
      flex-direction: row;
      justify-content: center;
      gap: var(--space-sm);
    }
    
    .topic-controls {
      flex-direction: column;
    }
    
    .topic-controls .dropdown {
      max-width: none;
    }
    
    .topic-actions-right > .btn {
      max-width: none;
    }
  }
    
   .sub-nav__container {
    flex-direction: column;
    gap: var(--space-lg);
    text-align: center;
  }
  
  .new-post-nav-info {
    order: 1;
  }
  
  .post-creation-badge {
    justify-content: center;
    margin-bottom: var(--space-md);
  }
  
  .sub-nav__search {
    order: 2;
    display: block;
    max-width: 400px;
    margin: 0 auto;
  }
  
  /* ===== MAIN LAYOUT ===== */
  .new-post-layout {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  
  .new-post-sidebar {
    order: 2;
    position: static;
  }
  
  /* ===== POST HEADER ENHANCED MOBILE ===== */
  .post-header-enhanced {
    flex-direction: column;
    gap: var(--space-lg);
    padding: var(--space-lg);
    align-items: stretch;
  }
  
  /* ===== POST AUTHOR SECTION ===== */
  .post-author-section {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    width: 100%;
    order: 2;
  }
  
  .post-header-content {
    flex: 1;
    min-width: 0;
  }
  
  .post-author-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-bottom: var(--space-sm);
  }
  
  .post-author-name .author-link {
    font-weight: var(--font-weight-semi);
    color: var(--color-text);
    text-decoration: none;
  }
  
  .post-author-name .author-link:hover {
    color: var(--theme-primary);
    text-decoration: underline;
  }
  
  .post-timestamp-info {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
  }
  
  .post-timestamp-info svg {
    flex-shrink: 0;
  }
  
  /* ===== POST CONTROLS MOBILE ===== */
  .post-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    order: 1;
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-border-light);
  }
  
  /* ===== VOTING WRAPPER MOBILE ===== */
  .post-voting-wrapper {
    flex-shrink: 0;
  }
  
  .vote-column {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-xs) var(--space-sm);
  }
  
  .vote-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-base);
    color: var(--color-text-secondary);
  }
  
  .vote-btn:hover {
    background: var(--color-border-light);
    color: var(--theme-primary);
  }
  
  .vote-btn--active {
    background: var(--theme-primary);
    color: white;
  }
  
  .vote-btn .icon {
    font-size: 14px;
    line-height: 1;
  }
  
  .vote-sum {
    font-weight: var(--font-weight-semi);
    color: var(--color-text);
    min-width: 24px;
    text-align: center;
    font-size: var(--font-size-sm);
  }
  
  /* ===== POST ACTION MENU MOBILE ===== */
  .post-action-menu {
    flex-shrink: 0;
  }
  
  .post-action-menu .dropdown__toggle,
  .post-action-menu button {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: var(--color-surface-elevated);
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-base);
  }
  
  .post-action-menu .dropdown__toggle:hover,
  .post-action-menu button:hover {
    border-color: var(--theme-primary);
    color: var(--theme-primary);
    background: color-mix(in srgb, var(--theme-primary) 5%, transparent);
  }
  
  /* ===== COMMENTS SECTION MOBILE ===== */
  .comments-header {
    flex-direction: column;
    gap: var(--space-md);
    align-items: flex-start;
    padding-bottom: var(--space-lg);
  }
  
  .comments-title-section {
    width: 100%;
  }
  
  .comments-actions {
    width: 100%;
    display: flex;
    justify-content: center;
  }
  
  .comments-actions .dropdown__toggle {
    min-width: 120px;
    justify-content: center;
  }
  
  /* ===== COMMENT FORM MOBILE ===== */
  .comment-form-layout {
    flex-direction: column;
    gap: var(--space-md);
  }
  
  .comment-form-avatar {
    align-self: center;
  }
  
  .comment-form-content {
    width: 100%;
  }
  
  .form-actions {
    flex-direction: column;
    gap: var(--space-md);
    align-items: stretch;
  }
  
  .form-buttons {
    display: flex;
    gap: var(--space-md);
    width: 100%;
  }
  
  .form-buttons .btn {
    flex: 1;
    justify-content: center;
  }
  
  /* ===== COMPACT LAYOUT FOR VERY SMALL SCREENS ===== */
  @media (max-width: 480px) {
    .post-header-enhanced {
      padding: var(--space-md);
    }
    
    .post-author-section {
      flex-direction: column;
      align-items: flex-start;
      gap: var(--space-sm);
    }
    
    .post-controls {
      flex-direction: column;
      gap: var(--space-md);
      align-items: center;
    }
    
    .vote-column {
      order: 1;
    }
    
    .post-action-menu {
      order: 2;
    }
    
    .form-buttons {
      flex-direction: column;
    }
    
    .comments-header {
      text-align: center;
    }
  }
@media (max-width: 768px) {
  .post-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: var(--space-sm);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
  }

  .post-voting-wrapper,
  .post-action-menu {
    display: flex;
    gap: var(--space-md);
    align-items: center;
  }

  /* Optional: hide in header */
  .post-header-enhanced .post-controls {
    display: none;
  }

  /* Optional: shrink icons */
  .vote-btn span.icon {
    font-size: 1.25rem;
  }

  .vote-sum {
    font-weight: bold;
    font-size: 1rem;
  }
}

    
    
  /* Posts */
  .post-header {
    flex-direction: column;
    gap: var(--space-md);
  }

  .post-stats {
    justify-content: space-between;
    width: 100%;
  }

  .topic-stats {
    flex-wrap: wrap;
    gap: var(--space-md);
  }

  /* Forms */
  .form-actions,
  .form-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .form-buttons .btn {
    flex: 1;
  }

  .form-actions-main {
    flex-direction: column;
  }

  .form-actions-main .btn {
    width: 100%;
    justify-content: center;
  }

  .forum-page .comment-form-layout {
    flex-direction: column;
  }

  .forum-page .comment-form-avatar {
    align-self: flex-start;
  }

  .comment-form-layout {
    flex-direction: column;
    gap: var(--space-md);
  }

  /* Footer */
  .footer-bottom__content {
    flex-direction: column;
    text-align: center;
  }

  /* Sub Nav */
  .sub-nav__container {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }

  /* Help Center */
  .help-page .category-controls,
  .help-page .section-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .help-page .search-filter-wrapper {
    flex-direction: column;
    width: 100%;
  }

  .help-page .search-bar--lg {
    width: 100%;
    min-width: auto;
    max-width: none;
  }

  .help-page .form-control--select {
    width: 100%;
    min-width: auto;
    max-width: none;
  }

  .help-page .sort-btn,
  .help-page .filter-btn {
    min-width: auto;
    width: 100%;
  }

  .article-table__header:nth-child(3),
  .article-date-cell {
    display: none;
  }

  /* Search Results */
  .main-page .popular-searches {
    justify-content: flex-start;
  }

  .main-page .popular-searches-label {
    width: 100%;
    margin-bottom: var(--space-sm);
    margin-right: 0;
  }
}}

/* =========================================
   35. SOCIAL LOGIN BUTTONS
   ========================================= */

/* Social Login Container */
.login-form,
.sign-in-form,
.auth-form,
[data-auth-providers],
.auth-providers {
  max-width: 400px;
  margin: 0 auto;
  padding: var(--space-lg);
}

/* Social Login Buttons - Base Styles */
.auth-provider,
.auth_provider,
.social-login-btn,
.nesty-btn[data-provider],
button[data-provider],
a[data-provider],
.auth0-lock-social-button,
.c-btn--social,
.btn--social,
.social-btn,
[class*="auth-btn"],
[class*="social-btn"],
[class*="login-btn"][class*="facebook"],
[class*="login-btn"][class*="google"],
.auth-button,
.sign-in-with-google,
.sign-in-with-facebook,
.google-sign-in,
.facebook-sign-in {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-md);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semi);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-base);
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Google Button Styling */
.auth-provider[data-provider="google"],
.auth_provider.google,
.nesty-btn[data-provider="google"],
button[data-provider="google"],
a[data-provider="google"],
.auth0-lock-social-button[data-provider="google"],
.google-btn,
.btn-google,
.sign-in-with-google,
.google-sign-in,
[class*="google"][class*="btn"],
[class*="google"][class*="login"] {
  background: #ffffff;
  color: #3c4043;
  border: 1px solid #dadce0;
}

.auth-provider[data-provider="google"]:hover,
.auth_provider.google:hover,
.nesty-btn[data-provider="google"]:hover,
button[data-provider="google"]:hover,
a[data-provider="google"]:hover,
.google-btn:hover,
.btn-google:hover,
.sign-in-with-google:hover,
.google-sign-in:hover {
  background: #f8f9fa;
  border-color: #c6c6c6;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Facebook Button Styling */
.auth-provider[data-provider="facebook"],
.auth_provider.facebook,
.nesty-btn[data-provider="facebook"],
button[data-provider="facebook"],
a[data-provider="facebook"],
.auth0-lock-social-button[data-provider="facebook"],
.facebook-btn,
.btn-facebook,
.sign-in-with-facebook,
.facebook-sign-in,
[class*="facebook"][class*="btn"],
[class*="facebook"][class*="login"] {
  background: #1877f2;
  color: #ffffff;
  border: 1px solid #1877f2;
}

.auth-provider[data-provider="facebook"]:hover,
.auth_provider.facebook:hover,
.nesty-btn[data-provider="facebook"]:hover,
button[data-provider="facebook"]:hover,
a[data-provider="facebook"]:hover,
.facebook-btn:hover,
.btn-facebook:hover,
.sign-in-with-facebook:hover,
.facebook-sign-in:hover {
  background: #166fe5;
  border-color: #166fe5;
  box-shadow: 0 2px 4px rgba(24, 119, 242, 0.3);
}

/* Social Button Icons */
.auth-provider svg,
.auth_provider svg,
.social-login-btn svg,
.nesty-btn[data-provider] svg,
.auth0-lock-social-button svg,
.social-btn svg,
[class*="auth-btn"] svg,
[class*="social-btn"] svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.auth-provider img,
.auth_provider img,
.social-login-btn img,
.nesty-btn[data-provider] img,
.social-btn img {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  object-fit: contain;
}

/* Social Button Text */
.auth-provider span,
.auth_provider span,
.social-login-btn span,
.nesty-btn[data-provider] span,
.social-btn span {
  flex: 1;
  text-align: center;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Social Login Divider */
.auth-divider,
.login-divider,
.social-divider,
.or-divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: var(--space-xl) 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

.auth-divider::before,
.auth-divider::after,
.login-divider::before,
.login-divider::after,
.social-divider::before,
.social-divider::after,
.or-divider::before,
.or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

/* Mobile Responsive - Social Login */
@media (max-width: 768px) {
  .login-form,
  .sign-in-form,
  .auth-form,
  [data-auth-providers],
  .auth-providers {
    padding: var(--space-md);
    max-width: 100%;
  }

  .auth-provider,
  .auth_provider,
  .social-login-btn,
  .nesty-btn[data-provider],
  button[data-provider],
  a[data-provider],
  .auth0-lock-social-button,
  .c-btn--social,
  .btn--social,
  .social-btn,
  [class*="auth-btn"],
  [class*="social-btn"],
  [class*="login-btn"][class*="facebook"],
  [class*="login-btn"][class*="google"],
  .auth-button,
  .sign-in-with-google,
  .sign-in-with-facebook,
  .google-sign-in,
  .facebook-sign-in,
  .google-btn,
  .btn-google,
  .facebook-btn,
  .btn-facebook {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: var(--space-md) var(--space-md);
    font-size: var(--font-size-base);
    min-height: 52px;
  }

  /* Ensure button text doesn't overflow */
  .auth-provider span,
  .auth_provider span,
  .social-login-btn span,
  .nesty-btn[data-provider] span,
  .social-btn span,
  [class*="auth-btn"] span,
  [class*="social-btn"] span {
    font-size: var(--font-size-sm);
  }
}

/* Very small screens */
@media (max-width: 480px) {
  .auth-provider,
  .auth_provider,
  .social-login-btn,
  .nesty-btn[data-provider],
  button[data-provider],
  a[data-provider],
  .auth0-lock-social-button,
  .c-btn--social,
  .btn--social,
  .social-btn,
  [class*="auth-btn"],
  [class*="social-btn"],
  .google-btn,
  .btn-google,
  .facebook-btn,
  .btn-facebook,
  .sign-in-with-google,
  .sign-in-with-facebook {
    padding: var(--space-sm) var(--space-md);
    min-height: 48px;
    gap: var(--space-xs);
  }

  .auth-provider svg,
  .auth_provider svg,
  .social-login-btn svg,
  .social-btn svg,
  [class*="auth-btn"] svg,
  [class*="social-btn"] svg {
    width: 18px;
    height: 18px;
  }

  .auth-provider img,
  .auth_provider img,
  .social-login-btn img,
  .social-btn img {
    width: 18px;
    height: 18px;
  }

  /* Small screen search controls */
  .search-sort-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 12px;
  }

  .search-sort__label {
    font-size: 13px;
    text-align: left;
  }

  .search-sort__select {
    max-width: 100%;
    width: 100%;
  }

  .collapsible-sidebar-toggle {
    padding: 14px 16px;
    font-size: 13px;
  }
}

/* Zendesk-specific auth button overrides */
.nesty-input-shell .nesty-btn,
.sign-in-buttons .nesty-btn,
.registration-form .nesty-btn {
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Auth0 Lock Widget overrides */
.auth0-lock-social-buttons-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  width: 100%;
}

.auth0-lock-social-button {
  width: 100% !important;
  margin: 0 !important;
}

/* Focus states for accessibility */
.auth-provider:focus,
.auth_provider:focus,
.social-login-btn:focus,
.nesty-btn[data-provider]:focus,
button[data-provider]:focus,
a[data-provider]:focus,
.social-btn:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Disabled state */
.auth-provider:disabled,
.auth_provider:disabled,
.social-login-btn:disabled,
.social-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* =========================================
   SEARCH RESULTS PAGE
   ========================================= */

/* Result Type Badges */
.result-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.result-type-badge--article {
  background: color-mix(in srgb, var(--color-help-green, #10b981) 15%, transparent);
  color: var(--color-help-green, #10b981);
  border: 1px solid color-mix(in srgb, var(--color-help-green, #10b981) 30%, transparent);
}

.result-type-badge--post {
  background: color-mix(in srgb, var(--color-primary, #3b82f6) 15%, transparent);
  color: var(--color-primary, #3b82f6);
  border: 1px solid color-mix(in srgb, var(--color-primary, #3b82f6) 30%, transparent);
}

/* Search Results Layout */
.search-results {
  display: flex;
  gap: 32px;
  margin-top: 24px;
}

/* Sidebar Filters */
.search-results-sidebar {
  flex: 0 0 240px;
  min-width: 0;
}

.search-results-column {
  flex: 1;
  min-width: 0;
}

.filters-in-section {
  margin-bottom: 24px;
  padding: 16px;
  background: var(--color-surface, #f9fafb);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 12px;
}

.sidenav-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.multibrand-filter-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.multibrand-filter-list li {
  margin-bottom: 4px;
}

.sidenav-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--color-text, #374151);
  text-decoration: none;
  transition: all 0.15s ease;
}

.sidenav-item:hover {
  background: var(--color-surface-elevated, #ffffff);
  color: var(--color-help-green, #10b981);
}

.sidenav-item.current {
  background: var(--color-help-green, #10b981);
  color: white;
  font-weight: 500;
}

.sidenav-item.current:hover {
  background: color-mix(in srgb, var(--color-help-green, #10b981) 90%, black);
  color: white;
}

.filter-name {
  flex: 1;
}

.doc-count {
  font-size: 12px;
  opacity: 0.7;
  margin-left: 8px;
}

.see-all-filters {
  display: block;
  width: 100%;
  padding: 8px 12px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--color-help-green, #10b981);
  background: transparent;
  border: 1px dashed var(--color-border, #e5e7eb);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.see-all-filters:hover {
  background: var(--color-surface-elevated, #ffffff);
  border-style: solid;
}

/* Content Tag Filters */
.sidenav-tag {
  display: inline-block;
  margin: 4px 4px 4px 0;
}

.content-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: color-mix(in srgb, var(--color-help-green, #10b981) 10%, white);
  border: 1px solid color-mix(in srgb, var(--color-help-green, #10b981) 30%, transparent);
  border-radius: 999px;
  font-size: 12px;
  color: var(--color-help-green, #10b981);
}

.content-tag .close-icon {
  opacity: 0.7;
  transition: opacity 0.15s;
}

.content-tag:hover .close-icon {
  opacity: 1;
}

/* Collapsible Sidebar for Mobile */
.collapsible-sidebar {
  position: relative;
}

.collapsible-sidebar-toggle {
  display: none;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  background: var(--color-surface, #f9fafb);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 8px;
  cursor: pointer;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text, #374151);
  transition: background-color 0.15s ease, border-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  position: relative;
  z-index: 10;
  pointer-events: auto;
}

/* Ensure SVGs inside button don't capture clicks */
.collapsible-sidebar-toggle svg {
  pointer-events: none;
}

.collapsible-sidebar-toggle-label {
  flex: 1;
  text-align: left;
  pointer-events: none;
}

.collapsible-sidebar-toggle:hover {
  background: var(--color-surface-hover, #f3f4f6);
}

.collapsible-sidebar-toggle:active {
  background: var(--color-surface-pressed, #e5e7eb);
  transform: scale(0.98);
}

.collapsible-sidebar-toggle:focus-visible {
  outline: 2px solid var(--color-help-green, #10b981);
  outline-offset: 2px;
}

.collapsible-sidebar-toggle-icon {
  flex-shrink: 0;
  transition: transform 0.2s ease;
  pointer-events: none;
}

.collapsible-sidebar-toggle-icon.x-icon {
  display: none;
}

/* Search Sort Controls */
.search-sort-controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--color-surface, #f9fafb);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 8px;
}

/* Mobile Filters Toggle - hidden on desktop */
.mobile-filters-toggle {
  display: none;
}

.search-sort__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary, #6b7280);
  white-space: nowrap;
}

.search-sort__select {
  padding: 8px 32px 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text, #374151);
  background: var(--color-surface-elevated, #ffffff);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 8px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.search-sort__select:hover,
.search-sort__select:focus {
  border-color: var(--color-help-green, #10b981);
  outline: none;
}

/* Result count display */
.search-results-count {
  font-size: 13px;
  color: var(--color-text-secondary, #6b7280);
  margin-bottom: 16px;
}

/* Result meta (badge + labels row) */
.result-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.result-badge-container {
  display: flex;
  align-items: center;
}

/* Result labels */
.result-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.result-label {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-weight: 500;
}

.result-label--article {
  background: color-mix(in srgb, var(--color-help-green, #10b981) 10%, white);
  color: var(--color-help-green-dark, #059669);
}

.result-label--post {
  background: #f1f5f9;
  color: #334155;
}

/* Search result breadcrumbs */
.search-result-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 12px;
  color: var(--color-text-secondary, #6b7280);
  margin-bottom: 8px;
  list-style: none;
  padding: 0;
}

.search-result-breadcrumbs li {
  display: flex;
  align-items: center;
}

.search-result-breadcrumbs li:not(:last-child)::after {
  content: '/';
  margin-left: 4px;
  opacity: 0.5;
}

.search-result-breadcrumbs a {
  color: var(--color-text-secondary, #6b7280);
  text-decoration: none;
}

.search-result-breadcrumbs a:hover {
  color: var(--color-help-green, #10b981);
}

/* Result icons (votes, comments) */
.search-result-icons {
  display: flex;
  gap: 12px;
  margin-left: auto;
}

.search-result-votes,
.search-result-meta-count {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--color-text-secondary, #6b7280);
}

.search-result-votes-icon,
.search-result-meta-count-icon {
  opacity: 0.7;
}

/* Hidden state for filtered items */
.search-result-item[hidden] {
  display: none;
}

/* No results styling */
.no-results {
  text-align: center;
  padding: 48px 24px;
}

.no-results .headline {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-text, #374151);
  margin: 24px 0 12px;
}

.no-results .action-prompt {
  font-size: 14px;
  color: var(--color-text-secondary, #6b7280);
  margin-bottom: 8px;
}

.no-results .action-prompt a {
  color: var(--color-help-green, #10b981);
  text-decoration: none;
  font-weight: 500;
}

.no-results .action-prompt a:hover {
  text-decoration: underline;
}

/* Container divider */
.container-divider {
  border-top: 1px solid var(--color-border, #e5e7eb);
}

/* Search page breadcrumbs styling */
.search-page .sub-nav {
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border, #e5e7eb);
  margin-bottom: 8px;
}

.search-page .sub-nav .breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--color-text-secondary, #6b7280);
  margin-bottom: 16px;
}

.search-page .sub-nav .breadcrumbs a {
  color: var(--color-text-secondary, #6b7280);
  text-decoration: none;
  transition: color 0.15s ease;
}

.search-page .sub-nav .breadcrumbs a:hover {
  color: var(--color-help-green, #10b981);
}

.search-page .sub-nav .breadcrumbs li {
  display: flex;
  align-items: center;
}

.search-page .sub-nav .breadcrumbs li:not(:last-child)::after {
  content: '/';
  margin-left: 8px;
  color: var(--color-border, #d1d5db);
}

.search-page .sub-nav .breadcrumbs li:last-child a {
  color: var(--color-text, #374151);
  font-weight: 500;
}

.search-container {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 400px;
}

.search-container .search-icon {
  color: var(--color-text-secondary, #6b7280);
  flex-shrink: 0;
}

/* Pagination styling */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
  padding: 24px 0;
  border-top: 1px solid var(--color-border, #e5e7eb);
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text, #374151);
  background: var(--color-surface-elevated, #ffffff);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.pagination a:hover {
  border-color: var(--color-help-green, #10b981);
  color: var(--color-help-green, #10b981);
}

.pagination .pagination-current,
.pagination [aria-current="page"] {
  background: var(--color-help-green, #10b981);
  color: white;
  border-color: var(--color-help-green, #10b981);
}

.pagination .pagination-next,
.pagination .pagination-prev {
  font-weight: 600;
}

.pagination .pagination-next:hover,
.pagination .pagination-prev:hover {
  background: var(--color-help-green, #10b981);
  color: white;
  border-color: var(--color-help-green, #10b981);
}

/* Pagination list reset - remove bullets */
.search-page .pagination,
.pagination ul,
.pagination ol,
.pagination-wrapper ul,
.pagination-wrapper ol {
  list-style: none !important;
  padding: 0;
  margin: 0;
}

.search-page .pagination li,
.pagination li,
.pagination-wrapper li {
  list-style: none !important;
  display: inline-flex;
  margin: 0;
}

.search-page .pagination li::before,
.pagination li::before,
.pagination-wrapper li::before {
  content: none !important;
  display: none !important;
}

.search-page .pagination li::marker,
.pagination li::marker {
  content: none !important;
  display: none !important;
}

/* Enhanced pagination button styling */
.search-page .pagination a,
.search-page .pagination span,
.pagination-wrapper a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 40px;
  height: 40px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text, #374151);
  background: var(--color-surface-elevated, #ffffff);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.search-page .pagination a:hover,
.pagination-wrapper a:hover {
  border-color: var(--color-help-green, #10b981);
  color: var(--color-help-green, #10b981);
  background: color-mix(in srgb, var(--color-help-green, #10b981) 5%, white);
}

/* Search result card padding */
.search-page .search-result-card,
.search-result-card {
  padding: 24px;
  margin-bottom: 16px;
  background: var(--color-surface-elevated, #ffffff);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.search-page .search-result-card:hover,
.search-result-card:hover {
  border-color: var(--color-help-green, #10b981);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Stretched link - make entire card clickable */
.search-result-card,
.post-card {
  position: relative;
}

/* Override position:relative so ::after positions relative to card, not link */
.search-result-card .link--accent,
.post-card .post-link {
  position: static;
}

.search-result-card .link--accent::after,
.post-card .post-link::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

/* Ensure other interactive elements remain clickable above the stretched link */
.search-result-card .breadcrumbs a,
.search-result-card .result-type-badge,
.search-result-card .result-label,
.post-card .avatar,
.post-card .author-name,
.post-card .post-stat {
  position: relative;
  z-index: 2;
}

/* Cursor pointer on card hover for better UX */
.search-result-card:hover,
.post-card:hover {
  cursor: pointer;
}

.search-page .card__body {
  padding: 0;
}

/* Search result list item spacing */
.search-page .search-results-list,
.search-results-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.search-page .search-result-item,
.search-result-item {
  list-style: none;
  margin-bottom: 16px;
}

.search-page .search-result-item::before,
.search-result-item::before {
  content: none !important;
  display: none !important;
}

/* Search page breadcrumbs - remove bullets and fix styling */
.search-page .breadcrumbs,
.search-page .sub-nav .breadcrumbs {
  list-style: none !important;
  padding: 0;
  margin: 0 0 16px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.search-page .breadcrumbs li,
.search-page .sub-nav .breadcrumbs li {
  list-style: none !important;
  display: inline-flex;
  align-items: center;
}

.search-page .breadcrumbs li::before,
.search-page .sub-nav .breadcrumbs li::before,
.search-page .breadcrumbs li::marker {
  content: none !important;
  display: none !important;
}

.search-page .breadcrumbs li + li::before {
  content: '›' !important;
  display: inline-block !important;
  margin-right: 8px;
  color: var(--color-text-muted, #9ca3af);
  font-weight: normal;
}

.search-page .breadcrumbs a {
  color: var(--color-text-secondary, #6b7280);
  text-decoration: none;
  transition: color 0.15s ease;
}

.search-page .breadcrumbs a:hover {
  color: var(--color-help-green, #10b981);
}

/* Search input styling */
.search-page .search-container input,
.search-page .search input,
.search-page input[type="search"],
.search-page input[name="query"] {
  width: 100%;
  max-width: 350px;
  padding: 10px 16px;
  font-size: 14px;
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 8px;
  background: var(--color-surface-elevated, #ffffff);
  transition: all 0.15s ease;
}

.search-page .search-container input:focus,
.search-page .search input:focus,
.search-page input[type="search"]:focus,
.search-page input[name="query"]:focus {
  outline: none;
  border-color: var(--color-help-green, #10b981);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-help-green, #10b981) 15%, transparent);
}

/* Search results subheading */
.search-results-subheading {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text, #374151);
  margin-bottom: 20px;
}

/* Search result title container */
.search-result-title-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 8px;
}

.search-result-title-container h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
}

/* Sub-nav layout for search page */
.search-page .sub-nav {
  background: var(--color-surface, #f9fafb);
  border-bottom: 1px solid var(--color-border, #e5e7eb);
  padding: 0;
}

.search-page .sub-nav .container {
  padding-top: 16px;
  padding-bottom: 16px;
}

.search-page .sub-nav__container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
}

.search-page .sub-nav__content {
  flex: 1;
  min-width: 0;
}

.search-page .breadcrumbs-wrapper {
  margin-bottom: 12px;
}

.search-page .search-results-info h1 {
  margin-bottom: 4px;
}

.search-page .search-results-info p {
  margin: 0;
}

/* Search bar in sub-nav - positioned to the right */
.search-page .sub-nav__search {
  flex-shrink: 0;
  width: 320px;
  max-width: 100%;
}

.search-page .sub-nav__search .search-bar {
  display: flex;
  position: relative;
  width: 100%;
  background: var(--color-surface-elevated, #ffffff);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: all 0.15s ease;
}

.search-page .sub-nav__search .search-bar:focus-within {
  border-color: var(--color-help-green, #10b981);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-help-green, #10b981) 15%, transparent);
}

.search-page .sub-nav__search .search-bar__input {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--color-text, #374151);
  outline: none;
}

.search-page .sub-nav__search .search-bar__input::placeholder {
  color: var(--color-text-muted, #9ca3af);
}

.search-page .sub-nav__search .search-bar__button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  background: var(--color-help-green, #10b981);
  border: none;
  color: white;
  cursor: pointer;
  transition: background 0.15s ease;
}

.search-page .sub-nav__search .search-bar__button:hover {
  background: color-mix(in srgb, var(--color-help-green, #10b981) 85%, black);
}

/* Legacy search container support */
.search-page .search-container {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.search-page .search-container .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted, #9ca3af);
  pointer-events: none;
  z-index: 1;
}

.search-page .search-container input,
.search-page .search-container .search input,
.search-page .search-container input[type="search"],
.search-page .search-container input[name="query"] {
  padding-left: 36px !important;
  width: 280px;
  max-width: 280px;
}

/* Load More Button Styling (transforms pagination) */
.search-load-more-wrapper {
  display: flex;
  justify-content: center;
  padding: 24px 0 32px;
}

.search-load-more-wrapper .pagination {
  list-style: none !important;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 0;
}

.search-load-more-wrapper .pagination li {
  list-style: none !important;
  display: none;
}

.search-load-more-wrapper .pagination li::before,
.search-load-more-wrapper .pagination li::marker {
  content: none !important;
  display: none !important;
}

/* Only show the "Next" link as a load more button */
.search-load-more-wrapper .pagination li:last-child,
.search-load-more-wrapper .pagination li.pagination-next {
  display: block;
}

.search-load-more-wrapper .pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 32px;
  background: var(--color-help-green, #10b981);
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.search-load-more-wrapper .pagination a:hover {
  background: color-mix(in srgb, var(--color-help-green, #10b981) 85%, black);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Hide "Last" link text, show only "Next" styled as "Show more" */
.search-load-more-wrapper .pagination li:last-child a::after {
  content: ' ↓';
}

/* If there's no next page, hide the wrapper */
.search-load-more-wrapper:empty,
.search-load-more-wrapper .pagination:empty {
  display: none;
}

/* Animation for collapsible sidebar */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Search Results Mobile Responsive */
@media (max-width: 768px) {
  .search-results {
    flex-direction: column;
  }

  /* Make results column transparent to flex layout so we can reorder */
  .search-results-column {
    display: contents;
  }

  /* Order: heading → sort → filters → results */
  .search-results-subheading {
    order: 1;
    width: 100%;
  }

  .search-sort-controls {
    order: 2;
    width: 100%;
  }

  .search-results-sidebar {
    order: 3;
    flex: none;
    width: 100%;
    position: relative;
    z-index: 5;
    display: none;
  }

  .search-results-sidebar.sidebar-visible {
    display: block;
    animation: slideDown 0.2s ease-out;
  }

  /* Mobile Filters Toggle */
  .mobile-filters-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border: 1px solid var(--color-border, #d8dcde);
    border-radius: 8px;
    background: var(--color-surface, #fff);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text, #2f3941);
    cursor: pointer;
    min-height: 44px;
    white-space: nowrap;
  }

  .mobile-filters-toggle[aria-expanded="true"] {
    border-color: var(--color-help-green, #10b981);
    color: var(--color-help-green, #10b981);
  }

  .search-results-list {
    order: 4;
    width: 100%;
  }

  .no-results {
    order: 4;
    width: 100%;
  }

  .collapsible-sidebar-toggle {
    display: flex;
    margin-bottom: 8px;
    min-height: 56px;
    padding: 14px 16px;
    font-size: 16px;
    position: relative;
    z-index: 2;
  }

  .collapsible-sidebar .sidenav-title {
    display: none;
  }

  .collapsible-sidebar .multibrand-filter-list {
    display: none;
    padding: 12px 0;
    position: relative;
    z-index: 1;
  }

  .collapsible-sidebar .sidenav-item {
    min-height: 48px;
    padding: 12px 14px;
    font-size: 16px;
  }

  .collapsible-sidebar .sidenav-item:active {
    background: rgba(0, 0, 0, 0.06);
  }

  .collapsible-sidebar .see-all-filters {
    min-height: 48px;
    padding: 12px 14px;
    font-size: 15px;
  }

  .collapsible-sidebar[aria-expanded="true"] {
    position: relative;
    z-index: 10;
  }

  .collapsible-sidebar[aria-expanded="true"] .multibrand-filter-list {
    display: block;
    margin-top: 8px;
    animation: slideDown 0.2s ease-out;
  }

  .collapsible-sidebar[aria-expanded="true"] .chevron-icon {
    display: none;
  }

  .collapsible-sidebar[aria-expanded="true"] .x-icon {
    display: block;
  }

  .collapsible-sidebar[aria-expanded="true"] .collapsible-sidebar-toggle {
    border-color: var(--color-help-green, #10b981);
    background: var(--color-surface-elevated, #ffffff);
  }

  /* Mobile Sort Controls */
  .search-sort-controls {
    flex-direction: row;
    justify-content: space-between;
    padding: 10px 12px;
    gap: 8px;
  }

  .search-sort__label {
    font-size: 12px;
  }

  .search-sort__select {
    flex: 1;
    max-width: 180px;
    min-height: 44px;
    padding: 10px 36px 10px 12px;
    font-size: 14px;
    background-position: right 12px center;
  }

  .search-result-card .search-result-breadcrumbs,
  .search-result-card .breadcrumbs.search-result-breadcrumbs {
    display: none !important;
  }

  .search-result-card nav:has(.search-result-breadcrumbs) {
    display: none !important;
  }

  .search-page .search-result-card,
  .search-result-card {
    padding: 16px;
  }

  /* Mobile: stack sub-nav vertically */
  .search-page .sub-nav__container {
    flex-direction: column;
    align-items: stretch;
  }

  .search-page .sub-nav__search {
    width: 100%;
  }

  .search-page .search-container {
    width: 100%;
  }

  .search-page .search-container input,
  .search-page .search-container .search input {
    width: 100%;
    max-width: 100%;
  }

  .search-load-more-wrapper .pagination a {
    padding: 10px 24px;
    font-size: 13px;
  }
}