/* Site home: two-level course categories under Most popular courses. */

.coursetabs-tablist:has(.geez-cattab-parents) {
  display: block;
  border-bottom: 0;
  margin-bottom: 0.4rem;
}

/* Main categories. These are the only controls restyled as obvious tabs. */
.mb2-pb-coursetabs .geez-cattab-parents {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem 0.85rem !important;
  width: fit-content;
  max-width: 100%;
  margin: 0.35rem auto 1.35rem;
  padding: 0.55rem !important;
  border: 1px solid rgba(11, 47, 107, 0.1);
  border-radius: 18px;
  background: #f3f6fb;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.mb2-pb-coursetabs .geez-cattab-parent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.72rem 1.15rem;
  border: 1px solid rgba(11, 47, 107, 0.14);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(11, 47, 107, 0.06);
  color: #1c2b45;
  cursor: pointer;
  line-height: 1.2;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.mb2-pb-coursetabs .geez-cattab-parent .catname {
  font-size: 1rem;
  font-weight: 600;
  color: #1c2b45;
}

.mb2-pb-coursetabs .geez-cattab-parent .coursecount {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0.12rem 0.48rem;
  border-radius: 999px;
  background: rgba(228, 163, 34, 0.2);
  color: #8a6410;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

.mb2-pb-coursetabs .geez-cattab-parent:hover {
  border-color: #0b2f6b;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(11, 47, 107, 0.1);
}

.mb2-pb-coursetabs .geez-cattab-parent.active {
  background: #0b2f6b;
  border-color: #0b2f6b;
  box-shadow: 0 8px 18px rgba(11, 47, 107, 0.2);
  transform: none;
}

.mb2-pb-coursetabs .geez-cattab-parent.active .catname,
.mb2-pb-coursetabs .geez-cattab-parent.active .coursecount {
  color: #fff;
  font-weight: 700;
}

.mb2-pb-coursetabs .geez-cattab-parent.active .coursecount {
  background: rgba(255, 255, 255, 0.16);
}

.mb2-pb-coursetabs .geez-cattab-parent.active::after,
.mb2-pb-coursetabs .geez-cattab-parent::after {
  content: none;
}

.geez-cattab-children {
  display: none !important;
  justify-content: center;
  margin: 0 0 1.6rem;
}

.geez-cattab-children.is-on {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem 0.5rem;
}

.geez-cattab-children .coursetabs-catitem {
  border-radius: 999px;
  background: #f4f7fb;
}

.geez-cattab-children .coursetabs-catitem.active {
  background: #0b2f6b;
  border-color: #0b2f6b;
}

.geez-cattab-children .coursetabs-catitem.active .catname,
.geez-cattab-children .coursetabs-catitem.active .coursecount {
  color: #fff;
}

/* Course cards in this block lift on hover so the list feels clickable. */
body.pagelayout-frontpage .mb2-pb-coursetabs .theme-course-item {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

body.pagelayout-frontpage .mb2-pb-coursetabs .theme-course-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(11, 47, 107, 0.12);
}

@media (max-width: 720px) {
  .mb2-pb-coursetabs .geez-cattab-parents,
  .geez-cattab-children.is-on {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    width: 100%;
    padding-bottom: 0.4rem;
  }

  .mb2-pb-coursetabs .geez-cattab-parent,
  .geez-cattab-children .coursetabs-catitem {
    flex: 0 0 auto;
  }
}
