.cf-pillars-collections {
  max-width: var(--cf-max-width, 1200px);
  margin: 0 auto;
  padding: 2rem;
}

.cf-pillar-group {
  margin-bottom: 3rem;
}

.cf-pillar-title {
  font-size: 1.5rem;
  margin: 0 0 1rem 0;
  padding-bottom: 0.25rem;
  border-bottom: 2px solid rgba(0, 0, 0, 0.06);
  color: var(--cf-accent, #d95743);
}

.cf-pillar-grid {
  display: grid;
  gap: var(--cf-gap, 1rem);
  margin-top: 1rem;
}

.cf-pillar-grid.columns-1 { grid-template-columns: 1fr; }
.cf-pillar-grid.columns-2 { grid-template-columns: repeat(2, 1fr); }
.cf-pillar-grid.columns-3 { grid-template-columns: repeat(3, 1fr); }
.cf-pillar-grid.columns-4 { grid-template-columns: repeat(4, 1fr); }

.cf-course-card {
  background: var(--cf-card-bg, #fff);
  border: 1px solid var(--cf-border, rgba(0,0,0,0.06));
  border-radius: var(--cf-radius, 8px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform var(--cf-transition, 180ms ease), box-shadow var(--cf-transition, 180ms ease);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.02);
}

.cf-course-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--cf-shadow, 0 6px 18px rgba(8,15,30,0.05));
}

.cf-card-link {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.cf-thumb {
  width: 100%;
  overflow: hidden;
  background: #f1f5f9;
  position: relative;
}

.cf-thumb img {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.cf-thumb-placeholder {
  width: 100%;
  height: 160px;
  background: linear-gradient(90deg, #eee, #f7f7f7);
}

.cf-card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.cf-card-title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.2;
  color: var(--cf-accent, #0f172a);
}

.cf-card-excerpt {
  margin: 0;
  color: var(--cf-muted, #6b7280);
  font-size: 0.95rem;
  flex: 1;
}

.cf-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
}

.cf-cta {
  font-weight: 600;
  color: var(--cf-accent, #d95743);
}

.cf-no-results,
.cf-no-pillars {
  color: var(--cf-muted, #666);
  padding: 1rem;
  background: #fff9f9;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.cf-card-body > .cf-pillar-badge,
.cf-card-body .cf-pillar-badges {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
  width: auto;
}

.cf-pillar-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  white-space: nowrap;
  text-decoration: none;
  border: 1px solid rgba(0,0,0,0.04);
  pointer-events: none;
}

.cf-pillar-badges .cf-pillar-badge {
  font-weight: 600;
  font-size: 11px;
}

.pillar-purpose { 
  background: rgba(217, 87, 67, 0.08);
  color: #d95743;
  border-color: rgba(217, 87, 67, 0.12);
}

.pillar-passion {
  background: rgba(216, 163, 77, 0.08);
  color: #c78d30;
  border-color: rgba(216, 163, 77, 0.12);
}

.pillar-people {
  background: rgba(167, 181, 116, 0.08);
  color: #829735;
  border-color: rgba(167, 181, 116, 0.12);
}

.pillar-profit {
  background: rgba(200, 80, 90, 0.08);
  color: #c8505a;
  border-color: rgba(200, 80, 90, 0.12);
}

.cf-pillar-badge:focus-visible {
  box-shadow: 0 0 0 3px rgba(217, 87, 67, 0.12);
}


.cf-pillar-badge:focus-visible {
  box-shadow: 0 0 0 3px rgba(217,87,67,0.12);
}

.cf-course-card.cf-show-all-pillars .cf-card-body > .cf-pillar-badges,
.cf-course-card.cf-show-all-pillars .cf-card-body > .cf-pillar-badge {
  width: auto;
  justify-content: flex-start;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.cf-course-card.cf-show-all-pillars .cf-pillar-badge {
  padding: 4px 6px;
  font-size: 10px;
  white-space: nowrap;
}

.cf-card-body > .cf-pillar-badge {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center ;
    flex-wrap: wrap;
    margin-bottom: 0.25rem;
    width: 80px;
}

@media (max-width: 1100px) {
  .cf-pillar-grid.columns-3,
  .cf-pillar-grid.columns-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .cf-pillars-collections {
    padding: 1.5rem;
  }

  .cf-pillar-badge { padding: 5px 8px; font-size: 11px; }
}

@media (max-width: 640px) {
  .cf-thumb img,
  .cf-thumb-placeholder {
    height: 180px;
  }

  .cf-pillar-grid.columns-2,
  .cf-pillar-grid.columns-3,
  .cf-pillar-grid.columns-4 {
    grid-template-columns: 1fr;
  }

  .cf-pillars-collections {
    padding: 1rem;
  }

  .cf-course-card.cf-show-all-pillars .cf-pillar-badge { font-size: 9px; padding: 3px 5px; }
}
