* { box-sizing: border-box; }

body {
  font-family: -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: #f4f5f7;
  margin: 0;
  padding: 24px 16px;
  color: #222;
}

.form-wrapper {
  max-width: 560px;
  margin: 0 auto;
  background: #fff;
  padding: 32px 28px;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,.06);
}

h1 { font-size: 22px; line-height: 1.3; margin: 0 0 24px; }

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 14px;
}

.required { color: #d33; }

input[type="text"],
input[type="tel"],
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccd0d5;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color .15s;
}

input:focus, textarea:focus {
  outline: none;
  border-color: #3a7afe;
  box-shadow: 0 0 0 3px rgba(58,122,254,.15);
}

textarea { resize: vertical; min-height: 100px; }

.error {
  color: #d33;
  font-size: 13px;
  display: block;
  margin-top: 4px;
  min-height: 16px;
}

.checkbox-field .checkbox-label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 400;
  font-size: 14px;
}

.checkbox-label input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
}

.checkbox-label a { color: #3a7afe; }

button[type="submit"] {
  width: 100%;
  padding: 14px;
  background: #3a7afe;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s;
}

button[type="submit"]:hover:not(:disabled) { background: #2861d8; }
button[type="submit"]:disabled { background: #8eb2ff; cursor: not-allowed; }

.thanks { text-align: center; }
.btn-link {
  display: inline-block;
  margin-top: 16px;
  color: #3a7afe;
  text-decoration: none;
  font-weight: 600;
}


/* Шапка формы: логотип + заголовок */
.form-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.form-logo {
  width: 150px;
  height: 100px;
  object-fit: contain;   /* логотип не искажается */
  flex-shrink: 0;        /* не сжимается при нехватке места */
  display: block;
}

.form-title {
  font-size: 22px;
  line-height: 1.3;
  margin: 0;
  flex: 1 1 auto;
}

/* Заменяем прежнее правило h1 — либо просто удаляем его */
h1 { /* можно оставить для других страниц, если нужно */ }


/* На узких экранах логотип уходит наверх, заголовок — под ним */
@media (max-width: 720px) {
  .form-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .form-logo {
    width: 100%;
    max-width: 300px;
    height: auto;         /* сохраняем пропорции */
  }

  .form-title {
    font-size: 20px;
  }
}