/* Contacts pages (/contacts/, /contacts/odessa/ and /uk/ twins). Loaded only on these pages. */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.contacts-page .mw-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 30px;
}
.contacts-page .mw-tabs a {
  padding: 10px 24px;
  border: 2px solid #49688e;
  border-radius: 6px;
  background: #fff;
  color: #49688e;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.contacts-page .mw-tabs a:hover { background: #eaf0f7; }
.contacts-page .mw-tabs a.is-active {
  background: #f4a024;
  border-color: #f4a024;
  color: #1d2f47;
}

.contacts-page .mw-section { scroll-margin-top: 16px; margin: 0 0 46px; }
.contacts-page .mw-section__title {
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 3px solid #f4a024;
  font-size: 28px;
  color: #2c4a6e;
}
.contacts-page .mw-note {
  margin: 0 0 22px;
  padding: 12px 16px;
  border-left: 5px solid #f4a024;
  background: #fdf1dc;
  font-size: 15.5px;
  color: #1d2f47;
}

/* --- District managers --- */
.mw-districts {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 30px;
  align-items: start;
}
.mw-districts__text h3,
.mw-districts__cards > h3 {
  margin: 0 0 12px;
  font-size: 22px;
  line-height: 1.3;
  color: #1d2f47;
}
.mw-districts__text p { margin: 0 0 12px; font-size: 16px; line-height: 1.55; color: #222; }
.mw-districts__text ul { margin: 0; padding-left: 20px; }
.mw-districts__text li { margin: 0 0 12px; font-size: 16px; line-height: 1.55; color: #222; }
.mw-districts__text li strong { color: #1d2f47; }

.mw-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.mw-card {
  display: flex;
  flex-direction: column;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #d9e0ea;
  border-top: 5px solid #49688e;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(44, 74, 110, .10);
}
.mw-card__area { margin: 0; font-size: 24px; font-weight: 700; line-height: 1.2; color: #2c4a6e; }
.mw-card__area .fa { margin-right: 8px; color: #f4a024; }
.mw-card__who { margin: 4px 0 10px; font-size: 15px; line-height: 1.4; color: #222; }
.mw-card__who strong { color: #1d2f47; }
.mw-card__also { margin: 0 0 12px; font-size: 14.5px; line-height: 1.4; color: #222; }
.mw-card__also .fa { margin-right: 6px; color: #f4a024; }
.mw-card__label { margin: 0 0 4px; font-size: 14px; color: #222; }
.mw-card__phone {
  display: inline-block;
  align-self: flex-start;
  margin: 0 0 8px;
  padding: 9px 14px;
  border-radius: 6px;
  background: #49688e;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 3px 0 #2c4a6e;
  white-space: nowrap;
}
.mw-card__phone:hover, .mw-card__phone:focus { background: #3a577a; color: #fff; }
.mw-card__phone .fa { margin-right: 8px; color: #f4a024; }
.mw-card__msgs { margin: 0 0 12px; }
.mw-card__msgs a { display: inline-block; margin-right: 10px; }
.mw-card__msgs img { display: block; }
.mw-card__quote {
  margin: auto 0 0;
  padding-top: 10px;
  border-top: 1px dashed #cfd8e3;
  font-size: 14.5px;
  font-style: italic;
  line-height: 1.45;
  color: #333;
}

@media only screen and (max-width: 1000px) {
  .mw-districts { grid-template-columns: 1fr; }
}
@media only screen and (max-width: 640px) {
  .contacts-page .mw-tabs a { flex: 1 1 100%; text-align: center; }
  .contacts-page .mw-section__title { font-size: 24px; }
  .mw-cards { grid-template-columns: 1fr; }
}

/* --- Level 1: the original "КИЕВ | ОДЕССА" line; level 2 (Kyiv only): two jump buttons --- */
.contacts-page .contacts-nav { margin: 0 0 14px; font-size: 22px; letter-spacing: .5px; }
.contacts-page .contacts-nav.contacts-nav--alone { margin-bottom: 30px; }
.contacts-page .contacts-nav a {
  padding-bottom: 3px;
  border-bottom: 3px solid transparent;
  font-weight: 700;
  text-decoration: none;
}
.contacts-page .contacts-nav a:hover { border-bottom-color: #cfd8e3; }
.contacts-page .contacts-nav a.is-active { color: #1d2f47; border-bottom-color: #f4a024; }

/* --- Align the same elements across neighbouring cards (area / name / also / phone / messengers / quote) ---
   Cards share the grid rows via subgrid; browsers without subgrid keep the plain stacked layout above. */
@supports (grid-template-rows: subgrid) {
  .mw-cards { column-gap: 16px; row-gap: 0; }
  .mw-card {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 7;
    margin-bottom: 16px;
  }
  .mw-cards { margin-bottom: -16px; } /* cancels the last row's bottom margin for any number of cards */
  .mw-card__phone { justify-self: start; align-self: start; }
  .mw-card__quote { margin: 0; align-self: start; }
}

/* Same distance from the card top to the phone button in every card (address block reserves 3 lines) */
@media only screen and (min-width: 641px) {
  .mw-card__also { min-height: calc(1.4em * 3); }
}

/* Card without a manager number yet ("number will appear later") */
.mw-card--soon { border-style: dashed; border-top-style: solid; background: #fbfcfe; }
.mw-card__soon {
  align-self: start;
  margin: 0 0 12px;
  padding: 9px 14px;
  border: 1px solid #f4a024;
  border-radius: 6px;
  background: #fdf1dc;
  color: #1d2f47;
  font-size: 15px;
  font-weight: 700;
}
.mw-card__soon .fa { margin-right: 6px; color: #c97f0b; }
.mw-card--soon .mw-card__who .fa { margin-right: 4px; color: #49688e; }
@supports (grid-template-rows: subgrid) {
  .mw-card--soon .mw-card__soon { grid-row: span 3; }
}
