/* Course catalog (/courses). Tokens, slides and the course card come from system.css. */

.ct { overflow-x: clip; }
.ct .jn-slide--white .jn-section-heading h2 { color: var(--jn-green); }
.ct .jn-section-heading h2 { letter-spacing: -.02em; }
.ct-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; }
.ct-button--ghost { color: #fff; border-color: rgb(255 255 255 / .35); background: transparent; }
.ct-button--ghost:hover { border-color: var(--jn-orange); color: #fff; }

/* Hero */
.ct-hero__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 3rem; align-items: center; }
.ct-hero h1 { max-width: 36rem; font-size: clamp(1.75rem, 3.2vw, 2.25rem); line-height: 1.15; letter-spacing: -.02em; color: #fff; }
.ct-hero h1 span { color: var(--jn-orange); }
.ct-hero__lead { max-width: 36rem; margin: 1.25rem 0 2rem; font-size: clamp(.9375rem, 1.6vw, 1.125rem); line-height: 1.75; color: rgb(255 255 255 / .78); }
.ct-facts { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: 0; }
.ct-facts div { display: flex; flex-direction: column-reverse; justify-content: flex-end; padding: 1.25rem; border: 1px solid rgb(255 255 255 / .16); border-radius: var(--jn-radius-sm); background: rgb(255 255 255 / .08); }
.ct-facts dt { font-size: 1.5rem; font-weight: 800; line-height: 1.15; color: #fff; }
.ct-facts dd { margin: .35rem 0 0; font-size: .75rem; line-height: 1.4; color: rgb(255 255 255 / .65); }

/* Programs */
.ct-programs__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.25rem 2rem; margin-bottom: 2rem; }
.ct-programs__head .jn-section-heading { margin: 0; }
.ct-filter { display: flex; flex-wrap: wrap; gap: .5rem; }
.ct-filter a { display: inline-flex; align-items: center; gap: .45rem; min-height: 2.5rem; padding: .45rem 1rem; border: 1px solid var(--jn-border); border-radius: 999px; color: var(--jn-green); font-size: .8125rem; font-weight: 700; text-decoration: none; transition: border-color .2s, background .2s, color .2s; }
.ct-filter a span { display: inline-grid; place-items: center; min-width: 1.4rem; height: 1.4rem; padding-inline: .3rem; border-radius: 999px; background: var(--jn-cream); font-size: .6875rem; }
.ct-filter a:hover { border-color: var(--jn-orange); }
.ct-filter a[aria-current="true"] { border-color: var(--jn-green); background: var(--jn-green); color: #fff; }
.ct-filter a[aria-current="true"] span { background: rgb(255 255 255 / .16); }
.ct-group:not([hidden]) ~ .ct-group:not([hidden]) { margin-top: 3rem; padding-top: 3rem; border-top: 1px solid var(--jn-border); }
.ct-group__head { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 1.5rem; }
.ct-group__head img { flex-shrink: 0; width: 4rem; height: 4rem; padding: .5rem; border-radius: 50%; background: var(--jn-cream); }
.ct-group__head h3 { font-size: 1.5rem; color: var(--jn-green); }
.ct-group__head p { margin-top: .25rem; max-width: 40rem; font-size: .9375rem; line-height: 1.6; color: var(--jn-muted); }
.ct-group__head .jn-play-button { margin-left: auto; }
.ct-grid { gap: 1rem; }
.ct .jn-course-card { border: 1px solid var(--jn-border); box-shadow: none; transition: translate .3s ease, box-shadow .3s ease, border-color .2s; }
.ct .jn-course-card:hover { translate: 0 -4px; border-color: var(--jn-orange); box-shadow: 0 18px 40px rgb(1 60 53 / .12); }
.ct-note { margin-top: 2rem; font-size: .8125rem; line-height: 1.6; color: var(--jn-muted); }

/* Levels */
.ct-levels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.ct-levels li { display: grid; align-content: start; gap: .6rem; padding: 1.5rem; border-radius: var(--jn-radius); background: #fff; color: #111; }
.ct-levels span { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--jn-orange); color: #fff; font-weight: 800; }
.ct-levels h3 { color: var(--jn-green); }
.ct-levels p { font-size: .9375rem; line-height: 1.6; color: #444; }
.ct-help { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 2rem; margin-top: 1.5rem; padding: 1.75rem; border: 1px solid rgb(255 255 255 / .16); border-radius: var(--jn-radius); background: rgb(255 255 255 / .08); }
.ct-help p { display: grid; gap: .3rem; max-width: 30rem; font-size: .9375rem; line-height: 1.6; color: rgb(255 255 255 / .75); }
.ct-help strong { font-size: 1.125rem; color: #fff; }
.ct-link { color: #fff; font-size: .875rem; font-weight: 700; }

/* Motion */
@keyframes ct-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes ct-rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
.ct-hero__grid > * { animation: ct-in .7s cubic-bezier(.2, .7, .2, 1) both; }
.ct-hero__grid > :nth-child(2) { animation-delay: .15s; }
@supports (animation-timeline: view()) {
  .ct :is(.ct-group__head, .jn-course-card, .ct-levels li, .ct-help) {
    animation: ct-rise linear both; animation-timeline: view(); animation-range: entry 0% entry 55%;
  }
  .ct .jn-course-card:nth-child(3n + 2) { animation-range: entry 8% entry 63%; }
  .ct .jn-course-card:nth-child(3n) { animation-range: entry 16% entry 71%; }
}

@media (max-width: 68rem) {
  .ct-levels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .ct-hero__grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
}
@media (max-width: 40rem) {
  .ct-levels { grid-template-columns: minmax(0, 1fr); }
  .ct-actions .jn-button { flex: 1 1 100%; }
  .ct-group__head { flex-wrap: wrap; align-items: flex-start; }
  .ct-group__head img { width: 3rem; height: 3rem; }
  .ct-group__head > div { flex: 1 1 0; min-width: 0; }
  .ct-group__head .jn-play-button { margin-left: 4.25rem; }
}

/* «Про напрям» page (templates/courses/direction.html): text and player on the green stage. */
.dr-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.dr h1 { margin: .5rem 0 1rem; color: #fff; font-size: clamp(1.25rem, 3vw, 2.25rem); line-height: 1.2; }
.dr-lead { margin: 0; color: rgb(255 255 255 / .82); font-size: 1rem; line-height: 1.65; }
.dr-player { border-radius: var(--jn-radius-sm); box-shadow: 0 24px 60px rgb(0 0 0 / .35); }
.dr-more { margin-top: 2rem; }
@media (max-width: 900px) { .dr-layout { grid-template-columns: minmax(0, 1fr); } }
