/* Enhanced Features Section with Hover Effects */
.enhanced-features {
  position: relative;
  z-index: 10;
  padding: 40px 0;
  max-width: 1200px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 768px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.feature-item {
  display: flex;
  flex-direction: column;
  padding: 40px;
  position: relative;
  transition: all 0.3s ease;
}

/* Border styling */
.feature-item {
  border-bottom: 1px solid var(--border-color);
}

.feature-item:nth-child(5),
.feature-item:nth-child(6),
.feature-item:nth-child(7),
.feature-item:nth-child(8) {
  border-bottom: none;
}

@media (min-width: 992px) {
  .feature-item:nth-child(1),
  .feature-item:nth-child(5) {
    border-left: 1px solid var(--border-color);
  }

  .feature-item {
    border-right: 1px solid var(--border-color);
  }

  .feature-item:nth-child(4),
  .feature-item:nth-child(8) {
    border-right: none;
  }

  .feature-item:nth-child(5),
  .feature-item:nth-child(6),
  .feature-item:nth-child(7),
  .feature-item:nth-child(8) {
    border-bottom: none;
  }
}

/* Hover gradient effects */
.feature-item::before {
  content: '';
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(to top, var(--background-secondary), transparent);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.feature-item:nth-child(5)::before,
.feature-item:nth-child(6)::before,
.feature-item:nth-child(7)::before,
.feature-item:nth-child(8)::before {
  background: linear-gradient(to bottom, var(--background-secondary), transparent);
}

.feature-item:hover::before {
  opacity: 1;
}

.feature-icon {
  margin-bottom: 16px;
  position: relative;
  z-index: 2;
  width: 24px;
  height: 24px;
  color: var(--teal);
}

.feature-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  position: relative;
  z-index: 2;
  padding-left: 16px;
  transition: transform 0.2s ease;
}

.feature-item:hover .feature-title {
  transform: translateX(8px);
}

/* Left border indicator */
.feature-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 24px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background-color: var(--border-color);
  transition:
    height 0.2s ease,
    background-color 0.2s ease;
}

.feature-item:hover .feature-title::before {
  height: 32px;
  background-color: var(--teal);
}

.feature-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  max-width: 320px;
  position: relative;
  z-index: 2;
  padding-left: 16px;
}

/* Dark mode adjustments */
.dark-mode .feature-item {
  border-color: #334155;
}

.dark-mode .feature-item::before {
  background: linear-gradient(to top, rgba(30, 41, 59, 0.8), transparent);
}

.dark-mode .feature-item:nth-child(5)::before,
.dark-mode .feature-item:nth-child(6)::before,
.dark-mode .feature-item:nth-child(7)::before,
.dark-mode .feature-item:nth-child(8)::before {
  background: linear-gradient(to bottom, rgba(30, 41, 59, 0.8), transparent);
}

.dark-mode .feature-title::before {
  background-color: #334155;
}

.dark-mode .feature-item:hover .feature-title::before {
  background-color: var(--teal);
}
