.courses-page { background: var(--paper); color: var(--ink); }
.courses-page .site-header { background: rgba(7, 17, 31, 0.94); }
.courses-page main { overflow: hidden; }
.courses-shell { width: var(--shell); margin-inline: auto; }

.courses-hero {
  position: relative;
  padding: calc(var(--header-height) + clamp(90px, 10vw, 140px)) 0 88px;
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 30%, rgba(228, 184, 94, 0.14), transparent 27%),
    linear-gradient(145deg, var(--navy-950), var(--navy-800));
  color: var(--white);
}
.courses-hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -45% auto;
  width: 700px;
  height: 700px;
  border: 1px solid rgba(228, 184, 94, 0.1);
  border-radius: 50%;
}
.courses-hero__glow { display: none; }
.courses-hero__content { position: relative; z-index: 1; }
.courses-hero h1 { max-width: 970px; margin-bottom: 28px; font-size: clamp(3.3rem, 7vw, 6.7rem); }
.courses-hero__lead { max-width: 720px; color: var(--slate); font-size: clamp(1.08rem, 2vw, 1.3rem); line-height: 1.62; }
.courses-hero__proof { display: flex; flex-wrap: wrap; gap: 1px; margin: 42px 0 34px; }
.courses-hero__proof span { min-width: 170px; display: grid; padding: 15px 24px; border-left: 1px solid var(--line-dark); color: var(--slate); font-size: 0.8rem; }
.courses-hero__proof span:first-child { padding-left: 0; border-left: 0; }
.courses-hero__proof strong { color: var(--gold-light); font-size: 1.5rem; line-height: 1.2; }
.courses-scroll-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--white); border-bottom: 1px solid var(--gold); font-weight: 730; }

.courses-directory { padding: clamp(80px, 9vw, 132px) 0 120px; }
.courses-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 0.72fr); gap: 70px; align-items: end; margin-bottom: 38px; }
.courses-intro h2 { margin-bottom: 0; }
.courses-intro > p { margin-bottom: 0; color: var(--ink-soft); }
.provider-notice { display: grid; grid-template-columns: 34px 1fr; gap: 13px; padding: 20px 22px; margin-bottom: 72px; border: 1px solid var(--line-light); border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.55); color: var(--ink-soft); }
.provider-notice > span { color: var(--gold-dark); font-size: 1.2rem; }
.provider-notice p { margin: 0; font-size: 0.9rem; }
.provider-notice strong { color: var(--ink); }
.courses-loading, .courses-error { padding: 34px; border: 1px solid var(--line-light); border-radius: var(--radius-md); background: rgba(255, 255, 255, 0.58); }
.courses-error a { text-decoration: underline; }

.course-groups { display: grid; gap: 88px; }
.course-group__heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding-bottom: 18px; margin-bottom: 22px; border-bottom: 1px solid var(--line-light); }
.course-group__heading span { color: var(--gold-dark); font-size: 0.72rem; font-weight: 820; letter-spacing: 0.12em; text-transform: uppercase; }
.course-group__heading h2 { margin: 7px 0 0; font-size: clamp(2rem, 4vw, 3.1rem); }
.course-group__heading > p { margin: 0; color: var(--ink-soft); font-size: 0.86rem; white-space: nowrap; }
.course-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.course-card { min-height: 370px; display: flex; flex-direction: column; padding: 26px; border: 1px solid var(--line-light); border-radius: var(--radius-md); background: rgba(255, 255, 255, 0.62); transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease; }
.course-card:hover { transform: translateY(-4px); border-color: rgba(185, 130, 47, 0.45); box-shadow: 0 18px 45px rgba(21, 32, 51, 0.08); }
.course-card__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 28px; }
.course-card__provider { color: var(--gold-dark); font-size: 0.74rem; font-weight: 820; letter-spacing: 0.05em; }
.course-difficulty { padding: 5px 9px; border: 1px solid var(--line-light); border-radius: 999px; color: var(--ink-soft); font-size: 0.68rem; font-weight: 760; line-height: 1.1; }
.course-difficulty[data-level="Advanced"] { color: #7d3b2c; border-color: rgba(125, 59, 44, 0.25); }
.course-difficulty[data-level="Intermediate"] { color: #5c5223; border-color: rgba(92, 82, 35, 0.25); }
.course-card h3 { margin-bottom: 13px; font-size: 1.35rem; letter-spacing: -0.035em; }
.course-card p { margin-bottom: 18px; color: var(--ink-soft); font-size: 0.91rem; }
.course-card__credential { display: flex; align-items: center; gap: 8px; margin: 0 0 22px; color: #315f4b; font-size: 0.76rem; font-weight: 800; line-height: 1.35; }
.course-card__credential > span:first-child { width: 19px; height: 19px; flex: 0 0 19px; display: inline-grid; place-items: center; border: 1px solid rgba(49, 95, 75, 0.35); border-radius: 50%; font-size: 0.7rem; }
.course-card__button { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px; margin-top: auto; border: 1px solid var(--navy-900); border-radius: 10px; background: transparent; color: var(--navy-900); font-weight: 760; cursor: pointer; transition: background 180ms ease, color 180ms ease; }
.course-card__button:hover { background: var(--navy-900); color: var(--white); }

.course-dialog { width: min(650px, calc(100% - 28px)); max-height: calc(100dvh - 28px); padding: 0; border: 1px solid var(--line-dark); border-radius: var(--radius-md); background: var(--navy-900); color: var(--white); box-shadow: 0 36px 100px rgba(0, 0, 0, 0.56); overflow: auto; }
.course-dialog::backdrop { background: rgba(2, 7, 14, 0.8); backdrop-filter: blur(5px); }
.course-dialog__panel { position: relative; padding: clamp(28px, 6vw, 50px); }
.course-dialog__close { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line-dark); border-radius: 50%; background: var(--navy-800); color: var(--white); font-size: 1.45rem; cursor: pointer; }
.course-dialog__heading { padding-right: 42px; margin-bottom: 28px; }
.course-dialog__heading h2 { margin-bottom: 13px; font-size: clamp(2rem, 6vw, 3.2rem); }
.course-dialog__heading > p:last-child { color: var(--slate); font-size: 0.92rem; }
.course-form { display: grid; gap: 17px; }
.course-form label { display: grid; gap: 7px; color: #e8eef4; font-size: 0.82rem; font-weight: 720; }
.course-form label > span b { color: var(--gold); }
.course-form input, .course-form select { min-height: 51px; width: 100%; padding: 11px 13px; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 9px; background: rgba(4, 11, 21, 0.68); color: var(--white); }
.course-form [aria-invalid="true"] { border-color: #ff918b; }
.course-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.course-field-error { min-height: 1.2em; color: #ffaba6; font-weight: 600; }
.course-form__privacy { margin: 2px 0 0; color: var(--slate); font-size: 0.75rem; }
.course-form__status { min-height: 1.35em; margin: 0; color: var(--slate); font-size: 0.82rem; }
.course-form__status.is-error { color: #ffaba6; }
.course-submit { min-height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; border: 0; border-radius: 9px; background: var(--gold); color: var(--navy-950); font-weight: 800; cursor: pointer; }
.course-submit:disabled { opacity: 0.65; cursor: wait; }
.course-success { text-align: center; padding: 24px 0; }
.course-success__mark { width: 64px; height: 64px; display: grid; place-items: center; margin: 0 auto 20px; border: 1px solid rgba(228, 184, 94, 0.5); border-radius: 50%; color: var(--gold-light); font-size: 1.7rem; }
.course-success h2 { margin-bottom: 12px; }
.course-success p { color: var(--slate); }
.course-success a, .course-success button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; padding: 0 18px; margin: 5px; border: 1px solid var(--line-dark); border-radius: 9px; background: transparent; color: var(--white); cursor: pointer; }
.course-success a { background: var(--gold); color: var(--navy-950); border-color: var(--gold); font-weight: 780; }

@media (max-width: 980px) {
  .courses-intro { grid-template-columns: 1fr; gap: 22px; }
  .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .courses-hero { padding-bottom: 64px; }
  .courses-hero h1 { font-size: clamp(3rem, 15vw, 4.6rem); }
  .courses-hero__proof { display: grid; grid-template-columns: repeat(3, 1fr); }
  .courses-hero__proof span, .courses-hero__proof span:first-child { min-width: 0; padding: 10px; border-left: 1px solid var(--line-dark); }
  .courses-hero__proof span:first-child { border-left: 0; padding-left: 0; }
  .courses-hero__proof strong { font-size: 1.15rem; }
  .course-group__heading { align-items: start; }
  .course-grid { grid-template-columns: 1fr; }
  .course-card { min-height: auto; }
  .course-form__row { grid-template-columns: 1fr; }
  .course-dialog__panel { padding: 28px 20px; }
}
