/* CSS Variables */
:root {
  /* Основные цвета (Аналоговая цветовая схема) */
  --primary-color: #3273dc;
  --primary-dark: #2366d1;
  --primary-light: #4a89dc;
  --secondary-color: #32a0dc;
  --secondary-dark: #2389c1;
  --tertiary-color: #3250dc;
  --tertiary-dark: #2b43b6;
  --accent-color: #ff3860;
  --accent-dark: #e0264e;
  --success-color: #23d160;
  
  /* Нейтральные цвета */
  --background: #ffffff;
  --foreground: #0a0a0a;
  --gray-light: #f5f5f5;
  --gray-medium: #dbdbdb;
  --gray-dark: #4a4a4a;
  
  /* Тени и градиенты */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
  --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--tertiary-color));
  --gradient-overlay: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.4));
  
  /* Размеры и отступы */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 4rem;
  --border-radius: 4px;
  --border-radius-lg: 8px;
  
  /* Анимации */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* Основные стили */
html, body {
  scroll-behavior: smooth;
  font-family: 'IBM Plex Sans', sans-serif;
  line-height: 1.6;
  color: var(--foreground);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .title, .subtitle {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

.title {
  margin-bottom: 1.5rem;
  position: relative;
}

.title.is-2::after {
  content: "";
  display: block;
  width: 60px;
  height: 5px;
  background: var(--primary-color);
  margin: 1rem auto 0;
}

/* Брутализм и Нео-брутализм */
.card, .box, .notification {
  border: 3px solid var(--foreground);
  box-shadow: 6px 6px 0 var(--foreground) !important;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  border-radius: var(--border-radius) !important;
  overflow: hidden;
}

.card:hover, .box:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--foreground) !important;
}

.image-container {
  width: 100%;
  overflow: hidden;
  border-radius: var(--border-radius);
  border: 2px solid var(--foreground);
  box-shadow: 4px 4px 0 var(--foreground);
  margin-bottom: var(--spacing-lg);
  display: block;
}

.image-container img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform var(--transition-normal);
  object-fit: cover;
}

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

/* Кнопки - глобальные стили */
.button {
  font-weight: 600;
  border: 2px solid var(--foreground) !important;
  box-shadow: 4px 4px 0 var(--foreground) !important;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
  position: relative;
  border-radius: var(--border-radius) !important;
  overflow: hidden;
  z-index: 1;
}

.button:hover, .button:focus {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--foreground) !important;
}

.button:active {
  transform: translate(0, 0);
  box-shadow: 0 0 0 var(--foreground) !important;
}

.button::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  z-index: -1;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--transition-normal);
}

.button:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.button.is-primary {
  background-color: var(--primary-color) !important;
}

.button.is-primary:hover {
  background-color: var(--primary-dark) !important;
}

/* Navigation */
.navbar {
  padding: var(--spacing-md) 0;
  border-bottom: 2px solid var(--foreground);
  background-color: white;
  position: sticky;
  top: 0;
  z-index: 30;
}

.navbar-item {
  font-weight: 600;
  transition: color var(--transition-fast);
}

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

.navbar-burger {
  border: 2px solid var(--foreground);
  border-radius: var(--border-radius);
  margin-top: 5px;
}

/* Hero Section */
.hero {
  position: relative;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-overlay);
  z-index: 1;
}

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

.hero .title,
.hero .subtitle,
.hero p {
  color: white !important;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.hero-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Анимация частиц через JS */
#particles-js {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* About Section */
#about .image-container {
  height: 400px;
}

#about .image-container img {
  height: 100%;
  object-fit: cover;
}

/* Services Section */
#services .card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

#services .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#services .card-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Team Section */
#team .card {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

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

#team .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#team .card-content {
  text-align: center;
  width: 100%;
}

/* Projects Section */
#projects .timeline {
  padding: var(--spacing-lg) 0;
}

#projects .timeline-item {
  margin-bottom: var(--spacing-xl);
  position: relative;
}

#projects .timeline-marker {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--primary-color);
  border: 3px solid var(--foreground);
  box-shadow: 0 0 0 5px rgba(50, 115, 220, 0.3);
}

#projects .timeline-content {
  padding-left: var(--spacing-lg);
}

#projects .image-container {
  height: 250px;
}

#projects .image-container img {
  height: 100%;
  object-fit: cover;
}

/* Partners Section */
#partners .card {
  text-align: center;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform var(--transition-normal);
}

#partners .card:hover {
  transform: translateY(-10px);
}

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

#partners .card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--spacing-md);
}

/* Community Section */
#community .image-container {
  height: 300px;
}

#community .image-container img {
  height: 100%;
  object-fit: cover;
}

#community .timeline {
  margin-top: var(--spacing-lg);
}

#community .timeline-item {
  margin-bottom: var(--spacing-md);
}

#community .timeline-marker.is-primary {
  background-color: var(--primary-color);
  border: 2px solid var(--foreground);
}

#community .field.has-addons {
  margin-top: var(--spacing-lg);
}

/* Contact Section */
#contact .contact-form {
  border: 3px solid var(--foreground);
  padding: var(--spacing-lg);
  box-shadow: 6px 6px 0 var(--foreground);
  background-color: white;
  border-radius: var(--border-radius);
}

#contact .field {
  margin-bottom: var(--spacing-lg);
}

#contact .label {
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
}

#contact .input, 
#contact .textarea, 
#contact .select select {
  border: 2px solid var(--foreground);
  box-shadow: 4px 4px 0 var(--gray-medium);
  transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}

#contact .input:focus, 
#contact .textarea:focus, 
#contact .select select:focus {
  border-color: var(--primary-color);
  box-shadow: 4px 4px 0 var(--primary-light);
}

#contact .image-container {
  height: 300px;
}

#contact .image-container img {
  height: 100%;
  object-fit: cover;
}

/* Footer */
.footer {
  padding: var(--spacing-xl) 0;
  border-top: 3px solid var(--foreground);
  background-color: var(--gray-light);
}

.footer .title {
  position: relative;
  padding-bottom: var(--spacing-sm);
}

.footer .title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 3px;
  background-color: var(--primary-color);
}

.footer a {
  color: var(--gray-dark);
  transition: color var(--transition-fast);
  font-weight: 500;
  display: inline-block;
  margin-bottom: var(--spacing-sm);
}

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

.social-links a {
  display: inline-flex;
  align-items: center;
  margin-right: var(--spacing-md);
  font-weight: 600;
}

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

/* Медиа-запросы для адаптивности */
@media screen and (max-width: 768px) {
  .title.is-1 {
    font-size: 2.5rem !important;
  }
  
  .title.is-2 {
    font-size: 2rem !important;
  }
  
  .title.is-3 {
    font-size: 1.75rem !important;
  }
  
  #projects .timeline-content {
    padding-left: 0;
  }
  
  .image-container {
    margin-bottom: var(--spacing-md);
  }
}

@media screen and (max-width: 480px) {
  .title.is-1 {
    font-size: 2rem !important;
  }
  
  .title.is-2 {
    font-size: 1.75rem !important;
  }
  
  .title.is-3 {
    font-size: 1.5rem !important;
  }
  
  .section {
    padding: 2rem 1rem;
  }
}

/* Special Pages */
.success-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: var(--gray-light);
}

.privacy-page, .terms-page {
  padding-top: 100px;
}

.privacy-page .container, .terms-page .container {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--spacing-xl);
  background-color: white;
  border: 3px solid var(--foreground);
  box-shadow: 6px 6px 0 var(--foreground);
  border-radius: var(--border-radius);
}

/* Дополнительные утилиты */
.has-text-primary {
  color: var(--primary-color) !important;
}

.has-background-light {
  background-color: var(--gray-light) !important;
}

.has-shadow {
  box-shadow: var(--shadow-md);
}

/* Анимация для чисел */
.animated-number {
  font-size: 3rem;
  font-weight: 700;
  display: block;
  margin-bottom: var(--spacing-sm);
  color: var(--primary-color);
}

/* Дополнительные анимации */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

.float-animation {
  animation: float 3s ease-in-out infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.pulse-animation {
  animation: pulse 2s infinite;
}