/* styles/main.css */

/* Обнуление и базовые стили */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Merriweather', serif;
  line-height: 1.7;
  color: #4A4A4A;
  background-color: #F9F7F4;
  overflow-x: hidden; /* Предотвращаем горизонтальный скролл */
}

/* Анимация появления */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.appear {
  opacity: 1;
  transform: translateY(0);
}

/* Шапка */
header {
  background-color: #F9F7F4;
  padding: 1.5rem 2rem;
  position: sticky; /* Липкий заголовок */
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(138, 155, 104, 0.1);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 a {
  color: #8A9B68;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.8rem;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

nav a {
  color: #4A4A4A;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 1.1rem;
  position: relative;
  transition: color 0.3s ease;
}

nav a:hover {
  color: #8A9B68;
}

nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: #8A9B68;
  transition: width 0.3s ease;
}

nav a:hover::after {
  width: 100%;
}

/* Основной контент */
main {
  max-width: 1400px;
  margin: 3rem auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

main section {
  background-color: #fff;
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  /* Анимация появления */
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

main section:nth-child(even) {
  transform: translateX(50px); /* Для асимметрии */
}

main section.appear {
  opacity: 1;
  transform: translateX(0);
}

/* Заголовки */
h1, h2 {
  font-family: 'Inter', sans-serif;
  color: #8A9B68;
  margin-bottom: 1.2rem;
}

h1 {
  font-size: 2.5rem;
  line-height: 1.2;
}

h2 {
  font-size: 1.8rem;
}

/* Параграфы */
p {
  margin-bottom: 1.2rem;
  color: #555;
}

/* Кнопки */
.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  background-color: #8A9B68;
  color: #F9F7F4;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  border-radius: 6px;
  transition: background-color 0.3s ease, transform 0.2s ease;
  border: none;
  cursor: pointer;
  margin-top: 1rem;
}

.btn:hover {
  background-color: #7a8a5a;
  transform: scale(1.05);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid #8A9B68;
  color: #8A9B68;
}

.btn-outline:hover {
  background-color: #8A9B68;
  color: #F9F7F4;
}

/* Контактная форма */
form {
  background-color: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  max-width: 100%;
  margin: 2rem 0;
}

form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #4A4A4A;
}

form input,
form textarea {
  width: 100%;
  padding: 0.8rem;
  margin-bottom: 1.2rem;
  border: 1px solid #D4B996;
  border-radius: 4px;
  font-family: 'Merriweather', serif;
  font-size: 1rem;
}

form button {
  width: 100%;
  max-width: 250px;
}

/* Информация о контактах */
.contact-info {
  text-align: left; /* Левое выравнивание внутри центрированного блока */
  margin-top: 1.5rem;
}

/* Подвал */
footer {
  background-color: #4A4A4A;
  color: #D4B996;
  padding: 3rem 2rem 1.5rem;
  margin-top: 4rem;
  text-align: center;
}

footer nav {
  margin-bottom: 1.5rem;
}

footer a {
  color: #D4B996;
  text-decoration: none;
  margin: 0 1rem;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

footer a:hover {
  color: #8A9B68;
}

footer p {
  font-size: 0.9rem;
  color: #aaa;
}

/* Адаптивность */
@media (max-width: 900px) {
  main {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 0 1rem;
  }

  main section {
    transform: translateX(0) !important; /* Сбрасываем асимметрию на мобильных */
  }

  header {
    padding: 1rem;
  }

  .nav-container {
    flex-direction: column;
    gap: 1rem;
  }

  nav ul {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  form {
    padding: 1.5rem;
  }
}