/* Plus Jakarta Sans loaded via <link> in header.php for better performance */

/* ============================================
   CSS Custom Properties (Design Tokens)
   ============================================ */
:root {
  /* Colors */
  --bg-page: #D27814;
  --bg-card: #FFFFFF;
  --bg-center: #F1F5F9;
  --text-primary: #1A1A1A;
  --text-secondary: #64748B;
  --text-muted: #9CA3AF;
  --accent: #E8820C;
  --accent-hover: #C96D08;
  --accent-light: #FEF0E0;
  --accent-blue: #3B82F6;
  --border-color: #E2E8F0;
  --navbar-bg: #D27814;
  --footer-bg: #D27814;
  --sidebar-text: rgba(255,255,255,0.75);
  --sidebar-text-muted: rgba(255,255,255,0.5);
  --sidebar-text-bright: #fff;
  --sidebar-divider: rgba(255,255,255,0.15);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);

  /* Typography */
  --font-family: 'Plus Jakarta Sans', -apple-system, system-ui, BlinkMacSystemFont, sans-serif;
  --font-size-base: 15px;
  --font-size-sm: 13px;
  --font-size-xs: 11px;
  --font-size-lg: 18px;
  --font-size-xl: 24px;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 20px;

  /* Transitions */
  --transition: 0.2s ease;
}

/* ============================================
   Base / Reset
   ============================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  color: var(--text-primary);
  background-color: var(--bg-page);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-top: 0 !important;
}

/* Page background wrapper — transparent so body color shows */
.background, .background2 {
  background: transparent !important;
  background-color: transparent !important;
}
.background:before {
  display: none !important;
}

img { border: none; max-width: 100%; }
ul, a { list-style: none; text-decoration: none; }
a { color: var(--text-primary); transition: color var(--transition); }
a:hover { color: var(--accent); text-decoration: none; }

.margin-bottom-none { margin-bottom: 0; }
.cursor-pointer { cursor: pointer; }
.clearfix::after { content: ""; display: table; clear: both; }
.hide { display: none !important; }

/* ============================================
   Navbar / Header
   ============================================ */
.loginarea {
  background-color: var(--navbar-bg);
  min-height: 56px;
  padding: 0;
  width: 100%;
  border-bottom: 1px solid var(--sidebar-divider);
}

.navbar {
  background-color: var(--navbar-bg) !important;
  border: none;
  margin-bottom: 0;
  min-height: 56px;
  display: block;
  box-shadow: none !important;
}

.navbar-fixed-top {
  position: sticky !important;
  top: 0;
  z-index: 1030;
}

.navbar-dark .navbar-nav .nav-link,
.navbar .navbar-nav .nav-link {
  color: rgba(255,255,255,0.85) !important;
  font-weight: 500;
  font-size: var(--font-size-sm);
  transition: color var(--transition);
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link:hover {
  color: var(--accent) !important;
}

nav.navbar.navbar-default,
nav.navbar {
  background-color: var(--navbar-bg) !important;
  border: none !important;
  box-shadow: none !important;
  border-bottom: 1px solid var(--sidebar-divider) !important;
}

.navbar-default .navbar-nav > li > a,
.navbar .top-header > ul > li > a,
.top-header > ul > li > a {
  color: rgba(255,255,255,0.85) !important;
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 14px;
  transition: color var(--transition);
}

.navbar-default .navbar-nav > li > a:hover,
.navbar .top-header > ul > li > a:hover,
.top-header > ul > li > a:hover {
  color: var(--accent) !important;
}

.logo-section {
  padding: 0;
}

.logo-section img {
  max-height: 30px;
  margin: 8px;
}

.top-header {
  width: auto;
  display: flex !important;
  align-items: center;
  gap: 8px;
  padding-top: 0;
  margin-right: 8px;
  float: none !important;
}

.top-header > ul {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
}

.top-header > ul > li {
  position: relative;
  float: none;
  font-size: 14px;
  font-family: var(--font-family);
  font-weight: 500;
  padding-left: 8px;
  color: rgba(255,255,255,0.85);
}

.top-header > ul > li > a {
  color: rgba(255,255,255,0.85) !important;
}

/* Dropdown menus in navbar */
.header-profile-dropdown {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--space-2) 0;
  min-width: 200px;
  right: 0;
  left: auto;
}

.header-profile-dropdown li a,
.dropdown-menu li a {
  color: var(--text-primary) !important;
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-sm);
  font-weight: 400;
  display: block;
  transition: background var(--transition);
}

.header-profile-dropdown li a:hover,
.dropdown-menu li a:hover {
  background-color: var(--accent-light) !important;
  color: var(--accent) !important;
}

.dropdown-menu {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

/* Caret */
.caret {
  border-top-color: rgba(255,255,255,0.7);
}

/* Hamburger / Toggle */
.navbar-toggle,
.navbar-toggler {
  border: 1px solid rgba(255,255,255,0.3);
  padding: 6px 10px;
}

.icon-bar-header,
.navbar-toggle .icon-bar,
.navbar-toggler-icon {
  background-color: rgba(255,255,255,0.8) !important;
}

.header-nav {
  margin-top: 8px;
}

/* Search bar in navbar */
.navbar-form {
  margin-left: 5%;
}

.form-control1 {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-lg);
  color: rgba(255,255,255,0.95);
  padding: 6px 12px;
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  transition: all var(--transition);
}

.form-control1:focus {
  background: rgba(255,255,255,0.3);
  border-color: rgba(255,255,255,0.4);
  outline: none;
  box-shadow: none;
}

.form-control1::placeholder {
  color: rgba(255,255,255,0.5);
}

.newbtns {
  display: inline-flex;
  gap: var(--space-2);
}

.btn-header {
  background: rgba(255,255,255,0.2) !important;
  border: 1px solid rgba(255,255,255,0.25) !important;
  color: #fff !important;
  border-radius: var(--radius-sm) !important;
  font-family: var(--font-family);
  font-weight: 600;
  font-size: var(--font-size-sm);
  padding: 6px 14px;
  transition: all var(--transition);
}

.btn-header:hover {
  background: rgba(255,255,255,0.3) !important;
  transform: none;
}

.questate-me {
  letter-spacing: 0.5px;
}

/* Notifications */
.notification {
  position: relative;
  color: rgba(255,255,255,0.85) !important;
}

.count {
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: -5px;
  right: -8px;
}

.count:empty {
  display: none !important;
}

.notification-list {
  display: none;
  position: absolute;
  right: 0;
  top: 35px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  width: 300px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 10000;
}

.notification-list ul {
  padding: 0;
  margin: 0;
}

.notification-list li,
.notification-xs {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-color);
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

.notification-list li:last-child {
  border-bottom: none;
}

.notification-list li a,
.notification-xs a {
  color: var(--accent) !important;
}

/* Notifation area (second nav row) */
.notifationarea {
  color: rgba(255,255,255,0.85) !important;
  background-color: var(--navbar-bg) !important;
  padding: 5px 0;
}

.notifationarea ul {
  margin: 0;
  padding: 0;
}

.notifationarea ul li {
  float: left;
  padding-left: 15px;
}

.notifationarea ul li a,
.notifationarea a {
  color: rgba(255,255,255,0.85) !important;
  font-family: var(--font-family);
  font-weight: 600;
  font-size: var(--font-size-sm);
  letter-spacing: 0.3px;
  transition: color var(--transition);
}

.notifationarea ul li a:hover,
.notifationarea a:hover {
  color: var(--accent) !important;
}

.center-align {
  text-align: center;
}

.red-background,
.navbar-coll,
.second-headerarea,
#bs-example-navbar-collapse-1,
.loginarea .row {
  color: white !important;
  background-color: var(--navbar-bg) !important;
}

.collapse.navbar-collapse {
  background-color: transparent;
}

.rightsidearea {
  width: 280px;
  flex-shrink: 0;
}

/* ============================================
   Sidebar (mobile)
   ============================================ */
.w3-sidebar {
  position: fixed;
  top: 56px;
  left: 0;
  width: 280px;
  height: 100%;
  background: var(--bg-card);
  box-shadow: var(--shadow-lg);
  z-index: 1040;
  overflow-y: auto;
  padding-top: var(--space-4);
}

.w3-bar-item {
  display: block;
  padding: var(--space-3) var(--space-5);
  font-size: var(--font-size-sm);
  color: var(--text-primary);
  transition: all var(--transition);
}

.w3-bar-item:hover {
  background: var(--accent-light);
  color: var(--accent);
}

.w3-bar-item.heading-item {
  font-weight: 600;
  font-size: var(--font-size-base);
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.w3-bar-item.category-item,
.w3-bar-item.feed-item,
.w3-bar-item.trending-item {
  padding-left: var(--space-6);
  font-weight: 400;
  color: var(--text-secondary);
}

/* ============================================
   Main Layout
   ============================================ */
.background {
  background-color: var(--bg-page);
  padding-top: var(--space-5);
  min-height: calc(100vh - 120px);
}

/* Override .container to be full-width inside .background */
.background > .container,
.background2 > .container {
  max-width: 100% !important;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 768px) {
  .background > .container,
  .background2 > .container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

@media (min-width: 992px) {
  .background > .container,
  .background2 > .container {
    padding-left: 3rem;
    padding-right: 3rem;
  }
}

.background > .container-fluid > .row,
.background > .container > .row {
  display: flex;
  flex-wrap: wrap;
}

/* Override Bootstrap .row > * { flex: 0 0 auto } for our sections */
.background .row > .section1 {
  flex: 0 0 240px;
  width: 240px;
  max-width: 240px;
}

.background .row > .section2 {
  flex: 1 1 0%;
  width: auto;
  max-width: none;
  min-width: 0;
}

.background .row > .section1.section3,
.background .row > .section2 ~ .section1 {
  flex: 0 0 280px;
  width: 280px;
  max-width: 280px;
}

.background2 {
  background-color: var(--bg-page);
  padding-top: var(--space-5);
}

.section1 {
  width: 240px;
  flex-shrink: 0;
  padding-left: 15px;
  padding-right: 15px;
  background: transparent;
}

.section2 {
  flex: 1;
  min-width: 0;
  padding-left: 15px;
  padding-right: 15px;
  background: var(--bg-center);
  border-radius: 20px;
  padding-top: 20px;
  padding-bottom: 20px;
  margin-top: 8px;
  margin-bottom: 8px;
  min-height: 90vh;
}

.section3 {
  margin-top: 0;
}

/* ============================================
   Left Sidebar (Feeds/Categories)
   ============================================ */
.feeds {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  margin-bottom: var(--space-4);
  overflow: hidden;
  position: relative;
}

/* Dividers between feed sections in sidebar */
.feeds + .feeds {
  border-top: 1px solid var(--sidebar-divider);
  padding-top: var(--space-4);
}

.feeds b {
  font-family: var(--font-family);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--sidebar-text-muted);
  margin-bottom: var(--space-2);
  display: block;
}

.feeds ul {
  padding: 0;
  margin: 0;
}

.feeds ul li {
  margin: 0;
  padding: 0;
}

.feeds ul li a {
  display: block;
  padding: 9px 12px !important;
  font-size: 13.5px;
  color: var(--sidebar-text);
  font-weight: 400;
  border-radius: var(--radius-md);
  transition: all var(--transition);
  border-left: 3px solid transparent;
}

.feeds ul li a:hover {
  background: rgba(255,255,255,0.1);
  color: var(--sidebar-text-bright);
  border-left-color: transparent;
}

.feeds ul li.active a,
.feeds ul li a.active {
  color: var(--sidebar-text-bright) !important;
  font-weight: 600;
  background: rgba(255,255,255,0.15);
  border-left-color: rgba(255,255,255,0.5);
}

.trending-now,
.cat_gories {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  margin-bottom: var(--space-4);
  border-top: 1px solid var(--sidebar-divider);
  padding-top: var(--space-4);
}

.trending-now b,
.cat_gories b {
  font-family: var(--font-family);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--sidebar-text-muted);
  margin-bottom: var(--space-2);
  display: block;
}

.trending-now ul,
.cat_gories ul {
  padding: 0;
  margin: 0;
}

.trending-now ul li,
.cat_gories ul li {
  margin: 0;
  padding: 0;
}

.trending-now ul li a,
.cat_gories ul li a {
  display: block;
  padding: 9px 12px !important;
  font-size: 13.5px;
  color: var(--sidebar-text);
  font-weight: 400;
  border-radius: var(--radius-md);
  transition: all var(--transition);
  border-left: 3px solid transparent;
}

.trending-now ul li a:hover,
.cat_gories ul li a:hover {
  background: rgba(255,255,255,0.1);
  color: var(--sidebar-text-bright);
  border-left-color: transparent;
}

.trending-now ul li.active a,
.trending-now ul li a.active,
.cat_gories ul li.active a,
.cat_gories ul li a.active {
  color: var(--sidebar-text-bright) !important;
  font-weight: 600;
  background: rgba(255,255,255,0.15);
  border-left-color: rgba(255,255,255,0.5);
}

.no-padding { padding: 0 !important; }

.hr-line {
  display: none;
}

.storiesarea hr {
  display: none;
}

.feeds .hr-line {
  display: none;
}

/* ============================================
   Right Sidebar (CTA)
   ============================================ */
.section1.section3 .feeds {
  background: transparent;
  color: #fff;
  border-radius: 0;
  text-align: center;
  padding: 20px 8px;
  margin-bottom: 0;
  transition: all var(--transition);
  border: none;
}

.section1.section3 .feeds + .feeds {
  border-top: 1px solid var(--sidebar-divider);
}

.section1.section3 .feeds:hover {
  background: rgba(255,255,255,0.08);
  transform: none;
  box-shadow: none;
  border-radius: 10px;
}

.section1.section3 .feeds span {
  color: rgba(255,255,255,0.9) !important;
  font-weight: 500;
  font-size: var(--font-size-sm);
}

.section1.section3 .feeds i {
  color: rgba(255,255,255,0.8);
  font-size: 28px;
  margin-bottom: 8px;
  display: block;
}

.section1.section3 a {
  color: #fff !important;
}

.q-cta-card {
  background: rgba(255,255,255,0.1) !important;
  color: #fff !important;
  border-radius: var(--radius-md);
  text-align: center;
  padding: var(--space-5) var(--space-4);
  border: 1px solid rgba(255,255,255,0.25) !important;
  backdrop-filter: blur(4px);
  margin-bottom: var(--space-4);
  transition: all var(--transition);
  border: none;
  cursor: pointer;
}

.q-cta-card:hover {
  background: rgba(255,255,255,0.2) !important;
  border-color: rgba(255,255,255,0.4) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.q-cta-card i {
  color: rgba(255,255,255,0.9);
}

.q-cta-card span {
  color: #fff !important;
  font-weight: 600;
  font-size: var(--font-size-sm);
}

/* Make .container pages (question page etc.) full-width like .container-fluid */
.background .container {
  max-width: 100%;
  padding-left: 15px;
  padding-right: 15px;
}

/* Ensure center section has white bg on all pages (answerpage etc.) */
.section2.answerpage,
.answerpage.section2 {
  background: var(--bg-center) !important;
}

/* Right sidebar on question/answer pages (second .section1 without .rightsidearea) */
.section2 ~ .section1 .feeds b {
  color: rgba(255,255,255,0.5) !important;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 1px;
}

.section2 ~ .section1 .trending-now h2 {
  color: rgba(255,255,255,0.5) !important;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 1px;
  font-weight: 700;
}

.section2 ~ .section1 .trending-now p {
  color: rgba(255,255,255,0.85) !important;
  font-size: 13px;
  line-height: 1.6;
}

.section2 ~ .section1 .trending-now a,
.section2 ~ .section1 .trending-now p a {
  color: #fff !important;
  text-decoration: none !important;
}

.section2 ~ .section1 .photoimg a,
.section2 ~ .section1 .photoimg a span,
.section2 ~ .section1 .feeds a {
  color: #fff !important;
  text-decoration: none !important;
}

.section2 ~ .section1 .followers ul li span,
.section2 ~ .section1 .followers ul li {
  color: rgba(255,255,255,0.85) !important;
}

.section2 ~ .section1 .followers ul li i {
  color: rgba(255,255,255,0.6) !important;
}

.section2 ~ .section1 hr {
  border-color: rgba(255,255,255,0.15) !important;
}

.section2 ~ .section1 .bottom-borders img {
  display: none;
}

/* ============================================
   Stories / Question Section Heading
   ============================================ */
.stories-section {
  margin-bottom: var(--space-4);
}

.stories-section h1,
.stories-section h2 {
  font-family: var(--font-family);
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.3px;
}

/* ============================================
   Question Cards (Q-Card)
   ============================================ */
.storiesarea {
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  padding: 0;
  margin-bottom: 16px;
  overflow: hidden;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.storiesarea:hover {
  border-color: #CBD5E1;
  box-shadow: var(--shadow-md);
}

.storiesarea h1 {
  font-family: var(--font-family);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

/* Category badge on top of question */
.category-on-top,
.newtag {
  display: inline-block;
  padding: 0;
  font-size: 12px;
  font-weight: 700;
  border-radius: 0;
  transition: all var(--transition);
  margin-bottom: var(--space-1);
  background: transparent !important;
  border: none !important;
  color: var(--accent) !important;
  text-transform: none;
  letter-spacing: 0;
}

.category-on-top.newtag {
  background: transparent !important;
  color: var(--accent) !important;
  border: none !important;
}

.category-on-top.newtag:hover {
  background: transparent !important;
  color: var(--accent-hover) !important;
}

/* Category label — uppercase blue text */
a[href*="/category/"] .newtag {
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent-blue) !important;
  font-weight: 700;
  font-size: 12px;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

/* Hashtag pills */
a[href*="/trending/"] .newtag {
  background: #EFF6FF !important;
  border: 1px solid #BFDBFE !important;
  border-radius: var(--radius-pill) !important;
  padding: 3px 10px !important;
  color: var(--accent-blue) !important;
  font-weight: 600;
  font-size: var(--font-size-xs);
  text-transform: lowercase;
  letter-spacing: 0;
  margin-left: 6px;
}

a[href*="/trending/"] .newtag:hover {
  background: #DBEAFE !important;
  color: #2563EB !important;
  border-color: #93C5FD !important;
}

a .newtag:hover {
  color: var(--accent) !important;
}

/* Question title link */
.new-class-first {
  padding: 24px 24px 0 24px;
  margin-bottom: 0;
}

.new-class-first a.no_views,
.storiesarea a.no_views {
  font-family: var(--font-family);
  font-size: 20px;
  font-weight: 700;
  color: #1E293B;
  line-height: 1.35;
  transition: color var(--transition);
  display: block;
  margin-top: var(--space-2);
}

.new-class-first a {
  display: inline;
}

.new-class-first a.no_views:hover,
.storiesarea a.no_views:hover {
  color: var(--accent);
}

/* New class two (views) */
.new-class-two {
  float: right;
  color: var(--text-muted);
  font-size: var(--font-size-sm);
}

/* Action buttons row (Write Answer, Upvote, etc.) */
.storiesarea > ul,
.answerpage ul.clearfix,
.storiesarea .clearfix + ul {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  margin: 0;
  border-top: none;
  border-bottom: 1px solid #F1F5F9;
  list-style: none;
}

.storiesarea > ul > li,
.answerpage ul > li,
.storiesarea .clearfix + ul > li {
  float: none !important;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
}

.storiesarea > ul > li a,
.storiesarea ul li a.active,
.answerpage ul > li a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 6px 14px;
  font-size: 12px;
  color: #475569;
  border-radius: 24px;
  transition: all var(--transition);
  font-weight: 600;
  white-space: nowrap;
  background: var(--accent-light);
  border: 1px solid rgba(232,130,12,0.2);
  min-height: 34px;
}

.storiesarea > ul > li a:hover,
.answerpage ul > li a:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.storiesarea > ul > li a:hover i,
.storiesarea > ul > li a:hover label,
.storiesarea > ul > li a:hover span,
.answerpage ul > li a:hover i,
.answerpage ul > li a:hover label,
.answerpage ul > li a:hover span {
  color: #fff !important;
}

.storiesarea > ul > li a:hover img,
.answerpage ul > li a:hover img {
  filter: brightness(0) invert(1);
}

.storiesarea > ul > li a i {
  font-size: 14px;
}

.storiesarea > ul > li a label,
.answerpage ul > li a label {
  margin: 0;
  font-weight: 600;
  font-size: var(--font-size-sm);
  cursor: pointer;
  display: inline;
  white-space: nowrap;
}

/* First child / leftmost */
li.first-child,
li.leftmost-child,
li.afirst-child {
  padding: 0;
  margin: 0;
  float: none !important;
}

/* Answer page action bars — force flex on all ULs containing action items */
div[id^="bs-example-navbar-collapsequestion"] > ul,
.answerpage div > ul {
  display: flex !important;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) 0;
  margin: 0;
  list-style: none;
}

div[id^="bs-example-navbar-collapsequestion"] > ul > li,
.answerpage div > ul > li {
  float: none !important;
  display: inline-flex;
  align-items: center;
}

/* Upvoted / Downvoted state */
.upd {
  color: var(--accent) !important;
  font-weight: 600;
}

.upd i {
  color: var(--accent);
}

.upd:hover {
  color: var(--accent-hover) !important;
}

/* Vote buttons */
.upvote, .down_v {
  cursor: pointer;
}

/* Write answer link */
.write-answer-a {
  color: var(--accent) !important;
}

.write-answer-a:hover {
  background: var(--accent) !important;
  color: #fff !important;
}

.write-answer-a:hover i,
.write-answer-a:hover label,
.write-answer-a:hover span,
.write-answer-a:hover .write-answer,
.write-answer-a:hover .fa-pen-to-square {
  color: #fff !important;
}

/* Follow */
.folvote img {
  max-height: 15px;
  margin-right: 2px;
  float: initial;
  margin-top: -3px;
}

/* Share popover */
.newsocial-icon {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-2);
}

.newsocial-icon img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  transition: transform var(--transition);
}

.newsocial-icon img:hover {
  transform: scale(1.15);
}

/* Popover styling */
.popover {
  z-index: 1060 !important;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}

.popover.show {
  z-index: 1060 !important;
}

/* ============================================
   Answer Section
   ============================================ */
.to-besidediv {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 36px 24px 6px 24px;
  margin: 0;
  position: relative;
}

.to-besidediv::before {
  content: "Best Answer";
  position: absolute;
  top: 8px;
  left: 24px;
  background: linear-gradient(135deg, #475569, #334155);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 3px 10px;
  border-radius: 0 0 10px 10px;
}

.iconimg {
  flex-shrink: 0;
}

/* Answer author row — flex align DP + name on question pages */
.storiesarea > .iconimg {
  float: left;
  margin-right: 12px;
}

.storiesarea > .iconimg + .iconimg-beside {
  overflow: hidden;
}

.dp_image {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.iconimg-beside {
  flex: 1;
}

.margintop10 {
  margin-top: 0;
}

.question_name {
  font-family: var(--font-family);
  font-weight: 600;
  font-size: var(--font-size-base);
  color: var(--text-primary) !important;
}

.question_name b {
  font-weight: 600;
}

.answer_subscript {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin: 0;
}

.expert-btn {
  background: linear-gradient(135deg, #F0993A, #E8820C) !important;
  color: #fff !important;
  border: none;
  border-radius: var(--radius-pill);
  padding: 3px 12px;
  font-size: var(--font-size-xs);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(232,130,12,0.3);
}

.expert-btn i {
  color: #fff !important;
  font-size: 12px;
}

/* Answer date tag — left aligned, no padding */
.para-div .newtag {
  font-size: var(--font-size-xs);
  color: #64748B !important;
  background: transparent !important;
  border: none !important;
  padding: 0;
  margin-bottom: var(--space-2);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  display: inline;
  text-align: left;
}

/* Share Answer — right-align */
.para-div > li {
  display: inline;
  float: right;
  list-style: none;
  margin: 0 0 var(--space-2) 0;
}

/* Answer text */
.para-div {
  background: #F8FAFC;
  border-left: 3px solid #94A3B8;
  padding: 14px 20px;
  margin: 6px 24px 12px 24px;
  color: #44403C;
  font-size: 14.5px;
  line-height: 1.7;
  border-radius: 0 12px 12px 0;
}

.para-div ul {
  list-style: inherit;
  padding-left: var(--space-5);
}

.storiesarea .para-div ul li {
  float: none;
  font-size: inherit;
  margin-top: inherit;
  margin-bottom: inherit;
  font-family: inherit;
  padding-left: inherit;
}

/* View more link */
a.no_views_ans {
  color: var(--accent);
  font-weight: 600;
  font-size: var(--font-size-sm);
}

a.no_views_ans:hover {
  color: var(--accent-hover);
}

/* Answer vote buttons */
.storiesarea .clearfix + ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 24px 14px 24px;
  margin: 0;
  background: #F8FAFC;
  border-top: 1px solid #F1F5F9;
  border-bottom: none;
  border-radius: 0 0 16px 16px;
}

.storiesarea .clearfix + ul li a {
  background: var(--accent-light);
  border: 1px solid rgba(232,130,12,0.2);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: #475569;
}

.storiesarea .clearfix + ul li a:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.storiesarea .clearfix + ul li a:hover i,
.storiesarea .clearfix + ul li a:hover label,
.storiesarea .clearfix + ul li a:hover span {
  color: #fff !important;
}

.storiesarea .clearfix + ul li a:hover img {
  filter: brightness(0) invert(1);
}

/* ============================================
   Comment Section
   ============================================ */
.panel-collapse {
  margin-top: var(--space-3);
}

.panel-body {
  padding: var(--space-4);
  background: #F9FAFB;
  border-radius: var(--radius-md);
}

.newclass textarea {
  width: 100% !important;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  resize: vertical;
  transition: border-color var(--transition);
}

.newclass textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 2px rgba(232,130,12,0.15);
}

/* Comment display */
.message-content {
  font-size: var(--font-size-sm);
  color: var(--text-primary);
  margin: var(--space-2) 0;
  line-height: 1.5;
}

.lessweight {
  font-weight: 600;
  font-size: var(--font-size-sm);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  font-family: var(--font-family);
  font-weight: 600;
  font-size: var(--font-size-sm);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  transition: all var(--transition);
  cursor: pointer;
}

.btn-default,
.btn-outline-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-default:hover,
.btn-outline-secondary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-primary {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #fff !important;
}

.btn-primary:hover {
  background: var(--accent-hover) !important;
  border-color: var(--accent-hover) !important;
  transform: translateY(-1px);
}

.btn_submit {
  background: var(--accent) !important;
  border: none !important;
  color: #fff !important;
  padding: 8px 24px;
  font-weight: 600;
}

.btn_submit:hover {
  background: var(--accent-hover) !important;
}

.btn-ghost-default {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent) !important;
}

.btn-ghost-default:hover {
  background: var(--accent);
  color: #fff !important;
}

.quans_btn {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #fff !important;
}

.quans_btn:hover {
  background: var(--accent-hover) !important;
}

/* ============================================
   Modals
   ============================================ */
.modal-content {
  border-radius: var(--radius-lg);
  border: none;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header .modal-title,
.modal-title {
  font-family: var(--font-family);
  font-weight: 700;
  font-size: var(--font-size-lg);
  color: var(--text-primary);
  margin: 0;
}

.modal-header .btn-close,
.modal-header .close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  opacity: 0.7;
  order: 1;
}

.modal-header .btn-close:hover,
.modal-header .close:hover {
  opacity: 1;
  color: var(--text-primary);
}

.modal-body {
  padding: var(--space-5);
}

.modal-footer {
  border-top: 1px solid var(--border-color);
  padding: var(--space-3) var(--space-5);
}

/* ============================================
   Forms
   ============================================ */
.form-control {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  transition: all var(--transition);
  color: var(--text-primary);
}

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232,130,12,0.15);
  outline: none;
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-control2 {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  transition: all var(--transition);
}

.form-control2:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232,130,12,0.15);
  outline: none;
}

.form-signin {
  padding: var(--space-4);
}

.form-signin-heading {
  font-family: var(--font-family);
  font-weight: 700;
  font-size: var(--font-size-xl);
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  text-align: center;
}

.form-group {
  margin-bottom: var(--space-4);
}

/* Fix BS3 modal form layout for BS5 */
.modal-body .form-group .control-label,
.modal-body .form-group label[class*="col-sm"] {
  display: block !important;
  float: none !important;
  width: 100% !important;
  text-align: left !important;
  margin-bottom: 6px !important;
  font-weight: 600;
  font-size: 14px;
}
.modal-body .form-group [class*="col-sm"] {
  float: none !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-top: 0 !important;
  padding: 0 !important;
}

/* BS3 pull-right compatibility */
.pull-right {
  float: right !important;
}

/* Apollo separator (OR divider in login) */
.apollo-seperator {
  text-align: center;
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  position: relative;
  margin: var(--space-3) 0;
}

.apollo-seperator::before,
.apollo-seperator::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--border-color);
}

.apollo-seperator::before { left: 0; }
.apollo-seperator::after { right: 0; }

/* Social login buttons */
.social-button {
  display: inline-block;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-align: center;
  transition: all var(--transition);
}

#facebook-connect {
  background: #1877F2;
  color: #fff !important;
}

#facebook-connect:hover {
  background: #1565D8;
}

#google-connect {
  background: #DB4437;
  color: #fff !important;
}

#google-connect:hover {
  background: #C33C2F;
}

.social-icon1 {
  text-align: center;
}

.social-icon1 ul {
  display: inline-flex;
  gap: var(--space-3);
  padding: 0;
}

.social-icon1 ul li {
  padding: 0 !important;
}

/* Login dropdown form */
.loginform {
  width: 320px;
  padding: var(--space-4);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
}

/* Ask question textarea (homepage) */
#search_ques_textarea {
  background: var(--bg-card) !important;
  color: var(--text-muted) !important;
  font-weight: 500 !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-md) !important;
  margin-top: var(--space-3) !important;
  margin-bottom: var(--space-5) !important;
  cursor: pointer;
  font-size: var(--font-size-lg) !important;
  font-family: var(--font-family) !important;
  padding: var(--space-4) !important;
  transition: all var(--transition);
}

#search_ques_textarea:hover {
  border-color: var(--accent) !important;
  box-shadow: var(--shadow-sm);
}

/* ============================================
   Ask Question Modal
   ============================================ */
#question-modal .modal-header {
  background: var(--accent-light);
}

#question-modal .btn-primary {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
}

#question-modal .btn-primary:hover {
  background: var(--accent-hover) !important;
}

/* Suggestions dropdown */
#suggestions {
  position: relative;
}

#autoSuggestionsList,
#autoSuggestionsListSearch {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  position: absolute;
  width: 100%;
  z-index: 100;
}

#autoSuggestionsListSearch > li {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  list-style: none;
  padding: var(--space-2) var(--space-4);
  text-align: left;
}

#autoSuggestionsListSearch > li a {
  color: var(--accent);
}

.auto_list {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  position: absolute;
}

/* ============================================
   Audio question
   ============================================ */
.audioquestion {
  width: 100%;
  margin-top: var(--space-2);
  border-radius: var(--radius-sm);
}

/* ============================================
   Breadcrumbs
   ============================================ */
.breadcrumb {
  background: transparent;
  padding: var(--space-2) 0;
  margin-bottom: var(--space-3);
  font-size: var(--font-size-sm);
  --bs-breadcrumb-divider: '>';
}

.breadcrumb > li + li:before {
  content: '>' !important;
  color: var(--text-muted);
  padding: 0 var(--space-2);
}

.breadcrumb-item + .breadcrumb-item::before {
  content: '>' !important;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--accent);
}

/* ============================================
   Answer Page
   ============================================ */
.answerpage {
  background: transparent;
}

.ans-area {
  margin-bottom: var(--space-4);
}

.hashtag {
  background: var(--accent-light) !important;
  color: var(--accent) !important;
  border: 1px solid rgba(232,130,12,0.2);
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  padding: 4px 12px;
}

.highlight {
  background: var(--accent-light);
  padding: 1px 3px;
  border-radius: 2px;
}

/* ============================================
   Expert Answer Page
   ============================================ */
.followers ul {
  padding: 0;
}

.followers ul li {
  padding: var(--space-2) 0;
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

.followers ul li a {
  color: var(--text-secondary);
}

.followers ul li i {
  color: var(--accent) !important;
  width: 20px;
}

.photoimg ul {
  padding: 0;
  margin: 0;
}

.photoimg ul li {
  font-weight: 600;
  font-size: var(--font-size-base);
  float: none;
  display: flex !important;
  align-items: center;
  gap: var(--space-2);
}

.photoimg ul li .dp_image {
  flex-shrink: 0;
}

.followers1 a {
  font-size: 14px;
  text-decoration: none;
  text-align: center;
  color: #fff;
  background: var(--accent);
  border-radius: var(--radius-sm);
  padding: 4px 12px;
}

.loading {
  text-align: center;
  padding: var(--space-3);
}

.loading span {
  color: var(--accent);
  cursor: pointer;
  font-weight: 600;
}

/* ============================================
   User Profile Page
   ============================================ */
.profile {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.top.left-area {
  padding: var(--space-6);
  border-bottom: 1px solid var(--border-color);
}

.profile_img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
}

.dp_image_profile {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  float: left;
  margin-right: var(--space-5);
}

.bottom-area {
  padding: var(--space-4);
}

/* Nav tabs */
.nav-tabs {
  border-bottom: 2px solid var(--border-color);
  margin-bottom: var(--space-4);
}

.nav-tabs > li > a,
.nav-tabs .nav-link {
  border: none !important;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: var(--font-size-sm);
  padding: var(--space-3) var(--space-4);
  border-radius: 0;
  border-bottom: 2px solid transparent !important;
  margin-bottom: -2px;
  transition: all var(--transition);
}

.nav-tabs > li.active > a,
.nav-tabs .nav-link.active {
  color: var(--accent) !important;
  border-bottom-color: var(--accent) !important;
  background: transparent !important;
}

.nav-tabs > li > a:hover,
.nav-tabs .nav-link:hover {
  color: var(--accent);
  background: transparent;
}

/* Profile table */
.table {
  font-family: var(--font-family);
}

.table thead tr th {
  background: var(--accent-light);
  color: var(--text-primary);
  font-weight: 600;
  font-size: var(--font-size-sm);
  border-bottom: 2px solid var(--accent);
  padding: var(--space-3) var(--space-4);
}

.table .tr-rows td {
  padding: var(--space-3) var(--space-4);
  font-size: var(--font-size-sm);
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.table .tr-rows td a {
  color: var(--text-primary);
  font-weight: 500;
}

.table .tr-rows td a:hover {
  color: var(--accent);
}

.pager {
  border-top: 1px solid var(--border-color) !important;
  border-bottom: 1px solid var(--border-color) !important;
  padding: var(--space-2) 0;
  margin: var(--space-3) 0;
}

.pager li a {
  border: none !important;
  border-radius: 0 !important;
  padding: var(--space-2) var(--space-3);
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

.pager li a:hover {
  color: var(--accent);
  background: var(--accent-light);
}

.notification-input {
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
}

.ni-error {
  border: 1px solid #EF4444;
  color: #EF4444;
}

/* ============================================
   Footer
   ============================================ */
.footer-color {
  background-color: var(--footer-bg);
  color: rgba(255,255,255,0.6);
  padding: var(--space-6) 0 var(--space-4);
  border-top: 1px solid var(--sidebar-divider);
}

.footer {
  padding: 0;
}

.footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: 0;
  margin: 0;
  align-items: center;
}

.footer ul li {
  padding: 0;
}

.footer ul li a {
  color: rgba(255,255,255,0.6);
  font-size: var(--font-size-sm);
  font-weight: 400;
  transition: color var(--transition);
}

.footer ul li a:hover {
  color: #fff;
}

.social-icon {
  text-align: right;
}

.social-icon p {
  color: rgba(255,255,255,0.5);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-2);
}

.social-icon ul {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: 0;
}

.social-icon ul li {
  padding: 0;
}

.social-icon ul li a img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  transition: all var(--transition);
  opacity: 0.7;
}

.social-icon ul li a img:hover {
  opacity: 1;
  transform: scale(1.1);
}

.copyright {
  text-align: center;
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: var(--space-4);
}

.copyright p {
  color: rgba(255,255,255,0.4);
  font-size: var(--font-size-xs);
}

/* ============================================
   Alerts
   ============================================ */
.alert {
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  border: none;
}

.alert-success {
  background: #ECFDF5;
  color: #065F46;
}

.alert-danger {
  background: #FEF2F2;
  color: #991B1B;
}

/* ============================================
   Loading Spinner
   ============================================ */
#loader-icon {
  display: none;
  text-align: center;
  padding: var(--space-5);
}

#loader-icon div {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 0 auto;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   Misc
   ============================================ */
.no_search {
  text-align: center;
  background: var(--accent-light) !important;
  color: var(--accent) !important;
  padding: var(--space-3);
  border-radius: var(--radius-sm);
}

.filter {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: var(--space-4);
}

/* Dropdown content (custom hover popover) */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background: var(--bg-card);
  min-width: 300px;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-md);
  z-index: 100;
  padding: var(--space-4);
}

.dropdown-content a {
  color: var(--text-primary);
  display: block;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* Popover content for user info */
.dropbtn {
  cursor: pointer;
}

/* Follow question modal */
#follow_question_modal .modal-body {
  text-align: center;
  padding: var(--space-6);
}

/* "Send to Expert" link */
.storiesarea ul li a[href*="move/"] {
  color: var(--accent);
  font-weight: 600;
}

/* ============================================
   Topsarea / Hero
   ============================================ */
.topsarea1 {
  height: 14em;
  position: relative;
}

/* ============================================
   Select category
   ============================================ */
.select-category select {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  background: var(--bg-card);
}

.select-category select:focus {
  border-color: var(--accent);
  outline: none;
}

/* ============================================
   Answer-page specific
   ============================================ */
.quesans_upvote,
.quesans_down_v {
  cursor: pointer;
}

.comm_upvote,
.comm_down_v,
.comm_edit,
.comm_delete,
.commans_upvote,
.commans_dwn {
  cursor: pointer;
}

/* Feedback close */
.feedback-close {
  background: none;
  border: none;
}

/* ============================================
   Hidden helpers
   ============================================ */
.hidden-xs { }
.hidden-sm { }
.hidden-md { }
.hidden-lg { }

/* ============================================
   Locality section
   ============================================ */
.locality {
  margin-top: var(--space-4);
}

/* ============================================
   User count widget
   ============================================ */
.count_user_section {
  margin-top: var(--space-3);
  text-align: center;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}
