/* ==========================================================================
   COMPONENT / BADGE CARD ("ידע פופולרי")
   Flat white card — badge-pill row, title, description, then a
   border-top footer with either just a CTA pill (free/tool items) or
   duration+author beside the CTA (course items). Built for the Home
   page's "ידע פופולרי" grid from the real Figma CSS export (radius 24,
   badge pills 6px/16px, footer border rgba(161,206,224,.2), etc.).

   Promoted here (rather than left inline in pages/_home.css) because a
   project-wide check turned up no existing equivalent: the other
   "card" components already in this codebase are all a different
   shape — components/_content-card.css (image-on-top), _course-row-
   card.css (horizontal split), the Article/Category swiper cards in
   related-cards.js (large carousel slides), and _case-study-card.css
   (text+photo pair). None of them match this flat badge-pill layout,
   so this is the first accurate build of it — kept here so any future
   page that needs the same "ידע פופולרי"-style grid can link this
   file and reuse it directly instead of re-approximating it again.
   ========================================================================== */

.badge-card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
  align-items: stretch;
  width: 1362px;
  max-width: 100%;
  margin: 0 auto;
}

.badge-card {
  background: var(--color-white);
  border-radius: 24px;
  box-shadow: 0px 12px 30px -16px rgba(0, 0, 128, 0.19), inset 0px 0px 0px 1px rgba(0, 0, 128, 0.03);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  text-align: right;
}

.badge-card__badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-start;
  width: 100%;
}

.badge-card__badge {
  font-family: var(--font-main);
  font-weight: 500;
  font-size: 14px;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 9999px;
  color: var(--color-primary-navy);
  white-space: nowrap;
}

.badge-card__badge--free { background: var(--color-badge-green-bg); }
.badge-card__badge--members { background: var(--color-tab-selected-bg); }
.badge-card__badge--topic { background: var(--color-icon-wave-bg); text-transform: none; font-weight: 400; }

.badge-card__title {
  font-family: var(--font-main);
  font-weight: 500;
  font-size: 22px;
  line-height: 32px;
  color: var(--color-primary-navy);
  margin: 0;
}

.badge-card__desc {
  font-family: var(--font-main);
  font-weight: 400;
  font-size: 18px;
  line-height: 25px;
  color: var(--color-text-slate);
  margin: 0;
}

.badge-card__footer {
  width: 100%;
  direction: rtl;
  border-top: 1px solid rgba(161, 206, 224, 0.2);
  padding-top: 20px;
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row;
}

.badge-card__footer:has(.badge-card__cta--solo) {
  justify-content: flex-end;
}

.badge-card__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.badge-card__meta-hours {
  font-family: var(--font-main);
  font-size: 18px;
  color: rgba(0, 0, 128, 0.7);
  font-weight: 500;
}

.badge-card__meta-author {
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 18px;
  color: var(--color-primary-navy);
}

.badge-card__cta {
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 14px;
  border-radius: 9999px;
  padding: 5px 22px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}

.badge-card__cta--outline {
  background: transparent;
  border: 1px solid var(--color-primary-navy);
  color: var(--color-primary-navy);
}

.badge-card__cta--solid {
  background: var(--color-pink-accent);
  border: none;
  color: var(--color-white);
  box-shadow: 0px 4px 20px rgba(26, 35, 126, 0.1);
}

@media (max-width: 1023px) {
  .badge-card-grid {
    grid-template-columns: 1fr;
  }
}
