/* ================================
   CONTACT PAGE
================================ */

.contact-page {
  background: #ffffff;
}

.contact-page__head {
  max-width: 760px;
  margin-bottom: 26px;
}

.contact-page__title {
  margin-bottom: 10px;
  text-transform: uppercase;
  font-weight: 400;
}

.contact-page__subtitle {
  max-width: 620px;
  margin: 0;
  color: #555555;
  font-size: 15px;
  line-height: 1.55;
}

.contact-page__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.contact-page__main {
  display: flex;
  flex-direction: column;
  gap: 26px;
  min-width: 0;
}

.contact-page__main section {
  margin: 0;
}

.contact-office {
  background: #ffffff;
  border: 1px solid #e7e1d8;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.contact-office__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 30px 0;
}

.contact-office__heading {
  min-width: 0;
}

.contact-office__label {
  margin-bottom: 7px;
  color: #b57a24;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-office__title {
  margin: 0;
  color: #1e1e1e;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 400;
  text-transform: uppercase;
}

.contact-office__info {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr 0.9fr;
  gap: 24px;
  padding: 25px 30px 28px;
}

.contact-info-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  min-width: 0;
}

.contact-info-item__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid #e7e1d8;
  background: #f8f4ee;
  color: #b57a24;
  font-size: 18px;
  line-height: 1;
}

.contact-info-item__title {
  margin-bottom: 7px;
  color: #1e1e1e;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 700;
  text-transform: uppercase;
}

.contact-info-item__text,
.contact-info-item__link {
  color: #555555;
  font-size: 14px;
  line-height: 1.55;
  font-weight: 400;
}

.contact-info-item__link {
  display: inline-flex;
  color: #1e1e1e;
  text-decoration: none;
}

.contact-info-item__link:hover {
  color: #b57a24;
  text-decoration: none;
}

.contact-office__map {
  height: 360px;
  border-top: 1px solid #e7e1d8;
  background: #f8f4ee;
  overflow: hidden;
}

.contact-office__map iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.contact-consult {
  position: sticky;
  top: 20px;
  min-width: 0;
}

.contact-consult__inner {
  padding: 30px 28px;
  background: #1e1e1e;
  background-image: linear-gradient(135deg, #1e1e1e 0%, #2a2620 100%);
  border: 1px solid rgba(200, 149, 62, 0.32);
  color: #ffffff;
}

.contact-consult__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 22px;
  border: 1px solid rgba(200, 149, 62, 0.52);
  color: #c8953e;
  font-size: 24px;
  line-height: 1;
}

.contact-consult__title {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 400;
  text-transform: uppercase;
}

.contact-consult__text {
  margin: 0 0 24px;
  color: #d8d8d8;
  font-size: 14px;
  line-height: 1.55;
}

.contact-consult__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid #a86c1b;
  border-radius: 3px;
  background: linear-gradient(180deg, #c8953e 0%, #a86c1b 100%);
  color: #ffffff;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition:
    opacity 0.2s ease,
    color 0.2s ease;
}

.contact-consult__btn:hover {
  color: #000000;
  text-decoration: none;
  opacity: 0.9;
}

.contact-consult__phone-box {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.contact-consult__phone-box span {
  display: block;
  margin-bottom: 8px;
  color: #bdbdbd;
  font-size: 12px;
  line-height: 1.2;
  text-transform: uppercase;
}

.contact-consult__phone-box a {
  color: #ffffff;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 700;
  text-decoration: none;
}

.contact-consult__phone-box a:hover {
  color: #c8953e;
  text-decoration: none;
}

/* ================================
   CONTACT MAPS CONTROLL
================================ */
.contact-office__map {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

/* По умолчанию iframe не перехватывает скролл */
.contact-office__map iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}

/* Затемнение и подсказка поверх карты */
.contact-office__map::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(20, 18, 15, 0.22);
  opacity: 1;
  visibility: visible;
  transition: 0.25s ease;
}

.contact-office__map::after {
  content: "Нажмите, чтобы управлять картой";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  transform: translate(-50%, -50%);
  padding: 8px 12px;
  border: 1px solid #a86c1b;
  background: linear-gradient(180deg, #c8953e 0%, #a86c1b 100%);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
  opacity: 1;
  visibility: visible;
  transition: 0.25s ease;
  pointer-events: none;
}

/* Активное состояние карты */
.contact-office__map.is-map-active {
  cursor: default;
}

.contact-office__map.is-map-active iframe {
  pointer-events: auto;
}

.contact-office__map.is-map-active::before,
.contact-office__map.is-map-active::after {
  opacity: 0;
  visibility: hidden;
}

/* Кнопка отключения карты */
.contact-office__map-disable {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 4;
  display: none;
  padding: 8px 12px;
  border: 1px solid #a86c1b;
  background: linear-gradient(180deg, #c8953e 0%, #a86c1b 100%);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
}

.contact-office__map.is-map-active .contact-office__map-disable {
  display: block;
}

/* ================================
   CONTACT PAGE ADAPTIVE
================================ */

@media (max-width: 1199px) {
  .contact-page__layout {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 22px;
  }

  .contact-office__top {
    padding: 24px 24px 0;
  }

  .contact-office__info {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 22px 24px 24px;
  }

  .contact-office__map {
    height: 330px;
  }

  .contact-consult__inner {
    padding: 26px 24px;
  }
}

@media (max-width: 991px) {
  .contact-page__layout {
    grid-template-columns: 1fr;
  }

  .contact-consult {
    position: static;
    order: -1;
  }

  .contact-consult__inner {
    flex-direction: column;
    display: flex;
    gap: 18px 22px;
    align-items: flex-start;
  }

  .contact-consult__icon {
    margin-bottom: 0;
  }

  .contact-consult__title {
    margin-bottom: 7px;
    font-size: 22px;
  }

  .contact-consult__text {
    margin-bottom: 0;
  }

  .contact-consult__btn {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .contact-consult__phone-box {
    grid-column: 2 / 4;
    margin-top: 0;
  }
}

@media (max-width: 767px) {
  .contact-page__head {
    margin-bottom: 20px;
  }

  .contact-page__subtitle {
    font-size: 13px;
    line-height: 1.45;
  }

  .contact-page__main {
    gap: 18px;
  }

  .contact-office__top {
    padding: 20px 18px 0;
  }

  .contact-office__label {
    font-size: 10px;
  }

  .contact-office__title {
    font-size: 19px;
  }

  .contact-office__info {
    gap: 16px;
    padding: 18px;
  }

  .contact-info-item {
    grid-template-columns: 36px 1fr;
    gap: 12px;
  }

  .contact-info-item__icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .contact-info-item__title {
    margin-bottom: 5px;
    font-size: 11px;
  }

  .contact-info-item__text,
  .contact-info-item__link {
    font-size: 13px;
    line-height: 1.45;
  }

  .contact-office__map {
    height: 285px;
  }

  .contact-consult__inner {
    display: block;
    padding: 24px 20px;
  }

  .contact-consult__icon {
    width: 46px;
    height: 46px;
    margin-bottom: 18px;
    font-size: 21px;
  }

  .contact-consult__title {
    margin-bottom: 10px;
    font-size: 20px;
  }

  .contact-consult__text {
    margin-bottom: 20px;
    font-size: 13px;
    line-height: 1.45;
  }

  .contact-consult__phone-box {
    margin-top: 20px;
  }

  .contact-consult__phone-box a {
    font-size: 18px;
  }
  .contact-office__map::after {
    content: "Коснитесь, чтобы управлять картой";
    font-size: 13px;
    padding: 10px 14px;
  }

  .contact-office__map-disable {
    right: 10px;
    top: 10px;
    font-size: 12px;
  }
}

@media (max-width: 374px) {
  .contact-office__map {
    height: 250px;
  }

  .contact-consult__inner {
    padding: 22px 16px;
  }
}
