.contacts-section {
  background: #edf2f8;
}

.contacts-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 36px;
  background: #fff;
}

.contact-map {
  position: relative;
  min-width: 0;
  min-height: 520px;
  overflow: hidden;
  background:
    linear-gradient(rgba(39, 69, 137, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(39, 69, 137, .08) 1px, transparent 1px),
    #e7edf5;
  background-size: 48px 48px;
}

.contact-map::before {
  content: "Карта загружается…";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--steel);
  font-size: 14px;
  letter-spacing: .04em;
}

.contact-map iframe {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.contact-map__open {
  position: absolute;
  z-index: 2;
  left: 24px;
  bottom: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 999px;
  background: rgba(8, 24, 58, .92);
  box-shadow: 0 10px 28px rgba(8, 24, 58, .2);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  backdrop-filter: blur(10px);
}

.contact-map__open span {
  margin-left: 12px;
  color: var(--orange);
  font-size: 18px;
}

.contact-map__open:hover {
  background: var(--ink);
}

.contact-map__open:focus-visible {
  background: var(--ink);
  outline: 2px solid rgba(31, 60, 136, 0.42);
  outline-offset: 3px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(32px, 4vw, 56px);
}

.contact-card__lead {
  max-width: 32em;
}

.contact-card__lead h3 {
  margin: 14px 0;
  color: var(--ink);
  font-size: clamp(30px, 3vw, 44px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -.035em;
}

.contact-card__lead p,
.contact-card__footer p {
  margin: 0;
  color: var(--steel);
  font-size: 15px;
  line-height: 1.65;
}

.contact-list {
  margin: clamp(28px, 4vw, 44px) 0 0;
}

.contact-list > div {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 20px;
  padding: 19px 0;
  border-top: 1px solid var(--line);
}

.contact-list dt {
  padding-top: 4px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.contact-list dd {
  min-width: 0;
  margin: 0;
}

.contact-list address,
.contact-list a {
  color: var(--ink);
  font-size: clamp(18px, 1.5vw, 23px);
  font-style: normal;
  font-weight: 450;
  line-height: 1.4;
  letter-spacing: -.015em;
}

.contact-list dd a {
  display: block;
  width: fit-content;
  min-height: 36px;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.contact-list dd a:hover,
.contact-list dd a:focus-visible {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 5px;
}

.contact-phone-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.contact-messengers {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.contact-list dd .contact-messenger {
  display: inline-grid;
  width: 40px;
  min-height: 40px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(31, 60, 136, .12);
  border-radius: 50%;
  box-shadow: 0 8px 20px -14px rgba(8, 24, 58, .6);
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.04em;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}

.contact-list dd .contact-messenger--max {
  background: #fff;
  border-color: rgba(71, 26, 255, .22);
}

.contact-list dd .contact-messenger--telegram {
  background: #229ed9;
}

.contact-messenger svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.contact-messenger img {
  width: 28px;
  height: 28px;
}

.contact-list dd .contact-messenger:hover,
.contact-list dd .contact-messenger:focus-visible {
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -14px rgba(8, 24, 58, .8);
}

.contact-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: auto;
  padding-top: 28px;
}

.contact-card__footer p {
  max-width: 24em;
  font-size: 13px;
}

.contact-card__footer .text-action {
  flex: 0 0 auto;
}

.avk-footer {
  padding: 40px 0 28px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.avk-footer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 32px;
}

.avk-footer__brand img {
  width: 120px;
}

.avk-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.avk-footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--steel);
  font-size: 14px;
  text-decoration: none;
}

.avk-footer a:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.avk-footer__bottom {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.avk-footer__bottom p {
  max-width: 36em;
  margin: 0;
  color: var(--steel);
  font-size: 12px;
}

.avk-footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 8px 20px;
}

.avk-footer__legal a {
  min-height: 24px;
  color: var(--steel);
  font-size: 12px;
}

.avk-footer__legal button {
  min-height: 24px;
  padding: 0;
  border: 0;
  color: var(--steel);
  background: transparent;
  font: inherit;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.cookie-notice {
  box-sizing: border-box;
  position: fixed;
  z-index: 90;
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(490px, calc(100% - 24px));
  margin: 0;
  padding: 7px 9px;
  border: 1px solid rgba(38, 66, 143, .2);
  border-radius: 10px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 3px 12px rgba(14, 29, 66, .1);
  pointer-events: none;
}

.cookie-notice[hidden],
body:has(.avk-quiz-dialog[open]) .cookie-notice,
.cookie-notice--quiz-near {
  display: none;
}

.cookie-notice__copy p {
  margin: 0;
  color: var(--steel);
  font-size: 11px;
  line-height: 1.3;
}

.cookie-notice__copy a {
  color: var(--blue);
  text-underline-offset: 3px;
  pointer-events: auto;
}

.cookie-notice__actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.cookie-notice__actions button {
  min-height: 32px;
  padding: 5px 9px;
  border-radius: 999px;
  font: 500 11px/1.2 'Jost', sans-serif;
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
}

.cookie-notice__primary {
  border: 1px solid var(--ink);
  color: #fff;
  background: var(--ink);
}

.cookie-notice__secondary {
  border: 1px solid var(--line);
  color: var(--blue);
  background: #fff;
}

.cookie-notice__actions button:focus-visible {
  outline: 2px solid rgba(31, 60, 136, 0.42);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  z-index: 99;
  top: -100px;
  left: 20px;
  padding: 12px 20px;
  background: #fff;
  color: var(--ink);
}

.skip-link:focus {
  top: 12px;
}

@media (max-width: 980px) {
  .contacts-panel {
    grid-template-columns: minmax(0, 1fr) minmax(320px, .82fr);
    min-height: 500px;
  }

  .contact-map {
    min-height: 500px;
  }

  .contact-card {
    padding: 32px;
  }

  .contact-list > div {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .contact-card__footer,
  .avk-footer__bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .avk-footer__legal {
    justify-content: start;
  }
}

@media (max-width: 760px) {
  .cookie-notice {
    right: 6px;
    bottom: max(6px, env(safe-area-inset-bottom));
    width: calc(100% - 12px);
    gap: 7px;
    padding: 6px 8px;
  }

  .cookie-notice__copy p {
    font-size: 11px;
  }

  .contacts-panel {
    grid-template-columns: 1fr;
    border-radius: 24px;
  }

  .contact-map {
    min-height: 320px;
  }

  .contact-map__open {
    right: 16px;
    bottom: 16px;
    left: 16px;
    min-height: 50px;
  }

  .contact-card {
    padding: 28px 20px 24px;
  }

  .contact-card__lead h3 {
    font-size: 32px;
  }

  .contact-card__lead p,
  .contact-card__footer p {
    font-size: 16px;
  }

  .contact-list {
    margin-top: 28px;
  }

  .contact-list > div {
    padding: 18px 0;
  }

  .contact-list address,
  .contact-list a {
    font-size: 20px;
  }

  .contact-phone-line {
    justify-content: space-between;
  }

  .contact-list dd .contact-messenger {
    width: 44px;
    min-height: 44px;
  }

  .contact-card__footer {
    gap: 18px;
    padding-top: 22px;
  }

  .avk-footer__top {
    align-items: start;
    flex-direction: column;
  }

  .avk-footer nav {
    gap: 8px 20px;
  }
}
