/* Самостоятельный шаблон страницы контактов. Контент и связи приходят из админки. */
.contacts-page { padding: 8px 0 88px; }
.contacts-head { max-width: 1040px; margin: 24px 0 42px; }
.contacts-head h1 { margin: 0; font-size: clamp(34px, 3.4vw, 52px); line-height: 1.12; font-weight: 700; }
.contacts-head .blog-crumbs { margin-top: 12px; }

.contacts-layout { display: grid; grid-template-columns: minmax(0, .92fr) minmax(520px, 1.08fr); gap: 24px; align-items: start; }
.contacts-layout--single { grid-template-columns: minmax(0, 1fr); }
.contacts-details {
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface);
}
.contacts-card {
  --contact-icon: none;
  --contact-icon-center: 53px;
  position: relative;
  min-width: 0; display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 18px; align-items: center;
  padding: 25px 28px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent;
  transition: background-color var(--transition);
}
.contacts-card:last-child { border-bottom: 0; }
.contacts-card::before {
  content: ""; width: 50px; height: 50px; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 11%, var(--surface));
}
.contacts-card::after {
  content: ""; position: absolute; left: var(--contact-icon-center); top: 50%; width: 23px; height: 23px;
  background-color: var(--accent); transform: translate(-50%, -50%);
  -webkit-mask: var(--contact-icon) center / 23px 23px no-repeat;
  mask: var(--contact-icon) center / 23px 23px no-repeat;
}
.contacts-card--address { --contact-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 10c0 5-8 11-8 11S4 15 4 10a8 8 0 1 1 16 0Z' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='12' cy='10' r='2.5' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E"); }
.contacts-card--phones { --contact-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1 1 .4 2 .7 2.8a2 2 0 0 1-.5 2.1L8.1 9.9a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.5c.9.4 1.8.6 2.8.7a2 2 0 0 1 1.7 2.1Z' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.contacts-card--email { --contact-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='5' width='18' height='14' rx='2' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='m3 7 9 6 9-6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.contacts-card--schedule { --contact-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M12 7v5l3 2' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.contacts-card--wide { grid-column: 1 / -1; }
.contacts-card:hover { background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
.contacts-card__label { display: block; margin: 1px 0 7px; color: var(--fg-faint); font-size: 12px; font-weight: 600; line-height: 18px; letter-spacing: .08em; text-transform: uppercase; }
.contacts-card__value { display: block; overflow-wrap: anywhere; color: var(--fg); font-size: 16px; font-weight: 600; line-height: 25px; }
.contacts-content a.contacts-card__value { color: var(--fg); }
.contacts-content a.contacts-card__value:hover { color: var(--accent); }
.contacts-card__links { display: flex; flex-direction: column; gap: 4px; }

.contacts-form { min-width: 0; padding: 36px 38px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg-soft); }
.contacts-form .form-inline { max-width: none; }
.contacts-form .ip-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.contacts-form .ip-form__title, .contacts-form .ip-form__context, .contacts-form .ip-form__consent,
.contacts-form .ip-form__submit, .contacts-form .ip-form__ok, .contacts-form .ip-form__err { grid-column: 1 / -1; }
.contacts-form .ip-form__title { margin-bottom: 6px; font-size: 30px; line-height: 1.2; }
.contacts-form .ip-form__field:has(input[type="email"]),
.contacts-form .ip-form__field:has(.ip-form__textarea) { grid-column: 1 / -1; }
.contacts-form .ip-form__input, .contacts-form .ip-form__textarea { background: var(--surface); }
.contacts-form .ip-form__input { min-height: 52px; }
.contacts-form .ip-form__textarea { min-height: 120px; }
.contacts-form .ip-form__submit { width: 100%; min-height: 50px; margin-top: 2px; }
.contacts-form .ip-form__consent a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.contacts-form .ip-form__consent a:hover { color: var(--accent); }

.contacts-content { width: 100%; max-width: none; }
.contacts-intro { max-width: 940px; margin: 0 0 42px; color: var(--fg-muted); font-size: 17px; line-height: 28px; }
.contacts-content > :first-child { margin-top: 0; }
.contacts-content > :last-child { margin-bottom: 0; }
.contacts-content .contacts-layout { margin: 0; }
.contacts-content .contacts-details { margin: 0; }
.contacts-content .contacts-card { margin: 0; }
.contacts-content .contacts-form { margin: 0; }
.contacts-content .contacts-map { max-width: none; }
.contacts-content .contacts-card__value,
.contacts-content .contacts-map__head > a { text-decoration: none; }
.contacts-map { margin-top: 56px; }
.contacts-map__head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.contacts-map__head span { color: var(--fg-faint); font-size: 13px; line-height: 20px; }
.contacts-map__head h2 { margin: 5px 0 0; font-size: clamp(28px, 3vw, 40px); line-height: 1.18; }
.contacts-map__head > a { flex: 0 0 auto; padding: 8px 0; color: var(--fg); font-size: 14px; font-weight: 600; }
.contacts-map__head > a:hover { color: var(--accent); }
.contacts-map__frame { min-height: 400px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg-soft); }
.contacts-map__frame iframe { display: block; width: 100% !important; min-height: 400px; border: 0; }

@media (max-width: 1100px) {
  .contacts-layout { grid-template-columns: 1fr; }
  .contacts-form .ip-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .contacts-page { padding-bottom: 64px; }
  .contacts-head { margin-bottom: 30px; }
  .contacts-layout { gap: 20px; }
  .contacts-intro { margin-bottom: 30px; font-size: 15px; line-height: 25px; }
  .contacts-card--wide { grid-column: auto; }
  .contacts-form { padding: 24px; }
  .contacts-form .ip-form { grid-template-columns: 1fr; gap: 15px; }
  .contacts-form .ip-form > * { grid-column: 1 !important; }
  .contacts-map { margin-top: 44px; }
  .contacts-map__head { align-items: flex-start; }
  .contacts-map__frame, .contacts-map__frame iframe { min-height: 360px; }
}

@media (max-width: 479px) {
  .contacts-page { padding-bottom: 52px; }
  .contacts-head { margin-top: 18px; }
  .contacts-card { --contact-icon-center: 41px; grid-template-columns: 42px minmax(0, 1fr); gap: 14px; padding: 20px; }
  .contacts-card::before { width: 42px; height: 42px; }
  .contacts-card::after { width: 20px; height: 20px; -webkit-mask-size: 20px 20px; mask-size: 20px 20px; }
  .contacts-card__value { font-size: 15px; line-height: 23px; }
  .contacts-form { padding: 20px; }
  .contacts-form .ip-form__title { font-size: 24px; }
  .contacts-map__head { display: block; }
  .contacts-map__head > a { display: inline-flex; margin-top: 10px; }
  .contacts-map__frame, .contacts-map__frame iframe { min-height: 320px; }
}

@media (prefers-reduced-motion: reduce) {
  .contacts-card { transition: none; }
}
