* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Montserrat", sans-serif;
  line-height: 1.5;
  color: #fafcfa;
  background-color: #faf9f8;
  padding-top: 100px; /* компенсация фиксированного хедера */
}

.container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header — фиксированный */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: #888077;
  padding: 12px 0;
  border-radius: 0 0 24px 24px;
  width: 100%;
  max-width: calc(98% - 40px);
  margin: 0 auto;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo {
  margin-right: 20px;
}

.logo__h {
  font-weight: 600;
  font-size: 24px;
  margin: 0;
}

.logo__a {
  font-weight: 300;
  font-size: 16px;
  margin: 4px 0 0;
}

.nav-wrapper {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 12px;
  margin: 0;
}

.nav-links a {
  display: block;
  padding: 12px 16px;
  background-color: #dbb991;
  border-radius: 20px;
  color: #fafcfa;
  text-decoration: none;
  font-size: 16px;
  font-weight: 300;
  text-align: center;
  transition: background-color 0.3s ease, box-shadow 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  background-color: #ccac87;
  box-shadow: 0 0 0 2px #888077, 0 0 0 4px #ccac87;
}

/* Burger menu (mobile) */
.burger {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: 12px;
}

.burger span {
  width: 24px;
  height: 3px;
  background-color: #fafcfa;
  margin: 3px 0;
  transition: 0.3s;
}

/* Section layout with image + text */
.section {
  background-color: #888077;
  padding: 24px 0;
  border-radius: 24px;
  margin: 2% auto;
  width: 98%;
}

/* Section layout: текст и изображение одинаковой высоты */
.section-content {
  display: flex;
  align-items: center; /* ← ключевое: растягивает дочерние элементы по высоте */
  gap: 32px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

.section-text {
  flex: 1;
  min-width: 0;
  padding: 24px; /* добавляем внутренние отступы для лучшего вида */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.section-image {
  flex: 0 0 280px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff20; /* фон на случай, если изображение не загрузится */
}

.section-image img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* ← сохраняет пропорции и показывает целиком */
  object-position: center;
  display: block;
}

/* Нечётные секции: фото слева */
#about .section-content,
#offer .section-content,
#approach .section-content {
  flex-direction: row;
}

/* Текст и списки */
.section-title {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #fafcfa;
  text-align: center;
}

.subsection-title {
  font-size: 20px;
  font-weight: 500;
  margin: 24px 0 12px;
  color: #fafcfa;
}

main p {
  margin-bottom: 12px;
  font-size: 18px;
  color: #fafcfa;
}

.values-list,
.offer-list {
  list-style: none;
  padding-left: 0;
  margin: 16px 0 20px;
}

.values-list li,
.offer-list li {
  margin-bottom: 10px;
  padding-left: 24px;
  position: relative;
  font-size: 18px;
}

.values-list li::before,
.offer-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #dbb991;
  font-size: 24px;
  line-height: 1;
}

.offer-details p {
  margin-bottom: 8px;
}

/* Footer */
#contacts {
  background-color: #888077;
  padding: 24px 0;
  border-radius: 24px;
  margin: 2% auto 2%;
  width: 95%;
}

#contacts .section-title {
  text-align: center;
}

#contacts p {
  color: #fafcfa;
  font-size: 18px;
  text-align: center;
  margin-bottom: 12px;
}

.contact-info {
  margin: 20px 0;
}

.contact-link {
  color: #dbb991;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
}

.contact-link i {
  margin-right: 8px;
  width: 18px;
  text-align: center;
  font-size: 18px;
  color: #dbb991;
}

.contact-link:hover {
  color: #fafcfa;
  text-decoration: underline;
}

.contact-link:hover i {
  color: #fafcfa;
}

.note {
  font-style: italic;
  opacity: 0.9;
  text-align: center;
}

@media (max-width: 768px) {
  body {
    padding-top: 90px;
  }

  header {
    padding: 10px 0;
    max-width: calc(100% - 30px);
  }

  /* Скрываем основное меню по умолчанию */
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #888077;
    flex-direction: column;
    padding: 16px 0;
    gap: 12px;
    display: none; /* ← скрыто до клика */
    z-index: 1000;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  }

  /* Показываем, когда есть класс .show */
  .nav-links.show {
    display: flex;
  }

  /* Бургер — всегда виден на мобильных */
  .burger {
    display: flex;
  }

  /* Секции */
  .section,
  #contacts {
    width: 95%;
  }

  .section-content {
    flex-direction: column !important;
    align-items: center;
    text-align: center;
  }

  .section-text {
    padding: 16px;
    width: 100%;
  }

  .section-image {
    flex: none;
    width: 100%;
    max-width: 280px;
    height: auto;
  }

  .section-image img {
    height: auto;
  }

  /* В нечётных секциях фото под текстом */
  #about .section-content,
  #offer .section-content {
    flex-direction: column-reverse;
  }

  .logo__h {
    font-size: 20px;
  }

  .section-title {
    font-size: 24px;
  }
}
