/* ========================================
   KEY BENEFITS - MODERN GRID REDESIGN
   Responsibility: Clean, modern SaaS grid layout
   featuring white cards, soft glows, and 
   premium pastel backgrounds.
   ======================================== */

:root {
  --kb-font-main: "Outfit", "Inter", sans-serif;

  /* Benefit Colors for Glows */
  --kb-clr-conceptualise: #3b82f6; /* Blueish */
  --kb-clr-design: #10b981; /* Emerald */
  --kb-clr-development: #f43f5e; /* Rose */
  --kb-clr-review: #f59e0b; /* Amber */
  --kb-clr-launch: #8b5cf6; /* Violet */
  --kb-clr-maintenance: #fb923c; /* Orange */

  --kb-card-bg: #ffffff;
  --kb-card-shadow:
    0 10px 30px -5px rgba(0, 0, 0, 0.05), 0 4px 15px -5px rgba(0, 0, 0, 0.03);
  --kb-card-radius: 24px;
}

.kb-section {
  position: relative;
  background: #ffffff;
  font-family: var(--kb-font-main);
  padding: 100px 0;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Premium Pastel Background Elements - More Diverse & Vibrant */
.kb-section::before {
  content: "";
  position: absolute;
  top: -10%;
  left: -5%;
  width: 60%;
  height: 70%;
  background:
    radial-gradient(
      circle at 20% 30%,
      rgba(59, 130, 246, 0.12) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 10%,
      rgba(16, 185, 129, 0.1) 0%,
      transparent 40%
    );
  filter: blur(80px);
  z-index: 0;
}

.kb-section::after {
  content: "";
  position: absolute;
  bottom: -15%;
  right: -5%;
  width: 70%;
  height: 80%;
  background:
    radial-gradient(
      circle at 70% 80%,
      rgba(244, 63, 94, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 20% 90%,
      rgba(139, 92, 246, 0.08) 0%,
      transparent 40%
    );
  filter: blur(100px);
  z-index: 0;
}

.kb-bg-accent {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle,
    rgba(244, 63, 94, 0.05) 0%,
    transparent 60%
  );
  filter: blur(80px);
  z-index: 0;
}

.kb-container {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 30px;
  position: relative;
  z-index: 10;
}

/* Header Section */
.kb-header {
  text-align: center;
  margin-bottom: 70px;
}

.kb-title {
  font-size: 3rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.kb-subtitle {
  font-size: 1.25rem;
  color: #64748b;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Benefits Grid */
.kb-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

/* Color Variables for Glows - High-Variety 10-Color Palette */
.kb-grid > a:nth-child(10n + 1) .kb-card {
  --current-glow: #3b82f6;
} /* Blue */
.kb-grid > a:nth-child(10n + 2) .kb-card {
  --current-glow: #10b981;
} /* Emerald */
.kb-grid > a:nth-child(10n + 3) .kb-card {
  --current-glow: #f59e0b;
} /* Amber */
.kb-grid > a:nth-child(10n + 4) .kb-card {
  --current-glow: #f43f5e;
} /* Rose */
.kb-grid > a:nth-child(10n + 5) .kb-card {
  --current-glow: #8b5cf6;
} /* Violet */
.kb-grid > a:nth-child(10n + 6) .kb-card {
  --current-glow: #06b6d4;
} /* Cyan */
.kb-grid > a:nth-child(10n + 7) .kb-card {
  --current-glow: #ec4899;
} /* Pink */
.kb-grid > a:nth-child(10n + 8) .kb-card {
  --current-glow: #f97316;
} /* Orange */
.kb-grid > a:nth-child(10n + 9) .kb-card {
  --current-glow: #84cc16;
} /* Lime */
.kb-grid > a:nth-child(10n + 10) .kb-card {
  --current-glow: #6366f1;
} /* Indigo */

/* Benefit Card */
.kb-card {
  background: var(--kb-card-bg);
  border-radius: var(--kb-card-radius);
  padding: 30px 15px 30px 25px; /* Offset for left accent */
  text-align: center;
  box-shadow: var(--kb-card-shadow);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  height: 100%;
  position: relative;
  overflow: hidden;
}

/* Colored Left Accent Bar */
.kb-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15%;
  height: 70%;
  width: 6px;
  background: var(--current-glow);
  border-radius: 0 10px 10px 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  opacity: 0.8;
  z-index: 5;
}

/* Shine Sweep Effect */
.kb-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transform: skewX(-25deg);
  transition: 0.8s;
  z-index: 10;
  pointer-events: none;
}

.kb-card:hover::after {
  left: 150%;
}

.kb-card:hover::before {
  height: 100%;
  top: 0;
  width: 8px;
  opacity: 1;
}

.kb-card:hover {
  transform: translateY(-12px) scale(1.02) rotate(0.5deg);
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.12);
  border-color: rgba(0, 0, 0, 0.05);
}

/* Icon Container with Glow */
.kb-icon-wrapper {
  position: relative;
  width: 60px;
  height: 60px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes kbPulseGlow {
  0%,
  100% {
    opacity: 0.12;
    transform: scale(1);
  }
  50% {
    opacity: 0.2;
    transform: scale(1.1);
  }
}

.kb-icon-glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--current-glow);
  opacity: 0.12;
  filter: blur(6px);
  transition: transform 0.4s ease;
  animation: kbPulseGlow 4s ease-in-out infinite;
}

.kb-card:hover .kb-icon-glow {
  transform: scale(1.4);
  opacity: 0.25;
  animation: none; /* Keep it focused on hover */
}

.kb-card img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  position: relative;
  z-index: 2;
  /* Make icons match the theme color more closely */
  filter: drop-shadow(0 0 20px var(--current-glow)) brightness(1.1);
  opacity: 0.9;
  transition: all 0.4s ease;
}

.kb-card:hover img {
  transform: scale(1.1);
  opacity: 1;
  filter: drop-shadow(0 0 25px var(--current-glow)) brightness(1.2);
}

/* Labels and Descriptions */
.kb-card-label {
  font-size: 0.9rem;
  font-weight: 800;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.2;
  margin: 0;
}

.kb-card-desc {
  display: none;
}

/* Entrance Animation */
@keyframes kbFadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes kbFloatIcon {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.kb-card {
  animation: kbFadeUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  opacity: 0; /* Start hidden for animation */
}

/* Staggered delay for 15 items using CSS */
.kb-grid > a:nth-child(1) .kb-card {
  animation-delay: 0.1s;
}
.kb-grid > a:nth-child(2) .kb-card {
  animation-delay: 0.15s;
}
.kb-grid > a:nth-child(3) .kb-card {
  animation-delay: 0.2s;
}
.kb-grid > a:nth-child(4) .kb-card {
  animation-delay: 0.25s;
}
.kb-grid > a:nth-child(5) .kb-card {
  animation-delay: 0.3s;
}
.kb-grid > a:nth-child(6) .kb-card {
  animation-delay: 0.35s;
}
.kb-grid > a:nth-child(7) .kb-card {
  animation-delay: 0.4s;
}
.kb-grid > a:nth-child(8) .kb-card {
  animation-delay: 0.45s;
}
.kb-grid > a:nth-child(9) .kb-card {
  animation-delay: 0.5s;
}
.kb-grid > a:nth-child(10) .kb-card {
  animation-delay: 0.55s;
}
.kb-grid > a:nth-child(11) .kb-card {
  animation-delay: 0.6s;
}
.kb-grid > a:nth-child(12) .kb-card {
  animation-delay: 0.65s;
}
.kb-grid > a:nth-child(13) .kb-card {
  animation-delay: 0.7s;
}
.kb-grid > a:nth-child(14) .kb-card {
  animation-delay: 0.75s;
}
.kb-grid > a:nth-child(15) .kb-card {
  animation-delay: 0.8s;
}

.kb-card img {
  animation: kbFloatIcon 3s ease-in-out infinite;
}

/* Staggered float to look natural */
.kb-grid > a:nth-child(odd) img {
  animation-delay: 0.5s;
}
.kb-grid > a:nth-child(3n) img {
  animation-delay: 1.2s;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .kb-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 1024px) {
  .kb-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .kb-section {
    padding: 60px 0;
  }
  .kb-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  .kb-title {
    font-size: 2.25rem;
  }
}

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

@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;800;900&display=swap");
