/* Drupal-specific adjustments for the new home design (kh-home.css is generated; keep fixes here). */
.kh-asset-card__img,
.kh-asset-card__img > *,
.kh-asset-card__img img {
  width: 100%;
  height: 100%;
}
.kh-asset-card__img img {
  object-fit: cover;
  transition: transform 0.7s;
}
.kh-asset-card:hover .kh-asset-card__img img {
  transform: scale(1.05);
}
.kh-newsletter form {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}
.kh-newsletter .form-item {
  flex: 1;
  margin: 0;
}
.kh-newsletter input[type="email"],
.kh-newsletter input[type="text"] {
  width: 100%;
  border-radius: 9999px;
  border: 1px solid rgb(255 255 255 / 0.2);
  background: transparent;
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  color: inherit;
}
.kh-newsletter input[type="submit"],
.kh-newsletter button {
  border: 0;
  border-radius: 9999px;
  background: var(--signal);
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
}
.visually-hidden,
.visually-hidden-focusable:not(:focus):not(:focus-within) {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* Header tools: language, accessibility toggle, login / profile */
.kh-tools {
  position: relative;
}
.kh-dd {
  position: relative;
}
.kh-dd > summary {
  list-style: none;
  cursor: pointer;
}
.kh-dd > summary::-webkit-details-marker {
  display: none;
}
.kh-dd__menu {
  position: absolute;
  left: 0;
  top: calc(100% + 0.5rem);
  z-index: 60;
  min-width: 9rem;
  margin: 0;
  padding: 0.5rem;
  list-style: none;
  background: var(--popover, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 0.75rem;
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.15);
}
.kh-dd--right .kh-dd__menu {
  left: auto;
  right: 0;
}
.kh-dd__menu--wide {
  min-width: 15rem;
}
.kh-dd__menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
}
.kh-dd__menu a:hover,
.kh-dd__menu a.is-active {
  background: var(--leaf-soft, #eef6ee);
}
.kh-dd__head {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border, #e5e7eb);
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
}
.kh-dd__head small {
  opacity: 0.7;
}
.kh-dd__sep {
  border-top: 1px solid var(--border, #e5e7eb);
  margin-top: 0.25rem;
  padding-top: 0.25rem;
}
.kh-dd__badge {
  border-radius: 9999px;
  background: #185fa5;
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
}
.kh-user,
.a11y-toolbar__toggle {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 2.5rem !important;
  height: 2.5rem !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 9999px !important;
  background: var(--ink, #16313a) !important;
  color: #fff !important;
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.18s ease;
}
.kh-user:hover,
.a11y-toolbar__toggle:hover,
.kh-lang:hover {
  background: var(--signal, #e8531f) !important;
  color: #fff !important;
  transform: translateY(-1px);
}
.kh-user svg {
  width: 1.375rem !important;
  height: 1.375rem !important;
  stroke: currentColor;
}
.kh-lang {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  height: 2.5rem;
  padding: 0 1rem;
  border-radius: 9999px;
  background: var(--ink, #16313a);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  transition: background-color 0.18s ease, transform 0.18s ease;
}
.kh-lang::after {
  content: "";
  border: 0.3em solid transparent;
  border-top-color: currentColor;
  border-bottom: 0;
}
.kh-user__initials {
  color: #fff !important;
  font-size: 0.8rem;
  font-weight: 600;
}
.a11y-toolbar__toggle i {
  font-size: 1.25rem;
  color: #fff !important;
}

/* Header search (shown on every page) */
.kh-search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.kh-search-panel {
  border-top: 1px solid var(--border);
  background: var(--background, #fff);
  padding: 1rem 0;
}
.kh-search-panel[hidden] {
  display: none;
}
.kh-search-panel form {
  display: flex;
  gap: 0.5rem;
}
.kh-search-panel__input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
}
.kh-search-panel__btn {
  border: 0;
  border-radius: 9999px;
  background: var(--signal);
  color: #fff;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
}

.kh-newsletter label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.kh-newsletter input::placeholder {
  color: rgb(255 255 255 / 0.5);
}

/* Keep headings/links in the shared header and footer independent of page-level styles. */
.kh-shell.kh-shell :is(h1, h2, h3, h4, h5, h6) {
  color: inherit;
  font-family: inherit;
  text-transform: none;
  letter-spacing: normal;
}

/* The wrapping <header> in page templates must not limit the sticky header. */
header:has(> header.kh-shell) {
  display: contents;
}

/* Header layout: keep everything on one line and match the live site's tools. */
.kh-shell.kh-shell nav a,
.kh-shell.kh-shell nav button,
.kh-shell.kh-shell .kh-tools,
.kh-shell.kh-shell .kh-lang {
  white-space: nowrap;
}
.kh-shell.kh-shell nav[aria-label="Main"] {
  gap: 0.125rem;
}
.kh-shell.kh-shell nav[aria-label="Main"] > a,
.kh-shell.kh-shell nav[aria-label="Main"] > .group > button {
  padding-left: 0.5rem !important;
  padding-right: 0.5rem !important;
}
.kh-shell.kh-shell .kh-tools {
  flex-shrink: 0;
  gap: 0.5rem;
}


.kh-shell.kh-shell .kh-lang {
  min-width: 3.5rem;
  justify-content: center;
}

.kh-shell.kh-shell .kh-logo {
  height: 3rem !important;
  width: auto !important;
  max-width: none !important;
}

/* Header tools: match the new design (outlined language pill, 32px dark round buttons). */
.kh-shell.kh-shell .kh-logo {
  height: 3.5rem !important;
}
.kh-shell.kh-shell .kh-tools {
  gap: 0.5rem;
}
.kh-shell.kh-shell .kh-lang {
  display: inline-flex !important;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
  height: auto !important;
  padding: 0.375rem 0.75rem !important;
  border: 1px solid var(--border, #e5e7eb) !important;
  border-radius: 9999px !important;
  background: transparent !important;
  color: inherit !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  transform: none !important;
}
.kh-shell.kh-shell .kh-lang::after {
  display: none;
}
.kh-shell.kh-shell .kh-lang:hover {
  background: transparent !important;
  color: var(--signal, #e8531f) !important;
}
.kh-shell.kh-shell .kh-user,
.kh-shell.kh-shell .a11y-toolbar__toggle,
.kh-shell.kh-shell .kh-search-toggle {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 2rem !important;
  height: 2rem !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 9999px !important;
  transform: none !important;
}
.kh-shell.kh-shell .kh-user,
.kh-shell.kh-shell .a11y-toolbar__toggle {
  background: var(--ink, #16313a) !important;
  color: var(--ink-foreground, #fff) !important;
}
.kh-shell.kh-shell .kh-user:hover,
.kh-shell.kh-shell .a11y-toolbar__toggle:hover {
  background: var(--signal, #e8531f) !important;
  color: #fff !important;
}
.kh-shell.kh-shell .kh-search-toggle {
  background: transparent !important;
  color: inherit !important;
}
.kh-shell.kh-shell .kh-search-toggle:hover {
  color: var(--signal, #e8531f) !important;
}
.kh-shell.kh-shell .kh-icon {
  width: 1rem !important;
  height: 1rem !important;
}
.kh-shell.kh-shell .kh-icon--sm {
  width: 0.875rem !important;
  height: 0.875rem !important;
}
.kh-shell.kh-shell .kh-search-toggle .h-5 {
  width: 1.25rem !important;
  height: 1.25rem !important;
}
.kh-shell.kh-shell .a11y-toolbar__toggle i {
  font-size: 1rem !important;
}

/* The mobile search button only shows below the lg breakpoint (the desktop one lives in .kh-tools). */
.kh-shell.kh-shell .kh-search-toggle--mobile {
  display: none !important;
}
@media (max-width: 63.999rem) {
  .kh-shell.kh-shell .kh-search-toggle--mobile {
    display: inline-flex !important;
  }
}

/* Hero stat tiles are links. */
.kh-stat {
  display: block;
  transition: background-color 0.2s ease;
}
.kh-stat:hover {
  background-color: var(--ink);
}
.kh-stat:hover > div:first-child {
  color: var(--signal);
}

/* Mobile header: logo on the left, search + menu buttons grouped on the right (not floating in the middle). */
@media (max-width: 63.999rem) {
  .kh-shell.kh-shell .kh-search-toggle--mobile {
    margin-left: auto;
    margin-right: 0.25rem;
  }
}

/* Footer "Stay Connected" form: style.css offsets the submit button (top:10px, margin below the actions wrapper) on inner pages. */
.kh-shell.kh-shell form.webform-submission-form { align-items: flex-start; }
.kh-shell.kh-shell form.webform-submission-form .form-actions { margin: 0 !important; }
.kh-shell.kh-shell form.webform-submission-form .webform-button--submit {
  position: static !important;
  top: 0 !important;
  margin: 0 !important;
}

/* style.css sets a global `p { color; font-size; margin }`, which beats the colour/size the footer copyright and
   breadcrumb inherit from their dark containers on inner pages. Let those paragraphs inherit instead. */
footer.kh-shell p,
[class*="crumb"] p {
  color: inherit;
  font-size: inherit;
  line-height: inherit;
  margin: 0;
}

/* style.css fades every hovered link (`a:hover { opacity: .8 }`). When the link wraps a whole card that washes out the
   card on hover, so keep card links fully opaque. */
a[class*="card"]:hover {
  opacity: 1;
}

/* Search buttons show the pointer cursor (the reset leaves them on the default arrow, which reads as disabled). */
form[role="search"] button[type="submit"],
form[role="search"] button:not([type]) {
  cursor: pointer;
}
