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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero-section,
.learning-path {
  margin: 2rem auto;
  padding: 2rem 0;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
  .section-title {
      font-size: 2rem;
  }
}

.component-card {
  background: white;
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .component-card {
      padding: 1.5rem;
  }
}

.component-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.component-icon {
  font-size: 3rem;
  color: #667eea;
  text-align: center;
  margin-bottom: 1.5rem;
}

.component-card h2 {
  color: #2d3748;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
  text-align: center;
}

.component-card p {
  margin-bottom: 1.5rem;
  color: #4a5568;
  font-size: 1.1rem;
  line-height: 1.8;
}

.definition {
  background: #f7fafc;
  border-left: 4px solid #667eea;
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 8px 8px 0;
}

.definition h4 {
  color: #2d3748;
  margin-bottom: 0.8rem;
  font-size: 1.3rem;
}

.definition p {
  color: #4a5568;
  font-size: 1rem;
  margin: 0;
}

.components-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.components-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

@media (max-width: 768px) {
  .components-container {
      grid-template-columns: 1fr;
      gap: 1rem;
  }
}

.component-item {
  background: #edf2f7;
  padding: 1.2rem;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.component-item:hover {
  background: #e2e8f0;
  transform: translateX(5px);
}

.component-item h5 {
  color: #2d3748;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.component-item p {
  color: #718096;
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.5;
}

.btn-container {
  text-align: center;
  margin: 3rem 0;
  padding: 2rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-decoration: none;
  padding: 1.2rem 3rem;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  border: none;
  cursor: pointer;
}

@media (max-width: 768px) {
  .btn-primary {
      padding: 1rem 2rem;
      font-size: 1rem;
  }
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Дополнительные стили для лучшего отображения */
.hero-section .component-card {
  margin-top: 2rem;
}

.imges {
  width: 200px;
  height: 150px;
}





/* Стили для изображений компонентов */
.image-container {
  margin-top: 1rem;
  text-align: center;
}

.component-image {
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.component-image:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Оптимизация для мобильных устройств */
@media (max-width: 768px) {
  .component-image {
      max-width: 250px;
  }
}

@media (max-width: 480px) {
  .component-image {
      max-width: 200px;
  }
}

/* Улучшение отступов для компонентов с изображениями */
.component-item.with-image {
  padding-bottom: 1.5rem;
}

/* Убедитесь, что изображение не выходит за границы карточки */
.component-item {
  overflow: hidden;
}
