.niche {
  padding: 80px 0 20px 0;
  /* background-color: green; */
}

.niche-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.niche-card {
  position: relative;
  background: var(--border);
  padding: 1px;
  clip-path: polygon(36px 0, 100% 0, 100% 100%, 0 100%, 0 36px);
  transition: transform 0.6s ease;
}

.niche-card:hover {
  transform: translateY(-6px);
}

.niche-card-inner {
  background: var(--bg-card);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  height: 100%;
  clip-path: polygon(35.5px 0, 100% 0, 100% 100%, 0 100%, 0 35.5px);
  position: relative;
}

.niche-accent-line {
  position: absolute;
  top: 10px;
  left: 48px;
  /* offset slightly after the cut */
  right: 16px;
  height: 2px;
  background: var(--text-primary);
  opacity: 0.9;
}

.niche-card-icon {
  font-size: 1rem;
  color: var(--text-primary);
  margin-right: 8px;
}

.niche-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.niche-card h3 svg {
  transition: transform 0.4s ease;
}

.niche-card:hover h3 svg {
  transform: rotate(180deg);
}

.niche-card p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
  text-align: center;
}

@media (max-width: 900px) {
  .niche-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .niche-grid {
    grid-template-columns: 1fr;
  }
}

/* Stagger animation delays for mobile reveal */
@media (max-width: 900px) {
  .niche-card.reveal:nth-child(1) {
    animation-delay: 0s;
  }

  .niche-card.reveal:nth-child(2) {
    animation-delay: 0.1s;
  }

  .niche-card.reveal:nth-child(3) {
    animation-delay: 0.2s;
  }

  .niche-card.reveal:nth-child(4) {
    animation-delay: 0.3s;
  }
}