

.p24-header {
  --p24-header-ink: #050505;
  --p24-header-muted: #3d4655;
  --p24-header-orange: #ff5c00;
  position: relative;
  z-index: 20;
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0 !important;
  padding: 10px 24px 8px;
  border-bottom: 1px solid #e7e9ee;
  background: #ffffff;
  color: var(--p24-header-ink);
  font-family: Inter, Arial, Helvetica, sans-serif;
}

.p24-header *,
.p24-header *::before,
.p24-header *::after {
  box-sizing: border-box;
}

.p24-header p {
  margin: 0;
}

.p24-header__container {
  width: min(1200px, 100%);
  margin: 0 auto;
}

.p24-header__top {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) 150px auto;
  gap: 16px;
  align-items: center;
  min-height: 62px;
}

.p24-header__logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.p24-header__logo-img {
  display: block;
  width: 150px;
  max-width: 100%;
  height: auto;
}

.p24-header__descriptor {
  min-width: 0;
  color: var(--p24-header-muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.3;
  white-space: nowrap;
}

.p24-header__rating {
  display: flex;
  width: 150px;
  height: 50px;
  align-items: center;
  justify-content: center;
  justify-self: end;
  overflow: hidden;
}

.p24-header__rating iframe {
  display: block;
  width: 150px;
  height: 50px;
  border: 0;
}

.p24-header__contacts {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
  gap: 12px;
}

.p24-header__messengers {
  display: flex;
  align-items: center;
  gap: 8px;
}

.p24-header__messenger {
  display: inline-flex;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #edf0f4;
  border-radius: 12px;
  background: #ffffff;
  text-decoration: none;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.p24-header__messenger:hover {
  border-color: #d5d9e1;
  transform: translateY(-2px);
}

.p24-header__messenger-img {
  display: block;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  object-fit: cover;
}

.p24-header__contact-links {
  display: flex;
  min-width: 142px;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.p24-header__phone,
.p24-header__email {
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.18s ease;
}

.p24-header__phone {
  color: var(--p24-header-ink);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.15;
}

.p24-header__email {
  color: var(--p24-header-muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.15;
}

.p24-header__phone:hover,
.p24-header__email:hover {
  color: var(--p24-header-orange);
}

.p24-header__nav {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 2px;
  padding-top: 5px;
  border-top: 1px solid #f0f1f4;
}

.p24-header__nav > a {
  position: relative;
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  border: 0;
  background: transparent;
  color: #252b35;
  font: 700 13px/1.15 Inter, Arial, Helvetica, sans-serif;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.18s ease;
}

.p24-header__nav > a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--p24-header-orange);
  content: "";
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.18s ease;
}

.p24-header__nav > a:hover {
  color: var(--p24-header-ink);
}

.p24-header__nav > a:hover::after {
  transform: scaleX(1);
}

.p24-header a:focus-visible {
  outline: 3px solid rgba(255, 92, 0, 0.38);
  outline-offset: 3px;
}

@media (max-width: 1120px) {
  .p24-header__nav {
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .p24-header__nav::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 980px) {
  .p24-header__top {
    grid-template-columns: auto 1fr auto;
  }

  .p24-header__descriptor {
    display: none;
  }
}

@media (max-width: 760px) {
  .p24-header {
    padding: 8px 16px 6px;
  }

  .p24-header__top {
    grid-template-columns: auto 1fr;
    gap: 10px;
    min-height: 54px;
  }

  .p24-header__rating,
  .p24-header__email {
    display: none;
  }

  .p24-header__contacts {
    justify-self: end;
    gap: 8px;
  }

  .p24-header__contact-links {
    min-width: 0;
    align-items: flex-end;
  }

  .p24-header__phone {
    font-size: 13px;
  }

  .p24-header__messengers {
    gap: 6px;
  }

  .p24-header__messenger {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    border-radius: 10px;
  }

  .p24-header__messenger-img {
    width: 38px;
    height: 38px;
    border-radius: 9px;
  }

  .p24-header__logo-img {
    width: 126px;
  }

  .p24-header__nav {
    gap: 18px;
    margin-top: 3px;
    padding: 4px 1px 2px;
  }

  .p24-header__nav > a {
    min-height: 29px;
    font-size: 13px;
  }
}

@media (max-width: 420px) {
  .p24-header__logo-img {
    width: 116px;
  }

  .p24-header__phone {
    font-size: 12px;
  }

  .p24-header__messenger {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .p24-header__messenger-img {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 360px) {
  .p24-header__logo-img {
    width: 110px;
  }

  .p24-header__phone {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .p24-header__messenger,
  .p24-header__nav > a,
  .p24-header__nav > a::after {
    transition: none;
  }
}


/* Мобильная навигация по фактическим блокам страницы. */
.p24-header__menu-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 0;
  border: 1px solid #dfe3ea;
  border-radius: 5px;
  background: #ffffff;
  color: var(--p24-header-ink);
  cursor: pointer;
}

.p24-header__menu-toggle > span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.p24-header__menu-toggle:hover {
  border-color: var(--p24-header-orange);
  color: var(--p24-header-orange);
}

@media (max-width: 900px) {
  .p24-header {
    z-index: 100;
  }

  .p24-header__top {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .p24-header__rating {
    display: none;
  }

  .p24-header__menu-toggle {
    display: inline-flex;
    justify-self: end;
  }

  .p24-header__nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 18px;
    max-height: 0;
    margin: 0;
    padding: 0 max(16px, calc((100vw - 1200px) / 2 + 24px));
    overflow-x: hidden;
    overflow-y: auto;
    border-top: 0;
    border-bottom: 1px solid transparent;
    background: #ffffff;
    box-shadow: none;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition:
      max-height 0.24s ease,
      padding 0.24s ease,
      opacity 0.18s ease,
      transform 0.18s ease,
      border-color 0.18s ease,
      box-shadow 0.18s ease;
  }

  .p24-header.is-page-menu-open .p24-header__nav {
    max-height: min(520px, calc(100vh - 70px));
    padding-top: 12px;
    padding-bottom: 14px;
    border-bottom-color: #dfe3ea;
    box-shadow: 0 18px 36px rgba(5, 5, 5, 0.10);
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .p24-header__nav > a {
    min-height: 46px;
    padding: 8px 4px;
    border-bottom: 1px solid #eef0f3;
    font-size: 14px;
    white-space: normal;
  }

  .p24-header__nav > a::after {
    display: none;
  }

  .p24-header__nav > a:hover {
    color: var(--p24-header-orange);
  }

  .p24-header.is-page-menu-open .p24-header__menu-toggle > span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .p24-header.is-page-menu-open .p24-header__menu-toggle > span:nth-child(2) {
    opacity: 0;
  }

  .p24-header.is-page-menu-open .p24-header__menu-toggle > span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

@media (max-width: 600px) {
  .p24-header__contact-links {
    display: none;
  }

  .p24-header__nav {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .p24-header__nav > a {
    min-height: 44px;
  }
}

@media (max-width: 420px) {
  .p24-header {
    padding-right: 12px;
    padding-left: 12px;
  }

  .p24-header__top {
    gap: 8px;
  }

  .p24-header__messengers {
    gap: 4px;
  }

  .p24-header__messenger {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    border-radius: 5px;
  }

  .p24-header__messenger-img {
    width: 34px;
    height: 34px;
    border-radius: 4px;
  }

  .p24-header__menu-toggle {
    width: 40px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .p24-header__menu-toggle > span,
  .p24-header__nav {
    transition: none;
  }
}
