
.features-page-wrapper {
  width: 100%;
  overflow-x: hidden;
}

/* Adjust page-hero-content spacing when containing feature cards */
.page-hero-section .page-hero-content {
  padding-bottom: 96px;
}

/* Bento Directory Grid Layout */
.features-directory-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  width: 100%;
  position: relative;
  z-index: 2;
  margin-top: 24px;
  background: transparent;
}

/* Base Bento Feature Card */
.feature-directory-card {
  position: relative;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 20px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  overflow: hidden;
  transition:
    box-shadow 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

.feature-directory-card:hover {
  border-color: rgba(93, 85, 249, 0.35);
  background: #f4f6fe;
  box-shadow: 0 6px 16px -2px rgba(15, 23, 42, 0.06);
}

.feature-directory-card:hover::after {
  transform: scale(1.3);
  opacity: 1;
}

/* Bento Featured Hero Cards (Span 2 Columns on Desktop) */
.feature-directory-card.bento-featured-card {
  background: #f4f6fe;
  border-color: rgba(93, 85, 249, 0.2);
}

.feature-directory-card.bento-featured-card:hover {
  background: #eef2ff;
  border-color: rgba(93, 85, 249, 0.4);
}

@media (min-width: 993px) {
  .feature-directory-card.bento-featured-card {
    grid-column: span 2;
  }

  .feature-directory-card.bento-featured-card .feature-card-title {
    font-size: 23.2px;
  }

  .feature-directory-card.bento-featured-card .feature-card-desc {
    font-size: 15.68px;
    -webkit-line-clamp: 4;
    line-clamp: 4;
  }
}

.feature-card-top {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  z-index: 2;
}

.feature-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Custom Icon Box Styling & Color Themes */
.feature-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 23.2px;
  flex-shrink: 0;
  transform: scale(1) rotate(0deg) translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
  transition:
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.feature-icon-box i,
.feature-icon-box svg {
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.feature-directory-card:hover .feature-icon-box {
  transform: scale(1.1) rotate(-3deg) translateZ(0);
}

/* Icon Box Palette */
.icon-indigo {
  background: linear-gradient(
    135deg,
    rgba(93, 85, 249, 0.15) 0%,
    rgba(93, 85, 249, 0.05) 100%
  );
  color: #5d55f9;
  border: 1px solid rgba(93, 85, 249, 0.25);
}

.icon-blue {
  background: linear-gradient(
    135deg,
    rgba(37, 99, 235, 0.15) 0%,
    rgba(37, 99, 235, 0.05) 100%
  );
  color: #2563eb;
  border: 1px solid rgba(37, 99, 235, 0.25);
}

.icon-amber {
  background: linear-gradient(
    135deg,
    rgba(217, 119, 6, 0.15) 0%,
    rgba(217, 119, 6, 0.05) 100%
  );
  color: #d97706;
  border: 1px solid rgba(217, 119, 6, 0.25);
}

.icon-purple {
  background: linear-gradient(
    135deg,
    rgba(147, 51, 234, 0.15) 0%,
    rgba(147, 51, 234, 0.05) 100%
  );
  color: #9333ea;
  border: 1px solid rgba(147, 51, 234, 0.25);
}

.icon-emerald {
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.15) 0%,
    rgba(16, 185, 129, 0.05) 100%
  );
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.icon-cyan {
  background: linear-gradient(
    135deg,
    rgba(14, 165, 233, 0.15) 0%,
    rgba(14, 165, 233, 0.05) 100%
  );
  color: #0284c7;
  border: 1px solid rgba(14, 165, 233, 0.25);
}

.icon-rose {
  background: linear-gradient(
    135deg,
    rgba(225, 29, 72, 0.15) 0%,
    rgba(225, 29, 72, 0.05) 100%
  );
  color: #e11d48;
  border: 1px solid rgba(225, 29, 72, 0.25);
}

.icon-teal {
  background: linear-gradient(
    135deg,
    rgba(13, 148, 136, 0.15) 0%,
    rgba(13, 148, 136, 0.05) 100%
  );
  color: #0d9488;
  border: 1px solid rgba(13, 148, 136, 0.25);
}

.icon-orange {
  background: linear-gradient(
    135deg,
    rgba(234, 88, 12, 0.15) 0%,
    rgba(234, 88, 12, 0.05) 100%
  );
  color: #ea580c;
  border: 1px solid rgba(234, 88, 12, 0.25);
}

/* Category Accent Badges */
.feature-tag-badge {
  font-size: 11.52px;
  font-weight: 700;
  padding: 4.8px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.4608px;
  white-space: nowrap;
}

.badge-indigo {
  background: rgba(93, 85, 249, 0.1);
  color: #5d55f9;
  border: 1px solid rgba(93, 85, 249, 0.22);
}

.badge-blue {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  border: 1px solid rgba(37, 99, 235, 0.22);
}

.badge-amber {
  background: rgba(217, 119, 6, 0.1);
  color: #d97706;
  border: 1px solid rgba(217, 119, 6, 0.22);
}

.badge-purple {
  background: rgba(147, 51, 234, 0.1);
  color: #9333ea;
  border: 1px solid rgba(147, 51, 234, 0.22);
}

.badge-emerald {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.22);
}

.badge-cyan {
  background: rgba(14, 165, 233, 0.1);
  color: #0284c7;
  border: 1px solid rgba(14, 165, 233, 0.22);
}

.badge-rose {
  background: rgba(225, 29, 72, 0.1);
  color: #e11d48;
  border: 1px solid rgba(225, 29, 72, 0.22);
}

.badge-teal {
  background: rgba(13, 148, 136, 0.1);
  color: #0d9488;
  border: 1px solid rgba(13, 148, 136, 0.22);
}

.badge-orange {
  background: rgba(234, 88, 12, 0.1);
  color: #ea580c;
  border: 1px solid rgba(234, 88, 12, 0.22);
}

/* Card Content Typography */
.feature-card-title {
  font-size: 20.8px;
  font-weight: 800;
  color: var(--text-1, #0f172a);
  line-height: 1.3;
  letter-spacing: -0.312px;
  margin: 0;
}

.feature-card-desc {
  font-size: 15.04px;
  color: var(--text-2, #475569);
  line-height: 1.6;
  margin: 0 0 24px 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Pill CTA Button */
.feature-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 9.6px;
  width: fit-content;
  padding: 9.6px 20px;
  background: #ffffff;
  border: 1px solid rgba(93, 85, 249, 0.2);
  border-radius: 30px;
  color: var(--brand, #5d55f9);
  font-size: 14.08px;
  font-weight: 700;
  text-decoration: none;
  box-sizing: border-box;
  margin-top: auto;
  position: relative;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(93, 85, 249, 0.06);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-card-cta i {
  font-size: 17.6px;
  transition: transform 0.25s ease;
}

.feature-card-cta:hover {
  background: linear-gradient(135deg, #5d55f9 0%, #4c44e0 100%);
  border-color: #5d55f9;
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(93, 85, 249, 0.3);
}

.feature-card-cta:hover i {
  transform: translateX(5px);
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
  .features-directory-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

@media (max-width: 992px) {
  .features-directory-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  .feature-directory-card.bento-featured-card {
    grid-column: span 1;
  }
}

@media (max-width: 640px) {
  .features-directory-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .feature-directory-card {
    padding: 24px;
  }
  .page-hero-section .page-hero-content {
    padding-bottom: 56px;
  }
}
