/* styles/main.css */

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

body {
  font-family: 'Source Sans Pro', sans-serif; /* Основной текст */
  line-height: 1.7;
  color: #2F4F4F; /* Тёмно-серо-синий */
  background-color: #F0FDFD; /* Очень светлая бирюза */
  overflow-x: hidden;
  position: relative;
}

/* Анимация */
.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);
}

/* Декоративный элемент (например, линия баланса) */
.balance-line {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 2px;
  background: linear-gradient(to right, transparent, #20B2AA, transparent);
  z-index: -1;
}

/* Шапка */
header {
  background-color: #008B8B; /* Тёмно-бирюзовый */
  padding: 1.5rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid #20B2AA; /* Светло-бирюзовый */
}

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

header h1 a {
  color: #F0FDFD; /* Светлый */
  text-decoration: none;
  font-family: 'Crimson Text', serif; /* Заголовок */
  font-weight: 700;
  font-size: 1.8rem;
  letter-spacing: 0.5px;
}

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

nav a {
  color: #F0FDFD; /* Светлый */
  text-decoration: none;
  font-family: 'Source Sans Pro', sans-serif; /* Основной текст */
  font-weight: 500;
  font-size: 1rem;
  position: relative;
  transition: color 0.3s;
}

nav a:hover {
  color: #AFEEEE; /* Бледно-бирюзовый */
}

nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: #20B2AA; /* Светло-бирюзовый */
  transition: width 0.3s ease;
}

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

/* Основной контент */
main {
  max-width: 1200px;
  margin: 3rem auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start; /* Выравнивание по верхнему краю */
}

main section {
  background-color: #FFFFFF; /* Белый */
  padding: 2.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 139, 139, 0.1); /* Тёмно-бирюзовый */
  border: 1px solid #AFEEEE; /* Бледно-бирюзовый */
  transition: box-shadow 0.3s ease;
}

main section:hover {
  box-shadow: 0 6px 16px rgba(0, 139, 139, 0.15); /* Тёмно-бирюзовый */
}

/* Заголовки */
h1, h2 {
  font-family: 'Crimson Text', serif; /* Заголовок */
  color: #008B8B; /* Тёмно-бирюзовый */
  margin-bottom: 1.2rem;
  line-height: 1.2;
  text-align: center; /* Центрируем заголовки */
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 1.9rem;
}

/* Параграфы */
p {
  margin-bottom: 1.2rem;
  color: #556B6B; /* Средне-серо-синий */
  text-align: justify; /* Выравнивание по ширине */
}

/* Кнопки */
.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  background-color: #008B8B; /* Тёмно-бирюзовый */
  color: #F0FDFD; /* Светлый */
  text-decoration: none;
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 600;
  border-radius: 6px;
  transition: background-color 0.3s, transform 0.2s;
  margin-top: 1rem;
  border: none;
  cursor: pointer;
  text-align: center;
  width: 100%; /* Кнопка на всю ширину контейнера */
  max-width: 200px; /* Максимальная ширина */
}

.btn:hover {
  background-color: #006666; /* Темнее */
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid #008B8B; /* Тёмно-бирюзовый */
  color: #008B8B; /* Тёмно-бирюзовый */
}

.btn-outline:hover {
  background-color: #008B8B; /* Тёмно-бирюзовый */
  color: #F0FDFD; /* Светлый */
}

/* Форма */
form {
  background-color: #FFFFFF; /* Белый */
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 139, 139, 0.1); /* Тёмно-бирюзовый */
  border: 1px solid #AFEEEE; /* Бледно-бирюзовый */
  max-width: 100%;
  margin: 2rem 0;
}

form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #2F4F4F; /* Тёмно-серо-синий */
  font-family: 'Source Sans Pro', sans-serif;
}

form input,
form textarea {
  width: 100%;
  padding: 0.8rem;
  margin-bottom: 1.2rem;
  border: 1px solid #20B2AA; /* Светло-бирюзовый */
  border-radius: 4px;
  font-family: 'Source Sans Pro', sans-serif;
  font-size: 1rem;
  background-color: #F5FFFF; /* Ещё светлее */
  transition: border-color 0.3s;
}

form input:focus,
form textarea:focus {
  outline: none;
  border-color: #008B8B; /* Тёмно-бирюзовый */
}

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

/* Контактная информация */
.contact-info {
  text-align: left;
  margin-top: 1.5rem;
  padding: 1rem;
  background-color: #F5FFFF; /* Ещё светлее */
  border-radius: 4px;
  border-left: 3px solid #008B8B; /* Тёмно-бирюзовый */
}

/* Подвал */
footer {
  background-color: #2F4F4F; /* Тёмно-серо-синий */
  color: #AFEEEE; /* Бледно-бирюзовый */
  padding: 3rem 2rem 1.5rem;
  margin-top: 4rem;
  text-align: center;
  border-top: 1px solid #008B8B; /* Тёмно-бирюзовый */
}

footer nav {
  margin-bottom: 1.5rem;
}

footer a {
  color: #AFEEEE; /* Бледно-бирюзовый */
  text-decoration: none;
  margin: 0 1rem;
  font-size: 0.95rem;
  font-family: 'Source Sans Pro', sans-serif;
  transition: color 0.3s;
}

footer a:hover {
  color: #20B2AA; /* Светло-бирюзовый */
}

footer p {
  font-size: 0.9rem;
  color: #99AABB; /* Светлее */
}

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

  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;
  }

  .btn {
    max-width: 100%; /* На мобильных кнопка на всю ширину */
  }
}