.header-8 {
  position: relative;
  z-index: 80;
  background: #ffffff;
}

.header-8__masthead {
  padding: 12px 0 14px;
  background: #ffffff;
}

.header-8__masthead-inner {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) auto minmax(160px, 1fr);
  align-items: start;
  gap: 24px;
}

.header-8__contact {
  padding-top: 4px;
  color: #6b6f76;
  font-family: "Poppins", sans-serif;
}

.header-8__phone {
  display: inline-block;
  margin-bottom: 4px;
  color: #383b41;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.header-8__address {
  margin: 0;
  font-size: 14px;
  font-style: italic;
  line-height: 1.45;
}

.header-8__brand {
  display: inline-flex;
  justify-self: center;
  align-items: center;
}

.header-8__brand img {
  display: block;
  width: clamp(96px, 8vw, 148px);
}

.header-8__social {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 20px;
  padding-top: 6px;
}

.header-8__social a {
  color: #111111;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.header-8__social a:hover {
  opacity: 0.75;
  transform: translateY(-1px);
}

.header-8__social svg {
  width: 19px;
  height: 19px;
}

.header-8__navband {
  background: #fff09b;
  box-shadow: 0 7px 18px rgba(24, 27, 33, 0.36);
}

.header-8__navband-inner {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 66px;
}

.header-8__nav {
  width: 100%;
}

.header-8__toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 0;
  background: transparent;
  padding: 0;
}

.header-8__toggle span {
  display: block;
  width: 27px;
  height: 3px;
  margin: 5px auto;
  border-radius: 999px;
  background: #2f3136;
}

.header-8__menu {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(20px, 3vw, 48px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.header-8__item {
  position: relative;
}

.header-8__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 8px;
  border: 0;
  background: transparent;
  color: #41454c;
  font-family: "Poppins", sans-serif;
  font-size: clamp(15px, 1.35vw, 18px);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.header-8__item.is-active > .header-8__link {
  padding: 12px 30px;
  border-radius: 999px;
  background: #2f3136;
  color: #ffffff;
}

.header-8__link:hover {
  color: #2f3136;
}

.header-8__caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.header-8__caret svg {
  width: 14px;
  height: 14px;
}

.header-8__submenu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 250px;
  padding: 12px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 22px 34px rgba(24, 27, 33, 0.16);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.header-8__submenu-link {
  display: block;
  padding: 8px 10px;
  border-radius: 14px;
  color: #3c4047;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.header-8__submenu-link:hover {
  background: #fff6c3;
}

.header-8__item--services.is-open > .header-8__submenu,
.header-8__item--services:focus-within > .header-8__submenu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.header-8__item--services.is-open > .header-8__link .header-8__caret {
  transform: rotate(180deg);
}

@media (max-width: 980px) {
  .header-8__masthead {
    padding: 12px 0;
  }

  .header-8__masthead-inner {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand social"
      "contact contact";
    align-items: center;
  }

  .header-8__brand {
    grid-area: brand;
    justify-self: start;
  }

  .header-8__social {
    grid-area: social;
    padding-top: 0;
  }

  .header-8__contact {
    grid-area: contact;
  }

  .header-8__navband-inner {
    min-height: 58px;
  }

  .header-8__toggle {
    position: absolute;
    top: 50%;
    right: 0;
    z-index: 3;
    display: block;
    transform: translateY(-50%);
  }

  .header-8__menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: auto;
    display: none;
    width: min(360px, calc(100vw - 32px));
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin: 0;
    padding: 16px;
    border-radius: 24px;
    background: #fff7bf;
    box-shadow: 0 18px 30px rgba(24, 27, 33, 0.18);
    text-align: left;
  }

  .header-8__menu.is-open {
    display: flex;
  }

  .header-8__item {
    width: 100%;
  }

  .header-8__link,
  .header-8__item.is-active > .header-8__link {
    justify-content: space-between;
    width: 100%;
    min-height: 0;
    padding: 16px 18px;
    border-radius: 16px;
    font-size: 18px;
  }

  .header-8__submenu {
    position: static;
    display: none;
    width: auto;
    min-width: 0;
    margin-top: 0;
    padding: 2px 0 0 14px;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .header-8__item--services.is-open > .header-8__submenu {
    display: flex;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .header-8__submenu-link {
    width: 100%;
    padding: 10px 10px 10px 0;
    border-radius: 0;
    font-size: 17px;
  }

  .header-8__submenu-link:hover {
    background: transparent;
  }
}

@media (max-width: 640px) {
  .header-8__contact {
    text-align: left;
  }

  .header-8__phone,
  .header-8__address {
    font-size: 15px;
  }

  .header-8__social {
    gap: 14px;
  }

  .header-8__social svg {
    width: 20px;
    height: 20px;
  }

  .header-8__menu {
    padding: 14px;
  }
}
