/* Course details — matched to Figma/screenshot */

.course {
  --primary: #0699D8;
  --secondary: #38BDF8;
  --accent: #14B8A6;
  --success: #22C55E;
  --warning: #F59E0B;
  --danger: #EF4444;
  --text: #0F172A;
  --gray: #64748B;
  --border: #E2E8F0;
  --background: #F8FAFC;
  --card: #FFFFFF;
  --radius: 0;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  background: #fff;
  color: var(--text);
  padding: 1.25rem 0 3.5rem;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}

.course img,
.course svg,
.course video,
.course iframe {
  max-width: 100%;
}

.course__container {
  width: min(var(--page-max, 1200px), calc(100% - var(--page-gutter, 2.5rem)));
  max-width: 100%;
  margin: 0 auto;
  min-width: 0;
}

.course__breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--gray);
  min-width: 0;
  max-width: 100%;
}

.course__breadcrumbs a {
  color: inherit;
}

.course__breadcrumbs a:hover {
  color: var(--primary);
}

.course__breadcrumbs-sep {
  color: #94A3B8;
}

.course__breadcrumbs-current {
  color: var(--gray);
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.course__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
  gap: 1.75rem 2rem;
  align-items: start;
  min-width: 0;
  max-width: 100%;
}

.course__main,
.course__aside {
  min-width: 0;
  max-width: 100%;
}

.course__aside {
  position: sticky;
  top: 1rem;
}

/* Hero */
.course-hero {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: 1.5rem 1.75rem;
  margin-bottom: 1.75rem;
  min-width: 0;
  max-width: 100%;
}

.course-hero__gallery {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
  max-width: 100%;
}

.course-hero__media {
  position: relative;
  border-radius: 0;
  overflow: hidden;
  background: #0f172a;
  aspect-ratio: 16 / 10;
  box-shadow: var(--shadow);
  min-width: 0;
  max-width: 100%;
}

.course-hero__thumbs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.course-hero__thumb-item {
  margin: 0;
  padding: 0;
  min-width: 0;
}

.course-hero__thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  height: auto;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 0;
  background: #0f172a;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
  transition: border-color 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
  opacity: 0.78;
}

.course-hero__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.course-hero__thumb:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.course-hero__thumb.is-active,
.course-hero__thumb[aria-pressed="true"] {
  border-color: #0699D8;
  opacity: 1;
}

.course-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.course-hero__badge {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  height: 28px;
  padding: 0 0.7rem;
  border-radius: 0;
  font-size: 0.78rem;
  font-weight: 650;
  color: #fff;
  background: #F97316;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.35);
}

.course-hero__badge--popular {
  background: #0699D8;
  box-shadow: 0 4px 12px rgba(6, 153, 216, 0.3);
}

.course-hero__badge--new {
  background: #38BDF8;
}

.course-hero__actions {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.course-hero__zoom,
.course-hero__fav {
  position: static;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.92);
  color: #94A3B8;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
  transition: color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.course-hero__zoom:hover {
  color: #0699D8;
  transform: scale(1.04);
}

.course-hero__fav:hover {
  color: #EF4444;
  transform: scale(1.04);
}

.course-hero__fav.is-active,
.course-hero__fav[aria-pressed="true"] {
  color: #EF4444;
}

.course-hero__play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary);
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.22);
  transition: transform 0.15s ease, background 0.15s ease;
}

.course-hero__play:hover {
  transform: translate(-50%, -50%) scale(1.05);
  background: #fff;
}

.course-hero__play--static {
  pointer-events: none;
}

.course-hero__info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 0.15rem 0;
}

.course-hero__cat {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  height: 28px;
  padding: 0 0.75rem;
  margin-bottom: 0.75rem;
  border-radius: 0;
  background: #EFF6FF;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 650;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.course-hero__cats {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-bottom: 0.75rem;
  border-radius: 0;
  background: #EFF6FF;
  box-sizing: border-box;
}

.course-hero__cats-viewport {
  overflow: hidden;
  max-width: 100%;
  padding: 0.35rem 0.85rem;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent);
  mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent);
}

.course-hero__cats:not(.is-marquee) .course-hero__cats-viewport {
  -webkit-mask-image: none;
  mask-image: none;
}

.course-hero__cats-track {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: none;
  white-space: nowrap;
  will-change: transform;
}

.course-hero__cats-group {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  white-space: nowrap;
  gap: 0.45rem;
  padding-right: 1.25rem;
}

.course-hero__cat-link {
  flex: 0 0 auto;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

a.course-hero__cat-link:hover {
  text-decoration: underline;
}

.course-hero__cats-sep {
  flex: 0 0 auto;
  color: #93C5FD;
  font-weight: 700;
  user-select: none;
}

.course-hero__cats.is-marquee .course-hero__cats-track {
  animation: course-cat-marquee var(--cat-marquee-duration, 28s) linear infinite;
}

.course-hero__cats.is-marquee:hover .course-hero__cats-track {
  animation-play-state: paused;
}

@keyframes course-cat-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .course-hero__cats.is-marquee .course-hero__cats-track {
    animation: none;
  }
}

.course-hero__title {
  margin: 0 0 0.65rem;
  font-size: clamp(1.65rem, 2.4vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.18;
  color: var(--text);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.course-hero__lead {
  margin: 0 0 1rem;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--gray);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.course-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  margin-bottom: 1.15rem;
}

.course-hero__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--gray);
}

.course-hero__meta-item svg {
  flex: 0 0 auto;
  color: #94A3B8;
}

.course-hero__author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.course-hero__author-photo,
.course-hero__author-fallback {
  width: 44px;
  height: 44px;
  border-radius: 0;
  object-fit: cover;
  flex: 0 0 auto;
}

.course-hero__author-fallback {
  display: grid;
  place-items: center;
  background: #DBEAFE;
  color: var(--primary);
  font-weight: 700;
}

.course-hero__author-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.course-hero__author-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

a.course-hero__author-name:hover {
  color: var(--primary);
}

.course-hero__author-role {
  font-size: 0.84rem;
  color: var(--gray);
}

/* Tabs */
.course-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.35rem;
  margin: 0 0 1.75rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  min-width: 0;
  max-width: 100%;
}

.course-tabs__item {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 46px;
  padding: 0 0.85rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--gray);
  white-space: nowrap;
}

.course-tabs__item:hover {
  color: var(--text);
}

.course-tabs__item.is-active {
  color: var(--primary);
}

.course-tabs__item.is-active::after {
  content: "";
  position: absolute;
  left: 0.65rem;
  right: 0.65rem;
  bottom: -1px;
  height: 2px;
  border-radius: 0;
  background: var(--primary);
}

/* Sections */
.course-section {
  margin-bottom: 2.25rem;
  scroll-margin-top: 4rem;
}

.course-section__title {
  margin: 0 0 0.9rem;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.course-section__prose {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.7;
  color: #475569;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.course-section__prose p {
  margin: 0 0 0.9rem;
}

.course-section__prose p:last-child {
  margin-bottom: 0;
}

.course-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 1.35rem 0 2rem;
}

.course-features__item {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--card);
}

.course-features__icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 0;
  background: #EFF6FF;
  color: var(--primary);
}

.course-features__label {
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.35;
  color: var(--text);
}

.course-outcomes {
  margin-top: 3.5rem;
}

.course-outcomes .course-section__title {
  margin-top: 0;
  margin-bottom: 1rem;
}

.course-outcomes__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.course-outcomes__item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--text);
  min-width: 0;
}

.course-outcomes__item > span,
.course-features__label,
.course-acc__title,
.course-review-card__body,
.rcard__title {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.course-outcomes__item svg {
  flex: 0 0 auto;
  margin-top: 0.1rem;
}

/* Curriculum */
.course-curriculum__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.course-curriculum__meta {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
  color: var(--gray);
}

.course-curriculum__expand {
  border: 0;
  background: none;
  color: var(--primary);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
  padding: 0.35rem 0;
}

.course-curriculum__expand:hover {
  color: #0578AB;
}

.course-curriculum__empty {
  margin: 0;
  color: var(--gray);
}

.course-curriculum__list {
  border: 1px solid var(--border);
  border-radius: 0;
  overflow: hidden;
  background: var(--card);
}

.course-acc {
  border-bottom: 1px solid var(--border);
}

.course-acc:last-child {
  border-bottom: 0;
}

.course-acc__summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  cursor: pointer;
  list-style: none;
}

.course-acc__summary::-webkit-details-marker {
  display: none;
}

.course-acc__num {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 0;
  background: #F1F5F9;
  color: #475569;
  font-size: 0.85rem;
  font-weight: 700;
}

.course-acc__body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.course-acc__title {
  font-size: 0.98rem;
  font-weight: 650;
  color: var(--text);
}

.course-acc__meta {
  font-size: 0.84rem;
  color: var(--gray);
}

.course-acc__chevron {
  color: #94A3B8;
  transition: transform 0.2s ease;
}

.course-acc[open] .course-acc__chevron {
  transform: rotate(180deg);
}

.course-acc[open] .course-acc__num {
  background: #DBEAFE;
  color: var(--primary);
}

.course-acc__panel {
  padding: 0 1.1rem 1.1rem 3.9rem;
  font-size: 0.92rem;
  line-height: 1.6;
  color: #475569;
}

.course-acc__panel .muted {
  color: var(--gray);
}

/* Teacher block */
.course-teacher-block {
  padding: 1.35rem 1.4rem 1.4rem;
  border: 1px solid #BFDBFE;
  border-radius: 0;
  background: #F0F7FF;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.course-teacher-block__head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  min-width: 0;
}

.course-teacher-block__photo,
.course-teacher-block__fallback {
  width: 88px;
  height: 88px;
  border-radius: 0;
  object-fit: cover;
  flex-shrink: 0;
}

.course-teacher-block__fallback {
  display: grid;
  place-items: center;
  background: #DBEAFE;
  color: var(--primary);
  font-size: 1.6rem;
  font-weight: 750;
}

.course-teacher-block__meta {
  min-width: 0;
  flex: 1 1 auto;
}

.course-teacher-block__name {
  display: block;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  overflow-wrap: anywhere;
  word-break: break-word;
}

a.course-teacher-block__name:hover {
  color: var(--primary);
}

.course-teacher-block__role {
  margin: 0.25rem 0 0;
  color: var(--gray);
}

.course-instructor__stats--inline {
  margin-top: 1.15rem;
  max-width: 420px;
}

.course-teacher-msg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.15rem;
  padding: 0.7rem 1.15rem;
  border-radius: 0;
  background: var(--primary, #0699D8);
  color: #fff;
  font-weight: 650;
  font-size: 0.92rem;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}

.course-teacher-msg:hover {
  background: #0578AB;
  color: #fff;
  transform: translateY(-1px);
}

.course-teacher-msg--sidebar {
  display: flex;
  width: 100%;
  margin-top: 1rem;
  box-sizing: border-box;
}

/* Multi-teacher slider */
.course-teacher-slider {
  outline: none;
}

.course-teacher-slider:focus-visible {
  box-shadow: 0 0 0 3px rgba(6, 153, 216, 0.25);
  border-radius: 0;
}

.course-teacher-slider__viewport {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 0.45rem;
}

.course-teacher-slider__track {
  min-width: 0;
}

.course-teacher-slider__slide {
  display: none;
}

.course-teacher-slider__slide.is-active {
  display: block;
  animation: course-teacher-fade 0.28s ease;
}

@keyframes course-teacher-fade {
  from { opacity: 0.35; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.course-teacher-slider__nav {
  align-self: center;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid #BFDBFE;
  border-radius: 0;
  background: #fff;
  color: #64748B;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.course-teacher-slider__nav:hover {
  color: var(--primary);
  border-color: #93C5FD;
  background: #EFF6FF;
}

.course-teacher-slider__nav:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.course-teacher-slider__dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.course-teacher-slider__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #BFDBFE;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.course-teacher-slider__dot.is-active {
  background: var(--primary);
  transform: scale(1.2);
}

.course-teacher-slider__dot:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .course-teacher-slider__viewport {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.65rem;
  }

  .course-teacher-slider__nav {
    position: absolute;
    top: 1.15rem;
    z-index: 2;
  }

  .course-teacher-slider__nav--prev {
    left: 0.65rem;
  }

  .course-teacher-slider__nav--next {
    right: 0.65rem;
  }

  .course-teacher-block {
    padding-top: 1.5rem;
  }
}

/* FAQ */
.course-faq {
  border: 1px solid var(--border);
  border-radius: 0;
  overflow: hidden;
}

.course-faq__item {
  border-bottom: 1px solid var(--border);
}

.course-faq__item:last-child {
  border-bottom: 0;
}

.course-faq__q {
  padding: 1rem 1.15rem;
  font-size: 0.98rem;
  font-weight: 650;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

.course-faq__q::-webkit-details-marker {
  display: none;
}

.course-faq__a {
  padding: 0 1.15rem 1.1rem;
  font-size: 0.94rem;
  line-height: 1.6;
  color: #475569;
}

.course-faq__a p {
  margin: 0;
}

/* Cert section */
.course-cert-block {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 1.35rem;
  border-radius: 0;
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
  border: 1px solid #BFDBFE;
}

.course-cert-block__lead {
  margin: 0 0 0.45rem;
  font-size: 1.1rem;
  font-weight: 750;
  color: var(--text);
}

.course-reviews-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.course-review-card--grid {
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 1rem 1.05rem;
  background: var(--card);
}

/* Sidebar */
.course-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
  max-width: 100%;
}

.course-price {
  padding: 1.25rem 1.2rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--card);
  box-shadow: var(--shadow);
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.course-price__row {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.course-price__current {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.course-price__current--free {
  color: var(--success);
}

.course-price__old {
  font-size: 1.05rem;
  color: #94A3B8;
  text-decoration: line-through;
}

.course-price__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  min-height: 48px;
  height: auto;
  padding: 0.75rem 1rem;
  border: 0;
  border-radius: 0;
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  white-space: normal;
  box-sizing: border-box;
  transition: background 0.15s ease;
}

.course-price__cta:hover {
  background: #0578AB;
  color: #fff;
}

.course-price form {
  margin: 0;
  max-width: 100%;
  min-width: 0;
}

.course-price__note {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.course-price__alt {
  margin: 0.65rem 0 0;
  text-align: center;
  font-size: 0.84rem;
  color: var(--gray);
}

.course-price__alt a {
  color: var(--primary);
  font-weight: 650;
}

.course-price__includes {
  list-style: none;
  margin: 1.1rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.course-price__includes li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #334155;
}

.course-price__includes svg {
  flex: 0 0 auto;
  margin-top: 0.05rem;
}

.course-price__social {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1.05rem;
  padding-top: 0.95rem;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--gray);
}

.course-price__social-icon {
  font-size: 1rem;
}

.course-instructor {
  padding: 1.15rem 1.15rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--card);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.course-instructor__title {
  margin: 0 0 0.9rem;
  font-size: 1.05rem;
  font-weight: 750;
}

.course-instructor__head {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  min-width: 0;
}

.course-instructor__photo,
.course-instructor__fallback {
  width: 64px;
  height: 64px;
  border-radius: 0;
  object-fit: cover;
  flex: 0 0 auto;
}

.course-instructor__fallback {
  display: grid;
  place-items: center;
  background: #DBEAFE;
  color: var(--primary);
  font-weight: 750;
  font-size: 1.2rem;
}

.course-instructor__meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.course-instructor__name {
  font-size: 1rem;
  font-weight: 750;
  color: var(--text);
  overflow-wrap: anywhere;
  word-break: break-word;
}

a.course-instructor__name:hover {
  color: var(--primary);
}

.course-instructor__role {
  font-size: 0.84rem;
  color: var(--gray);
}

.course-instructor__rating {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.2rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.course-instructor__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 1rem 0 0.85rem;
  padding: 0.75rem 0.35rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.course-instructor__stat {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.course-instructor__stat strong {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
}

.course-instructor__stat span {
  font-size: 0.75rem;
  color: var(--gray);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.course-instructor__bio {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #475569;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Reviews widget */
.course-reviews-widget {
  padding: 1.05rem 0.9rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--card);
  min-width: 0;
  max-width: 100%;
}

.course-reviews-widget__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding: 0 0.25rem;
}

.course-reviews-widget__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 750;
}

.course-reviews-widget__all {
  font-size: 0.84rem;
  font-weight: 650;
  color: var(--primary);
  white-space: nowrap;
}

.course-reviews-widget__viewport {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.25rem;
}

.course-reviews-widget__track {
  overflow: hidden;
  min-width: 0;
}

.course-reviews-widget__track .course-review-card {
  display: none;
  padding: 0.35rem 0.25rem;
}

.course-reviews-widget__track .course-review-card.is-active {
  display: block;
}

.course-reviews-widget__nav {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 0;
  background: #fff;
  color: #64748B;
  cursor: pointer;
}

.course-reviews-widget__nav:hover {
  color: var(--primary);
  border-color: #BFDBFE;
  background: #EFF6FF;
}

.course-review-card__head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.55rem;
}

.course-review-card__avatar,
.course-review-card__fallback {
  width: 40px;
  height: 40px;
  border-radius: 0;
  object-fit: cover;
}

.course-review-card__fallback {
  display: grid;
  place-items: center;
  background: #DBEAFE;
  color: var(--primary);
  font-weight: 700;
}

.course-review-card__meta {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.course-review-card__name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

.course-review-card__date {
  font-size: 0.78rem;
  color: var(--gray);
}

.course-review-card__stars {
  display: flex;
  gap: 0.12rem;
  margin-bottom: 0.45rem;
}

.course-review-card__body {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #475569;
}

.course-cert-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.05rem;
  border-radius: 0;
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
  border: 1px solid #BFDBFE;
  min-width: 0;
  max-width: 100%;
}

.course-cert-card__art {
  flex: 0 0 auto;
}

.course-cert-card__text {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Related */
.course-related {
  margin-top: 2.75rem;
  padding: 1.75rem 0 0.25rem;
}

.course-related__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.course-related__title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.course-related__all {
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--primary);
}

.course-related__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.15rem;
}

.rcard {
  border: 1px solid var(--border);
  border-radius: 0;
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.rcard:hover {
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
  transform: translateY(-2px);
}

.rcard__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #e2e8f0;
}

.rcard__media-link {
  display: block;
  height: 100%;
}

.rcard__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rcard__badge {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  height: 24px;
  padding: 0 0.55rem;
  border-radius: 0;
  font-size: 0.72rem;
  font-weight: 650;
  color: #fff;
  background: #F97316;
}

.rcard__badge--popular {
  background: #0699D8;
}

.rcard__badge--new {
  background: #38BDF8;
}

.rcard__fav {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.92);
  color: #94A3B8;
  cursor: pointer;
}

.rcard__fav.is-active,
.rcard__fav[aria-pressed="true"] {
  color: #EF4444;
}

.rcard__body {
  padding: 0.85rem 0.9rem 1rem;
  min-width: 0;
}

.rcard__cats {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-bottom: 0.45rem;
  border-radius: 0;
  background: #EFF6FF;
  box-sizing: border-box;
}

.rcard__cats-viewport {
  overflow: hidden;
  max-width: 100%;
  padding: 0.2rem 0.55rem;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 10px), transparent);
  mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 10px), transparent);
}

.rcard__cats:not(.is-marquee) .rcard__cats-viewport {
  -webkit-mask-image: none;
  mask-image: none;
}

.rcard__cats-track {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: none;
  white-space: nowrap;
  will-change: transform;
}

.rcard__cats-group {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  white-space: nowrap;
  gap: 0.35rem;
  padding-right: 1rem;
}

.rcard__cat-link {
  flex: 0 0 auto;
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

a.rcard__cat-link:hover {
  text-decoration: underline;
}

.rcard__cats-sep {
  flex: 0 0 auto;
  color: #93C5FD;
  font-weight: 700;
  user-select: none;
}

.rcard__cats.is-marquee .rcard__cats-track {
  animation: course-cat-marquee var(--cat-marquee-duration, 28s) linear infinite;
}

.rcard__cats.is-marquee:hover .rcard__cats-track {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  .rcard__cats.is-marquee .rcard__cats-track {
    animation: none;
  }
}

.rcard__cat {
  display: inline-flex;
  height: 22px;
  align-items: center;
  padding: 0 0.55rem;
  margin-bottom: 0.45rem;
  border-radius: 0;
  background: #EFF6FF;
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 650;
}

.rcard__title {
  margin: 0 0 0.55rem;
  font-size: 0.98rem;
  font-weight: 750;
  line-height: 1.3;
}

.rcard__title a {
  color: var(--text);
}

.rcard__title a:hover {
  color: var(--primary);
}

.rcard__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
  color: var(--gray);
}

.rcard__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.rcard__rating {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.84rem;
  font-weight: 650;
  color: var(--text);
}

.rcard__price {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
}

.rcard__price--free {
  color: var(--success);
}

/* CTA — dark field + soft blue/teal mesh (neutral) */
.course-cta {
  margin-top: 2.75rem;
  min-width: 0;
  max-width: 100%;
}

.course-cta__inner {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.35rem 1.75rem;
  padding: 1.65rem 1.85rem;
  isolation: isolate;
  overflow: hidden;
  max-width: 100%;
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 0;
  background:
    linear-gradient(
      105deg,
      rgba(2, 6, 23, 0.96) 0%,
      rgba(2, 6, 23, 0.78) 40%,
      rgba(15, 23, 42, 0.45) 68%,
      transparent 100%
    ),
    radial-gradient(110% 130% at 82% 100%, rgba(6, 153, 216, 0.22) 0%, transparent 58%),
    radial-gradient(80% 90% at 92% 8%, rgba(56, 189, 248, 0.18) 0%, transparent 52%),
    radial-gradient(70% 80% at 70% 40%, rgba(20, 184, 166, 0.1) 0%, transparent 55%),
    #020617;
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.35);
}

.course-cta__art {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.course-cta__mesh {
  position: absolute;
  right: 0;
  top: 50%;
  width: min(72%, 560px);
  max-width: 100%;
  height: 140%;
  transform: translateY(-50%);
  opacity: 0.9;
  pointer-events: none;
}

.course-cta__inner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(2, 6, 23, 0.72) 0%,
    rgba(2, 6, 23, 0.35) 46%,
    transparent 74%
  );
}

.course-cta__icon,
.course-cta__copy,
.course-cta__btn {
  position: relative;
  z-index: 1;
}

.course-cta__icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 0;
  color: #E8EEF9;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.course-cta__icon svg {
  display: block;
}

.course-cta__copy {
  min-width: 0;
  padding: 0.35rem 0.55rem 0.35rem 0;
}

.course-cta__title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.18rem, 1.9vw, 1.42rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: #F8FAFC;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

.course-cta__text {
  margin: 0;
  max-width: 36rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(226, 232, 240, 0.82);
}

.course-cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  height: auto;
  padding: 0.7rem 1.35rem;
  border: 0;
  border-radius: 0;
  background: linear-gradient(135deg, #0699D8 0%, #38BDF8 100%);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-decoration: none;
  max-width: 100%;
  box-sizing: border-box;
  box-shadow: 0 10px 22px rgba(6, 153, 216, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.course-cta__btn svg {
  transition: transform 0.2s ease;
}

.course-cta__btn:hover {
  color: #fff;
  filter: brightness(1.04);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(6, 153, 216, 0.28);
}

.course-cta__btn:hover svg {
  transform: translateX(2px);
}

.course-cta__btn:focus-visible {
  outline: 2px solid #93C5FD;
  outline-offset: 3px;
}

.course-cta__btn:active {
  transform: translateY(0);
  filter: brightness(0.98);
}

/* Preview modal */
.course-modal[hidden] {
  display: none !important;
}

.course-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.course-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.course-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(880px, 100%);
  background: #0f172a;
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.course-modal__close {
  position: absolute;
  top: 0.55rem;
  right: 0.65rem;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.course-modal__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.course-modal__frame iframe,
.course-modal__frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.course-modal__frame video {
  background: #000;
  object-fit: contain;
}

/* Responsive */
@media (max-width: 1200px) {
  .course-related__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .course-cta__inner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 1.45rem 1.5rem;
  }

  .course-cta__mesh {
    width: min(80%, 480px);
    opacity: 0.82;
  }

  .course-features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .course__layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .course__aside {
    position: static;
    order: 0;
  }

  .course__main {
    order: -1;
  }

  .course-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .course-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem;
  }

  .course-price {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .course-sidebar {
    grid-template-columns: minmax(0, 1fr);
  }

  .course-cta__inner {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  .course,
  .course__container,
  .course__layout,
  .course__main,
  .course__aside,
  .course-hero,
  .course-sidebar,
  .course-section,
  .course-section__prose,
  .course-cta,
  .course-related {
    max-width: 100%;
    min-width: 0;
  }

  .course-section__prose table,
  .course-section__prose pre,
  .course-section__prose iframe,
  .course-section__prose video,
  .course-section__prose img {
    max-width: 100% !important;
  }

  .course-section__prose table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .course-related__grid .rcard,
  .course-related__grid .ms-course-card,
  .course-related__grid > * {
    max-width: 100%;
    min-width: 0;
  }
}

@media (max-width: 720px) {
  .course {
    padding-top: 0.85rem;
    overflow-x: hidden;
    overflow-x: clip;
  }

  .course__container {
    width: min(calc(100% - 1.5rem), 100%);
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
  }

  .course-sidebar {
    grid-template-columns: minmax(0, 1fr);
  }

  .course-outcomes__list,
  .course-reviews-grid,
  .course-related__grid,
  .course-features {
    grid-template-columns: minmax(0, 1fr);
  }

  .course-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    max-width: 100%;
  }

  .course-tabs::-webkit-scrollbar {
    display: none;
  }

  .course-tabs__item {
    flex: 0 0 auto;
    min-height: 44px;
  }

  .course-acc__panel {
    padding-left: 1.1rem;
  }

  .course-acc__summary {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .course-cta__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.1rem;
    padding: 1.35rem 1.2rem;
  }

  .course-cta__mesh {
    right: 0;
    width: 100%;
    max-width: none;
    height: 120%;
    opacity: 0.4;
  }

  .course-cta__btn {
    white-space: normal;
    min-height: 48px;
    width: 100%;
    justify-content: center;
  }

  .course-cta__inner::before {
    background: linear-gradient(
      180deg,
      rgba(2, 6, 23, 0.78) 0%,
      rgba(2, 6, 23, 0.5) 55%,
      rgba(2, 6, 23, 0.28) 100%
    );
  }

  .course-cta__icon {
    width: 52px;
    height: 52px;
  }

  .course-cert-block {
    flex-direction: column;
    align-items: flex-start;
  }

  .course-hero__meta {
    flex-wrap: wrap;
  }

  .course-price__cta {
    width: 100%;
    justify-content: center;
  }

  .course-instructor__stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
  }

  .course-teacher-block__photo,
  .course-teacher-block__fallback {
    width: 72px;
    height: 72px;
  }

  .course-curriculum__head {
    flex-wrap: wrap;
  }

  .course-curriculum__expand {
    white-space: normal;
  }
}

@media (max-width: 480px) {
  .course__container {
    width: calc(100% - 1rem);
  }

  .course-hero__meta,
  .course-price__row,
  .course-instructor__head,
  .course-curriculum__head {
    max-width: 100%;
  }

  .course-price,
  .course-instructor,
  .course-reviews-widget,
  .course-cert-card {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .course-cta__inner {
    padding: 1.15rem 1rem;
  }

  .course-acc__summary {
    gap: 0.55rem;
  }
}

@media (max-width: 420px) {
  .course-hero__title {
    font-size: 1.45rem;
  }

  .course-price__current {
    font-size: 1.5rem;
  }

  .course-hero__play {
    width: 56px;
    height: 56px;
  }

  .course-instructor__stats {
    gap: 0.25rem;
    padding-left: 0;
    padding-right: 0;
  }

  .course-reviews-widget__viewport {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem;
  }

  .course-reviews-widget__nav {
    position: absolute;
    top: 0.15rem;
    z-index: 2;
  }

  .course-reviews-widget__nav--prev {
    left: 0;
  }

  .course-reviews-widget__nav--next {
    right: 0;
  }
}

/* Mobile sticky enroll bar — hidden on desktop */
.course-mobile-enroll {
  display: none;
}

@media (max-width: 1024px) {
  .course-mobile-enroll {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
    background: #ffffff;
    border-top: 1px solid var(--border, #E2E8F0);
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
  }

  .course-mobile-enroll form {
    margin: 0;
  }

  .course-mobile-enroll__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    padding: 0.75rem 1rem;
    border: 0;
    border-radius: 0;
    background: var(--primary, #0699D8);
    color: #fff;
    font: inherit;
    font-size: 0.98rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
  }

  .course-mobile-enroll__btn:hover {
    background: #0578AB;
    color: #fff;
  }

  .course {
    padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
  }
}
