/* =====================================================================
   Connect2English — dynamic course UI (home cards extras + detail page)
   Raw CSS on purpose: the public marketing site is legacy-CSS based, so
   utility frameworks fight the global element rules. Uses the design
   tokens declared in legacy.css :root (--brand, --accent, --muted, ...).
   ===================================================================== */

/* ---- Home card extras (the .course base lives in legacy.css) ---- */
.course-icon {
  position: relative;
  z-index: 2;
  width: 56px;
  height: 56px;
  filter: brightness(0) invert(1);
}
.course-wish {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 3;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: 0.25s;
}
.course-wish:hover {
  background: #fff;
  transform: scale(1.1);
}
.course-wish i {
  color: #cbd5e1;
  font-size: 0.95rem;
}
.course-wish.is-active i {
  color: #f43f5e;
}
.course-title-link {
  color: inherit;
  transition: opacity 0.2s;
}
.course-title-link:hover {
  opacity: 0.75;
}

.course-flash {
  max-width: 720px;
  margin: 0 auto 32px;
  padding: 14px 20px;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 600;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 14px;
}

/* ---- Detail page ---- */
.cd-hero {
  position: relative;
  overflow: hidden;
  background: var(--bg-soft);
  padding: 50px 0 60px;
}
.cd-hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(244, 124, 32, 0.1);
  filter: blur(60px);
  z-index: 0;
}
.cd-hero .container {
  position: relative;
  z-index: 1;
}
.cd-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 22px;
}
.cd-breadcrumb a {
  color: var(--muted);
}
.cd-breadcrumb a:hover {
  color: var(--brand);
}
.cd-breadcrumb .cur {
  color: var(--ink);
  font-weight: 600;
}

.cd-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 44px;
  align-items: start;
}

.cd-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.cd-chip {
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.cd-chip--brand {
  color: var(--brand);
  background: rgba(30, 95, 180, 0.1);
}
.cd-chip--gray {
  color: #4b5563;
  background: #f1f0ec;
}
.cd-chip--accent {
  color: var(--accent);
  background: rgba(244, 124, 32, 0.12);
  text-transform: uppercase;
}

.cd-title {
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 2.9rem);
  font-weight: 800;
  line-height: 1.12;
  margin: 0 0 14px;
}
.cd-summary {
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.6;
  max-width: 620px;
  margin: 0 0 22px;
}

.cd-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 28px;
}
.cd-facts span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.cd-facts i {
  color: var(--accent);
}
.cd-facts .is-new {
  color: #059669;
  font-weight: 700;
}
.cd-facts .is-rated {
  color: var(--ink);
  font-weight: 700;
}
.cd-facts .is-rated i {
  color: #fbbf24;
}

.cd-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.cd-highlight {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
}
.cd-highlight-ic {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: var(--brand);
  background: rgba(30, 95, 180, 0.1);
}
.cd-highlight span:last-child {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}

/* Sticky enrollment card */
.cd-aside {
  position: sticky;
  top: 96px;
}
.cd-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.cd-card-media {
  position: relative;
  height: 176px;
  background: var(--grad-brand);
}
.cd-card-media img.cd-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cd-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.45), transparent);
}
.cd-card-icon {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  width: 40px;
  height: 40px;
  filter: brightness(0) invert(1);
}
.cd-card-disc {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 2;
  padding: 5px 12px;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  background: var(--accent);
  box-shadow: var(--shadow-sm);
}
.cd-card-body {
  padding: 24px;
}
.cd-price-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.cd-price-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
}
.cd-price {
  font-family: "Poppins", sans-serif;
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
}
.cd-price-was {
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: line-through;
}
.cd-campus {
  margin-top: 6px;
  font-size: 0.88rem;
  color: var(--muted);
}
.cd-campus strong {
  color: var(--ink);
}

.cd-actions {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  padding: 14px 24px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: 0.25s;
}
.cd-btn--enroll {
  color: #fff;
  background: var(--accent);
  box-shadow: var(--shadow-gold);
}
.cd-btn--enroll:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
}
.cd-btn--wish {
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--border);
}
.cd-btn--wish:hover {
  border-color: #fda4af;
  color: #f43f5e;
}
.cd-btn--wish .saved {
  color: #f43f5e;
}
.cd-btn--done {
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  cursor: default;
}

.cd-facts-list {
  margin: 22px 0 0;
  padding: 18px 0 0;
  list-style: none;
  border-top: 1px solid var(--border);
}
.cd-facts-list li {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  padding: 6px 0;
}
.cd-facts-list .k {
  color: var(--muted);
}
.cd-facts-list .v {
  color: var(--ink);
  font-weight: 600;
}

/* About + prose */
.cd-section {
  padding: 50px 0;
}
.cd-section--soft {
  background: var(--bg-soft);
}
.cd-section-title {
  color: var(--ink);
  font-size: 1.6rem;
  font-weight: 800;
  margin: 0 0 20px;
}
.cd-prose {
  max-width: 780px;
  color: #3a4a5e;
  line-height: 1.75;
}
.cd-prose p {
  margin: 0 0 16px;
}
.cd-prose strong {
  color: var(--ink);
}
.cd-prose a {
  color: var(--brand);
  text-decoration: underline;
}
.cd-prose ul,
.cd-prose ol {
  margin: 0 0 16px;
  padding-left: 22px;
}
.cd-prose ul {
  list-style: disc;
}
.cd-prose ol {
  list-style: decimal;
}
.cd-prose li {
  margin: 6px 0;
}
.cd-prose h2,
.cd-prose h3 {
  color: var(--ink);
  margin: 24px 0 10px;
}

/* Mentors */
.cd-mentors {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.cd-mentor {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
}
.cd-mentor-photo {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 3px rgba(30, 95, 180, 0.15);
}
.cd-mentor h3 {
  font-size: 1.02rem;
  color: var(--ink);
  margin: 0 0 2px;
}
.cd-mentor .role {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 6px;
}
.cd-mentor .bio {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}

/* CTA band */
.cd-band {
  padding: 56px 0;
  text-align: center;
  background: var(--grad-brand);
  color: #fff;
}
.cd-band h2 {
  color: #fff;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin: 0 0 10px;
}
.cd-band p {
  max-width: 620px;
  margin: 0 auto 26px;
  color: rgba(255, 255, 255, 0.88);
}
.cd-band .cd-btn {
  width: auto;
  padding: 14px 40px;
}
.cd-band .cd-btn--done {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Responsive */
@media (max-width: 900px) {
  .cd-grid {
    grid-template-columns: 1fr;
  }
  .cd-aside {
    position: static;
  }
  .cd-mentors {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .cd-highlights {
    grid-template-columns: 1fr;
  }
}
