/* Nav-bar Contact Us button — tighter padding so the menu is compact */
.button.is-navbar {
  padding: 0.45rem 0.95rem;
  letter-spacing: 0.5px;
  font-size: 0.85rem;
}

/* Klover site search — magnifying glass toggle + Pagefind overlay
   ----------------------------------------------------------------- */

/* The toggle button that replaced the old search bar */
.km-search-toggle {
  background: transparent;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s, color 0.2s;
}
.km-search-toggle svg { width: 1.25rem; height: 1.25rem; }
.km-search-toggle:hover { background: rgba(255, 255, 255, 0.18); color: #F6B028; }
/* "is-dark" variant: used where the surrounding background is light/white,
   so a white icon would be invisible. Picks up the brand teal instead. */
.km-search-toggle.is-dark { color: #004F61; }
.km-search-toggle.is-dark:hover { background: rgba(0, 79, 97, 0.08); color: #F6B028; }

/* Fixed-position overlay backdrop — brand teal at 75% opacity */
.km-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 79, 97, 0.78);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 5rem 1.25rem 1.25rem;
}
.km-search-overlay.is-open { display: flex; }
body.km-search-overlay-open { overflow: hidden; }

/* Box that contains the Pagefind UI */
.km-search-overlay__inner {
  position: relative;
  width: 100%;
  max-width: 720px;
  background: #ffffff;
  border: 2px solid #F6B028;
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
  padding: 1rem 1rem 0;
}

.km-search-overlay__close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: transparent;
  border: 0;
  font-size: 1.75rem;
  line-height: 1;
  color: #004F61;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  transition: color 0.2s;
}
.km-search-overlay__close:hover { color: #F6B028; }

/* Pagefind UI styling overrides — match Klover brand colors */
.km-search-overlay .pagefind-ui {
  --pagefind-ui-primary: #004F61;
  --pagefind-ui-text: #1a1a1a;
  --pagefind-ui-background: #ffffff;
  --pagefind-ui-border: #004F61;
  --pagefind-ui-tag: #FFF8E6;
  --pagefind-ui-border-width: 1px;
  --pagefind-ui-border-radius: 8px;
  --pagefind-ui-image-border-radius: 6px;
  --pagefind-ui-image-box-ratio: 3 / 2;
  --pagefind-ui-font: inherit;
}
.km-search-overlay .pagefind-ui__search-input {
  border: none;
  box-shadow: none;
}
.km-search-overlay .pagefind-ui__search-input:focus {
  outline: none;
  border: none;
  box-shadow: none;
}
.km-search-overlay .pagefind-ui__search-clear {
  color: #004F61;
}
.km-search-overlay .pagefind-ui__search-clear:hover {
  color: #F6B028;
}
.km-search-overlay .pagefind-ui__result-link {
  color: #004F61;
  font-weight: 600;
}
.km-search-overlay .pagefind-ui__result-link:hover {
  color: #F6B028;
}
.km-search-overlay .pagefind-ui__result-tags .pagefind-ui__result-tag {
  color: #004F61;
}
.km-search-overlay .pagefind-ui__results-area {
  max-height: calc(100vh - 14rem);
  overflow-y: auto;
}
.km-search-overlay .pagefind-ui__button {
  background: #004F61;
  color: #ffffff;
  border: 0;
}
.km-search-overlay .pagefind-ui__button:hover {
  background: #F6B028;
}

/* Sanity blog results section (lives below the Pagefind results in the modal) */
.km-search-blog {
  margin-top: 1rem;
  border-top: 1px solid #d8d8d8;
  padding: 1rem 0;
  max-height: 40vh;
  overflow-y: auto;
}
.km-search-blog__heading {
  margin: 0 0 0.6rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #004F61;
}
.km-search-blog__results { display: flex; flex-direction: column; gap: 0.55rem; }
.km-search-blog__item {
  display: block;
  padding: 0.55rem 0.7rem;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s, color 0.15s;
}
.km-search-blog__item:hover {
  background: #FFF8E6;
  color: #004F61;
}
.km-search-blog__title {
  font-weight: 600;
  color: #004F61;
  font-size: 0.95rem;
  line-height: 1.3;
}
.km-search-blog__item:hover .km-search-blog__title { color: #F6B028; }
.km-search-blog__summary {
  margin-top: 0.2rem;
  font-size: 0.85rem;
  color: #555;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.km-search-blog__empty {
  margin: 0;
  font-size: 0.9rem;
  color: #666;
  font-style: italic;
}
