@font-face {
  font-family: "Sanri Menu";
  src: url("menu-font.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

#header.sanri-hd {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid #f0eae6;
  background: rgba(255,255,255,.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: #222;
  font: 400 16px/1.35 Arial, sans-serif;
  text-align: left;
}

.sanri-hd *, .sanri-hd *::after { box-sizing: border-box; }
.sanri-hd .sanri-hd-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
}
.sanri-hd a { color: inherit; text-decoration: none; }
.sanri-hd :is(a,summary):focus-visible { outline: 2px solid #a32252; outline-offset: 3px; border-radius: 4px; }
.sanri-hd .sanri-hd-brand { flex: 0 1 auto; min-width: 208px; }
.sanri-hd-brand > a { display: block; width: fit-content; }
.sanri-hd .sanri-hd-logo { display: block; width: auto; height: 40px; max-width: none; object-fit: contain; border: 0; }
.sanri-hd-region { display: block; margin-top: 2px; color: #666; font-size: 11.5px; line-height: 1.25; white-space: nowrap; }
.sanri-hd nav { min-width: 0; }
.sanri-hd .sanri-hd-links { display: flex; align-items: center; gap: clamp(6px, .8vw, 11px); padding: 0; margin: 0; list-style: none; }
.sanri-hd-links > li { flex: none; padding: 0; margin: 0; list-style: none; }
.sanri-hd .sanri-hd-links a {
  position: relative;
  display: block;
  padding: 10px 0;
  color: #222;
  font: 500 14.5px/1.25 Arial,sans-serif;
  white-space: nowrap;
  transition: color .16s ease;
}
.sanri-hd-links a::after {
  content: "";
  position: absolute;
  bottom: 5px;
  inset-inline: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transition: transform .16s ease;
}
.sanri-hd .sanri-hd-links :is(.current-menu-item > a, [aria-current="page"], a:hover, a:focus-visible) { color: #d83a6f; }
.sanri-hd-links :is(.current-menu-item > a, [aria-current="page"], a:hover, a:focus-visible)::after { transform: scaleX(1); }
.sanri-hd-actions { display: flex; flex: none; align-items: center; gap: 10px; }
.sanri-hd-contact { display: grid; gap: 2px; }
.sanri-hd .sanri-hd-phone { color: #1a1a1a; font-size: 16px; font-weight: 700; white-space: nowrap; }
.sanri-hd .sanri-hd-phone:hover { color: #b82859; }
.sanri-hd-operator { color: #777; font-size: 12px; }
.sanri-hd .sanri-hd-viber {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid #e2d9f3;
  border-radius: 10px;
  background: #f4f0fa;
  color: #7360f2;
  font-size: 14px;
  font-weight: 600;
}
.sanri-hd .sanri-hd-viber:hover, .sanri-hd .sanri-hd-viber:focus-visible { color: #fff; background: #7360f2; }
.sanri-hd :is(.sanri-hd-phone-symbol,.sanri-hd-viber-symbol,.sanri-hd-menu,.sanri-hd-cross) { display: none; }
.sanri-hd .sanri-hd-skip { position: absolute; left: 8px; top: 0; transform: translateY(-150%); z-index: 2; padding: 10px; background: #fff; }
.sanri-hd .sanri-hd-skip:focus { transform: none; }
html:has(.sanri-hd) { scroll-padding-top: 88px; }
@media (min-width: 601px) {
  .admin-bar #header.sanri-hd { top: var(--wp-admin--admin-bar--height,32px); }
}

/* Keep all seven links visible on small desktop screens. */
@media (min-width: 993px) and (max-width: 1199px) {
  .sanri-hd .sanri-hd-inner { gap: 12px; padding-inline: 12px; }
  .sanri-hd .sanri-hd-links { gap: 7px; }
}
@media (min-width: 993px) and (max-width: 1099px) {
  .sanri-hd .sanri-hd-brand { flex: none; }
  .sanri-hd .sanri-hd-region, .sanri-hd .sanri-hd-links a { font-family: "Sanri Menu", "Arial Narrow", Arial, sans-serif; }
  .sanri-hd .sanri-hd-actions { gap: 6px; }
}

@media (max-width: 992px) {
  html:has(.sanri-hd) { scroll-padding-top: 66px; }
  .sanri-hd .sanri-hd-inner { gap: 8px; padding: 5px 16px; }
  .sanri-hd .sanri-hd-brand { min-width: 0; }
  .sanri-hd .sanri-hd-logo { height: 32px; }
  .sanri-hd :is(.sanri-hd-region,.sanri-hd-operator,.sanri-hd-number,.sanri-hd-viber-label) { display: none; }
  .sanri-hd .sanri-hd-actions { gap: 6px; }
  .sanri-hd .sanri-hd-menu { display: block; padding: 0; margin: 0; }
  .sanri-hd :is(.sanri-hd-phone,.sanri-hd-viber,summary) {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border-radius: 12px;
    cursor: pointer;
  }
  .sanri-hd .sanri-hd-viber { padding: 0; }
  .sanri-hd .sanri-hd-phone { color: #27573c; background: #eef5ef; }
  .sanri-hd summary { list-style: none; color: #252425; }
  .sanri-hd summary::-webkit-details-marker { display: none; }
  .sanri-hd :is(.sanri-hd-phone-symbol,.sanri-hd-viber-symbol,summary svg) { display: block; width: 22px; height: 22px; }
  .sanri-hd .sanri-hd-menu[open] .sanri-hd-bars { display: none; }
  .sanri-hd .sanri-hd-menu[open] .sanri-hd-cross { display: inline; }
  .sanri-hd .sanri-hd-nav {
    position: absolute;
    inset: 100% 0 auto;
    max-height: calc(100dvh - 60px - var(--wp-admin--admin-bar--height,0px));
    overflow: auto;
    overscroll-behavior: contain;
    padding: 8px 16px 12px;
    border: 1px solid #f0eae6;
    border-radius: 0 0 16px 16px;
    background: #fff;
    box-shadow: 0 12px 24px rgba(47,27,34,.09);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity .16s, transform .16s, visibility 0s linear .16s;
  }
  .sanri-hd:has(.sanri-hd-menu[open]) .sanri-hd-nav { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .sanri-hd .sanri-hd-links { display: block; }
  .sanri-hd .sanri-hd-links a { display: flex; align-items: center; min-height: 44px; width: fit-content; max-width: 100%; padding: 8px 1px; white-space: normal; font: 500 16px/1.35 Arial,sans-serif; }
}
@media (max-width: 360px) {
  .sanri-hd .sanri-hd-inner { gap: 4px; padding-inline: 6px; }
  .sanri-hd .sanri-hd-actions { gap: 1px; }
}
@media (max-width: 800px) {
  body:has(.sanri-hd) #toTop { display: none !important; }
  html.sanri-hd-form-notice .grecaptcha-badge { visibility: hidden !important; }
  .wpcf7 form .sanri-hd-form-note { margin: 8px 0; color: #4d554f; font: 400 13px/1.45 Arial,sans-serif; }
}
@media (prefers-reduced-motion: reduce) {
  .sanri-hd *, .sanri-hd *::after { transition: none !important; }
}
