/* CSS Custom Properties */
:root {
  /* Пастельная цветовая палитра */
  --primary-color: #a8d5e2;
  --primary-dark: #7bc3d4;
  --secondary-color: #f9c2d4;
  --secondary-dark: #f5a3be;
  --accent-color: #b8e6b8;
  --accent-dark: #9dd99d;
  --tertiary-color: #ffd3a5;
  --tertiary-dark: #ffbc7d;
  
  /* Нейтральные цвета */
  --background-light: #faf8f5;
  --background-white: #ffffff;
  --text-dark: #2d3748;
  --text-gray: #4a5568;
  --text-light: #718096;
  --border-color: #e2e8f0;
  
  /* Неоморфизм тени */
  --shadow-light: 8px 8px 16px #d1d9e6, -8px -8px 16px #ffffff;
  --shadow-inset: inset 8px 8px 16px #d1d9e6, inset -8px -8px 16px #ffffff;
  --shadow-hover: 12px 12px 24px #c8d0e7, -12px -12px 24px #ffffff;
  
  /* Градиенты */
  --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  --gradient-accent: linear-gradient(135deg, var(--accent-color), var(--tertiary-color));
  --gradient-overlay: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.3));
  
  /* Шрифты */
  --font-heading: 'Archivo Black', sans-serif;
  --font-body: 'Roboto', sans-serif;
  
  /* Размеры */
  --border-radius: 20px;
  --border-radius-small: 12px;
  --container-max-width: 1200px;
  --section-padding: 80px 0;
  --grid-gap: 30px;
}

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

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background-color: var(--background-light);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-dark);
  margin-bottom: 1rem;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.2;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.3;
}

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

p {
  margin-bottom: 1rem;
  color: var(--text-gray);
  font-weight: 400;
}

/* Global Button Styles */
.btn, button, input[type='submit'] {
  display: inline-block;
  padding: 15px 30px;
  border: none;
  border-radius: var(--border-radius-small);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-light);
  position: relative;
  overflow: hidden;
}

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

.btn-secondary {
  background: var(--background-white);
  color: var(--text-dark);
}

.btn-submit {
  background: var(--gradient-accent);
  color: white;
  width: 100%;
}

.btn:hover, button:hover, input[type='submit']:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

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

/* Header Styles */
.header-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(250, 248, 245, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  padding: 1rem 0;
}

.nav-container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--primary-color);
  margin: 0;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--primary-color);
  transform: translateY(-2px);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

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

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.mobile-menu-btn span {
  width: 25px;
  height: 3px;
  background: var(--text-dark);
  transition: 0.3s;
  border-radius: 2px;
}

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

.hero-content {
  text-align: center;
  max-width: 800px;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  transform: perspective(1000px) rotateX(5deg);
}

.hero-title {
  color: #FFFFFF !important;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-subtitle {
  color: #FFFFFF !important;
  font-size: 1.2rem;
  margin-bottom: 2rem;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

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

/* Section Styles */
section {
  padding: var(--section-padding);
  position: relative;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  color: var(--text-dark);
  position: relative;
}

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

/* Insights Section */
.insights-section {
  background: var(--background-white);
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--grid-gap);
  margin-bottom: 3rem;
}

.insight-card {
  transform: perspective(1000px) rotateY(-5deg);
  transition: all 0.5s ease;
}

.insight-card:nth-child(even) {
  transform: perspective(1000px) rotateY(5deg);
}

.insight-card:hover {
  transform: perspective(1000px) rotateY(0deg) translateY(-10px);
}

/* Card Styles */
.card {
  background: var(--background-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

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

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

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

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

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

.card-content p {
  color: var(--text-gray);
  margin-bottom: 1.5rem;
}

/* Statistics Widget */
.stat-widget {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--gradient-accent);
  padding: 1rem;
  border-radius: var(--border-radius-small);
  margin-top: auto;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: white;
  margin-bottom: 0.5rem;
}

.stat-label {
  color: white;
  font-size: 0.9rem;
  text-align: center;
}

/* Projects Section */
.projects-section {
  background: var(--background-light);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--grid-gap);
  margin-bottom: 3rem;
}

.project-card {
  transform: skew(-2deg, 1deg);
  transition: all 0.3s ease;
}

.project-card:hover {
  transform: skew(0deg, 0deg) scale(1.02);
}

.project-stats {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.project-stats span {
  background: var(--primary-color);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius-small);
  font-size: 0.9rem;
  font-weight: 500;
}

/* Custom Slider */
.custom-slider {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
}

.slider-container {
  position: relative;
  height: 400px;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide.active {
  opacity: 1;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--border-radius);
}

.slide-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--gradient-overlay);
  color: white;
  padding: 2rem;
  text-align: center;
}

.slider-controls {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  width: 100%;
  pointer-events: none;
}

.slider-btn {
  background: rgba(255, 255, 255, 0.8);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  pointer-events: auto;
  margin: 0 1rem;
}

.slider-btn:hover {
  background: white;
  transform: scale(1.1);
}

/* External Resources Section */
.resources-section {
  background: var(--background-white);
  padding: 4rem 0;
}

.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.resource-card {
  background: var(--background-light);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  text-align: center;
}

.resource-card h4 {
  color: var(--text-dark);
  margin-bottom: 1.5rem;
}

.resource-links {
  list-style: none;
}

.resource-links li {
  margin-bottom: 1rem;
}

.resource-links a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-block;
}

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

/* Process Section */
.process-section {
  background: var(--background-white);
}

.process-steps {
  max-width: 900px;
  margin: 0 auto;
}

.process-step {
  display: flex;
  align-items: center;
  margin-bottom: 3rem;
  gap: 2rem;
}

.process-step:nth-child(even) {
  flex-direction: row-reverse;
}

.step-number {
  width: 80px;
  height: 80px;
  background: var(--gradient-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 2rem;
  box-shadow: var(--shadow-light);
  flex-shrink: 0;
}

.step-content {
  flex: 1;
  background: var(--background-light);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
}

.step-content h3 {
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.step-content p {
  color: var(--text-gray);
  margin: 0;
}

/* Community Section */
.community-section {
  background: var(--background-light);
}

.community-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.stat-card {
  background: var(--background-white);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  text-align: center;
  transition: all 0.3s ease;
}

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

.stat-card .stat-number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--primary-color);
  display: block;
  margin-bottom: 0.5rem;
}

.stat-card .stat-label {
  color: var(--text-gray);
  font-size: 1rem;
}

/* Image Gallery */
.image-gallery {
  margin: 3rem 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.gallery-item {
  overflow: hidden;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  transform: rotate(1deg);
  transition: all 0.3s ease;
}

.gallery-item:nth-child(even) {
  transform: rotate(-1deg);
}

.gallery-item:hover {
  transform: rotate(0deg) scale(1.05);
  box-shadow: var(--shadow-hover);
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.community-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.5);
  border-radius: var(--border-radius);
  backdrop-filter: blur(10px);
}

/* Contact Section */
.contact-section {
  background: var(--background-white);
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-info h3 {
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.contact-info p {
  color: var(--text-gray);
  margin-bottom: 2rem;
}

.contact-details {
  background: var(--background-light);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
}

.contact-item {
  margin-bottom: 1rem;
  color: var(--text-gray);
}

.contact-item strong {
  color: var(--text-dark);
}

/* Form Styles */
.contact-form {
  background: var(--background-light);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-small);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: all 0.3s ease;
  background: var(--background-white);
  box-shadow: inset 2px 2px 5px rgba(0,0,0,0.1);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: inset 2px 2px 5px rgba(0,0,0,0.1), 0 0 0 3px rgba(168, 213, 226, 0.3);
}

/* Footer */
.footer {
  background: var(--text-dark);
  color: var(--background-light);
  padding: 3rem 0 1rem 0;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
  color: var(--background-white);
  margin-bottom: 1rem;
}

.footer-section p {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
}

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

.footer-links a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.social-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.social-links a {
  color: var(--text-light);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 1px solid var(--text-light);
  border-radius: var(--border-radius-small);
  transition: all 0.3s ease;
}

.social-links a:hover {
  color: var(--primary-color);
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--text-gray);
  color: var(--text-light);
}

/* Cookie Consent */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(45, 55, 72, 0.95);
  backdrop-filter: blur(10px);
  padding: 1rem;
  z-index: 9999;
  display: none;
}

.cookie-content {
  max-width: var(--container-max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.cookie-content p {
  color: white;
  margin: 0;
  flex: 1;
  min-width: 300px;
}

.cookie-accept-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius-small);
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.cookie-accept-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* Success Page Styles */
.success-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  padding: 2rem;
}

.success-content {
  background: var(--background-white);
  padding: 3rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  text-align: center;
  max-width: 500px;
  width: 100%;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: var(--accent-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem auto;
  font-size: 2rem;
  color: white;
}

/* About, Terms, Privacy Pages */
.page-content {
  padding-top: 120px;
  padding-bottom: 4rem;
}

.page-header {
  text-align: center;
  margin-bottom: 3rem;
}

.page-text {
  max-width: 800px;
  margin: 0 auto;
  background: var(--background-white);
  padding: 3rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
}

.page-text h2 {
  color: var(--text-dark);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.page-text p {
  color: var(--text-gray);
  margin-bottom: 1.5rem;
}

.page-text ul, .page-text ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.page-text li {
  color: var(--text-gray);
  margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  :root {
    --section-padding: 60px 0;
    --grid-gap: 20px;
  }
  
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--background-white);
    flex-direction: column;
    padding: 1rem;
    box-shadow: var(--shadow-light);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
  }
  
  .nav-menu.active {
    display: flex;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  .mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
  }
  
  .mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
  
  .hero-content {
    padding: 1.5rem;
    transform: none;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .contact-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .process-step {
    flex-direction: column !important;
    text-align: center;
  }
  
  .process-step:nth-child(even) {
    flex-direction: column !important;
  }
  
  .insights-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .community-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .cookie-content {
    flex-direction: column;
    text-align: center;
  }
  
  .cookie-content p {
    min-width: auto;
  }
}

@media (max-width: 480px) {
  .community-stats {
    grid-template-columns: 1fr;
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .slider-controls {
    display: none;
  }
  
  .page-text {
    padding: 2rem 1rem;
  }
  
  .success-content {
    padding: 2rem;
  }
}

/* Animation Classes */
@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);
  }
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.mb-1 {
  margin-bottom: 1rem;
}

.mb-2 {
  margin-bottom: 2rem;
}

.mb-3 {
  margin-bottom: 3rem;
}

.mt-1 {
  margin-top: 1rem;
}

.mt-2 {
  margin-top: 2rem;
}

.mt-3 {
  margin-top: 3rem;
}

.p-1 {
  padding: 1rem;
}

.p-2 {
  padding: 2rem;
}

.p-3 {
  padding: 3rem;
}

/* Scroll Animations */
.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

.slide-in-left {
  animation: slideInLeft 0.6s ease forwards;
}

.slide-in-right {
  animation: slideInRight 0.6s ease forwards;
}

.zoom-in {
  animation: zoomIn 0.6s ease forwards;
}

/* Performance Optimizations */
.card,
.btn,
.slider-btn,
.gallery-item {
  will-change: transform;
}

img {
  loading: lazy;
}