/*
 * Contacts /kontakty/ (WP-12, page-contacts.php): boards Kontakty (1440) and Kontakty-mobile (390), on the tokens of
 * css/base.css. The white band holds the breadcrumbs, the H1 and the stored content (intro, map panel, «Реквизиты:»
 * and the requisites table); the blue band the «Контактная информация» card and the «Напишите нам» form (5960; its
 * fields, boxes and button are css/dialogs.css). Derived widths (I13): the two cards stack below 1024 px; below the
 * board's 390 px the requisites put each label above its value. Breakpoints: 1023, 767 and 389 px.
 */

/* ---------- White band: breadcrumbs, H1, intro, map, requisites ---------- */

.k-type-contacts .k-contacts__intro {
  padding: 28px 0 72px;
  background: var(--k-white);
}

.k-type-contacts .k-contacts__title {
  margin: 20px 0 0;
}

/* Stored content: the boards' spacing replaces the generic .page-text margins. */
.k-type-contacts .k-contacts .k-contacts__text.page-text {
  margin-top: 28px;
}

.k-type-contacts .k-contacts .k-contacts__text.page-text > * {
  margin-top: 0;
  margin-bottom: 0;
}

.k-type-contacts .k-contacts .k-contacts__text.page-text > * + * {
  margin-top: 16px;
}

.k-type-contacts .k-contacts .k-contacts__text.page-text > p {
  max-width: 760px;
}

.k-type-contacts .k-contacts .k-contacts__text.page-text > ul + p {
  margin-top: 20px;
}

/* The intro list: blue chevrons, as the boards draw it. */
.k-type-contacts .k-contacts .k-contacts__text.page-text > ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.k-type-contacts .k-contacts .k-contacts__text.page-text > ul > li {
  position: relative;
  margin: 0;
  padding-left: 34px;
  font-size: 17px;
  line-height: 26px;
}

.k-type-contacts .k-contacts .k-contacts__text.page-text > ul > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 22px;
  height: 22px;
  background: var(--k-blue);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* The map: the stored Yandex widget fills a panel of fixed height. Behind it the pin shows while the map loads and,
   where frames are blocked (k-contacts__map--blocked from the inline script), instead of the browser's error page. */
.k-type-contacts .k-contacts .k-contacts__text.page-text > .k-contacts__map {
  margin-top: 28px;
}

.k-type-contacts .k-contacts__map {
  position: relative;
  height: 400px;
  overflow: hidden;
  border-radius: var(--k-radius-panel);
  background: var(--k-panel);
}

.k-type-contacts .k-contacts__map > iframe {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  border: 0;
}

.k-type-contacts .k-contacts__map--blocked > iframe {
  visibility: hidden;
}

.k-type-contacts .k-contacts__map-pin {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--k-hairline);
  border-radius: 999px;
  background: var(--k-white);
  color: var(--k-blue);
  transform: translate(-50%, -50%);
}

/* Content without the panel (a changed widget): the iframe at least keeps to the column. */
.k-type-contacts .k-contacts__text iframe {
  max-width: 100%;
  border: 0;
}

.k-type-contacts .k-contacts .k-contacts__text.page-text > h2 {
  margin-top: 56px;
}

/* ---------- Requisites table ([kompresorii_requisites]) ---------- */

.k-type-contacts .k-contacts .k-contacts__text.page-text > .k-requisites {
  margin-top: 24px;
}

.k-type-contacts .k-requisites {
  overflow: hidden;
  border: 1px solid var(--k-hairline);
  border-radius: var(--k-radius-card);
  background: var(--k-white);
  box-shadow: var(--k-shadow);
}

.k-type-contacts .k-requisites__table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: 16px;
  line-height: 24px;
  font-variant-numeric: tabular-nums;
}

.k-type-contacts .k-requisites__table tr + tr {
  border-top: 1px solid var(--k-hairline);
}

.k-type-contacts .k-requisites__table th,
.k-type-contacts .k-requisites__table td {
  padding: 14px 24px;
  text-align: left;
  vertical-align: top;
}

.k-type-contacts .k-requisites__table th {
  width: 400px;
  font-weight: 400;
  color: var(--k-muted);
  background: var(--k-panel);
}

.k-type-contacts .k-requisites__table td {
  color: var(--k-ink);
  overflow-wrap: anywhere;
}

/* ---------- Blue band: the contact card and the form ---------- */

.k-type-contacts .k-contacts__band {
  padding: 72px 0;
  background: var(--k-band);
}

.k-type-contacts .k-contacts__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

.k-type-contacts .k-contacts__card {
  min-width: 0;
  padding: 32px;
  border: 1px solid var(--k-hairline);
  border-radius: var(--k-radius-card);
  background: var(--k-white);
}

.k-type-contacts .k-contacts__heading {
  margin: 0;
  font-size: 24px;
  line-height: 30px;
}

.k-type-contacts .k-contacts__name {
  margin: 20px 0 0;
  font-size: 20px;
  line-height: 26px;
  font-weight: 700;
}

.k-type-contacts .k-contacts__row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--k-hairline);
}

.k-type-contacts .k-contacts__row p {
  margin: 0;
  font-size: 17px;
  line-height: 26px;
}

.k-type-contacts .k-contacts__row > .k-ui-icon {
  flex: none;
  margin-top: 2px;
  color: var(--k-blue);
}

.k-type-contacts .k-contacts__phone {
  align-items: center;
}

.k-type-contacts .k-contacts__phone > .k-ui-icon {
  margin-top: 0;
}

.k-type-contacts .k-contacts__phone p {
  line-height: 30px;
}

.k-type-contacts .k-contacts__tel {
  font-size: 22px;
  font-weight: 700;
  color: var(--k-ink);
  text-decoration: none;
  white-space: nowrap;
}

.k-type-contacts .k-contacts__tel:hover {
  color: var(--k-blue-hover);
}

.k-type-contacts .k-contacts__messengers {
  flex-wrap: wrap;
  gap: 8px;
}

.k-type-contacts .k-contacts__msg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--k-muted);
  border-radius: var(--k-radius-control);
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
  color: var(--k-ink);
  text-decoration: none;
  white-space: nowrap;
}

.k-type-contacts .k-contacts__msg:hover {
  border-color: var(--k-blue);
  color: var(--k-ink);
}

.k-type-contacts .k-contacts__msg .k-chrome-icon {
  flex: none;
  color: var(--k-blue);
}

.k-type-contacts .k-contacts__email {
  display: block;
}

.k-type-contacts .k-contacts__mail {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  max-width: 100%;
  min-height: 44px;
  font-size: 17px;
  line-height: 26px;
  font-weight: 700;
  color: var(--k-blue);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.k-type-contacts .k-contacts__mail:hover {
  color: var(--k-blue-hover);
  text-decoration: underline;
}

.k-type-contacts .k-contacts__mail .k-chrome-icon {
  flex: none;
  color: var(--k-blue);
}

.k-type-contacts .k-contacts__form .wpcf7 {
  margin-top: 20px;
}

/* ---------- 768–1023 px: the cards one above the other ---------- */

@media (max-width: 1023px) {
  /* Section spacing 56 px, as on the other pages at these widths (72 px from 1024). */
  .k-type-contacts .k-contacts__intro {
    padding-bottom: 56px;
  }

  .k-type-contacts .k-contacts__band {
    padding: 56px 0;
  }

  .k-type-contacts .k-requisites__table th {
    width: 280px;
  }

  .k-type-contacts .k-contacts__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  /* The touch header's widths: a 44 px touch target for the phone without moving the line. */
  .k-type-contacts .k-contacts__tel {
    display: inline-block;
    padding: 8px 0;
    margin: -8px 0;
  }
}

/* ---------- Phones (Kontakty-mobile) ---------- */

@media (max-width: 767px) {
  .k-type-contacts .k-contacts__intro {
    padding: 20px 0 32px;
  }

  .k-type-contacts .k-contacts__title {
    margin-top: 14px;
  }

  .k-type-contacts .k-contacts .k-contacts__text.page-text {
    margin-top: 16px;
  }

  .k-type-contacts .k-contacts .k-contacts__text.page-text > * + * {
    margin-top: 12px;
  }

  .k-type-contacts .k-contacts .k-contacts__text.page-text > ul + p {
    margin-top: 16px;
  }

  .k-type-contacts .k-contacts .k-contacts__text.page-text > ul {
    gap: 8px;
  }

  .k-type-contacts .k-contacts .k-contacts__text.page-text > ul > li {
    padding-left: 32px;
    font-size: 16px;
    line-height: 24px;
  }

  .k-type-contacts .k-contacts .k-contacts__text.page-text > ul > li::before {
    top: 1px;
  }

  .k-type-contacts .k-contacts .k-contacts__text.page-text > .k-contacts__map {
    margin-top: 20px;
  }

  .k-type-contacts .k-contacts__map {
    height: 220px;
    border-radius: var(--k-radius-card);
  }

  .k-type-contacts .k-contacts__map-pin {
    width: 48px;
    height: 48px;
  }

  .k-type-contacts .k-contacts__map-pin .k-ui-icon {
    width: 24px;
    height: 24px;
  }

  .k-type-contacts .k-contacts .k-contacts__text.page-text > h2 {
    margin-top: 32px;
  }

  .k-type-contacts .k-contacts .k-contacts__text.page-text > .k-requisites {
    margin-top: 16px;
  }

  .k-type-contacts .k-requisites__table {
    table-layout: fixed;
    font-size: 15px;
    line-height: 22px;
  }

  .k-type-contacts .k-requisites__table th,
  .k-type-contacts .k-requisites__table td {
    padding: 12px 10px;
  }

  .k-type-contacts .k-requisites__table th {
    width: 156px;
    font-size: 14px;
    line-height: 20px;
  }

  .k-type-contacts .k-contacts__band {
    padding: 24px 0 28px;
  }

  .k-type-contacts .k-contacts__grid {
    gap: 16px;
  }

  .k-type-contacts .k-contacts__card {
    padding: 16px;
  }

  .k-type-contacts .k-contacts__heading {
    font-size: 20px;
    line-height: 25px;
  }

  .k-type-contacts .k-contacts__name {
    margin-top: 12px;
    font-size: 18px;
    line-height: 24px;
  }

  .k-type-contacts .k-contacts__row {
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
  }

  .k-type-contacts .k-contacts__row p {
    font-size: 16px;
    line-height: 24px;
  }

  .k-type-contacts .k-contacts__row > .k-ui-icon {
    margin-top: 1px;
  }

  .k-type-contacts .k-contacts__phone > .k-ui-icon {
    margin-top: 0;
  }

  .k-type-contacts .k-contacts__phone p {
    line-height: 28px;
  }

  .k-type-contacts .k-contacts__messengers {
    gap: 8px;
  }

  .k-type-contacts .k-contacts__msg {
    flex: 1 1 auto;
    justify-content: center;
    gap: 6px;
    height: 48px;
    padding: 0 8px;
  }

  .k-type-contacts .k-contacts__email {
    padding-top: 4px;
  }

  .k-type-contacts .k-contacts__mail {
    gap: 12px;
    font-size: 16px;
    line-height: 24px;
  }

  .k-type-contacts .k-contacts__form .wpcf7 {
    margin-top: 12px;
  }
}

/* Phones narrower than the board's 390 (derived): each label above its value, so the 20-digit account numbers keep
   one line (two columns split them from 389 px down). The messenger buttons keep their own widths, so a button that
   wraps to the next row does not stretch across the card. */
@media (max-width: 389px) {
  .k-type-contacts .k-contacts__msg {
    flex: 0 1 auto;
  }

  .k-type-contacts .k-requisites__table,
  .k-type-contacts .k-requisites__table tbody,
  .k-type-contacts .k-requisites__table tr,
  .k-type-contacts .k-requisites__table th,
  .k-type-contacts .k-requisites__table td {
    display: block;
    width: auto;
  }

  .k-type-contacts .k-requisites__table th {
    padding: 8px 12px;
  }

  .k-type-contacts .k-requisites__table td {
    padding: 8px 12px 12px;
  }
}
