/* ===== CSS VARIABLES ===== */
:root {
  /* Пастельные основные цвета */
  --primary-color: #E8B4FF; /* Пастельный фиолетовый */
  --primary-dark: #D598E8;
  --primary-light: #F0C8FF;
  --secondary-color: #B4E8FF; /* Пастельный голубой */
  --secondary-dark: #98D5E8;
  --secondary-light: #C8F0FF;
  
  /* Акцентные цвета */
  --accent-color: #FFB4D4; /* Пастельный розовый */
  --accent-dark: #E898C4;
  --accent-light: #FFC8E0;
  --warning-color: #FFE4B4; /* Пастельный желтый */
  --success-color: #B4FFD4; /* Пастельный зеленый */
  --error-color: #FFB4B4; /* Пастельный красный */
  
  /* Нейтральные цвета */
  --dark-color: #2C2C34;
  --light-color: #FAFAFA;
  --white-color: #FFFFFF;
  --gray-100: #F8F9FA;
  --gray-200: #E9ECEF;
  --gray-300: #DEE2E6;
  --gray-400: #CED4DA;
  --gray-500: #ADB5BD;
  --gray-600: #6C757D;
  --gray-700: #495057;
  --gray-800: #343A40;
  --gray-900: #212529;
  
  /* Динамические градиенты */
  --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  --gradient-secondary: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
  --gradient-accent: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
  --gradient-hero: linear-gradient(135deg, rgba(232, 180, 255, 0.9) 0%, rgba(180, 232, 255, 0.9) 50%, rgba(255, 180, 212, 0.9) 100%);
  --gradient-overlay: linear-gradient(rgba(44, 44, 52, 0.6), rgba(44, 44, 52, 0.4));
  
  /* Тени */
  --shadow-sm: 0 2px 8px rgba(44, 44, 52, 0.08);
  --shadow-md: 0 4px 16px rgba(44, 44, 52, 0.12);
  --shadow-lg: 0 8px 32px rgba(44, 44, 52, 0.16);
  --shadow-xl: 0 16px 48px rgba(44, 44, 52, 0.20);
  
  /* Шрифты */
  --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  /* Размеры */
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --border-radius-lg: 20px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Размеры контейнера */
  --container-max-width: 1200px;
  --header-height: 80px;
}

/* ===== БАЗОВЫЕ СТИЛИ ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-800);
  background-color: var(--white-color);
  overflow-x: hidden;
}

/* ===== ТИПОГРАФИКА ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--dark-color);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
}

h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 600;
}

h5 {
  font-size: clamp(1.125rem, 2vw, 1.25rem);
  font-weight: 500;
}

h6 {
  font-size: 1rem;
  font-weight: 500;
}

p {
  margin-bottom: 1rem;
  color: var(--gray-700);
}

.lead {
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--gray-600);
}

/* ===== ГЛОБАЛЬНЫЕ СТИЛИ КНОПОК ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  min-width: 140px;
  text-align: center;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: var(--transition);
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--white-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--white-color);
}

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

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--white-color);
}

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

.btn-outline-primary:hover {
  background: var(--gradient-primary);
  color: var(--white-color);
  transform: translateY(-2px);
}

.btn-outline-light {
  background: transparent;
  color: var(--white-color);
  border-color: var(--white-color);
}

.btn-outline-light:hover {
  background: var(--white-color);
  color: var(--primary-color);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.125rem;
}

.btn-sm {
  padding: 0.5rem 1.5rem;
  font-size: 0.875rem;
}

/* ===== АНИМАЦИИ ===== */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes draw {
  0% { 
    stroke-dashoffset: 1000;
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% { 
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

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

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===== HEADER ===== */
.header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(232, 180, 255, 0.2);
  z-index: 1000;
  transition: var(--transition);
}

.navbar {
  padding: 1rem 0;
}

.navbar-brand .brand-text {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-nav .nav-link {
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--gray-700);
  margin: 0 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
}

.navbar-nav .nav-link:hover {
  color: var(--primary-color);
  background: rgba(232, 180, 255, 0.1);
  transform: translateY(-2px);
}

.navbar-toggler {
  border: none;
  padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
  box-shadow: none;
}

/* ===== HERO SECTION ===== */
.hero-section {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
}

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

.hero-section .container {
  position: relative;
  z-index: 2;
}

.hero-content {
  animation: fadeInUp 1s ease-out;
}

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

.hero-subtitle {
  color: var(--white-color) !important;
  opacity: 0.95;
  font-size: 1.25rem;
  margin-bottom: 2rem;
  text-shadow: 0 1px 5px rgba(0,0,0,0.2);
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-image {
  animation: float 6s ease-in-out infinite;
}

.hero-image img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,0.2));
}

/* ===== СЕКЦИИ ===== */
.section {
  padding: 5rem 0;
  position: relative;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

/* ===== КАРТОЧКИ ===== */
.card {
  border: none;
  border-radius: var(--border-radius);
  background: var(--white-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
}

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

.card-image {
  width: 100%;
  height: 250px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
}

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

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

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

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

.card-text {
  color: var(--gray-600);
  margin-bottom: 1.5rem;
  flex: 1;
}

/* ===== INFO КАРТОЧКИ ===== */
.info-card {
  background: linear-gradient(145deg, var(--white-color) 0%, rgba(232, 180, 255, 0.05) 100%);
  border: 1px solid rgba(232, 180, 255, 0.2);
}

.info-card:hover {
  background: linear-gradient(145deg, var(--white-color) 0%, rgba(232, 180, 255, 0.1) 100%);
  border-color: var(--primary-color);
}

/* ===== ГАЛЕРЕЯ ===== */
.gallery-card .card-image {
  height: 200px;
}

.gallery-card .card-content {
  padding: 1.5rem;
}

/* ===== НОВОСТИ ===== */
.news-card .card-image {
  height: 220px;
}

.news-card .card-content {
  padding: 2rem;
}

/* ===== РЕСУРСЫ ===== */
.resource-card {
  background: var(--gradient-accent);
  color: var(--white-color);
}

.resource-card .card-title,
.resource-card .card-text {
  color: var(--white-color);
}

.resource-card .btn-outline-primary {
  border-color: var(--white-color);
  color: var(--white-color);
}

.resource-card .btn-outline-primary:hover {
  background: var(--white-color);
  color: var(--primary-color);
}

/* ===== TIMELINE ===== */
.timeline {
  position: relative;
  padding-left: 2rem;
}

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

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  padding-left: 3rem;
}

.timeline-marker {
  position: absolute;
  left: -2.5rem;
  top: 0;
  width: 32px;
  height: 32px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white-color);
  font-weight: 600;
  font-size: 0.875rem;
  box-shadow: var(--shadow-md);
}

.timeline-content h4 {
  color: var(--dark-color);
  margin-bottom: 0.5rem;
}

.timeline-content p {
  color: var(--gray-600);
  margin-bottom: 0;
}

/* ===== ФОРМЫ ===== */
.contact-form-wrapper {
  background: var(--white-color);
  padding: 3rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(232, 180, 255, 0.2);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  font-weight: 500;
  color: var(--dark-color);
  margin-bottom: 0.5rem;
  display: block;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--gray-300);
  border-radius: var(--border-radius);
  transition: var(--transition);
  background: var(--white-color);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(232, 180, 255, 0.2);
}

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

/* ===== ФУТЕР ===== */
.footer {
  background: var(--dark-color);
  color: var(--gray-300);
}

.footer-brand h4 {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

.footer-brand p {
  color: var(--gray-400);
  line-height: 1.6;
}

.footer h5 {
  color: var(--white-color);
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer ul {
  list-style: none;
  padding: 0;
}

.footer ul li {
  margin-bottom: 0.5rem;
}

.footer-link {
  color: var(--gray-400);
  text-decoration: none;
  transition: var(--transition);
  position: relative;
}

.footer-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: var(--transition);
}

.footer-link:hover {
  color: var(--primary-color);
}

.footer-link:hover::after {
  width: 100%;
}

.social-links {
  margin-bottom: 1.5rem;
}

.social-links .footer-link {
  display: inline-block;
  padding: 0.5rem 1rem;
  margin-right: 1rem;
  margin-bottom: 0.5rem;
  border: 1px solid var(--gray-600);
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.social-links .footer-link:hover {
  border-color: var(--primary-color);
  background: rgba(232, 180, 255, 0.1);
}

.footer hr {
  border-color: var(--gray-700);
  margin: 2rem 0;
}

/* ===== СТРАНИЦЫ ПОЛИТИКИ И УСЛОВИЙ ===== */
.privacy-page,
.terms-page {
  padding-top: 100px;
}

.privacy-content,
.terms-content {
  background: var(--white-color);
  padding: 3rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
}

.privacy-content h2,
.privacy-content h3,
.terms-content h2,
.terms-content h3 {
  color: var(--dark-color);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.privacy-content h2:first-child,
.terms-content h2:first-child {
  margin-top: 0;
}

.privacy-content ul,
.terms-content ul {
  padding-left: 2rem;
  margin-bottom: 1.5rem;
}

.privacy-content li,
.terms-content li {
  margin-bottom: 0.5rem;
  color: var(--gray-700);
}

/* ===== SUCCESS СТРАНИЦА ===== */
.success-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-hero);
}

.success-content {
  text-align: center;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: 3rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
  animation: scaleIn 0.6s ease-out;
}

.success-content h1 {
  color: var(--success-color);
  margin-bottom: 1rem;
}

.success-content p {
  color: var(--gray-700);
  margin-bottom: 2rem;
}

/* ===== ЧИТАТЬ ДАЛЕЕ ===== */
.read-more {
  display: inline-flex;
  align-items: center;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

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

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

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

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 1200px) {
  .container {
    max-width: 960px;
  }
}

@media (max-width: 992px) {
  .hero-section {
    text-align: center;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .timeline {
    padding-left: 1rem;
  }
  
  .timeline-item {
    padding-left: 2rem;
  }
  
  .timeline-marker {
    left: -1.5rem;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 3rem 0;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .hero-buttons .btn {
    width: 100%;
    max-width: 250px;
  }
  
  .contact-form-wrapper {
    padding: 2rem;
  }
  
  .card-content {
    padding: 1.5rem;
  }
  
  .timeline::before {
    left: 8px;
  }
  
  .timeline-item {
    padding-left: 2rem;
  }
  
  .timeline-marker {
    left: -2rem;
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
  }
}

@media (max-width: 576px) {
  .hero-section {
    padding: 32rem 0;
    min-height: 80vh;
  }
  
  .section {
    padding: 2rem 0;
  }
  
  .contact-form-wrapper {
    padding: 1.5rem;
  }
  
  .footer {
    text-align: center;
  }
  
  .social-links .footer-link {
    display: block;
    margin: 0.5rem 0;
  }
  
  .btn {
    padding: 0.625rem 1.5rem;
    font-size: 0.875rem;
  }
  
  .btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1rem;
  }
}

/* ===== УТИЛИТАРНЫЕ КЛАССЫ ===== */
.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--secondary-color) !important; }
.text-accent { color: var(--accent-color) !important; }
.text-white { color: var(--white-color) !important; }

.bg-primary { background: var(--gradient-primary) !important; }
.bg-secondary { background: var(--gradient-secondary) !important; }
.bg-accent { background: var(--gradient-accent) !important; }
.bg-light { background: var(--light-color) !important; }

.border-primary { border-color: var(--primary-color) !important; }
.border-secondary { border-color: var(--secondary-color) !important; }

.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow-md { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }
.shadow-xl { box-shadow: var(--shadow-xl) !important; }

.rounded { border-radius: var(--border-radius) !important; }
.rounded-sm { border-radius: var(--border-radius-sm) !important; }
.rounded-lg { border-radius: var(--border-radius-lg) !important; }

.fade-in-up { animation: fadeInUp 0.6s ease-out; }
.slide-in-left { animation: slideInLeft 0.6s ease-out; }
.scale-in { animation: scaleIn 0.6s ease-out; }

/* ===== СТИЛИ ПРОКРУТКИ ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-200);
}

::-webkit-scrollbar-thumb {
  background: var(--gradient-primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

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

/* ===== ФОКУС ===== */
.btn:focus,
.form-control:focus,
.nav-link:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* ===== ЗАГРУЗКА ===== */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,.3);
  border-radius: 50%;
  border-top-color: var(--white-color);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== ПЕЧАТЬ ===== */
@media print {
  .header,
  .footer,
  .btn,
  .hero-section {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
    color: #000;
    background: #fff;
  }
  
  .section {
    padding: 1rem 0;
    break-inside: avoid;
  }
}