/* Определение CSS-переменных для триадной цветовой схемы и эко-минимализм дизайна */
:root {
  /* Триадная цветовая схема */
  --primary-color: #2E8B57; /* Морской зеленый */
  --primary-light: #3CB371;
  --primary-dark: #1F5F3F;
  
  --secondary-color: #8B2E57; /* Бордовый */
  --secondary-light: #B23771;
  --secondary-dark: #5F1F3F;
  
  --tertiary-color: #57582E; /* Оливковый */
  --tertiary-light: #71713C;
  --tertiary-dark: #3F401F;
  
  /* Нейтральные цвета */
  --neutral-100: #FFFFFF;
  --neutral-200: #F8F9FA;
  --neutral-300: #E9ECEF;
  --neutral-400: #CED4DA;
  --neutral-500: #6C757D;
  --neutral-600: #495057;
  --neutral-700: #343A40;
  --neutral-800: #212529;
  --neutral-900: #000000;
  
  /* Градиенты */
  --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  --gradient-secondary: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 100%);
  --gradient-hero: linear-gradient(135deg, rgba(46, 139, 87, 0.8) 0%, rgba(139, 46, 87, 0.8) 100%);
  --gradient-overlay: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.6));
  
  /* Типографика */
  --font-primary: 'Playfair Display', serif;
  --font-secondary: 'Source Sans Pro', sans-serif;
  
  /* Размеры */
  --border-radius: 12px;
  --border-radius-lg: 20px;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --header-height: 70px;
  
  /* Анимации */
  --animation-duration: 0.6s;
  --animation-easing: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-secondary);
  font-weight: 400;
  line-height: 1.7;
  color: var(--neutral-700);
  background-color: var(--neutral-100);
  overflow-x: hidden;
}

/* Типографика */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--neutral-800);
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.8rem; }
h3 { font-size: 2.2rem; }
h4 { font-size: 1.8rem; }
h5 { font-size: 1.4rem; }
h6 { font-size: 1.2rem; }

p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.8;
}

/* Глобальные стили для кнопок */
.btn, 
button, 
input[type='submit'], 
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  font-family: var(--font-secondary);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  text-align: center;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-width: 160px;
  background: var(--gradient-primary);
  color: var(--neutral-100);
  box-shadow: var(--shadow);
}

.btn:hover,
button:hover,
input[type='submit']:hover,
.button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
  color: var(--neutral-100);
}

.btn:active,
button:active,
input[type='submit']:active,
.button:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--gradient-secondary);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, var(--secondary-dark) 0%, var(--secondary-color) 100%);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: var(--neutral-100);
}

.btn-large {
  padding: 1.25rem 2.5rem;
  font-size: 1.125rem;
}

/* Ссылки "Читать далее" */
.read-more {
  display: inline-flex;
  align-items: center;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  font-size: 1rem;
  margin-top: 1rem;
}

.read-more:hover {
  color: var(--primary-dark);
  transform: translateX(5px);
}

.read-more::after {
  content: '→';
  margin-left: 0.5rem;
  transition: var(--transition);
}

.read-more:hover::after {
  transform: translateX(3px);
}

/* Навигация */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  height: var(--header-height);
  transition: var(--transition);
  z-index: 1000;
}

.navbar.is-scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.navbar-item {
  color: var(--neutral-700);
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.navbar-item:hover {
  color: var(--primary-color);
}

.navbar-item::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: var(--transition);
  transform: translateX(-50%);
}

.navbar-item:hover::after {
  width: 100%;
}

/* Hero секция */
#hero {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

#hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-overlay);
  z-index: 1;
}

.hero-body {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem 0;
}

.hero-body .title {
  color: var(--neutral-100) !important;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
  margin-bottom: 1.5rem;
}

.hero-body .subtitle {
  color: var(--neutral-100) !important;
  text-shadow: 0 1px 5px rgba(0,0,0,0.3);
  margin-bottom: 2.5rem;
  font-size: 1.25rem;
  font-weight: 300;
}

/* Parallax эффект */
.parallax-container {
  transform: translate3d(0, 0, 0);
}

/* Секции */
.section {
  padding: 5rem 0;
  position: relative;
}

.section:nth-child(even) {
  background: linear-gradient(135deg, var(--neutral-200) 0%, var(--neutral-100) 100%);
}

/* Карточки */
.card {
  background: var(--neutral-100);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.card-image {
  position: relative;
  overflow: hidden;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-image .image-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: var(--transition);
}

.card:hover .card-image img {
  transform: scale(1.05);
}

.card-content {
  padding: 2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  text-align: center;
}

.card-content .title {
  color: var(--neutral-800);
  margin-bottom: 1rem;
}

.card-content p {
  flex-grow: 1;
  margin-bottom: 1.5rem;
}

/* Timeline стили для истории */
.timeline-container {
  position: relative;
  padding: 2rem 0;
}

.timeline-item {
  position: relative;
  margin-bottom: 4rem;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s var(--animation-easing);
}

.timeline-item.animate {
  opacity: 1;
  transform: translateY(0);
}

.timeline-marker {
  position: absolute;
  left: -15px;
  top: 0;
  width: 30px;
  height: 30px;
  background: var(--gradient-primary);
  border-radius: 50%;
  border: 4px solid var(--neutral-100);
  z-index: 2;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 30px;
  bottom: -30px;
  width: 2px;
  background: var(--gradient-primary);
  z-index: 1;
}

.timeline-item:last-child::before {
  display: none;
}

/* Формы */
.form-container {
  max-width: 600px;
  margin: 0 auto;
}

.field {
  margin-bottom: 2rem;
}

.label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: block;
  color: var(--neutral-700);
}

.input,
.textarea,
.select select {
  width: 100%;
  padding: 1rem 1.5rem;
  border: 2px solid var(--neutral-300);
  border-radius: var(--border-radius);
  font-family: var(--font-secondary);
  font-size: 1rem;
  transition: var(--transition);
  background: var(--neutral-100);
}

.input:focus,
.textarea:focus,
.select select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(46, 139, 87, 0.1);
}

.textarea {
  min-height: 120px;
  resize: vertical;
}

/* Footer */
.footer {
  background: var(--neutral-800);
  color: var(--neutral-300);
  padding: 4rem 0 2rem;
}

.footer .title {
  color: var(--neutral-100);
  margin-bottom: 1.5rem;
}

.footer p,
.footer li {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.footer ul {
  list-style: none;
}

.footer a {
  color: var(--neutral-300);
  text-decoration: none;
  transition: var(--transition);
}

.footer a:hover {
  color: var(--primary-light);
  text-decoration: underline;
}

/* Социальные ссылки в футере */
.social-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.social-links a {
  display: flex;
  align-items: center;
  padding: 0.5rem 0;
  font-weight: 500;
  transition: var(--transition);
}

.social-links a:hover {
  color: var(--primary-light);
  transform: translateX(5px);
}

.social-links a::before {
  content: '→';
  margin-right: 0.5rem;
  transition: var(--transition);
}

.social-links a:hover::before {
  transform: scale(1.2);
}

/* Awards секция */
#awards .card {
  background: linear-gradient(135deg, var(--neutral-100) 0%, rgba(46, 139, 87, 0.02) 100%);
}

/* Responsive дизайн */
@media (max-width: 1024px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2.5rem; }
  h3 { font-size: 2rem; }
  
  .section {
    padding: 4rem 0;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 60px;
  }
  
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.75rem; }
  
  .section {
    padding: 3rem 0;
  }
  
  .btn,
  button,
  input[type='submit'],
  .button {
    padding: 0.875rem 1.75rem;
    min-width: auto;
  }
  
  .card-content {
    padding: 1.5rem;
  }
  
  .timeline-item {
    margin-bottom: 3rem;
  }
  
  .timeline-marker {
    left: -12px;
    width: 24px;
    height: 24px;
  }
  
  .social-links {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  
  .hero-body .title {
    font-size: 2.25rem;
  }
  
  .hero-body .subtitle {
    font-size: 1.125rem;
  }
  
  .section {
    padding: 2rem 0;
  }
  
  .card-content {
    padding: 1.25rem;
  }
  
  .btn,
  button,
  input[type='submit'],
  .button {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }
}

/* Страницы success, privacy, terms */
.success-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  color: var(--neutral-100);
}

.success-content {
  text-align: center;
  max-width: 500px;
  padding: 2rem;
}

.success-content .title {
  color: var(--neutral-100);
  margin-bottom: 1.5rem;
}

.privacy-content,
.terms-content {
  padding-top: 100px;
  max-width: 800px;
  margin: 0 auto;
  padding-left: 2rem;
  padding-right: 2rem;
  padding-bottom: 4rem;
}

/* Прокрутка-зависимые анимации */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s var(--animation-easing);
}

.animate-on-scroll.animate {
  opacity: 1;
  transform: translateY(0);
}

/* Эффекты при наведении для интерактивных элементов */
.interactive-element {
  transition: var(--transition);
}

.interactive-element:hover {
  transform: translateY(-2px);
}

/* Гласморфизм эффекты */
.glass-effect {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Утилитарные классы */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.mb-4 { margin-bottom: 4rem; }
.mb-5 { margin-bottom: 5rem; }
.mb-6 { margin-bottom: 6rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mt-4 { margin-top: 4rem; }
.mt-5 { margin-top: 5rem; }

.p-0 { padding: 0; }
.p-1 { padding: 1rem; }
.p-2 { padding: 2rem; }
.p-3 { padding: 3rem; }
.p-4 { padding: 4rem; }

/* Цветовые утилиты */
.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--secondary-color); }
.text-tertiary { color: var(--tertiary-color); }
.text-white { color: var(--neutral-100); }
.text-dark { color: var(--neutral-800); }

.bg-primary { background: var(--primary-color); }
.bg-secondary { background: var(--secondary-color); }
.bg-tertiary { background: var(--tertiary-color); }
.bg-light { background: var(--neutral-200); }
.bg-dark { background: var(--neutral-800); }

/* Специальные эффекты для изображений */
.image-hover-zoom {
  overflow: hidden;
  border-radius: var(--border-radius);
}

.image-hover-zoom img {
  transition: transform 0.6s var(--animation-easing);
}

.image-hover-zoom:hover img {
  transform: scale(1.1);
}

/* Адаптивные утилиты */
@media (max-width: 768px) {
  .mobile-center { text-align: center; }
  .mobile-hidden { display: none; }
}

/* Анимации загрузки */
.loading-animation {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* Скрытие элементов для screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Улучшение доступности */
:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Оптимизация производительности */
.will-change-transform {
  will-change: transform;
}

.will-change-opacity {
  will-change: opacity;
}

/* Плавная прокрутка для старых браузеров */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Поддержка темной темы */
@media (prefers-color-scheme: dark) {
  :root {
    --neutral-100: #1a1a1a;
    --neutral-200: #2d2d2d;
    --neutral-300: #404040;
    --neutral-700: #e0e0e0;
    --neutral-800: #f5f5f5;
  }
}