/* Keep the search strip readable while the navigation below it shrinks on scroll. */
html.has-site-search {
  --topline-expanded: 52px;
  --masthead-expanded: calc(var(--topline-expanded) + var(--header-expanded));
  --masthead-compact: calc(var(--topline-expanded) + var(--header-expanded) * .7);
}
.has-site-search .site-masthead .topline {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 20px;
  height: var(--topline-expanded);
}
.has-site-search .site-masthead .topline > span { white-space: normal; }
.has-site-search .site-masthead .topline-right { justify-content: flex-end; gap: 12px; min-width: 0; }
.has-site-search .site-search { justify-self: center; max-width: 560px; }
.site-search {
  position: relative;
  width: 100%;
  min-width: 0;
  margin: 0;
  color: var(--ci-ink);
  font-family: var(--ci-body);
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0;
}
.site-search-field {
  display: flex;
  align-items: stretch;
  height: 36px;
  border: 1px solid #ffffff80;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 2px 8px #003c6e14;
}
.site-search-field:focus-within { outline: 2px solid var(--ci-sun); outline-offset: 2px; }
.site-search input {
  width: 100%;
  min-width: 0;
  padding: 6px 12px;
  border: 0;
  border-radius: 7px 0 0 7px;
  color: var(--ci-ink);
  background: transparent;
  font: inherit;
  outline: none;
}
.site-search input::placeholder { color: #526779; opacity: 1; }
.site-search button {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  padding: 0;
  border: 0;
  border-radius: 0 6px 6px 0;
  color: var(--ci-navy);
  background: var(--ci-sun);
}
.site-search button:hover { background: #ffdc85; }
.site-search button:focus-visible { outline-offset: -4px; outline-color: var(--ci-navy); }
.site-search-panel {
  position: absolute;
  top: calc(100% + 9px);
  left: 0;
  width: 100%;
  max-height: min(460px, calc(100dvh - var(--topline-expanded) - 24px));
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-padding-block: 6px;
  border: 1px solid var(--ci-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 32px #003c6e40;
  overflow-wrap: anywhere;
}
.site-search-summary { margin: 0; padding: 13px 15px; color: #435c70; font-size: 12px; }
.site-search-results { margin: 0; padding: 0 5px 5px; list-style: none; }
.site-search-results:empty { display: none; }
.site-search-results li + li { border-top: 1px solid #e9eff3; }
.topline .site-search-results a {
  display: grid;
  gap: 4px;
  padding: 12px 10px;
  border-radius: 6px;
  color: var(--ci-navy);
  text-decoration: none;
}
.topline .site-search-results a:hover,
.topline .site-search-results a:focus-visible { color: var(--ci-navy); background: #edf7fc; outline-offset: -3px; }
.site-search-results strong { font-size: 15px; font-weight: 700; }
.site-search-category { color: #46657c; font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.site-search-description { color: #435c70; font-size: 12px; line-height: 1.5; }
.search-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

@media (max-width: 1699px) {
  .has-site-search .topline-right > .topline-facebook { width: 34px; height: 34px; padding: 0; justify-content: center; flex: none; }
  .has-site-search .topline-facebook > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .has-site-search .topline .language-flags { gap: 6px; padding-left: 10px; }
  .has-site-search .topline .language-flag img { width: 24px; height: 17px; }
}
@media (max-width: 1399px) {
  html.has-site-search { --topline-expanded: 104px; }
  .has-site-search .site-masthead .topline {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "contacts" "search";
    gap: 8px;
    padding-block: 8px;
  }
  .has-site-search .site-masthead .topline > span { display: none; }
  .has-site-search .site-masthead .topline-right { grid-area: contacts; width: 100%; justify-content: center; }
  .site-search { grid-area: search; font-size: 16px; }
  .site-search-field { height: 44px; }
  .site-search button { flex-basis: 44px; }
}
@media (max-width: 600px) {
  html.has-site-search { --topline-expanded: 132px; }
  .has-site-search .site-masthead .topline-right { display: grid; grid-template-columns: 1fr auto auto; gap: 5px 10px; }
  .has-site-search .topline .topline-whatsapp { justify-self: start; }
  .has-site-search .topline .language-flags { grid-column: 1 / -1; justify-content: center; gap: 10px; padding-left: 0; border: 0; }
  .has-site-search .topline .language-flag img { width: 24px; height: 17px; }
}
@media (max-width: 359px) {
  .has-site-search .site-masthead .topline { padding-inline: 12px; }
  .has-site-search .site-masthead .topline-whatsapp { font-size: 11px; gap: 4px; padding-inline: 5px; }
  .has-site-search .site-masthead .topline-right { gap: 4px; }
  .has-site-search .topline .language-flags { gap: 10px; padding-left: 0; }
}
