/* ==========================================================================
   Contact Section Module
   Контакты, форма обратной связи и карта.
   ========================================================================== */

.contact-item + .contact-item {
  margin-top: 0;
}

/* Левая карточка с контактными данными */
.contact-card {
  border-radius: 8px;
  background: #fff;
}

.contact-card::before {
  display: none;
}

.contact-card-head {
  margin-bottom: 16px;
}

.contact-card-head .section-label {
  margin-bottom: 8px;
  color: #164075;
}

.contact-card-head h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: #12345e;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid #edf3f9;
}

.contact-item:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.contact-item i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 50%;
  background: #f2f7fc;
  color: #164075;
  box-shadow: inset 0 0 0 1px #d9e6f3;
  font-size: 13px;
}

.contact-item div {
  flex: 1 1 auto;
  min-width: 0;
}

.contact-item strong {
  display: block;
  margin-bottom: 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5f7698;
}

.contact-item span {
  display: block;
  color: #173e72;
  line-height: 1.45;
  font-size: 14px;
}

.contact-item a {
  color: #164075;
  font-weight: 600;
}

/* Обёртка секции контактов и карточка карты */
.contact-layout {
  align-items: stretch;
}

.map-card {
  height: 100%;
  padding: 14px;
  border: 1px solid #dfe7f2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(22, 64, 117, 0.04);
}

.map-card-head {
  margin-bottom: 12px;
}

.map-card-head .section-label {
  margin-bottom: 6px;
  color: #164075;
}

.map-card-head h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: #12345e;
}

.map-frame {
  width: 100%;
  min-height: 420px;
  border: 0;
  border-radius: 8px;
  background: #f5f9fd;
}

/* Правая карточка с формой обратной связи */
.form-card {
  border-radius: 8px;
  background: #fff;
}

.form-card::before {
  display: none;
}

.form-card-head {
  margin-bottom: 18px;
}

.form-card-head .section-label {
  margin-bottom: 8px;
  color: #164075;
}

.form-card-head h3 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  color: #12345e;
}

.form-card-head p {
  max-width: 520px;
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: #5b7090;
}

.form-field {
  display: block;
}

.form-field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5f7698;
}

.contact-form {
  position: relative;
  z-index: 1;
}

/* Кастомный чекбокс согласия на обработку данных */
.form-consent {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  cursor: pointer;
}

.form-consent-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.form-consent-box {
  position: relative;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 1px solid #bfd3e9;
  border-radius: 5px;
  background: #fff;
  box-shadow: inset 0 1px 1px rgba(22, 64, 117, 0.04);
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-consent-box::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
  opacity: 0;
}

.form-consent-input:checked + .form-consent-box {
  border-color: #164075;
  background: linear-gradient(180deg, #164075 0%, #2d6fb4 100%);
  box-shadow: 0 8px 18px rgba(22, 64, 117, 0.18);
}

.form-consent-input:checked + .form-consent-box::after {
  opacity: 1;
}

.form-consent-input:focus-visible + .form-consent-box {
  box-shadow: 0 0 0 4px rgba(89, 181, 232, 0.16);
}

.form-consent-text {
  color: #5b7090;
  line-height: 1.5;
  font-size: 13px;
}

/* Поля формы, textarea и select */
.form-control {
  min-height: 46px;
  padding: 10px 13px;
  border-radius: 6px;
  border: 1px solid #d9e3ee;
  background: #fff;
  font-size: 14px;
  color: #173e72;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-control::placeholder {
  color: #8a9bb5;
}

textarea.form-control {
  min-height: 132px;
  resize: vertical;
}

.form-select {
  padding-right: 40px;
  background-position: right 14px center;
  background-size: 12px 9px;
}

.form-control:focus {
  border-color: #164075;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(89, 181, 232, 0.12);
}

.contact-submit-btn {
  min-width: 150px;
  padding-inline: 22px;
  border-radius: 6px;
  box-shadow: none;
}

/* Мобильная коррекция высоты карты */
@media (max-width: 767.98px) {
  .map-frame {
    min-height: 320px;
  }
}
