/**
 * Guest dark-mode fixes. All rules are scoped to html.dark-mode
 * except .p-title2 layout (broken in both themes).
 */

/* html overscroll / gap between sections */
html.dark-mode {
  background-color: #0f172a;
  color-scheme: dark;
}

html.dark-mode body {
  background-color: #0f172a;
}

/* Broken benefit subtitle layout (fixed width / padding) */
.p-title2 {
  width: 100% !important;
  max-width: 920px;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box;
  text-align: center;
  position: relative !important;
  left: auto !important;
}

/* Dropdowns: white menus + ghost opacity menus */
html.dark-mode .dropdown-menu,
html.dark-mode .dropdown-menu.float-list,
html.dark-mode .dropdown-menu.hdMnApiDropdown {
  background-color: rgba(15, 23, 42, 0.98) !important;
  border: 1px solid rgba(56, 189, 248, 0.28) !important;
  box-shadow: 0 12px 40px rgba(2, 6, 23, 0.55) !important;
  color: #e2e8f0 !important;
}

html.dark-mode .dropdown-item {
  color: #cbd5e1 !important;
}

html.dark-mode .dropdown-item:hover,
html.dark-mode .dropdown-item:focus {
  background-color: rgba(37, 99, 235, 0.35) !important;
  color: #f8fafc !important;
}

html.dark-mode .dropdown-item.active,
html.dark-mode .dropdown-menu .dropdown-item[style*="background"] {
  color: #fff !important;
}

/* Breadcrumbs that force black links */
html.dark-mode .breadcrumb-item a {
  color: #93c5fd !important;
}

html.dark-mode .breadcrumb-item.actives,
html.dark-mode .breadcrumb-item.active,
html.dark-mode .actives {
  color: #e2e8f0 !important;
}

/* Google login / register buttons stay white — ok; soften clash */
html.dark-mode .login-with-google-btn {
  border: 1px solid rgba(148, 163, 184, 0.35);
}

/* Blog index forced white body */
html.dark-mode body,
html.dark-mode body.blog-index-page,
html.dark-mode body.blog-single-page {
  background-color: #0f172a !important;
}

html.dark-mode .blog-item-modern,
html.dark-mode .card.blog-item-modern {
  background-color: rgba(30, 41, 59, 0.95) !important;
  border-color: rgba(56, 189, 248, 0.2) !important;
  color: #e2e8f0 !important;
}

html.dark-mode .blog-item-modern h2,
html.dark-mode .blog-item-modern h2 a,
html.dark-mode .blog-item-modern a {
  color: #e2e8f0 !important;
}

html.dark-mode .blog-breadcrumb-link {
  color: #93c5fd !important;
}

html.dark-mode .blog-breadcrumb-current {
  color: #e2e8f0 !important;
}

html.dark-mode .page-link {
  background-color: rgba(15, 23, 42, 0.7) !important;
  border-color: rgba(56, 189, 248, 0.25) !important;
  color: #cbd5e1 !important;
}

html.dark-mode .page-item.active .page-link {
  background-color: #2563eb !important;
  border-color: #2563eb !important;
  color: #fff !important;
}
