/* ============================================
   Страница Контакты (макет Figma: svg/figma/contact)
   Холст: 1920×1080, фон #F6F8F9
   Точные координаты по макету
   ============================================ */

/* Страница в один экран: без прокрутки, без footer */
body.contact-page {
  background: #F6F8F9;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Хедер на светлом фоне: тёмные линии и логотип */
.contact-page .header--light .header__burger-line {
  background-color: #FFFFFF;
}

.contact-page .header--light .header__burger.header__burger--active .header__burger-line {
  background-color: var(--color-black);
}

.contact-page .header__line-middle {
  background-color: var(--color-black);
}

/* Footer скрыт на странице контактов */
.contact-page .footer {
  display: none;
}

/* ============================================
   Основной контент
   ============================================ */
.contact-page__main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  max-width: 1920px;
  width: 100%;
  margin: 0 auto;
}

.contact-page__wrap {
  flex: 1;
  min-height: 0;
  position: relative;
  width: 100%;
  overflow: hidden;
}

/* ============================================
   Левая колонка: заголовок и подзаголовок
   По макету: left 66px, заголовок top 295px
   ============================================ */
.contact-page__left {
  position: absolute;
  left: 66px;
  top: 295px;
  z-index: 2;
}

/* Заголовок: font-size 60px, line-height 47px */
.contact-page__title {
  font-family: 'Proxima Nova', 'Mulish', sans-serif;
  font-weight: 400;
  font-size: 60px;
  line-height: 47px;
  letter-spacing: -0.05em;
  color: var(--color-black);
  margin: 0 0 24px;
}

/* Подзаголовок: font-size 42px, line-height 36px, КРАСНЫЙ */
.contact-page__subtitle {
  font-family: 'Proxima Nova', 'Mulish', sans-serif;
  font-weight: 400;
  font-size: 42px;
  line-height: 36px;
  letter-spacing: -0.05em;
  color: var(--color-red, #960018);
  margin: 0;
}

/* ============================================
   Правая колонка: изображение (Mask Group из Figma)
   Точные значения: left 1199px, top -41px, width 728px, height 777px
   ============================================ */
.contact-page__right {
  position: absolute;
  left: 1199px;
  top: -61px;
  width: 728px;
  bottom: 320px; /* растягиваем до верхней границы тулбара */
  z-index: 1;
  overflow: hidden;
}

.contact-page__image {
  position: absolute;
  left: 0;
  top: 0;
  width: 728px;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* ============================================
   Нижний тулбар — 4 ячейки 2×2
   По макету: top 737px, размер 1920×320px
   Ячейки: 960×157px (верх), 960×162px (низ)
   ============================================ */
.contact-toolbar {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 1920px;
  height: 320px;
  display: grid;
  grid-template-columns: 960px 960px;
  grid-template-rows: 157px 162px;
  z-index: 3;
}

/* Для экранов меньше 1920px — масштабируем */
@media screen and (max-width: 1919px) {
  .contact-toolbar {
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }
}

/* Общие стили ячейки */
.contact-toolbar__cell {
  position: relative;
  background: #F4F6F7;
  border: 1px solid #C7C7C7;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 66px;
  text-decoration: none;
  color: #000000;
  transition: background-color 0.2s ease;
}

.contact-toolbar__cell:hover {
  background: #EAEEF0;
}

/* Иконка — по Figma: ~32px от верха ячейки, 19-21px размер */
.contact-toolbar__icon {
  width: 21px;
  height: 21px;
  margin-bottom: 18px;
  color: #000000;
  flex-shrink: 0;
}

/* Текст — по Figma: 24.39px, line-height 26px */
.contact-toolbar__text {
  font-family: 'Proxima Nova', 'Mulish', sans-serif;
  font-weight: 400;
  font-size: 24.39px;
  line-height: 26px;
  letter-spacing: -0.05em;
  color: #000000;
}

/* Стрелка — по Figma: left 874px в ячейке 960px = right 70px */
.contact-toolbar__arrow {
  position: absolute;
  right: 70px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #000000;
}

/* Позиционирование ячеек */
.contact-toolbar__cell--1 {
  grid-column: 1;
  grid-row: 1;
}

.contact-toolbar__cell--2 {
  grid-column: 2;
  grid-row: 1;
}

.contact-toolbar__cell--3 {
  grid-column: 1;
  grid-row: 2;
}

.contact-toolbar__cell--4 {
  grid-column: 2;
  grid-row: 2;
}

/* ============================================
   Адаптив: от 1200px до 1920px
   Пропорциональное масштабирование
   ============================================ */
@media screen and (min-width: 1200px) and (max-width: 1919px) {
  .contact-page__left {
    left: clamp(40px, 3.4375vw, 66px);
    top: clamp(180px, 27.3vh, 295px);
  }

  .contact-page__title {
    font-size: clamp(40px, 3.125vw, 60px);
    line-height: 1.1;
  }

  .contact-page__subtitle {
    font-size: clamp(28px, 2.1875vw, 42px);
    line-height: 1.1;
  }

  .contact-page__right {
    left: auto;
    right: 0;
    width: clamp(450px, 37.9vw, 728px);
    bottom: clamp(260px, 29.6vh, 320px); /* растягиваем до верхней границы тулбара */
  }

  .contact-page__image {
    width: 100%;
    height: 100%;
  }

  .contact-toolbar {
    height: clamp(260px, 29.6vh, 320px);
    grid-template-rows: 1fr 1fr;
  }

  .contact-toolbar__cell {
    padding-left: clamp(40px, 3.4375vw, 66px);
  }

  .contact-toolbar__text {
    font-size: clamp(18px, 1.27vw, 24.39px);
  }

  .contact-toolbar__arrow {
    right: clamp(40px, 3.6vw, 70px);
  }
}

/* ============================================
   Адаптив: планшет (901px - 1199px)
   Горизонтальная раскладка: текст слева, изображение справа
   ============================================ */
@media screen and (max-width: 1199px) and (min-width: 901px) {
  body.contact-page {
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
  }

  .contact-page__main {
    min-height: 100vh;
  }

  .contact-page__wrap {
    display: flex;
    flex-direction: row;
    min-height: calc(100vh - 320px);
  }

  .contact-page__left {
    position: relative;
    left: auto;
    top: auto;
    flex: 0 0 45%;
    padding: 100px 40px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .contact-page__right {
    position: relative;
    right: auto;
    top: auto;
    left: auto;
    flex: 0 0 55%;
    width: 55%;
    min-width: auto;
    height: auto;
    min-height: 400px;
  }

  .contact-page__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
  }

  .contact-page__title {
    font-size: clamp(36px, 4vw, 48px);
    line-height: 1.1;
    margin-bottom: 20px;
  }

  .contact-page__subtitle {
    font-size: clamp(24px, 2.8vw, 32px);
    line-height: 1.2;
  }

  .contact-toolbar {
    position: relative;
    height: auto;
    min-height: 240px;
    grid-template-rows: 120px 120px;
  }

  .contact-toolbar__cell {
    padding-left: 40px;
  }

  .contact-toolbar__text {
    font-size: clamp(16px, 1.8vw, 20px);
    line-height: 1.3;
  }

  .contact-toolbar__icon {
    width: 20px;
    height: 20px;
    margin-bottom: 10px;
  }

  .contact-toolbar__arrow {
    right: 30px;
  }
}

/* ============================================
   Адаптив: планшет и меньше (до 900px)
   ============================================ */
@media screen and (max-width: 900px) {
  body.contact-page {
    overflow-y: auto;
    height: auto;
    min-height: 100vh;
  }

  .contact-page__wrap {
    display: flex;
    flex-direction: column;
  }

  .contact-page__left {
    position: relative;
    left: auto;
    top: auto;
    order: 2;
    padding: 2rem clamp(1rem, 4vw, 40px);
  }

  .contact-page__right {
    position: relative;
    right: auto;
    top: auto;
    order: 1;
    width: 100%;
    min-width: auto;
    height: 50vw;
    min-height: 280px;
    max-height: 400px;
    background: linear-gradient(135deg, #1a0a0a 0%, #0d0505 50%, #000000 100%);
  }

  .contact-page__image {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
  }

  .contact-page__title {
    font-size: clamp(2rem, 6vw, 48px);
    line-height: 1.2;
    margin-bottom: 16px;
  }

  .contact-page__subtitle {
    font-size: clamp(1.25rem, 4vw, 32px);
    line-height: 1.3;
  }

  .contact-toolbar {
    position: relative;
    order: 3;
    height: auto;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 100px 100px;
  }

  .contact-toolbar__cell {
    padding-left: clamp(20px, 4vw, 40px);
  }

  .contact-toolbar__text {
    font-size: clamp(16px, 2.5vw, 20px);
    line-height: 1.2;
  }

  .contact-toolbar__icon {
    width: 18px;
    height: 18px;
    margin-bottom: 8px;
  }

  .contact-toolbar__arrow {
    right: clamp(20px, 4vw, 40px);
    width: 14px;
    height: 14px;
  }
}

/* ============================================
   Адаптив: большие телефоны (до 768px)
   ============================================ */
@media screen and (max-width: 768px) {
  .contact-page__right {
    height: 45vw;
    min-height: 250px;
    max-height: 350px;
  }

  .contact-page__title {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
  }

  .contact-page__subtitle {
    font-size: clamp(1.125rem, 3.5vw, 1.75rem);
  }

  .contact-toolbar {
    grid-template-rows: 90px 90px;
  }

  .contact-toolbar__text {
    font-size: clamp(14px, 2.2vw, 18px);
  }

  .contact-toolbar__icon {
    width: 17px;
    height: 17px;
    margin-bottom: 6px;
  }

  .contact-toolbar__arrow {
    right: clamp(15px, 3vw, 30px);
    width: 13px;
    height: 13px;
  }
}

/* ============================================
   Адаптив: средние телефоны (до 480px)
   ============================================ */
@media screen and (max-width: 480px) {
  .contact-page__left {
    padding: 1.5rem 1rem;
  }

  .contact-page__title {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
  }

  .contact-page__subtitle {
    font-size: 1.125rem;
  }

  .contact-page__right {
    min-height: 220px;
    max-height: 300px;
  }

  .contact-toolbar {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, 75px);
  }

  .contact-toolbar__cell--1 { grid-column: 1; grid-row: 1; }
  .contact-toolbar__cell--2 { grid-column: 1; grid-row: 2; }
  .contact-toolbar__cell--3 { grid-column: 1; grid-row: 3; }
  .contact-toolbar__cell--4 { grid-column: 1; grid-row: 4; }

  .contact-toolbar__cell {
    padding-left: 1rem;
    padding-right: 3rem;
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .contact-toolbar__text {
    font-size: 15px;
    line-height: 1.3;
  }

  .contact-toolbar__text br {
    display: none;
  }

  .contact-toolbar__icon {
    width: 18px;
    height: 18px;
    margin-bottom: 0;
  }

  .contact-toolbar__arrow {
    right: 1rem;
    width: 14px;
    height: 14px;
  }
}

/* ============================================
   Адаптив: маленькие телефоны (до 360px)
   ============================================ */
@media screen and (max-width: 360px) {
  .contact-page__left {
    padding: 1.25rem 0.75rem;
  }

  .contact-page__title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }

  .contact-page__subtitle {
    font-size: 1rem;
  }

  .contact-page__right {
    min-height: 180px;
    max-height: 250px;
  }

  .contact-toolbar {
    grid-template-rows: repeat(4, 65px);
  }

  .contact-toolbar__cell {
    padding-left: 0.75rem;
    padding-right: 2.5rem;
    gap: 10px;
  }

  .contact-toolbar__text {
    font-size: 13px;
  }

  .contact-toolbar__icon {
    width: 16px;
    height: 16px;
  }

  .contact-toolbar__arrow {
    right: 0.75rem;
    width: 12px;
    height: 12px;
  }
}
