/* components/features/features.css */
.features {
  background: var(--gradient-surface);
  padding: var(--block-top-indent) 0;
  position: relative;
}

.features::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--gradient-accent);
  opacity: 0.8;
}

.features__container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 20px;
}

.features__header {
  text-align: center;
  margin-bottom: 80px;
}

.features__title {
  font-size: 48px;
  font-weight: 800;
  color: var(--primary-text);
  margin-bottom: 20px;
  line-height: 1.2;
}

.features__subtitle {
  font-size: 20px;
  color: var(--secondary-text);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.features__item {
  background: var(--card-bg);
  border-radius: var(--border-radius-lg);
  padding: 40px 30px;
  box-shadow: var(--shadow-light);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease-out forwards;
  border: 1px solid var(--border-primary);
}

.features__item:nth-child(1) { animation-delay: 0.1s; }
.features__item:nth-child(2) { animation-delay: 0.2s; }
.features__item:nth-child(3) { animation-delay: 0.3s; }
.features__item:nth-child(4) { animation-delay: 0.4s; }
.features__item:nth-child(5) { animation-delay: 0.5s; }

.features__item:nth-child(4) {
  grid-column: 1 / 3;
}

.features__item:nth-child(5) {
  grid-column: 3 / 4;
}

.features__item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0;
  background: var(--gradient-primary);
  transition: height 0.8s ease-out 0.3s;
}

.features__item:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-heavy);
}

.features__item:hover::before {
  height: 100%;
}

.features__icon-wrapper {
  width: 80px;
  height: 80px;
  background: var(--accent-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.features__icon-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-primary);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0);
  transition: var(--transition);
}

.features__item:hover .features__icon-wrapper::before {
  opacity: 1;
  transform: scale(1);
}

.features__icon {
  width: 40px;
  height: 40px;
  fill: var(--accent-primary);
  position: relative;
  z-index: 2;
  transition: var(--transition);
}

.features__item:hover .features__icon {
  fill: var(--primary-text);
  transform: scale(1.1);
}

.features__content {
  position: relative;
  z-index: 1;
}

.features__item-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-text);
  margin-bottom: 16px;
  line-height: 1.3;
}

.features__item-text {
  font-size: 16px;
  color: var(--secondary-text);
  line-height: 1.6;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .features {
    padding: 120px 0;
  }
  
  .features__header {
    margin-bottom: 60px;
  }
  
  .features__title {
    font-size: 40px;
  }
  
  .features__subtitle {
    font-size: 18px;
  }
  
  .features__grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
    gap: 30px;
  }
  
  .features__item:nth-child(4),
  .features__item:nth-child(5) {
    grid-column: span 1;
  }
  
  .features__item {
    padding: 30px 25px;
  }
}

@media (max-width: 768px) {
  .features {
    padding: 80px 0;
  }
  
  .features__title {
    font-size: 32px;
  }
  
  .features__subtitle {
    font-size: 16px;
  }
  
  .features__grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  
  .features__item:nth-child(4),
  .features__item:nth-child(5) {
    grid-column: 1;
  }
  
  .features__item {
    padding: 25px 20px;
  }
  
  .features__icon-wrapper {
    width: 70px;
    height: 70px;
  }
  
  .features__icon {
    width: 35px;
    height: 35px;
  }
  
  .features__item-title {
    font-size: 18px;
  }
  
  .features__item-text {
    font-size: 15px;
  }
}