/* --- Общие стили --- */
:root {
  --primary-color: #6B4E3D;       /* тёплый кофейно‑коричневый */
  --primary-hover: #523a2d;
  --secondary-color: #f5f0e6;     /* светлый бежевый фон */
  --text-dark: #333;
  --text-light: #666;
  --white: #fff;
  --border-color: #e0d9d0;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--secondary-color);
  color: var(--text-dark);
  line-height: 1.5;
}

.container {
  max-width: 1170px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* --- Кнопки (базовые классы) --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn--primary {
  background-color: var(--primary-color);
  color: var(--white);
}
.btn--primary:hover {
  background-color: var(--primary-hover);
}

.btn--secondary {
  background-color: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}
.btn--secondary:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 700px;
  /*background: linear-gradient(rgba(0,0,0,.3), rgba(0,0,0,.3)), url('../img/hero-bg.jpg') no-repeat center/cover;*/
    background: linear-gradient(
    rgba(0, 0, 0, 0.4),
    rgba(0, 0, 0, 0.4)
  ),
  linear-gradient(
    to bottom,
    #8B6B4E, /* тёплый коричнево‑бежевый */
    #4A3325  /* более тёмный оттенок для глубины */
  );
  display: flex;
  align-items: center;
  text-align: center;
}

.hero__container {
  position: relative;
  z-index: 2;
}

.hero__title {
  font-size: 3rem;
  line-height: 1.1;
  margin-bottom: 16px;
  color: var(--white);
}

.hero__text {
  font-size: 1.25rem;
  color: rgba(255,255,255,.9);
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero__btn {
  width: 100%;
  max-width: 360px;
}

/* --- Секция «Для кого» (forwhom) --- */
.forwhom {
  padding: 64px 0;
  background-color: var(--white);
}

.forwhom__container {
  text-align: center;
}

.forwhom__title {
  font-size: 2.25rem;
  margin-bottom: 40px;
}

.forwhom__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.forwhom__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.forwhom__icon {
  font-size: 2rem;
}

.forwhom__content {
  text-align: left;
}

.forwhom__subtitle {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.forwhom__desc {
  color: var(--text-light);
}

/* --- Преимущества (advantages) --- */
.advantages {
  padding: 64px 0;
}

.advantages__container {
  text-align: center;
}

.advantages__title {
  font-size: 2.25rem;
  margin-bottom: 48px;
}

.advantages__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.advantages__card {
  padding: 24px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
}

.advantages__subtitle {
  font-size: 1.375rem;
  margin-bottom: 12px;
}

.advantages__desc {
  color: var(--text-light);
}

/* --- Формы и поля (form) --- */
.form-group {
  margin-bottom: 20px;
}

.form__label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form__field {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
}

.form__field:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(107, 78, 61, .15);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group--half {
  width: 100%;
}

.form__submit {
  width: 100%;
}

/* --- Модалка (modal) --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,.5);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 9999;
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--white);
  padding: 32px;
  border-radius: 16px;
  width: 90%;
  max-width: 520px;
  box-shadow: 0 20px 64px rgba(0,0,0,.16);
  position: relative;
}

.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.modal__title {
  font-size: 1.75rem;
}

.modal__close {
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: var(--text-dark);
  cursor: pointer;
  padding: 0;
}

.modal__close:hover {
  color: var(--primary-color);
}

/* Статус формы (AJAX) */
.form-status {
  text-align: center;
  font-size: 0.95rem;
  min-height: 24px;
}

.form-status--success {
  color: #2E7D32;
}

.form-status--error {
  color: #C62828;
}

#form-submit[disabled] {
  opacity: 0.7;
  cursor: not-allowed;
}

/* --- Адаптив --- */
@media (max-width: 768px) {
  .hero__title {
    font-size: 2rem;
  }

  .hero__text {
    font-size: 1.1rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}
/* --- Тарифы (БЭМ) --- */
.tariffs {
  padding: 60px 0;
}
.tariffs__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}
.tariffs__title {
  text-align: center;
  font-size: 2.2rem;
  color: #2c3e50;
  margin-bottom: 40px;
  border-bottom: 3px solid #28a745;
  display: inline-block;
  padding-bottom: 10px;
}
.tariffs__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 25px;
}
.tariffs__card {
  background: #fff;
  padding: 24px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  text-align: center;
  border-top: 5px solid #28a745;
}
.tariffs__name {
  margin: 0 0 14px;
  font-weight: 700;
  color: #333;
  line-height: 1.3;
}
.tariffs__price {
  font-size: 1.5rem;
  font-weight: 800;
  color: #28a745;
  line-height: 1.2;
  margin-bottom: 8px;
}
.tariffs__duration {
  color: #7f8c8d;
  font-size: 0.95rem;
}

/* --- Отзывы (БЭМ) --- */
.reviews {
  padding: 60px 0;
  background-color: #f9f9f9;
}
.reviews__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}
.reviews__title {
  text-align: center;
  font-size: 2.2rem;
  color: #2c3e50;
  margin-bottom: 40px;
  border-bottom: 3px solid #28a745;
  display: inline-block;
  padding-bottom: 10px;
}
.reviews__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}
.reviews__card {
  background: #fff;
  padding: 24px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.reviews__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #eee;
}
.reviews__name {
  font-weight: 700;
  color: #2c3e50;
  font-size: 1.1rem;
  margin-bottom: 4px;
}
.reviews__stars {
  color: #f1c40f;
  font-size: 1.1rem;
}
.reviews__text {
  line-height: 1.6;
  color: #555;
  font-size: 0.98rem;
  margin: 0;
}
modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-overlay.is-open {
  display: flex;
}

.modal {
  background: #fff;
  padding: 24px;
  border-radius: 8px;
  width: 100%;
  max-width: 500px;
}

.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.modal__close {
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  border: none;
  background: none;
}

/* Скрываем селект по умолчанию, если не нужно (но JS управляет этим лучше) */
#service-select-group {
  display: block; /* JS будет переключать display: block/none */
  margin-bottom: 16px;
}

.form-status--error { color: #dc3545; }
.form-status--success { color: #28a745; }
