/* Основные стили остаются без изменений */
@font-face {
  font-family: 'Montserrat';
  src: local('Montserrat-Regular');
  src: url('../fonts/Montserrat-Regular.woff'), url('../fonts/Montserrat-Regular.woff2') format('woff2'), url('../fonts/Montserrat-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: local('Montserrat-Medium');
  src: url('../fonts/Montserrat-Medium.woff'), url('../fonts/Montserrat-Medium.woff2') format('woff2'), url('../fonts/Montserrat-Medium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: local('Montserrat-Bold');
  src: url('../fonts/Montserrat-Bold.woff'), url('../fonts/Montserrat-Bold.woff2') format('woff2'), url('../fonts/Montserrat-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

*,
::before,
::after {
  margin: 0;
  padding: 0;
  box-sizing: inherit;
}

html {
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: #b9b9b9;
  background-image: url('../img/fon.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

.flex {
  display: flex;
}

.list__reset {
  margin: 0;
  padding: 0;
  list-style: none;
}

.btn__reset {
  margin: 0;
  padding: 0;
  border: none;
  background-color: transparent;
  cursor: pointer;
}

.container {
  margin: 0 auto;
  padding: 0 247px;
}

:root {
  --header: #292525;
  --red: #bc4639;
  --white: #fff;
  --black: #000;
}

.header {
  padding: 20px 0;
  width: 100%;
  background: var(--header);
}

.header__container {
  align-items: center;
  justify-content: space-between;
}

.logo {
  margin-right: 10px;
  width: 100px;
}

.title {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  color: var(--white);
}

.contacts {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.phone {
  margin-bottom: 5px;
  font-size: 19px;
  font-weight: 700;
  color: var(--white);
}

.phone:hover {
  text-decoration: underline;
}

.tg-link {
  font-size: 19px;
  font-weight: 700;
  color: var(--white);
}

.tg-link:hover {
  text-decoration: underline;
}

.nadpisi {
  display: flex;
  justify-content: center; /* Центрирование по горизонтали */
  max-height: 100vh; /* Высота секции на весь экран */
  padding: 50px 0; /* Отступы сверху и снизу */
}

.content {
  display: flex;
  justify-content: center; /* Центрирование по горизонтали */
  gap: 80px; /* Отступ между элементами */
  flex-wrap: wrap; /* Перенос элементов на новую строку, если не хватает места */
  width: 100%; /* Ширина контента на 100% */
}

.content > div {
  display: flex;
  flex-direction: column;
  align-items: center; /* Центрирование содержимого внутри каждого блока */
  text-align: center; /* Центрирование текста */
  max-width: 40%; /* Максимальная ширина блока */
}

.content-btn {
  font-size: 22px;
  padding: 10px 20px;
  color: #000;
  border: 2px solid #d8b82b;
  border-radius: 30px;
  cursor: pointer;
  background-color: transparent;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.content-btn:hover {
  background-color: #d8b82b;
  color: #000;
}

.hidden-text {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, opacity 0.5s ease;
  opacity: 0;
  font-size: 20px;
  line-height: 24px;
  margin-top: 10px;
  text-align: left; /* Текст внутри блока выравниваем по левому краю */
}

.hidden-text.visible {
  max-height: 500px;
  opacity: 1;
}

/* Адаптив для экранов до 1400px */
@media (max-width: 1400px) {
  .container {
    padding: 0 100px; /* Уменьшаем отступы контейнера */
  }

  .header__container {
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
  }

  .title {
    font-size: 26px;
  }

  .contacts {
    align-items: center;
  }

  .content {
    gap: 60px; /* Уменьшаем отступ между элементами */
  }

  .content > div {
    max-width: 45%; /* Увеличиваем ширину блоков */
  }

  .content-btn {
    font-size: 20px; /* Уменьшаем размер шрифта кнопок */
    padding: 8px 16px; /* Уменьшаем отступы внутри кнопок */
  }

  .hidden-text.visible {
    max-height: 400px; /* Уменьшаем максимальную высоту текста */
  }
}

@media (max-width: 1024px) {
  .container {
    padding: 0 50px; /* Уменьшаем отступы контейнера */
  }

  .content {
    gap: 40px; /* Уменьшаем отступ между элементами */
  }

  .content > div {
    max-width: 50%; /* Увеличиваем ширину блоков */
  }

  .content-btn {
    font-size: 18px; /* Уменьшаем размер шрифта кнопок */
    padding: 6px 12px; /* Уменьшаем отступы внутри кнопок */
  }

  .hidden-text.visible {
    max-height: 300px; /* Уменьшаем максимальную высоту текста */
  }
}

/* Адаптив для экранов до 768px */
@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }

  .header {
    padding: 15px 0;
  }

  .logo {
    margin-right: 0;
  }

  .header__container {
    justify-content: space-between;
    align-items: center;
    gap: 10px;
  }

  .title {
    font-size: 24px;
    text-align: center;
  }

  .contacts {
    align-items: center;
  }

  .content {
    align-items: center;
    flex-direction: column;
    gap: 30px;
  }

  .content > div {
    max-width: 80%;
  }

  .content-btn {
    font-size: 16px;
    padding: 5px 10px;
  }

  .hidden-text {
    font-size: 16px;
    line-height: 18px;
  }
}

@media (max-width: 633px) {
  .title {
    margin: 0 auto;
    order: 2;
  }
}

/* Адаптив для экранов до 480px */
@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .title {
    font-size: 22px;
  }

  .phone, .tg-link {
    font-size: 16px;
  }

  .content > div {
    max-width: 90%; /* Увеличиваем ширину блоков */
  }

  .content-btn {
    font-size: 14px; /* Уменьшаем размер шрифта кнопок */
    padding: 4px 8px; /* Уменьшаем отступы внутри кнопок */
  }

  .hidden-text {
    font-size: 14px;
    line-height: 16px;
  }

  .hidden-text.visible {
    max-height: 300px; /* Уменьшаем максимальную высоту текста */
  }
}

/* Адаптив для экранов до 320px */
@media (max-width: 320px) {
  .container {
    padding: 0 10px;
  }

  .title {
    font-size: 20px;
  }

  .phone, .tg-link {
    font-size: 14px;
  }

  .content > div {
    max-width: 100%; /* Блоки занимают всю ширину */
  }

  .content-btn {
    font-size: 12px; /* Уменьшаем размер шрифта кнопок */
    padding: 3px 6px; /* Уменьшаем отступы внутри кнопок */
  }
}

@media (max-width: 272px) {
  .header__container {
    justify-content: center;
  }
}