/* Branch phones — replaces callback slot, keeps original phone card */
.header-phone-block {
  position: relative;
  z-index: 60;
}

.page-header-illustration #header .header-phone__text {
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: 0.02em;
  color: #0f172a;
}

.page-header-illustration #header .header-phone__email {
  font-weight: 500;
  color: #94a3b8;
}

.header-phones {
  position: relative;
  z-index: 61;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem 0.5rem;
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.4rem;
}

/* Same slot/look as former «Обратный звонок» */
.header-phones__toggle--callback-slot {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(59, 111, 217, 0.45);
  background: #fff;
  color: var(--blue-500, #3b6fd9);
  font-family: inherit;
  cursor: pointer;
  line-height: 1.2;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.header-phones__toggle--callback-slot:hover {
  background: rgba(59, 111, 217, 0.08);
  border-color: var(--blue-500, #3b6fd9);
  color: var(--blue-700, #1e4a7a);
}

.header-phones__caret {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  transition: transform 0.15s ease;
}

.header-phones.is-open .header-phones__caret {
  transform: rotate(180deg);
}

.header-phones.is-open .header-phones__toggle--callback-slot {
  background: rgba(59, 111, 217, 0.1);
  border-color: #3b6fd9;
}

.header-phones__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 5000;
  min-width: 292px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(30, 74, 122, 0.14);
  background: linear-gradient(165deg, #fff 0%, #eef5fc 100%);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(8px);
}

.header-phones__panel[hidden] {
  display: none;
}

.header-phones__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.header-phones__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 14px;
  padding: 6px 8px;
  border-radius: 8px;
  transition: background 0.12s ease;
}

.header-phones__row:hover {
  background: rgba(59, 111, 217, 0.07);
}

.header-phones__city {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
}

.header-phones__num {
  font-size: 12.5px;
  font-weight: 700;
  color: #1e4a7a;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-align: right;
}

.header-phones__num:hover {
  color: #3b6fd9;
  text-decoration: underline;
}

.header-phones__mail {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  padding: 8px 8px 2px;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  color: #1e4a7a;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.header-phones__mail:hover {
  color: #3b6fd9;
}

.header-phones__mail svg {
  flex: 0 0 auto;
  color: #64748b;
}

@media (max-width: 639px) {
  .header-phones__toggle--callback-slot {
    font-size: 0.75rem;
    padding: 0.25rem 0.55rem;
  }
  .header-phones__panel {
    min-width: min(292px, 78vw);
  }
}
