/* Panel that slides down after the first screen */
html {
  scroll-padding-top: 8rem;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  color: var(--color-white);
  background-color: rgba(35, 37, 42, 0.94);
  -webkit-backdrop-filter: blur(1rem);
  backdrop-filter: blur(1rem);
  visibility: hidden;
  transform: translateY(-100%);
  transition: transform var(--transition), visibility var(--transition);
}

.topbar.is-visible {
  visibility: visible;
  transform: none;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.4rem;
  min-height: 7.2rem;
  padding: 0.8rem 5.4rem 0.8rem 20rem;
}

.topbar__nav {
  min-width: 0;
}

.topbar__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 3.2rem;
}

.topbar .nav__link {
  font-size: max(1.4rem, 11px);
}

.topbar__contacts {
  flex-shrink: 0;
  margin-left: auto;
}

.topbar__contacts .contacts__icon,
.topbar__contacts .messengers__link {
  margin-top: 0;
  align-self: center;
}

.topbar__contacts .contacts__number {
  font-size: max(2.2rem, 16px);
}

.topbar__contacts .messengers__link img {
  filter: invert(1);
}

.topbar__cta {
  flex-shrink: 0;
  white-space: nowrap;
}

@media (max-width: 1279.98px) {
  .topbar__inner {
    justify-content: flex-end;
    min-height: 6.4rem;
    padding: 0.8rem var(--gutter);
  }

  .topbar__nav {
    display: none;
  }

  .topbar__contacts .contacts__icon,
  .topbar__contacts .messengers__link {
    width: 2.8rem;
    height: 2.8rem;
  }
}

@media (max-width: 767.98px) {
  .topbar__inner {
    gap: 1.2rem;
  }

  .topbar__contacts {
    gap: 1rem;
    margin-left: 0;
  }

  .topbar__contacts .contacts__phone {
    display: none;
  }

  .topbar__cta {
    min-height: 3.4rem;
    padding: 0 1.3rem;
    font-size: 2.5vw;
    letter-spacing: 0.1em;
  }
}
