/* Кастомный селект «Филиал» в блоке заявки */
.order .order-branch-select {
  position: relative;
  width: 100%;
}

.order .order-branch-select__native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.order .order-branch-select__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  border: none;
  border-bottom: 0.1rem solid var(--white);
  background: transparent;
  padding: 0.5rem 0;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--white);
  cursor: pointer;
  outline: none;
  transition: opacity 0.2s ease;
}

.order .order-branch-select__trigger:hover,
.order .order-branch-select__trigger:focus-visible {
  opacity: 0.85;
}

.order .order-branch-select__trigger[aria-expanded="true"] .order-branch-select__icon {
  transform: rotate(180deg);
}

.order .order-branch-select__value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order .order-branch-select__icon {
  flex-shrink: 0;
  width: 0;
  height: 0;
  border-left: 0.45rem solid transparent;
  border-right: 0.45rem solid transparent;
  border-top: 0.55rem solid var(--white);
  transition: transform 0.2s ease;
}

.order .order-branch-select__dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.4rem);
  z-index: 30;
  margin: 0;
  padding: 0.4rem 0;
  list-style: none;
  max-height: 22rem;
  overflow-y: auto;
  background: var(--white);
  color: var(--green);
  border-radius: 0.4rem;
  box-shadow: 0 0.4rem 2rem rgba(0, 0, 0, 0.18);
}

.order .order-branch-select__dropdown[hidden] {
  display: none !important;
}

.order .order-branch-select__option {
  padding: 0.9rem 1.2rem;
  font-size: 1.4rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
}

.order .order-branch-select__option:hover,
.order .order-branch-select__option:focus {
  background: rgba(0, 0, 0, 0.06);
  outline: none;
}

.order .order-branch-select__option[aria-selected="true"] {
  font-weight: 700;
  background: rgba(0, 0, 0, 0.08);
}

/* Выпадающий список филиалов в шапке */
.header-branch-nav {
  position: relative;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .header-branch-nav {
    width: 100%;
    max-width: 36rem;
    align-self: center;
  }
}

.header-branch-nav__trigger.header__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: auto;
  max-width: 100%;
  margin: 0;
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-decoration: none;
  background: none;
  border: none;
  border-bottom: 0.2rem solid transparent;
  border-radius: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .header-branch-nav__trigger.header__link {
    width: 100%;
    justify-content: center;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

.header-branch-nav__trigger-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

@media (min-width: 769px) {
  .header-branch-nav__trigger-text {
    text-align: left;
    max-width: 18rem;
  }
}

.header-branch-nav__trigger-icon {
  flex-shrink: 0;
  width: 0;
  height: 0;
  border-left: 0.4rem solid transparent;
  border-right: 0.4rem solid transparent;
  border-top: 0.5rem solid currentColor;
  transition: transform 0.2s ease;
}

.header-branch-nav__trigger[aria-expanded="true"] .header-branch-nav__trigger-icon {
  transform: rotate(180deg);
}

.header-branch-nav__dropdown {
  position: absolute;
  z-index: 120;
  top: calc(100% + 0.6rem);
  left: 0;
  right: auto;
  min-width: 100%;
  width: max-content;
  max-width: min(32rem, calc(100vw - 4rem));
  margin: 0;
  padding: 0.5rem 0;
  list-style: none;
  background: var(--white);
  color: var(--green);
  border-radius: 0.4rem;
  box-shadow: 0 0.4rem 2rem rgba(0, 0, 0, 0.18);
  max-height: min(28rem, 70vh);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
  .header-branch-nav__dropdown {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(32rem, calc(100vw - 6rem));
    max-width: none;
  }
}

.header-branch-nav__dropdown[hidden] {
  display: none !important;
}

.header-branch-nav__item {
  margin: 0;
}

.header-branch-nav__link {
  display: block;
  padding: 1rem 1.4rem;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--green);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
  outline: none;
}

@media (max-width: 768px) {
  .header-branch-nav__link {
    font-size: 1.6rem;
    padding: 1.2rem 1.6rem;
  }
}

.header-branch-nav__link:hover,
.header-branch-nav__link:focus-visible {
  background: rgba(0, 0, 0, 0.06);
  color: var(--green);
}

.header-branch-nav__link:focus-visible {
  box-shadow: inset 0 0 0 0.2rem rgba(0, 32, 1, 0.25);
}

/* Блок «Преимущества» (сетка как у include) */
#advantages .advantages__item-title {
  font-weight: 700;
  margin-bottom: 0.6em;
}

#advantages .advantages__item-title:last-child {
  margin-bottom: 0;
}

#advantages .advantages__item-text {
  font-weight: 500;
}


.first__img {
  pointer-events: none;
}

/* Fixed messengers (Telegram/WhatsApp) */
.call.call--fixed {
  position: fixed;
  right: 2.4rem;
  bottom: 2.4rem;
  z-index: 200;

  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;

  pointer-events: none;
}

.call.call--fixed .call__link {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 6rem;
  height: 6rem;
  border-radius: 999rem;
  overflow: hidden;

  box-shadow: 0 0.6rem 1.8rem rgba(0, 0, 0, 0.22);
  transform: translateZ(0);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.call.call--fixed .call__link svg {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* Left variant (phone button) */
.call.call--fixed.call--fixed-left {
  left: 2.4rem;
  right: auto;
}

@media (max-width: 768px) {
  .call.call--fixed.call--fixed-left {
    left: 1.2rem;
    right: auto;
  }
}

/* Make phone icon closer to site palette */
.call.call--fixed.call--fixed-left .call__link svg path:first-of-type {
  fill: var(--green) !important;
}

.call.call--fixed.call--fixed-left .call__link svg path:last-of-type {
  fill: var(--white) !important;
}

@media (hover: hover) and (pointer: fine) {
  .call.call--fixed .call__link:hover {
    transform: translateY(-0.2rem);
    box-shadow: 0 0.8rem 2.2rem rgba(0, 0, 0, 0.26);
    filter: brightness(1.03);
  }
}

.call.call--fixed .call__link:focus-visible {
  outline: none;
  box-shadow:
    0 0.8rem 2.2rem rgba(0, 0, 0, 0.26),
    0 0 0 0.25rem rgba(13, 112, 17, 0.35);
}

@media (max-width: 768px) {
  .call.call--fixed {
    right: 1.2rem;
    bottom: 1.2rem;
    gap: 0.6rem;
  }

  .call.call--fixed .call__link {
    width: 4.4rem;
    height: 4.4rem;
    box-shadow: 0 0.45rem 1.4rem rgba(0, 0, 0, 0.2);
  }
}

@media (max-width: 768px) {
  .map__text {
    justify-content: space-between;
  }

  .map__text span {
    width: 6.8rem;
  }
}

.first__img {
  width: 70rem;
  right: 6rem;
}

.first__img img, .first__img svg {
  object-fit: contain;
}

@media (max-width: 768px) {
  .first__img {
      height: 25rem;
      top: 36rem;
      right: 12rem;
  }
}