.contact-page {
  --contact-blue: #bf2323;
  --contact-blue-dark: #8f1718;
  --contact-ink: #202735;
  --contact-muted: #77808e;
  --contact-line: #e7ebf0;
  --contact-surface: #f5f7fa;
  background: radial-gradient(circle at 7% 8%, rgba(191, 35, 35, .055), transparent 27rem), #fff;
  color: var(--contact-ink);
  overflow: hidden;
}

.contact-page *, .contact-page *::before, .contact-page *::after { box-sizing: border-box; }
.contact-page__inner { width: min(92%, 1520px); margin: 0 auto; padding: clamp(72px, 7.3vw, 140px) 0 clamp(80px, 8vw, 154px); }
.contact-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: #fff; border: 1px solid var(--contact-line); box-shadow: 0 22px 60px rgba(18, 45, 82, .09); }

.contact-card {
  position: relative;
  min-width: 0;
  min-height: 330px;
  padding: 54px 34px 42px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--contact-ink);
  background: #fff;
  transition: background-color .28s ease, transform .28s ease, box-shadow .28s ease;
}

.contact-card:not(:last-child)::after { content: ""; position: absolute; top: 48px; right: 0; width: 1px; height: calc(100% - 96px); background: var(--contact-line); }
.contact-card--link { cursor: pointer; }
.contact-card--link:hover { z-index: 1; color: var(--contact-ink); background: #fbfcfe; transform: translateY(-5px); box-shadow: 0 16px 36px rgba(191, 35, 35, .09); }
.contact-card--link:focus-visible, .contact-map-route:focus-visible { outline: 3px solid rgba(191, 35, 35, .3); outline-offset: 4px; }

.contact-card__icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  margin-bottom: 25px;
  border-radius: 50%;
  color: #fff;
  background: #d8dce1;
  transition: background-color .28s ease, transform .28s ease;
}

.contact-card--link:hover .contact-card__icon { background: var(--contact-blue); transform: scale(1.04); }
.contact-card__icon svg { width: 33px; height: 33px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact-card__label { margin-bottom: 18px; color: var(--contact-muted); font-size: 17px; line-height: 1.4; }

.contact-card__value {
  width: 100%;
  max-width: 100%;
  min-height: 58px;
  display: block;
  color: #2c3037;
  font-size: clamp(17px, 1.12vw, 21px);
  font-weight: 600;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: normal;
  text-wrap: balance;
}

.contact-card__value--number { font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.contact-card--address .contact-card__value { word-break: break-all; white-space: normal !important; }
.contact-card__address-text { display: block; width: min(100%, 290px); margin: 0 auto; overflow-wrap: anywhere; word-break: break-all; white-space: normal; }
.contact-card__hint { margin-top: auto; padding-top: 20px; color: #a1a8b1; font-size: 12px; letter-spacing: .08em; }
.contact-location { padding-top: clamp(72px, 7vw, 118px); }
.contact-location__heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 28px; }
.contact-location__eyebrow { display: block; margin-bottom: 8px; color: var(--contact-blue); font-size: 11px; font-weight: 600; letter-spacing: .2em; }
.contact-location__heading h2 { margin: 0; color: var(--contact-ink); font-size: clamp(28px, 2.2vw, 40px); font-weight: 600; line-height: 1.15; letter-spacing: -.03em; }
.contact-location__heading p { margin: 0 0 4px; color: var(--contact-muted); font-size: 14px; }
.contact-map-wrap { position: relative; min-height: 500px; overflow: hidden; background: var(--contact-surface); box-shadow: 0 22px 60px rgba(18, 45, 82, .1); }
.contact-map { width: 100%; height: clamp(500px, 50vw, 720px); }

.contact-map-status {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--contact-muted);
  background: var(--contact-surface);
  font-size: 14px;
  transition: opacity .25s ease, visibility .25s ease;
}

.contact-map-status.is-hidden { visibility: hidden; opacity: 0; }
.contact-map-status.is-error { gap: 8px; padding: 30px; text-align: center; background: linear-gradient(rgba(245,247,250,.94), rgba(245,247,250,.94)), repeating-linear-gradient(45deg, #e9edf2 0, #e9edf2 1px, transparent 1px, transparent 14px); }
.contact-map-status.is-error strong { color: var(--contact-ink); font-size: 18px; }
.contact-map-status__spinner { width: 30px; height: 30px; border: 2px solid #dfe4ea; border-top-color: var(--contact-blue); border-radius: 50%; animation: contact-map-spin .8s linear infinite; }

.contact-map-route {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 3;
  min-height: 48px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  background: var(--contact-blue);
  box-shadow: 0 10px 28px rgba(191, 35, 35, .28);
  font-size: 14px;
  font-weight: 500;
  transition: transform .24s ease, background-color .24s ease, box-shadow .24s ease;
}

.contact-map-route:hover { color: #fff; background: var(--contact-blue-dark); transform: translateY(-2px); box-shadow: 0 14px 32px rgba(191, 35, 35, .34); }
.contact-map-route:active { transform: translateY(0); }
.contact-map-route svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.contact-map-marker {
  position: relative;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 5px solid #fff;
  border-radius: 50% 50% 50% 10%;
  color: #fff;
  background: var(--contact-blue);
  box-shadow: 0 8px 22px rgba(191, 35, 35, .35);
  transform: rotate(-45deg);
}

.contact-map-marker::after { content: ""; position: absolute; inset: 10px; border: 2px solid rgba(255,255,255,.9); border-radius: 50%; }
.contact-map-marker span { width: 7px; height: 7px; border-radius: 50%; background: #fff; }
.contact-page .amap-logo, .contact-page .amap-copyright { opacity: .72; }
@keyframes contact-map-spin { to { transform: rotate(360deg); } }

@media (max-width: 1100px) {
  .contact-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-card { min-height: 300px; }
  .contact-card:nth-child(2)::after { display: none; }
  .contact-card:nth-child(-n + 2)::before { content: ""; position: absolute; left: 38px; bottom: 0; width: calc(100% - 76px); height: 1px; background: var(--contact-line); }
}

@media (max-width: 640px) {
  .contact-page__inner { width: 100%; padding: 42px 15px 70px; }
  .contact-cards { grid-template-columns: 1fr; box-shadow: 0 12px 34px rgba(18, 45, 82, .08); }
  .contact-card { min-height: 0; padding: 32px 22px 28px; }
  .contact-card::after { display: none; }
  .contact-card:nth-child(-n + 3)::before { content: ""; position: absolute; left: 24px; bottom: 0; width: calc(100% - 48px); height: 1px; background: var(--contact-line); }
  .contact-card__icon { width: 66px; height: 66px; margin-bottom: 17px; }
  .contact-card__icon svg { width: 28px; height: 28px; }
  .contact-card__label { margin-bottom: 10px; font-size: 15px; }
  .contact-card__value { min-height: 0; font-size: 17px; }
  .contact-card__hint { margin-top: 14px; padding-top: 0; }
  .contact-location { padding-top: 62px; }
  .contact-location__heading { align-items: flex-start; flex-direction: column; gap: 9px; margin-bottom: 20px; }
  .contact-location__heading p { font-size: 13px; }
  .contact-map-wrap { min-height: 410px; }
  .contact-map { height: 410px; }
  .contact-map-route { right: 14px; bottom: 14px; min-height: 44px; padding: 0 15px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .contact-card, .contact-card__icon, .contact-map-route, .contact-map-status { transition: none; }
  .contact-map-status__spinner { animation-duration: 1.8s; }
}
