/* styles/main.css */

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

body {
  font-family: 'Lato', sans-serif; /* Основной текст */
  line-height: 1.7;
  color: #2F4F4F; /* Тёмно-серо-синий */
  background: linear-gradient(135deg, #F0F8FF, #E0F6FF); /* Градиент: небесно-голубой в светло-синий */
  overflow-x: hidden;
  position: relative;
}

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

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

/* Анимированный фон (волны/пузырьки) */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='20' cy='80' r='3' fill='%2387CEEB' opacity='0.3'%3E%3Canimate attributeName='cy' values='80;20;80' dur='10s' repeatCount='indefinite'/%3E%3Canimate attributeName='cx' values='20;80;20' dur='15s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='80' cy='40' r='2' fill='%2398FB98' opacity='0.4'%3E%3Canimate attributeName='cy' values='40;10;40' dur='8s' repeatCount='indefinite'/%3E%3Canimate attributeName='cx' values='80;10;80' dur='12s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E");
  z-index: -1;
  pointer-events: none;
  opacity: 0.6;
}

/* Шапка */
header {
  background: linear-gradient(90deg, #228B22, #3CB371); /* Зелёный градиент */
  padding: 1.5rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(34, 139, 34, 0.2);
  border-bottom: 2px solid #87CEEB; /* Голубая граница */
}

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

header h1 a {
  color: #F0F8FF; /* Противоположный фону */
  text-decoration: none;
  font-family: 'Pacifico', cursive; /* Заголовок */
  font-weight: 400;
  font-size: 1.9rem;
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(135, 206, 235, 0.5);
}

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

nav a {
  color: #F0F8FF; /* Противоположный фону */
  text-decoration: none;
  font-family: 'Lato', sans-serif; /* Основной текст */
  font-weight: 500;
  font-size: 1.05rem;
  position: relative;
  transition: color 0.3s, transform 0.2s;
}

nav a:hover {
  color: #87CEEB; /* Голубой */
  transform: translateY(-2px);
}

nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background: linear-gradient(90deg, #228B22, #87CEEB); /* Зелёно-голубой */
  transition: width 0.3s ease;
}

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

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

/* Плавающие элементы */
main section {
  background-color: #FFFFFF; /* Белый */
  padding: 2.8rem;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(34, 139, 34, 0.1); /* Лесной зелёный */
  border: 1px solid #98FB98; /* Бледно-зелёный */
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  /* Анимация "листьев" */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 15 Q 60 5, 70 15 T 90 15' stroke='%2398FB98' stroke-width='0.5' fill='none' opacity='0.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: top right;
  background-size: 15% auto;
}

main section:hover {
  transform: translateY(-10px) rotate(0.5deg); /* Лёгкое движение */
  box-shadow: 0 12px 25px rgba(34, 139, 34, 0.15);
}

/* Заголовки */
h1, h2 {
  font-family: 'Pacifico', cursive; /* Заголовок */
  color: #228B22; /* Лесной зелёный */
  margin-bottom: 1.3rem;
  line-height: 1.2;
  text-align: center;
}

h1 {
  font-size: 2.6rem;
}

h2 {
  font-size: 2rem;
}

/* Параграфы */
p {
  margin-bottom: 1.3rem;
  color: #556B6B; /* Средне-серый */
  font-size: 1.05rem;
}

/* Кнопки */
.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  background: linear-gradient(135deg, #228B22, #87CEEB); /* Зелёно-голубой */
  color: #F0F8FF; /* Противоположный фону */
  text-decoration: none;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  border-radius: 6px;
  transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
  margin-top: 1.3rem;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(34, 139, 34, 0.2);
}

.btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(34, 139, 34, 0.3);
  background: linear-gradient(135deg, #1a6b1a, #5dbcd2); /* Темнее */
}

.btn-outline {
  background: transparent;
  border: 2px solid #228B22; /* Лесной зелёный */
  color: #228B22; /* Лесной зелёный */
}

.btn-outline:hover {
  background: #228B22; /* Лесной зелёный */
  color: #F0F8FF; /* Противоположный фону */
}

/* Форма */
form {
  background-color: #F8FFFC; /* Очень светлый зелёный */
  padding: 2.2rem;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(34, 139, 34, 0.12);
  border: 1px solid #87CEEB; /* Небесно-голубой */
  max-width: 100%;
  margin: 2rem 0;
}

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

form input,
form textarea {
  width: 100%;
  padding: 0.8rem;
  margin-bottom: 1.3rem;
  border: 1px solid #98FB98; /* Бледно-зелёный */
  border-radius: 6px;
  font-family: 'Lato', sans-serif;
  font-size: 1rem;
  background-color: #F0FFF0; /* Светло-зелёный */
  transition: border-color 0.3s;
}

form input:focus,
form textarea:focus {
  outline: none;
  border-color: #228B22; /* Лесной зелёный */
}

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

/* Контактная информация */
.contact-info {
  text-align: left;
  margin-top: 1.6rem;
  padding: 1.2rem;
  background-color: #F0FFFF; /* Очень светлый голубой */
  border-radius: 6px;
  border-left: 4px solid #228B22; /* Лесной зелёный */
}

/* Подвал */
footer {
  background: linear-gradient(135deg, #2F4F4F, #228B22); /* Тёмно-серый в зелёный */
  color: #87CEEB; /* Небесно-голубой */
  padding: 3.2rem 2rem 1.6rem;
  margin-top: 4.5rem;
  text-align: center;
  border-top: 1px solid #87CEEB; /* Небесно-голубой */
}

footer nav {
  margin-bottom: 1.6rem;
}

footer a {
  color: #87CEEB; /* Небесно-голубой */
  text-decoration: none;
  margin: 0 1.1rem;
  font-size: 0.95rem;
  font-family: 'Lato', sans-serif;
  transition: color 0.3s;
}

footer a:hover {
  color: #98FB98; /* Бледно-зелёный */
}

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

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

  header {
    padding: 1.2rem;
  }

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

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

  h1 {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  form {
    padding: 1.8rem;
  }
}