/**
 * @file
 * Страница Контактов (node/4)
 * 
 * Сетка:
 * - Десктоп: текст + форма в ряд, карта снизу
 * - Мобайл: текст → карта → форма
 * 
 * Sticky-поведение:
 * - Обе колонки (текст и форма) прилипают к верху экрана независимо
 * - Короткая колонка "держит" позицию до конца своего контента
 * - На мобайле sticky отключается
 */

/* ===== РЯД 1: информация + форма ===== */
.contacts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 30px;
  align-items: start;
}

.contacts-info {
  position: sticky;
  top: 20px;
  align-self: start;
}

.contacts-form-wrapper {
  position: sticky;
  top: 20px;
  align-self: start;
  background: #f8f9fa;
  padding: 30px;
  border-radius: 8px;
}

.contacts-form-wrapper h2 {
  margin-top: 0;
  font-size: 22px;
  font-weight: 500;
}

/* ===== СТИЛИ ФОРМЫ (как в корзине) ===== */
.contact-form .order-form-group {
  display: flex;
  flex-wrap: wrap;
  row-gap: 6px;
  column-gap: 6px;
  margin: 0;
  padding: 0;
  border: 0 none;
}

.contact-form input:not([type="checkbox"]),
.contact-form textarea {
  width: 100%;
  background: #fff;
  border-radius: 6px;
  padding: 16px 24px;
  font-size: 16px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

.contact-form input:not([type="checkbox"]):focus,
.contact-form textarea:focus {
  border-color: #911504;
  outline: none;
  box-shadow: 0 0 0 3px rgba(145, 21, 4, 0.15);
}

.contact-form input.error,
.contact-form textarea.error {
  background: #f2c1c1;
  border-color: #911504;
}

.contact-form input[type="checkbox"].error {
  outline: 5px solid #911504;
  outline-offset: 2px;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  opacity: 0.7;
}

.contact-form textarea {
  resize: none;
  min-height: 100px;
}

.contact-form .form-item-confirm {
  margin-top: 16px;
}

.contact-form .form-item-confirm label {
  display: inline;
  font-size: 14px;
}

.contact-form .form-checkbox {
  width: auto;
  margin-right: 8px;
}

.contact-form .w-100 {
  width: 100%;
}

.contact-form .w-50 {
  width: calc(50% - 3px);
}

.contact-form .form-actions {
  margin-top: 20px;
}

.contact-form .form-actions input[type="submit"] {
  width: 100%;
  height: 60px;
  background: #911504;
  border-radius: 4px;
  border: 0 none;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.contact-form .form-actions input[type="submit"]:hover {
  opacity: 0.7;
}

/* ===== РЯД 2: карта ===== */
.contacts-map {
  margin-top: 40px;
}

.contacts-map iframe {
  border-radius: 8px;
}

/* ===== АДАПТИВ: мобильная версия ===== */
@media (max-width: 768px) {
  .contacts-row {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .contacts-info,
  .contacts-form-wrapper {
    position: static;
    top: auto;
    align-self: auto;
  }

  .contacts-info {
    order: 1;
  }

  .contacts-map {
    order: 2;
    margin-top: 30px;
  }

  .contacts-form-wrapper {
    order: 3;
    padding: 20px;
  }

  .contact-form .w-50 {
    width: 100%;
  }
}