/* ==========================================================================
   КОНТАКТИ ТА ФОРМА — ТЕМНА ТЕМА (css/contacts.css)
   Компанія: APFEL EXPERT (APFEL GROUP)
   ========================================================================== */

/* 1. Глибокий темний фон секції */
.contacts-section {
  position: relative;
  background-color: var(--bg-dark) !important;
  padding: 85px 0 95px;
  color: var(--text-light);
  border-top: 1px solid var(--border-dark);
  border-bottom: 1px solid var(--border-dark);
}

.contacts-section .section__header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 40px;
}

/* Сліпучо-білий заголовок */
.contacts-section .section__title {
  font-size: 2.3rem;
  font-weight: 800;
  color: #FFFFFF !important;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

/* Світло-сірий підзаголовок */
.contacts-section .section__subtitle {
  font-size: 1.05rem;
  color: var(--text-muted) !important;
  line-height: 1.6;
}

/* =========================================================================
   ДВОКОЛОНКОВА СІТКА — СТРОГО ОДНАКОВА ВИСОТА КОЛОНОК (stretch)
   ========================================================================= */
.contacts-section__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: stretch; /* Примусово вирівнює обидві картки по висоті */
}

/* --- ЛІВА КОЛОНКА: КАРТКА З ФОРМОЮ --- */
.contacts-form-card {
  background: #1E293B;
  border: 1px solid #334155;
  border-radius: var(--radius-lg);
  padding: 32px 34px; /* Компактні відступи */
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.contacts-form-card__inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.contacts-form-card__title {
  font-size: 1.6rem; 
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 6px;
  line-height: 1.25;
}

.contacts-form-card__subtitle {
  font-size: 0.94rem; 
  color: #CBD5E1; 
  margin-bottom: 20px; /* Зменшено відстань до форми */
  line-height: 1.45;
}

/* Стилі інпутів та лейблів */
.contact-form__group {
  display: flex;
  flex-direction: column;
  gap: 6px; 
  margin-bottom: 14px; /* Компактніше між полями */
}

.contact-form__label {
  font-size: 0.85rem; 
  font-weight: 500;
  color: #CBD5E1;
}

.contact-form__input,
.contact-form__textarea {
  width: 100%;
  padding: 12px 16px; /* Акуратна висота інпутів */
  background: #0F172A;
  border: 1px solid #334155;
  border-radius: var(--radius-sm);
  color: #FFFFFF;
  font-size: 0.95rem; 
  font-family: inherit;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form__input::placeholder,
.contact-form__textarea::placeholder {
  color: #64748B;
}

.contact-form__input:focus,
.contact-form__textarea:focus {
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgba(99, 175, 56, 0.25);
}

.contact-form__textarea {
  resize: vertical;
}

/* Чекбокс */
.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.checkbox__input {
  accent-color: var(--primary-green);
  width: 16px; 
  height: 16px;
  cursor: pointer;
}

.checkbox__label {
  font-size: 0.85rem; 
  color: #CBD5E1;
  line-height: 1.4;
}

/* Повідомлення успішної відправки */
.contacts-success {
  text-align: center;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
  height: 100%;
  min-height: 400px;
  animation: contactsFadeIn 0.4s ease;
}

@keyframes contactsFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.contacts-success__icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
  background: rgba(99, 175, 56, 0.18);
  border: 2px solid var(--primary-green);
  color: var(--primary-green);
  font-size: 1.8rem;
  font-weight: 800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(99, 175, 56, 0.4);
}

.contacts-success__title {
  font-size: 1.8rem;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 8px;
}

.contacts-success__text {
  font-size: 1rem;
  color: #E2E8F0;
  margin-bottom: 24px;
  line-height: 1.5;
}

/* --- ПРАВА КОЛОНКА: ІНФОРМАЦІЯ ТА КАРТА --- */
.contacts-info-card {
  background: #1E293B;
  border: 1px solid #334155;
  border-radius: var(--radius-lg);
  padding: 32px 34px; /* Компактні відступи */
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.contacts-info-card__top {
  display: flex;
  flex-direction: column;
}

.contacts-info__person {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #334155;
}

.contacts-info__person-badge {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(99, 175, 56, 0.2);
  color: #86EFAC;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 50px;
  margin-bottom: 10px;
}

.contacts-info__person-name {
  font-size: 1.6rem;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 4px;
  line-height: 1.25;
}

.contacts-info__person-role {
  font-size: 0.95rem;
  color: #CBD5E1;
  font-weight: 500;
  margin: 0;
}

.contacts-info__list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
  display: flex;
  flex-direction: column;
  gap: 14px; /* Компактніше */
}

.contacts-info__item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.contacts-info__label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary-green);
  letter-spacing: 0.5px;
}

.contacts-info__link {
  font-size: 1.1rem;
  font-weight: 700;
  color: #FFFFFF;
  text-decoration: none;
  transition: color 0.3s ease;
}

.contacts-info__link:hover {
  color: #86EFAC;
}

.contacts-info__text {
  font-size: 0.95rem;
  color: #E2E8F0;
  line-height: 1.45;
}

/* Карта розтягується автоматично */
.contacts-info__map-wrap {
  width: 100%;
  flex-grow: 1;
  min-height: 180px; /* Зменшена мінімальна висота, щоб не розтягувати картку */
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid #334155;
  background: #0F172A;
  display: flex;
}

.contacts-info__map {
  width: 100%;
  height: 100%;
  border: 0;
  filter: contrast(95%) brightness(95%);
}

/* ==========================================================================
   АДАПТИВНІСТЬ ДЛЯ ТЕЛЕФОНІВ ТА ПЛАНШЕТІВ (MOBILE-FIRST)
   ========================================================================== */

@media (max-width: 1024px) {
  .contacts-section__grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .contacts-section .section__title {
    font-size: 2.1rem;
  }

  .contacts-info__map-wrap {
    min-height: 240px;
  }
}

/* СМАРТФОНИ */
@media (max-width: 768px) {
  .contacts-section {
    padding: 50px 0 60px;
  }

  .contacts-section .section__header {
    margin-bottom: 24px;
  }

  .contacts-section .section__title {
    font-size: 1.75rem;
    margin-bottom: 8px;
  }

  .contacts-section .section__subtitle {
    font-size: 0.95rem !important;
    line-height: 1.45;
  }

  .contacts-section__grid {
    gap: 16px;
  }

  .contacts-form-card,
  .contacts-info-card {
    padding: 24px 20px;
    border-radius: var(--radius-md);
  }

  .contacts-form-card__title {
    font-size: 1.5rem;
  }

  .contacts-form-card__subtitle {
    font-size: 0.9rem;
    margin-bottom: 16px;
  }

  .contact-form__group {
    margin-bottom: 14px;
    gap: 6px;
  }
  
  .contact-form__label {
    font-size: 0.85rem;
  }

  .contact-form__input,
  .contact-form__textarea {
    padding: 12px 14px;
    font-size: 16px !important; /* Обов'язково для Safari iOS */
  }
  
  .checkbox__label {
    font-size: 0.85rem;
  }

  .contacts-info__person {
    margin-bottom: 16px;
    padding-bottom: 14px;
  }

  .contacts-info__person-name {
    font-size: 1.45rem;
  }

  .contacts-info__list {
    gap: 14px;
    margin-bottom: 16px;
  }

  .contacts-info__link {
    font-size: 1.05rem;
  }

  .contacts-info__text {
    font-size: 0.9rem;
  }

  .contacts-info__map-wrap {
    min-height: 200px;
  }

  .contacts-success {
    min-height: 320px;
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .contacts-section .section__title {
    font-size: 1.55rem;
  }
}