/* Public Courses — subject catalogue */

.courses-hub {
  --courses-accent: var(--brand-primary, #0d9488);
  --courses-glow: color-mix(in srgb, var(--courses-accent) 35%, transparent);
  position: relative;
  overflow: hidden;
}

.courses-hub__mesh {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 60% at 5% -5%, var(--courses-glow), transparent 55%),
    radial-gradient(ellipse 70% 50% at 98% 15%, color-mix(in srgb, var(--brand-secondary, #2563eb) 16%, transparent), transparent 50%);
  opacity: 0.9;
}

.courses-hub__inner {
  position: relative;
  z-index: 1;
}

.courses-hero {
  position: relative;
  min-height: clamp(16rem, 36vh, 22rem);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 1.35rem;
  margin-bottom: 2rem;
}

.courses-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.courses-hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(8, 12, 22, 0.9) 0%, rgba(8, 12, 22, 0.45) 55%, rgba(8, 12, 22, 0.2) 100%),
    linear-gradient(135deg, color-mix(in srgb, var(--courses-accent) 30%, rgba(8, 12, 22, 0.85)) 0%, transparent 60%);
}

.courses-hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 2rem 1.35rem 1.75rem;
}

@media (min-width: 768px) {
  .courses-hero__content {
    padding: 2.25rem 2rem 2rem;
  }
}

.courses-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 0.85rem;
}

.courses-hero__title {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: #fff;
  margin: 0 0 0.5rem;
}

.courses-hero__lead {
  font-size: clamp(0.875rem, 2vw, 1.05rem);
  color: rgba(255, 255, 255, 0.84);
  max-width: 38rem;
  margin: 0;
  line-height: 1.55;
}

.courses-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin: -1.25rem auto 1.75rem;
  position: relative;
  z-index: 3;
  max-width: 52rem;
}

@media (min-width: 640px) {
  .courses-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: -1.75rem;
  }
}

.courses-stat {
  padding: 0.85rem 0.75rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
  text-align: center;
}

.dark .courses-stat {
  background: rgba(15, 23, 42, 0.88);
  border-color: rgba(51, 65, 85, 0.75);
}

.courses-stat__value {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--courses-accent);
  line-height: 1.1;
}

.courses-stat__label {
  display: block;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin-top: 0.2rem;
}

.courses-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
  padding: 1rem 1.1rem;
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid #e2e8f0;
}

.dark .courses-controls {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(51, 65, 85, 0.75);
}

.courses-controls__label {
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #64748b;
  margin: 0 0 0.35rem;
}

.courses-controls__search {
  flex: 1 1 14rem;
  min-width: 12rem;
  max-width: 22rem;
}

.courses-search-wrap {
  position: relative;
}

.courses-search-wrap__icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  color: #94a3b8;
  pointer-events: none;
}

.courses-search-input {
  width: 100%;
  padding: 0.55rem 0.85rem 0.55rem 2.25rem;
  border-radius: 0.65rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 0.875rem;
  color: #0f172a;
}

.dark .courses-search-input {
  background: rgba(30, 41, 59, 0.65);
  border-color: rgba(51, 65, 85, 0.85);
  color: #f8fafc;
}

.courses-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.courses-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  cursor: pointer;
  transition: all 0.18s ease;
}

.dark .courses-chip {
  background: rgba(30, 41, 59, 0.65);
  border-color: rgba(51, 65, 85, 0.85);
  color: #cbd5e1;
}

.courses-chip:hover,
.courses-chip.is-active {
  border-color: color-mix(in srgb, var(--courses-accent) 40%, transparent);
  background: color-mix(in srgb, var(--courses-accent) 10%, #fff);
  color: var(--courses-accent);
}

.courses-chip__count {
  font-size: 0.625rem;
  font-weight: 800;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
}

.courses-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

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

@media (min-width: 1024px) {
  .courses-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.15rem;
  }
}

.courses-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 1.1rem 1.15rem 1rem;
  border-radius: 1.1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.courses-card--link {
  cursor: pointer;
}

.courses-card--link:focus-visible {
  outline: 2px solid var(--courses-accent);
  outline-offset: 3px;
}

.dark .courses-card {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(51, 65, 85, 0.85);
}

.courses-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--courses-accent) 35%, #e2e8f0);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.courses-card__media {
  margin: -1.1rem -1.15rem 0.85rem;
  overflow: hidden;
  border-radius: 1.1rem 1.1rem 0 0;
}

.courses-card__photo {
  display: block;
  width: 100%;
  height: 9.5rem;
  object-fit: cover;
}

.courses-card__head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.courses-card__icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
  color: var(--courses-accent);
  background: color-mix(in srgb, var(--courses-accent) 12%, #fff);
}

.dark .courses-card__icon {
  background: color-mix(in srgb, var(--courses-accent) 22%, #1e293b);
}

.courses-card__name {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin: 0;
  line-height: 1.25;
}

.dark .courses-card__name {
  color: #f8fafc;
}

.courses-card__code {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  margin: 0.2rem 0 0;
}

.courses-card__desc {
  flex: 1;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: #475569;
  margin: 0 0 0.85rem;
}

.courses-card__desc--empty {
  color: #94a3b8;
  font-style: italic;
}

.dark .courses-card__desc {
  color: #cbd5e1;
}

.courses-card__footer {
  margin-top: auto;
  padding-top: 0.65rem;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.courses-card__cta {
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--courses-accent);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
  transition: gap 0.15s ease;
}

.courses-card:hover .courses-card__cta {
  gap: 0.5rem;
}

.dark .courses-card__footer {
  border-color: rgba(51, 65, 85, 0.65);
}

.courses-card__category {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--courses-accent);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--courses-accent) 10%, #fff);
  border: 1px solid color-mix(in srgb, var(--courses-accent) 22%, transparent);
}

.dark .courses-card__category {
  background: color-mix(in srgb, var(--courses-accent) 18%, #1e293b);
}

.courses-card__levels {
  font-size: 0.6875rem;
  font-weight: 600;
  color: #64748b;
  margin: 0 0 0.45rem;
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
}

.courses-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.courses-card__tag {
  display: inline-flex;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--courses-accent);
  background: color-mix(in srgb, var(--courses-accent) 10%, #fff);
  border: 1px solid color-mix(in srgb, var(--courses-accent) 22%, transparent);
}

.courses-empty {
  text-align: center;
  padding: 4rem 1.5rem;
  border-radius: 1.35rem;
  background: linear-gradient(165deg, #f8fafc, #fff);
  border: 1px dashed #cbd5e1;
  margin-bottom: 2rem;
}

.dark .courses-empty {
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.65), rgba(30, 41, 59, 0.45));
  border-color: rgba(51, 65, 85, 0.85);
}

.courses-empty__icon {
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto 1.15rem;
  border-radius: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.65rem;
  background: color-mix(in srgb, var(--courses-accent) 14%, #fff);
  color: var(--courses-accent);
}

.courses-cta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.35rem;
  border-radius: 1.15rem;
  background: linear-gradient(135deg, #0f172a, color-mix(in srgb, var(--courses-accent) 35%, #0f172a));
  color: rgba(255, 255, 255, 0.85);
}

.courses-cta-bar__text-link {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.courses-cta-bar__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1.15rem;
  border-radius: 0.65rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #0f172a !important;
  background: #fff;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.courses-cta-bar__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

/* Course detail — scheme of work only */

.course-breadcrumb {
  margin-bottom: 1.25rem;
}

.course-breadcrumb__link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--courses-accent);
  text-decoration: none;
}

.course-breadcrumb__link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.scheme-page-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #e2e8f0;
}

@media (min-width: 640px) {
  .scheme-page-header {
    grid-template-columns: minmax(0, 10rem) minmax(0, 1fr);
    align-items: center;
    gap: 1.25rem;
  }
}

.dark .scheme-page-header {
  border-bottom-color: rgba(51, 65, 85, 0.75);
}

.scheme-page-header__photo {
  display: block;
  width: 100%;
  height: 10rem;
  object-fit: cover;
  border-radius: 0.85rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

@media (min-width: 640px) {
  .scheme-page-header__photo {
    height: 7.5rem;
  }
}

.dark .scheme-page-header__photo {
  border-color: rgba(51, 65, 85, 0.75);
}

.scheme-page-header__text {
  min-width: 0;
}

.scheme-page-header__title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
  margin: 0 0 0.35rem;
  line-height: 1.15;
}

.dark .scheme-page-header__title {
  color: #f8fafc;
}

.scheme-page-header__subtitle {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--courses-accent);
  margin: 0;
}

.scheme-topics {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.scheme-topic {
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  overflow: hidden;
}

.dark .scheme-topic {
  background: rgba(30, 41, 59, 0.55);
  border-color: rgba(51, 65, 85, 0.75);
}

.scheme-topic__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: color-mix(in srgb, var(--courses-accent) 6%, #f8fafc);
  border-bottom: 1px solid #e2e8f0;
}

.dark .scheme-topic__head {
  background: color-mix(in srgb, var(--courses-accent) 12%, #1e293b);
  border-bottom-color: rgba(51, 65, 85, 0.65);
}

.scheme-topic__index {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: #fff;
  background: var(--courses-accent);
  flex-shrink: 0;
}

.scheme-topic__title {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  line-height: 1.3;
}

.dark .scheme-topic__title {
  color: #f8fafc;
}

.scheme-topic__body {
  padding: 1rem;
}

.scheme-subtopics {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.scheme-subtopic {
  padding: 0.85rem;
  border-radius: 0.75rem;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
}

.scheme-subtopic--flat {
  padding: 0;
  background: transparent;
  border: none;
}

.dark .scheme-subtopic {
  background: rgba(15, 23, 42, 0.45);
  border-color: rgba(51, 65, 85, 0.55);
}

.dark .scheme-subtopic--flat {
  background: transparent;
  border: none;
}

.scheme-subtopic__title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #334155;
  margin: 0 0 0.65rem;
}

.dark .scheme-subtopic__title {
  color: #e2e8f0;
}

.scheme-subtopic__fields {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.scheme-field {
  padding: 0.65rem 0.75rem;
  border-radius: 0.6rem;
  background: #fff;
  border: 1px solid #e8edf3;
}

.dark .scheme-field {
  background: rgba(30, 41, 59, 0.55);
  border-color: rgba(51, 65, 85, 0.55);
}

.scheme-field dt {
  font-size: 0.625rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin: 0 0 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.scheme-field dt i {
  color: var(--courses-accent);
  font-size: 0.6rem;
}

.scheme-field dd {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: #475569;
  margin: 0;
  white-space: pre-line;
}

.dark .scheme-field dd {
  color: #cbd5e1;
}

.scheme-topic__empty {
  font-size: 0.8125rem;
  color: #94a3b8;
  font-style: italic;
  margin: 0;
}

.course-scheme-empty {
  text-align: center;
  padding: 2.5rem 1.25rem;
  border-radius: 1rem;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
}

.dark .course-scheme-empty {
  background: rgba(15, 23, 42, 0.45);
  border-color: rgba(51, 65, 85, 0.75);
}

.course-scheme-empty__icon {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 0.85rem;
  border-radius: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: color-mix(in srgb, var(--courses-accent) 14%, #fff);
  color: var(--courses-accent);
}
