body:has(.mobile-menu:popover-open) { overflow: hidden; }

:where(.site-header, .mobile-menu) :where(p, a, span, button) {
  min-inline-size: 0;
  overflow-wrap: anywhere;
}

body > .site-header {
  --font-display: "Stem", "Century Gothic", Arial, sans-serif;
  --font-body: "Century Gothic", "Trebuchet MS", Arial, sans-serif;
  position: var(--site-header-position, absolute);
  z-index: 50;
  top: 0;
  left: 0;
  display: grid;
  width: 100%;
  min-height: 85px;
  grid-template-columns: 141px 170px minmax(500px, 1fr) max-content 160px;
  align-items: center;
  gap: 20px;
  padding: 0 max(var(--gutter), calc((100% - var(--shell)) / 2));
  border: 0;
  background: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.42;
}

body > .site-header .brand {
  display: block;
  width: 141px;
  height: 56px;
  background: currentColor;
  -webkit-mask: url('../../media/home-desktop/imgDentix2Page13Image2.png') center / contain no-repeat;
  mask: url('../../media/home-desktop/imgDentix2Page13Image2.png') center / contain no-repeat;
}

body > .site-header .brand--blue { color: var(--blue); }
body > .site-header .header-address { display: block; margin: 0; font-size: 12px; line-height: 1.3; }

body > .site-header .desktop-nav {
  position: relative;
  left: -28px;
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  flex-wrap: nowrap;
  gap: 25px;
  font-size: 14px;
  text-transform: uppercase;
  white-space: nowrap;
}

body > .site-header .desktop-nav a,
body > .site-header .header-phone { transition: opacity .2s ease; }
@media (hover: hover) {
  body > .site-header .desktop-nav a:hover,
  body > .site-header .header-phone:hover { opacity: .55; }
}
body > .site-header .desktop-nav a.is-current {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 7px;
}

body > .site-header .header-phone {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  text-transform: uppercase;
  white-space: nowrap;
}

body > .site-header .header-appointment {
  --corner-color: var(--blue);
  --corner-hover-color: #fff;
  --corner-inset: -1px;
  position: relative;
  display: flex;
  width: 160px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin: 0;
  padding: 0;
  color: var(--text);
  background: transparent;
  border: 1px solid #c4c4c1;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
}

body > .site-header .header-appointment .button__arrow { display: none; }
body > .site-header button { font-family: var(--font-display); }
body > .site-header .header-appointment::before {
  position: absolute;
  width: 10px;
  height: 10px;
  background: transparent;
  pointer-events: none;
  content: "";
  transform-origin: center;
}
body > .site-header .header-appointment::after {
  position: absolute;
  width: 10px;
  height: 10px;
  background: transparent;
  pointer-events: none;
  content: "";
  transform-origin: center;
}
body > .site-header .header-appointment::before {
  top: calc(100% - var(--corner-inset) - 10px);
  left: -2px;
  border-bottom: 2px solid var(--corner-color);
  border-left: 2px solid var(--corner-color);
}
body > .site-header .header-appointment::after {
  top: -2px;
  left: calc(100% - var(--corner-inset) - 10px);
  border-top: 2px solid var(--corner-color);
  border-right: 2px solid var(--corner-color);
}
@media (hover: hover) {
  body > .site-header .header-appointment:hover {
    --corner-color: #fff;
    color: #fff;
    background: var(--blue);
    border-color: var(--blue);
  }
  body > .site-header .header-appointment:hover::before {
    animation: header-corner-before-clockwise .58s cubic-bezier(.45, 0, .2, 1) both;
  }
  body > .site-header .header-appointment:hover::after {
    animation: header-corner-after-clockwise .58s cubic-bezier(.45, 0, .2, 1) both;
  }
}
body > .site-header .header-appointment:focus-visible {
  --corner-color: #fff;
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}
body > .site-header .header-appointment:focus-visible::before {
  animation: header-corner-before-clockwise .58s cubic-bezier(.45, 0, .2, 1) both;
}
body > .site-header .header-appointment:focus-visible::after {
  animation: header-corner-after-clockwise .58s cubic-bezier(.45, 0, .2, 1) both;
}

@keyframes header-corner-before-clockwise {
  0% { top: calc(100% - var(--corner-inset) - 10px); left: var(--corner-inset); transform: rotate(0); }
  50% { top: var(--corner-inset); left: var(--corner-inset); transform: rotate(90deg); }
  100% { top: var(--corner-inset); left: calc(100% - var(--corner-inset) - 10px); transform: rotate(180deg); }
}

@keyframes header-corner-after-clockwise {
  0% { top: var(--corner-inset); left: calc(100% - var(--corner-inset) - 10px); transform: rotate(0); }
  50% { top: calc(100% - var(--corner-inset) - 10px); left: calc(100% - var(--corner-inset) - 10px); transform: rotate(90deg); }
  100% { top: calc(100% - var(--corner-inset) - 10px); left: var(--corner-inset); transform: rotate(180deg); }
}

body > .site-header .menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 12px 8px;
  background: none;
  border: 0;
}
body > .site-header .menu-toggle span { display: block; height: 1px; margin: 5px 0; background: var(--blue); }

.mobile-menu {
  position: fixed;
  z-index: 90;
  inset: 0 0 auto auto;
  width: min(354px, calc(100% - 76px));
  height: 100dvh;
  margin: 0;
  flex-direction: column;
  padding: 84px 28px 30px;
  background: var(--white);
  border: 0;
  box-shadow: -25px 0 60px rgba(1,15,119,.12);
  overflow-y: auto;
}
.mobile-menu:popover-open { display: flex; animation: mobile-menu-in .35s ease both; }
.mobile-menu::backdrop { background: rgba(15,18,42,.42); animation: mobile-menu-backdrop-in .35s ease both; }
@keyframes mobile-menu-in { from { transform: translateX(102%); } to { transform: translateX(0); } }
@keyframes mobile-menu-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
.menu-close {
  position: absolute;
  top: 24px;
  right: 25px;
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--blue);
  background: none;
  border: 0;
  font-size: 35px;
  font-weight: 200;
  line-height: 1;
}
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu nav a { padding: 13px 0; border-bottom: 1px solid #eaeaea; font-family: var(--font-display); font-size: 20px; }
.mobile-menu nav a.is-current { color: var(--blue); }
.mobile-menu__bottom { display: flex; flex-direction: column; gap: 22px; margin-top: auto; }
.mobile-menu__bottom > a:not(.button) { font-family: var(--font-display); font-size: 15px; }

@media (max-width: 1359px) and (min-width: 768px) {
  body > .site-header {
    min-height: 76px;
    grid-template-columns: 141px 1fr max-content 48px;
    gap: 18px;
    padding-inline: 32px;
  }
  body > .site-header .brand { width: 130px; height: 52px; }
  body > .site-header .header-address,
  body > .site-header .desktop-nav { display: none; }
  body > .site-header .header-phone { display: block; justify-self: end; font-size: 14px; }
  body > .site-header .header-appointment { display: flex; width: 160px; }
  body > .site-header .menu-toggle { display: block; width: 48px; height: 44px; border: 1px solid #c4c4c1; }
}

@media (max-width: 767px) {
  body > .site-header {
    display: grid;
    min-height: 70px;
    grid-template-columns: minmax(0, 1fr) 160px 44px;
    gap: 10px;
    padding-inline: 20px;
  }
  body > .site-header .brand { align-self: start; width: 121px; height: 48px; margin-top: 14px; }
  body > .site-header .header-address,
  body > .site-header .desktop-nav,
  body > .site-header .header-phone { display: none; }
  body > .site-header .header-appointment { align-self: start; display: flex; width: 160px; min-height: 44px; margin-top: 16px; font-size: 14px; }
  body > .site-header .menu-toggle { align-self: start; display: block; width: 44px; height: 44px; margin-top: 16px; border: 1px solid #c4c4c1; }
  body > .site-header .menu-toggle span { background: #303030; }
  body > .site-header .brand {
    -webkit-mask-image: url('../../media/home-mobile/imgDentix2Page13Image3.png');
    mask-image: url('../../media/home-mobile/imgDentix2Page13Image3.png');
  }
}

@media (max-width: 410px) {
  body > .site-header { grid-template-columns: minmax(0, 1fr) 150px 44px; padding-inline: 14px; }
  body > .site-header .header-appointment { width: 150px; padding-left: 18px; }
  body > .site-header .brand { width: 110px; }
}

@media (max-width: 390px) {
  body > .site-header .header-appointment { padding-left: 0; }
}

@media (max-width: 340px) {
  body > .site-header { grid-template-columns: minmax(0, 1fr) 44px; }
  body > .site-header .header-appointment { display: none; }
}
