/* Contact page pilot: selected compact mobile header and responsive hero. */
.contact-mobile-header {
  display: none;
}

@media screen and (max-width: 991px) {
  body > .nav,
  body > .nav.nav_is_2nd,
  body > .nav.nav_is_3d {
    display: none !important;
  }

  .contact-mobile-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: block;
    --contact-mobile-phone-font-size: clamp(.98rem, 3.6vw, 1.15rem);
    color: var(--_colors---core-accent-color--accent-primary);
    background: var(--_colors---navbar-colors--navbar-accent-1);
    box-shadow: 0 .15rem .65rem rgb(66 45 23 / 8%);
  }

  .contact-mobile-header__top,
  .contact-mobile-header__phone-row {
    width: min(100%, 74rem);
    margin-inline: auto;
    padding-inline: clamp(1rem, 5.5vw, 2rem);
  }

  .contact-mobile-header__top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 2.75rem;
    align-items: center;
    min-height: 5rem;
  }

  .contact-mobile-header__brand {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: .65rem;
    color: inherit;
    text-decoration: none;
  }

  .contact-mobile-header__brand img {
    width: 2.9rem;
    height: 2.9rem;
    flex: 0 0 auto;
    object-fit: contain;
    overflow: visible;
  }

  .contact-mobile-header__brand span {
    display: grid;
    min-width: 0;
    gap: .05rem;
  }

  .contact-mobile-header__brand strong {
    overflow: hidden;
    font-size: clamp(1.15rem, 3.7vw, 1.5rem);
    font-weight: 400;
    letter-spacing: -.035em;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .contact-mobile-header__brand small {
    overflow: hidden;
    font-size: clamp(.68rem, 2.35vw, .85rem);
    font-weight: 400;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .contact-mobile-header__toggle,
  .contact-mobile-header__more {
    appearance: none;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
  }

  .contact-mobile-header__toggle {
    display: grid;
    width: clamp(3.25rem, 12vw, 3.75rem);
    height: clamp(3.25rem, 12vw, 3.75rem);
    box-sizing: border-box;
    padding: .45rem;
    place-items: center;
    border-radius: 50%;
    transition: background-color .18s ease, color .18s ease;
  }

  .contact-mobile-header__toggle svg {
    width: 1.75rem;
    height: 1.75rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.65;
  }

  .contact-mobile-header__phone-row {
    display: flex;
    min-height: 3.25rem;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    gap: .75rem;
    border-top: 1px solid rgb(135 100 49 / 16%);
  }

  .contact-mobile-header__phone {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
    color: inherit;
    font-size: var(--contact-mobile-phone-font-size);
    font-weight: 400;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
  }

  .contact-mobile-header__more {
    display: inline-flex;
    width: 2.75rem;
    min-width: 2.75rem;
    min-height: 3.25rem;
    align-items: center;
    justify-content: flex-start;
  }

  .contact-mobile-header__more svg {
    width: 1.65rem;
    height: 1.65rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.35;
    transition: transform .18s ease;
  }

  .contact-mobile-header.is-phone-open .contact-mobile-header__more svg {
    transform: rotate(180deg);
  }

  .contact-mobile-header__panel[hidden] {
    display: none;
  }

  .contact-mobile-header__phone-panel[hidden] {
    display: none;
  }

  .contact-mobile-header__phone-panel {
    display: flex;
    width: min(100%, 74rem);
    min-height: 3.25rem;
    align-items: center;
    justify-content: flex-end;
    box-sizing: border-box;
    margin-inline: auto;
    padding-inline: clamp(1rem, 5.5vw, 2rem);
    border-top: 1px solid rgb(135 100 49 / 16%);
    background: #fffdf9;
    box-shadow: 0 .9rem 1.5rem rgb(66 45 23 / 14%);
  }

  .contact-mobile-header__phone-panel-link {
    color: inherit;
    font-size: var(--contact-mobile-phone-font-size);
    font-weight: 400;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
  }

  .contact-mobile-header__panel {
    max-height: calc(100vh - 8rem);
    overflow-y: auto;
    border-top: 1px solid rgb(135 100 49 / 16%);
    background: #fffdf9;
    box-shadow: 0 .9rem 1.5rem rgb(66 45 23 / 14%);
  }

  .contact-mobile-header__panel-inner {
    display: grid;
    width: min(100%, 74rem);
    margin-inline: auto;
    padding: 1.25rem clamp(1rem, 5.5vw, 2rem) 1.5rem;
    gap: .75rem;
  }

  .contact-mobile-header__nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin-top: .25rem;
    border-top: 1px solid rgb(135 100 49 / 14%);
  }

  .contact-mobile-header__nav > a {
    display: flex;
    min-height: 3.45rem;
    align-items: center;
    padding: .5rem .45rem;
    border-bottom: 1px solid rgb(135 100 49 / 14%);
    color: #604824;
    font-size: 1.15rem;
    font-weight: 400;
    text-decoration: none;
  }

  .contact-mobile-header__group {
    min-width: 0;
    border-bottom: 1px solid rgb(135 100 49 / 14%);
  }

  .contact-mobile-header__group > summary {
    display: flex;
    min-height: 3.45rem;
    align-items: center;
    justify-content: space-between;
    padding: .5rem .45rem;
    color: #604824;
    cursor: pointer;
    font-size: 1.15rem;
    font-weight: 400;
    list-style: none;
  }

  .contact-mobile-header__group > summary::-webkit-details-marker {
    display: none;
  }

  .contact-mobile-header__group > summary::after {
    width: .62rem;
    height: .62rem;
    margin-right: .2rem;
    border-right: 4px solid currentColor;
    border-bottom: 4px solid currentColor;
    border-radius: 1px;
    content: "";
    transform: rotate(45deg) translateY(-.15rem);
    transition: transform .18s ease;
  }

  .contact-mobile-header__group[open] > summary::after {
    transform: rotate(225deg) translate(-.1rem, -.05rem);
  }

  .contact-mobile-header__subnav {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .contact-mobile-header__subnav a {
    display: flex;
    min-height: 3.4rem;
    align-items: center;
    justify-content: flex-start;
    padding: .45rem .6rem .45rem calc(.45rem + var(--submenu-indent, 0px));
    border-bottom: 1px solid rgb(135 100 49 / 14%);
    color: #97631f;
    font-size: calc(1.15rem - 2px);
    font-weight: 400;
    line-height: 1.3;
    text-align: left;
    text-decoration: none;
  }

  .contact-mobile-header__group > summary:focus-visible,
  .contact-mobile-header__nav a:focus-visible {
    outline: 3px solid #b9832b;
    outline-offset: -3px;
  }

  .contact-mobile-header__nav a:hover,
  .contact-mobile-header__group > summary:hover {
    background: rgb(189 135 54 / 7%);
  }

  .contact-mobile-header__cta {
    display: inline-flex;
    min-height: 3.25rem;
    align-items: center;
    justify-content: center;
    margin-top: .9rem;
    padding: .75rem 1rem;
    border: 1px solid rgb(99 76 41 / 30%);
    border-radius: 1.25rem;
    background: linear-gradient(180deg, #d9ccb9 0%, #b7a68e 100%);
    box-shadow: 0 .18rem .34rem rgb(70 50 25 / 26%);
    color: #3d2c19;
    font-size: 1rem;
    font-weight: 400;
    text-align: center;
    text-decoration: none;
  }

  .contact-mobile-header :is(a, button):not(.contact-mobile-header__toggle):focus-visible {
    outline: 3px solid #b9832b;
    outline-offset: 2px;
  }

  .contact-mobile-header__toggle:focus-visible {
    outline: none;
    background: rgb(189 135 54 / 16%);
    color: #604824;
  }

  .section > .container > .grid_2-col.gap-medium.margin-bottom_medium {
    grid-template-columns: minmax(0, 1fr);
    row-gap: clamp(2rem, 6vw, 3.5rem);
  }

  .section > .container > .grid_2-col.gap-medium.margin-bottom_medium > .grid-item-manual {
    min-width: 0;
  }

  .section > .container > .grid_2-col.gap-medium.margin-bottom_medium .header {
    text-align: left;
  }

  .section > .container > .grid_2-col.gap-medium.margin-bottom_medium .heading_primary {
    max-width: 18ch;
    margin-inline: 0;
    font-size: clamp(2.35rem, 9.5vw, 4.5rem);
    line-height: 1.04;
    text-wrap: balance;
  }

  .section > .container > .grid_2-col.gap-medium.margin-bottom_medium .subheading {
    max-width: 40rem;
    font-size: clamp(1rem, 3.7vw, 1.25rem);
    line-height: 1.5;
  }
}

@media screen and (max-width: 767px) {
  /* The first section starts directly below the compact mobile header. */
  .section:first-of-type {
    padding-top: clamp(2.5rem, 10vw, 4rem);
  }

  .section > .container {
    padding-inline: clamp(1rem, 5vw, 1.5rem);
  }

  .section > .container > .grid_2-col.gap-medium.margin-bottom_medium {
    row-gap: 2rem;
  }

  .section > .container > .grid_2-col.gap-medium.margin-bottom_medium .heading_primary {
    max-width: 17ch;
  }

  .contact-info-list {
    width: min(100%, 29rem);
    max-width: none;
    margin-inline: auto !important;
    gap: 4rem;
  }

  .contact-info-list .contact-info-list__item {
    /* Keep the contact column airy without letting the desktop icon scale leak in. */
    grid-template-columns: 3rem minmax(0, 1fr) !important;
    column-gap: clamp(1rem, 11vw, 4.5rem) !important;
    align-items: center;
  }

  .contact-info-list__item > .icon {
    width: 3rem !important;
    height: 3rem !important;
    color: #9b8c76 !important;
    background-color: #f0eeee !important;
    border-radius: .5rem;
  }

  .contact-info-list__item > .icon svg {
    width: 1.5rem !important;
    height: 1.5rem !important;
  }

  /* The metro mark is an external SVG, so it cannot inherit currentColor. */
  .contact-info-list__item > .icon .metro_logo_img {
    width: 1.5rem !important;
    height: 1.5rem !important;
    filter: invert(55%) sepia(9%) saturate(1100%) hue-rotate(356deg) brightness(92%) contrast(86%);
  }

  .contact-info-list__phone-links {
    gap: .45rem 1rem;
  }

  .contact-info-list__phone-links .text-link {
    font-weight: 400;
  }

  /* Keep the map useful on a phone: the full Yandex card remains visible,
     instead of being cropped to the old 16:9 decorative frame. */
  .contact-map-section {
    padding-top: 1rem;
  }

  .contact-map-section > .container {
    padding-inline: .75rem;
  }

  .contact-map-card {
    overflow: hidden;
    border: 1px solid #ded3c4;
    border-radius: 1.5rem;
    background: #faf5eb;
    box-shadow: 0 .2rem .55rem rgba(82, 58, 29, .14);
  }

  .contact-map-card__body {
    padding: clamp(1.5rem, 6vw, 2.25rem);
  }

  .contact-map-card__title {
    max-width: 9.5ch;
    margin: 0 0: clamp(1.25rem, 5vw, 2rem);
    color: #705334;
    font-size: clamp(2.65rem, 13vw, 3.8rem);
    font-weight: 400;
    line-height: 1.12;
    letter-spacing: -.035em;
  }

  .contact-map-card__frame,
  .contact-map-card__frame .ya_map_code_ins,
  .contact-map-card__frame .ya_map_code_ins > div {
    width: 100%;
    height: 38.125rem;
  }

  .contact-map-card__frame {
    overflow: hidden;
    border-radius: 1.25rem;
    background: #fff;
  }

  .contact-map-card__frame iframe {
    display: block;
    width: 100% !important;
    height: 38.125rem !important;
    border: 0 !important;
  }
}

@media screen and (max-width: 479px) {
  .contact-mobile-header__top {
    min-height: 4.75rem;
  }

  .contact-mobile-header__brand img {
    width: 2.65rem;
    height: 2.65rem;
  }

  .contact-mobile-header__brand strong {
    font-size: 1.08rem;
  }

  .contact-mobile-header__phone {
    font-size: .92rem;
  }

  .contact-mobile-header__nav {
    grid-template-columns: minmax(0, 1fr);
  }

  .contact-mobile-header__nav > a:nth-child(odd) {
    border-right: 0;
    padding-right: .25rem;
  }

  .contact-mobile-header__nav > a:nth-child(even) {
    padding-left: .25rem;
  }
}
