/* Category Ecosystem Section (Home Page)
 * Matches the reference design with 4x2 grid, soft blue icon tiles,
 * pill badges with course counts, and clean card styling.
 */

.imz-ecosystem-section {
  width: 100%;
  padding: 60px 0 64px;
  background: transparent;
  position: relative;
  z-index: 5;
}

.imz-ecosystem-container {
  width: min(1440px, calc(100% - 64px));
  margin: 0 auto;
  padding: 0;
}

/* Header */
.imz-ecosystem-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 44px;
}

.imz-ecosystem-title {
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 800;
  color: #0b1f4f;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.imz-ecosystem-subtitle {
  font-size: 15.5px;
  color: #64748b;
  margin: 0;
  line-height: 1.6;
}

/* 4x2 Grid */
.imz-ecosystem-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  margin-left: 4%;
  margin-right: 4%;
}

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

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

/* Individual Card */
.imz-ecosystem-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s ease;
  position: relative;
}

.imz-ecosystem-card:hover {
  transform: translateY(-4px);
  border-color: #bfdbfe;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

/* Card Top: Icon + Badge */
.imz-ecosystem-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.imz-ecosystem-icon-wrapper {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
  flex-shrink: 0;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.imz-ecosystem-card:hover .imz-ecosystem-icon-wrapper {
  background: #dbeafe;
  transform: scale(1.05);
}

.imz-ecosystem-icon-wrapper svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

.imz-ecosystem-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
  background-color: #ffffff;
  padding: 4px 12px;
  font-size: 11.5px;
  font-weight: 700;
  color: #64748b;
  white-space: nowrap;
}

/* Card Title & Description */
.imz-ecosystem-card-title {
  margin: 18px 0 8px;
  font-size: 17.5px;
  font-weight: 800;
  color: #0b1f4f;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.imz-ecosystem-card-desc {
  margin: 0 0 24px;
  font-size: 13.5px;
  line-height: 1.55;
  color: #64748b;
  flex-grow: 1;
  min-height: 42px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card Link */
.imz-ecosystem-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: #1554c8;
  text-decoration: none !important;
  margin-top: auto;
  transition: color 0.15s ease;
}

.imz-ecosystem-card-link:hover {
  color: #0b1f4f;
  text-decoration: none !important;
}

.imz-eco-arrow-icon {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  transition: transform 0.2s ease;
}

.imz-ecosystem-card:hover .imz-eco-arrow-icon,
.imz-ecosystem-card-link:hover .imz-eco-arrow-icon {
  transform: translateX(4px);
}

/* Bottom Action Button */
.imz-ecosystem-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 44px;
}

.imz-ecosystem-explore-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none !important;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.imz-ecosystem-explore-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  color: #0f172a;
  text-decoration: none !important;
}

.imz-ecosystem-explore-btn .imz-eco-arrow-icon {
  width: 15px;
  height: 15px;
  stroke: currentColor;
}

/* Status / Loader */
.imz-ecosystem-status {
  text-align: center;
  padding: 3rem 1rem;
  color: #64748b;
  font-size: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.imz-ecosystem-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e2e8f0;
  border-top-color: #1447e6;
  border-radius: 50%;
  animation: imz-ecosystem-spin 0.8s linear infinite;
}

@keyframes imz-ecosystem-spin {
  to {
    transform: rotate(360deg);
  }
}
