/* DHUMS professional responsive refinement */
:root {
  --dhums-accent: var(--vr-theme-color);
  --dhums-ink: #20242a;
  --dhums-muted: #68717d;
  --dhums-border: rgba(25, 35, 45, .12);
}
html { scroll-behavior: smooth; }
body { font-size: 15px; line-height: 1.65; color: var(--dhums-ink); }
h1 { font-size: clamp(1.65rem, 2.5vw, 2.25rem); line-height: 1.25; }
h2 { font-size: clamp(1.35rem, 2vw, 1.75rem); line-height: 1.3; }
h3 { font-size: clamp(1.12rem, 1.5vw, 1.35rem); line-height: 1.35; }
p, li { line-height: 1.7; }
a { text-decoration-thickness: .06em; text-underline-offset: .18em; }
#mega-menu-wrapper { background: var(--bs-body-bg, #fff); border-bottom: 1px solid var(--dhums-border); }
#mega-menu-wrapper .navbar { min-height: 66px; padding-top: 7px; padding-bottom: 7px; }
#mega-menu-wrapper .navbar-brand img { max-height: 42px; width: auto; }
#mega-menu-wrapper .navbar-nav .nav-link { font-size: 14px; font-weight: 600; padding: 11px 10px; }
#mega-menu-wrapper .search-icon-btn, #mega-menu-wrapper .theme-toggle-btn { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
#mega-menu-wrapper .search-icon-btn:hover, #mega-menu-wrapper .theme-toggle-btn:hover { background: rgba(120,130,145,.12); }
.desktop-header-actions { gap: 13px !important; white-space: nowrap; }
.desktop-header-actions a { font-size: 14px; font-weight: 600; text-decoration: none; }
.desktop-login-link { color: var(--bs-body-color); padding: 7px 2px; }
.desktop-join-link { background: #20242a; color: #fff !important; border-radius: 7px; padding: 8px 17px; min-width: 72px; text-align: center; }
.desktop-join-link:hover { background: var(--dhums-accent); }
.desktop-language a { color: var(--bs-body-color); text-decoration: none; font-size: 13px; }
.desktop-theme-toggle { width: 30px; height: 30px; align-items: center; justify-content: center; }
.mobile-header { min-height: 54px; height: 54px; padding: 0 12px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--dhums-border); background: var(--bs-body-bg, #fff); }
.mobile-header .header-btn { width: 32px; height: 32px; min-width: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 7px; background: transparent; color: var(--bs-body-color); }
.mobile-header .header-btn:hover { background: rgba(120,130,145,.12); }
.mobile-header .header-logo { min-width: 0; flex: 1; display: flex; align-items: center; justify-content: center; }
.mobile-header .header-logo img { display: block; max-width: min(100%, 142px); max-height: 35px; width: auto; height: auto; object-fit: contain; }
.mobile-header-spacer { height: 54px; }
.mobile-login-btn { margin-left: auto; }
.mobile-header .header-btn#searchToggleBtn { margin-left: 0; }
.custom-offcanvas .offcanvas-header { padding: 14px 16px; border-bottom: 1px solid var(--dhums-border); }
.custom-offcanvas .offcanvas-logo img { max-width: 145px; max-height: 36px; object-fit: contain; }
.custom-offcanvas .btn-close { width: 30px; height: 30px; padding: 0; background: none; display: inline-flex; align-items: center; justify-content: center; opacity: .75; }
.custom-offcanvas .menu-nav { padding: 10px 14px 18px; }
.custom-offcanvas .menu-link { min-height: 43px; padding: 10px 12px; font-size: 14px; font-weight: 600; border-radius: 7px; }
.custom-offcanvas .sub-menu-link { font-size: 13px; padding: 8px 14px; }
.custom-offcanvas .menu-footer { padding: 14px 16px 20px; border-top: 1px solid var(--dhums-border); }
.custom-offcanvas .menu-footer svg, .custom-offcanvas .action-icon-box svg { width: 17px; height: 17px; }
.custom-offcanvas .user-section { margin: 14px; padding: 13px; border: 1px solid var(--dhums-border); border-radius: 10px; }
#footer { margin-top: 48px; background: #17191d; color: #d9dde3; }
#footer .footer-inner { padding: 44px 0 32px; }
#footer .footer-modern-grid { align-items: start; }
#footer .footer-widget { min-width: 0; }
#footer .footer-logo img { max-width: 175px; max-height: 48px; width: auto; object-fit: contain; }
#footer .footer-about, #footer .description { color: #b8bec8; font-size: 14px; line-height: 1.7; margin-top: 14px; }
#footer .widget-title { color: #fff; font-size: 16px; font-weight: 700; margin: 0 0 15px; }
#footer .footer-quick-links { list-style: none; margin: 0; padding: 0; }
#footer .footer-quick-links li { margin: 0 0 9px; }
#footer .footer-quick-links a, #footer .nav-footer a { color: #cbd0d8; font-size: 14px; text-decoration: none; }
#footer .footer-quick-links a:hover, #footer .nav-footer a:hover { color: #fff; }
#footer .newsletter-inputs { display: flex; gap: 0; }
#footer .newsletter-input { min-width: 0; height: 43px; border: 1px solid #505762; border-radius: 6px 0 0 6px; background: #242830; color: #fff; }
#footer .newsletter-input::placeholder { color: #aab1bc; }
#footer .newsletter-button { height: 43px; border-radius: 0 6px 6px 0; background: var(--dhums-accent); color: #fff; padding: 0 17px; }
#footer .footer-social-links { margin-top: 18px; }
#footer .footer-social-links a { width: 34px; height: 34px; margin: 0 7px 7px 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #2b3038; color: #e7eaf0; }
#footer .footer-copyright { border-top: 1px solid rgba(255,255,255,.18); padding: 17px 0; }
#footer .copyright { color: #b8bec8; font-size: 13px; }
#footer .nav-footer ul { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 18px; list-style: none; margin: 0; padding: 0; }
.btn-scroll-up { width: 38px; height: 38px; }
@media (max-width: 991.98px) {
  body { font-size: 14px; }
  #mega-menu-wrapper { display: none; }
}
@media (max-width: 575.98px) {
  .mobile-header { padding: 0 9px; gap: 7px; }
  .mobile-header .header-btn { width: 29px; min-width: 29px; height: 30px; }
  .mobile-header .header-logo img { max-width: min(100%, 128px); max-height: 32px; }
  #footer .footer-inner { padding: 32px 0 24px; }
  #footer .footer-widget { margin-bottom: 8px; }
  #footer .footer-copyright .row > div { text-align: left !important; }
  #footer .nav-footer ul { justify-content: flex-start; margin-top: 10px; }
  #footer .footer-social-links a { width: 31px; height: 31px; }
}

.desktop-add-post-link { color: var(--dhums-muted); font-size: 13px !important; font-weight: 600; text-decoration: none; }
.desktop-add-post-link:hover { color: var(--dhums-accent); }

#mega-menu-wrapper .navbar svg { max-width: 18px; max-height: 18px; }
.mobile-header svg { width: 18px; height: 18px; }
.custom-offcanvas svg { max-width: 18px; max-height: 18px; }
#footer .footer-social-links svg { width: 17px; height: 17px; }


/* Header polish: consistent icon controls, clean hover and balanced actions */
#mega-menu-wrapper .desktop-header-actions { gap: 15px !important; }
#mega-menu-wrapper .desktop-header-actions .desktop-login-link {
  display: inline-flex; align-items: center; min-height: 36px;
  padding: 0 4px; color: var(--bs-body-color); font-size: 14px;
  font-weight: 600; text-decoration: none; border-radius: 0;
}
#mega-menu-wrapper .desktop-header-actions .desktop-login-link:hover {
  color: var(--dhums-accent); background: transparent;
}
#mega-menu-wrapper .search-icon-btn,
#mega-menu-wrapper .theme-toggle-btn {
  width: 36px; min-width: 36px; height: 36px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%; background: transparent !important;
  color: var(--bs-body-color); box-shadow: none !important;
  transition: color .18s ease, opacity .18s ease;
}
#mega-menu-wrapper .search-icon-btn svg,
#mega-menu-wrapper .theme-toggle-btn svg {
  width: 19px !important; height: 19px !important;
  max-width: none; max-height: none; display: block;
}
#mega-menu-wrapper .search-icon-btn:hover,
#mega-menu-wrapper .theme-toggle-btn:hover,
#mega-menu-wrapper .search-icon-btn:focus-visible,
#mega-menu-wrapper .theme-toggle-btn:focus-visible {
  background: transparent !important; color: var(--dhums-accent);
  outline: none; opacity: .78;
}
#mega-menu-wrapper .search-icon-btn:active,
#mega-menu-wrapper .theme-toggle-btn:active { transform: scale(.96); }
#mega-menu-wrapper .desktop-theme-toggle { width: 36px; height: 36px; }

/* Mobile header: same-sized icons and exactly one theme-appropriate logo */
.mobile-header { gap: 8px; }
.mobile-header .header-btn {
  width: 34px; min-width: 34px; height: 34px; flex: 0 0 34px;
  border-radius: 50%; background: transparent; box-shadow: none;
}
.mobile-header .header-btn:hover,
.mobile-header .header-btn:focus-visible,
.mobile-header .header-btn:active {
  background: transparent; box-shadow: none; color: var(--dhums-accent);
}
.mobile-header .header-btn svg {
  width: 19px !important; height: 19px !important;
  max-width: none; max-height: none;
}
.mobile-header .header-logo { flex: 1 1 auto; min-width: 0; }
.mobile-header .header-logo img {
  max-width: min(100%, 138px); max-height: 34px;
}
.mobile-header .header-logo .js-logo-light { display: block !important; }
.mobile-header .header-logo .js-logo-dark { display: none !important; }
[data-bs-theme="dark"] .mobile-header .header-logo .js-logo-light { display: none !important; }
[data-bs-theme="dark"] .mobile-header .header-logo .js-logo-dark { display: block !important; }
.mobile-login-btn { margin-left: 0; }
.mobile-header #searchToggleBtn { margin-left: 0; }

/* Compact post reactions: seven reactions remain on one line on phones */
@media (max-width: 575.98px) {
  .reaction-wrapper { width: 100%; max-width: 100%; padding: 0 0 1.25rem; }
  .reaction-wrapper-title { width: 100%; font-size: 11px; margin: 0 0 9px; letter-spacing: .35px; }
  .reaction-grid {
    width: 100%; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 5px; justify-content: stretch; align-items: stretch;
  }
  .reaction-btn {
    min-width: 0; width: 100%; min-height: 66px; padding: 7px 2px;
    border-radius: 10px; gap: 2px; box-shadow: none;
  }
  .reaction-img { width: 23px; height: 23px; margin: 0 0 2px; }
  .reaction-label { font-size: 9px; line-height: 1.15; white-space: nowrap; }
  .reaction-count { font-size: 8px; line-height: 1; margin-top: 2px; }
  .reaction-btn:hover { transform: none; box-shadow: none; }
}
@media (max-width: 360px) {
  .reaction-grid { gap: 3px; }
  .reaction-btn { min-height: 62px; padding: 6px 1px; }
  .reaction-img { width: 21px; height: 21px; }
  .reaction-label { font-size: 8px; }
}


/* FINAL FIX: desktop theme toggle must remain visible in both theme states.
   Visibility is controlled by the root data-bs-theme attribute, not JS classes. */
#mega-menu-wrapper #theme-toggle.desktop-theme-toggle {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 36px !important;
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: visible !important;
  color: var(--bs-body-color) !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
#mega-menu-wrapper #theme-toggle.desktop-theme-toggle .theme-icon {
  display: none !important;
  visibility: visible !important;
  width: 19px !important;
  height: 19px !important;
  min-width: 19px !important;
  max-width: 19px !important;
  flex: 0 0 19px !important;
  stroke: currentColor !important;
  fill: none !important;
}
html:not([data-bs-theme="dark"]) #mega-menu-wrapper #theme-toggle #theme-sw-icon-moon {
  display: block !important;
}
html:not([data-bs-theme="dark"]) #mega-menu-wrapper #theme-toggle #theme-sw-icon-sun {
  display: none !important;
}
html[data-bs-theme="dark"] #mega-menu-wrapper #theme-toggle #theme-sw-icon-moon {
  display: none !important;
}
html[data-bs-theme="dark"] #mega-menu-wrapper #theme-toggle #theme-sw-icon-sun {
  display: block !important;
}
#mega-menu-wrapper #theme-toggle.desktop-theme-toggle:hover,
#mega-menu-wrapper #theme-toggle.desktop-theme-toggle:focus-visible {
  color: var(--dhums-accent) !important;
  background: transparent !important;
  outline: none !important;
  box-shadow: none !important;
}


/* DHUMS FINAL HEADER COLOR FIX — use configured Language/Primary color */
#mega-menu-wrapper .desktop-header-actions .desktop-login-link:hover,
#mega-menu-wrapper .desktop-header-actions .desktop-login-link:focus,
#mega-menu-wrapper .desktop-header-actions .desktop-login-link:active,
#mega-menu-wrapper #header-search-btn,
#mega-menu-wrapper #header-search-btn:hover,
#mega-menu-wrapper #header-search-btn:focus,
#mega-menu-wrapper #header-search-btn:focus-visible,
#mega-menu-wrapper #header-search-btn:active,
#mega-menu-wrapper #theme-toggle,
#mega-menu-wrapper #theme-toggle:hover,
#mega-menu-wrapper #theme-toggle:focus,
#mega-menu-wrapper #theme-toggle:focus-visible,
#mega-menu-wrapper #theme-toggle:active,
#mega-menu-wrapper .search-icon-btn,
#mega-menu-wrapper .search-icon-btn:hover,
#mega-menu-wrapper .search-icon-btn:focus,
#mega-menu-wrapper .search-icon-btn:focus-visible,
#mega-menu-wrapper .search-icon-btn:active,
#mega-menu-wrapper .theme-toggle-btn,
#mega-menu-wrapper .theme-toggle-btn:hover,
#mega-menu-wrapper .theme-toggle-btn:focus,
#mega-menu-wrapper .theme-toggle-btn:focus-visible,
#mega-menu-wrapper .theme-toggle-btn:active {
    color: var(--vr-theme-color) !important;
    -webkit-text-fill-color: var(--vr-theme-color) !important;
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    outline-color: var(--vr-theme-color) !important;
    opacity: 1 !important;
    -webkit-tap-highlight-color: transparent;
}
#mega-menu-wrapper #header-search-btn svg,
#mega-menu-wrapper #theme-toggle svg,
#mega-menu-wrapper .search-icon-btn svg,
#mega-menu-wrapper .theme-toggle-btn svg {
    color: var(--vr-theme-color) !important;
    stroke: currentColor !important;
    fill: none;
}

/* Mobile hamburger, always-visible login/account, and search icons */
.mobile-header .header-btn,
.mobile-header .header-btn:link,
.mobile-header .header-btn:visited,
.mobile-header .header-btn:hover,
.mobile-header .header-btn:focus,
.mobile-header .header-btn:focus-visible,
.mobile-header .header-btn:active,
.mobile-header .mobile-login-btn,
.mobile-header .mobile-login-btn:hover,
.mobile-header .mobile-login-btn:focus,
.mobile-header .mobile-login-btn:active,
.mobile-header #searchToggleBtn,
.mobile-header #searchToggleBtn:hover,
.mobile-header #searchToggleBtn:focus,
.mobile-header #searchToggleBtn:focus-visible,
.mobile-header #searchToggleBtn:active {
    color: var(--vr-theme-color) !important;
    -webkit-text-fill-color: var(--vr-theme-color) !important;
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    outline-color: var(--vr-theme-color) !important;
    opacity: 1 !important;
    -webkit-tap-highlight-color: transparent;
}
.mobile-header .header-btn svg,
.mobile-header .header-btn:hover svg,
.mobile-header .header-btn:focus svg,
.mobile-header .header-btn:active svg {
    color: var(--vr-theme-color) !important;
    stroke: currentColor !important;
    fill: none;
}
