/* Dual-language content visibility */
html[data-lang="en"] .lang-id,
html:not([data-lang="id"]) .lang-id {
  display: none !important;
}
html[data-lang="id"] .lang-en {
  display: none !important;
}
html[data-lang="en"] span.lang-id,
html:not([data-lang="id"]) span.lang-id {
  display: none !important;
}
html[data-lang="id"] span.lang-en {
  display: none !important;
}

/* Language Switcher Navbar Button */
.lang-switch-item {
  display: flex;
  align-items: center;
}
.lang-switch-item #dropdown-langswitch {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.92rem;
  padding: 0.5rem 0.65rem;
  background: transparent;
  border: none;
  cursor: pointer;
}
#lang-current-label {
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
}
.lang-select-btn {
  display: flex;
  align-items: center;
  font-size: 0.88rem;
  padding: 0.45rem 1rem;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  transition: background 0.15s ease;
}
.lang-select-btn:hover {
  background-color: rgba(29, 106, 92, 0.1);
}
.lang-select-btn.active {
  background-color: #1D6A5C !important;
  color: #ffffff !important;
  font-weight: 600;
}
/* Ensure good contrast across themes */
[data-bs-theme="light"] #dropdown-langswitch,
:root:not([data-bs-theme="dark"]) #dropdown-langswitch {
  color: #ffffff !important;
}
[data-bs-theme="dark"] #dropdown-langswitch {
  color: rgba(255, 255, 255, 0.75) !important;
}
[data-bs-theme="dark"] #dropdown-langswitch:hover {
  color: #ffffff !important;
}

/* Package version in navbar is white when theme is light */
[data-bs-theme="light"] .navbar .nav-text,
:root:not([data-bs-theme="dark"]) .navbar .nav-text {
  color: #ffffff !important;
}
/* Hide logo on all pages by default (articles, reference, etc.) */
img.logo {
  display: none !important;
}
/* Prevent page-header border from cutting the logo */
.page-header {
  border-bottom: none !important;
}
.template-home .page-header {
  border-bottom: none !important;
  margin-bottom: 2rem !important;
  padding-bottom: 0.75rem !important;
  min-height: 140px !important;
}
.template-home .page-header::after {
  content: "";
  display: table;
  clear: both;
}
/* Show logo ONLY on homepage header */
.template-home .page-header img.logo {
  display: block !important;
  float: right !important;
  width: 125px !important;
  height: auto !important;
  margin-left: 1.5rem !important;
  margin-bottom: 1.5rem !important;
  border: none !important;
  box-shadow: none !important;
}
.template-home .page-header h1 {
  padding-top: 0.75rem !important;
  line-height: 1.3 !important;
}
/* Ample spacing between package title/logo and description paragraph */
.template-home .section.level1 > p:first-of-type,
.template-home .page-header + p {
  margin-top: 1.75rem !important;
  margin-bottom: 2.25rem !important;
  font-size: 1.15rem !important;
  line-height: 1.8 !important;
  clear: both !important;
}
.template-home hr {
  margin-top: 2rem !important;
  margin-bottom: 2rem !important;
  opacity: 0.15 !important;
}
