/* ═══════════════════════════════════════════════════════
   CONTACT PAGE
   Стили hero — в main.css (.page-hero).
   Здесь: раскладка страницы, контакты-карточки,
   онлайн-галереи и форма.
   ═══════════════════════════════════════════════════════ */

.contact-page {
  padding: 140px var(--gutter) 100px;
}

.contact-page__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 100px;
  align-items: start;
}

@media (max-width: 900px) {
  .contact-page {
    padding: 80px 0 60px;
  }
  .contact-page__grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

/* ═══════════════════════════════════════════════════════
   INTRO — левая колонка
   ═══════════════════════════════════════════════════════ */
.contact-page__intro {
  position: sticky;
  top: 120px;
  min-width: 0;
}

/* ═══════════════════════════════════════════════════════
   СПИСОК КОНТАКТОВ — карточки
   ═══════════════════════════════════════════════════════ */
.contact__info {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 0;                     /* разделители — border-bottom */
  list-style: none;
  padding: 0;
}

/* ─── Строка-карточка ──────────────────────────────── */
.contact-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  transition: padding-left .3s var(--ease);
  text-decoration: none;
}

.contact-item:hover {
  padding-left: 8px;
}

/* Первая карточка — с верхней границей для симметрии */
.contact__info > li:first-child .contact-item {
  border-top: 1px solid var(--border);
}

/* Static (Location) — без hover-эффекта */
.contact-item--static {
  cursor: default;
}
.contact-item--static:hover {
  padding-left: 0;
}

/* ─── Иконка в квадратной рамке ──────────────────── */
.contact-item__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: 1px solid var(--border);
  color: var(--text);
  transition:
    background .3s var(--ease),
    border-color .3s var(--ease),
    color .3s var(--ease),
    transform .3s var(--ease);
  flex-shrink: 0;
}

.contact-item__icon svg {
  display: block;
  width: 22px;
  height: 22px;
}

/* Hover — квадрат становится тёмным, иконка белой */
.contact-item:hover .contact-item__icon {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
  transform: scale(1.04);
}

/* Static — без hover */
.contact-item--static .contact-item__icon {
  transition: none;
}

/* ─── Тело карточки: label сверху, значение под ним ─── */
.contact-item__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.contact-item__label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1;
}

.contact-item__value {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--text);
  word-break: break-word;
  transition: color .3s var(--ease);
}

.contact-item:hover .contact-item__value {
  color: var(--accent);
}

/* ═══════════════════════════════════════════════════════
   ONLINE GALLERIES — карточки со стрелкой
   ═══════════════════════════════════════════════════════ */
.contact__galleries {
  margin-top: 72px;
}

.contact__galleries-title {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.contact__galleries-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.contact-gallery {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  transition: padding-left .3s var(--ease), color .3s var(--ease);
}

.contact__galleries-list > li:first-child .contact-gallery {
  border-top: 1px solid var(--border);
}

.contact-gallery:hover {
  padding-left: 8px;
  color: var(--accent);
}

.contact-gallery__name {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.2;
}

.contact-gallery__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: transform .3s var(--ease), color .3s var(--ease);
  flex-shrink: 0;
}

.contact-gallery__arrow svg {
  display: block;
  width: 16px;
  height: 16px;
}

.contact-gallery:hover .contact-gallery__arrow {
  color: var(--accent);
  transform: translate(3px, -3px);
}

/* ═══════════════════════════════════════════════════════
   ФОРМА — правая колонка
   ═══════════════════════════════════════════════════════ */
.contact__form {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.contact__form input[type="text"],
.contact__form input[type="email"],
.contact__form textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  padding: 12px 0;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 300;
  color: var(--text);
  outline: none;
  transition: border-color .4s var(--ease);
  resize: vertical;
  min-height: 1em;
}

.contact__form input::placeholder,
.contact__form textarea::placeholder {
  color: var(--text-muted);
  opacity: .7;
}

.contact__form input:focus,
.contact__form textarea:focus {
  border-color: var(--text);
}

.contact__form textarea {
  min-height: 140px;
  line-height: 1.5;
}

.contact__form input[name="website"] {
  display: none;
}

.contact__form button {
  align-self: flex-start;
  margin-top: 12px;
}

/* Turnstile */
.contact__form .cf-turnstile {
  margin: 8px 0;
  max-width: 100%;
  overflow: hidden;
}
.contact__form .cf-turnstile > div,
.contact__form .cf-turnstile iframe {
  max-width: 100% !important;
}

/* Сообщение */
.contact__message {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  min-height: 1.4em;
  transition: color .3s var(--ease);
}
.contact__message.is-error   { color: #A04A3C; }
.contact__message.is-success { color: var(--accent); }

/* ═══════════════════════════════════════════════════════
   WHERE TO BUY
   ═══════════════════════════════════════════════════════ */
.contact__where {
  margin-top: 64px;
  padding-top: 8px;
}

.contact__where-title {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.contact__where-text {
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1.5;
  color: var(--text);
  max-width: 42ch;
}

/* ═══════════════════════════════════════════════════════
   INTRO-ТЕКСТ ПЕРЕД ФОРМОЙ
   ═══════════════════════════════════════════════════════ */
.contact-form-wrap {
  display: flex;
  flex-direction: column;
  gap: 32px;
  min-width: 0;
}

.contact-form-intro {
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 40ch;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* Форма внутри обёртки — уже без дополнительных отступов */
.contact-form-wrap .contact__form {
  margin: 0;
}

/* ═══════════════════════════════════════════════════════
   МОБИЛЬНЫЙ
   ═══════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .contact-page {
    padding: 80px var(--gutter) 60px;
  }
  .contact-page__grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .contact-page__intro {
    position: static;
    top: auto;
  }
}

@media (max-width: 600px) {
  .contact-page {
    padding: 60px var(--gutter) 40px;
  }

  .contact-item {
    grid-template-columns: 48px 1fr;
    gap: 16px;
    padding: 20px 0;
  }

  .contact-item__icon {
    width: 48px;
    height: 48px;
  }

  .contact-item__icon svg {
    width: 20px;
    height: 20px;
  }

  .contact-item__value {
    font-size: 18px;
  }

  .contact__galleries {
    margin-top: 48px;
  }

  .contact-gallery {
    padding: 16px 0;
  }

  .contact-gallery__name {
    font-size: 18px;
  }

  .contact__form {
    gap: 20px;
  }
    .contact__where {
    margin-top: 48px;
  }
  .contact__where-text {
    font-size: 18px;
  }

  .contact-form-wrap {
    gap: 24px;
  }
  .contact-form-intro {
    font-size: 18px;
  }
}