/* =========================================================
   Teaching Pages
   ========================================================= */

.teaching-hero,
.course-hero,
.lesson-hero {
  position: relative;
  margin: 2.5rem 0 2rem;
  padding: 3.2rem 2.4rem;
  border-radius: 32px;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 20%, rgba(38, 75, 139, 0.18), transparent 34%),
    radial-gradient(circle at 88% 10%, rgba(214, 168, 79, 0.16), transparent 30%),
    linear-gradient(135deg, rgba(255,255,255,0.95), rgba(246,248,252,0.86));
  border: 1px solid rgba(30, 40, 70, 0.10);
  box-shadow: 0 28px 90px rgba(40, 50, 80, 0.12);
}

.teaching-hero h1,
.course-hero h1,
.lesson-hero h1 {
  max-width: 980px;
  margin: 0.7rem 0 0.8rem;
  font-size: clamp(2.1rem, 5vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.teaching-hero p,
.course-hero p,
.lesson-hero p {
  max-width: 860px;
  line-height: 1.85;
  color: var(--text-muted, #647089);
  font-size: 1.05rem;
}

.teaching-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
  margin: 2rem 0;
}

.teaching-overview-card,
.course-description,
.course-module,
.lesson-content,
.lesson-sidebar {
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(30, 40, 70, 0.10);
  box-shadow: 0 18px 54px rgba(40, 50, 80, 0.08);
}

.teaching-overview-card {
  padding: 1.6rem;
}

.teaching-overview-card span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 1rem;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, #264b8b, #d6a84f);
}

.teaching-overview-card h2 {
  margin-bottom: 0.6rem;
  font-size: 1.25rem;
}

.teaching-overview-card p {
  margin: 0;
  color: var(--text-muted, #647089);
  line-height: 1.7;
}

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

.course-card {
  display: block;
  padding: 1.8rem;
  border-radius: 28px;
  color: inherit;
  text-decoration: none;
  background: rgba(255,255,255,0.84);
  border: 1px solid rgba(30, 40, 70, 0.10);
  box-shadow: 0 20px 60px rgba(40, 50, 80, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.course-card:hover {
  color: inherit;
  text-decoration: none;
  transform: translateY(-6px);
  box-shadow: 0 30px 85px rgba(40, 50, 80, 0.14);
}

.course-card-top,
.course-meta-row {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.course-code,
.course-count,
.course-meta-row span {
  display: inline-flex;
  padding: 0.34rem 0.76rem;
  border-radius: 999px;
  background: rgba(38, 75, 139, 0.10);
  color: #264b8b;
  font-size: 0.85rem;
  font-weight: 700;
}

.course-card h2 {
  margin-bottom: 0.3rem;
  font-size: 1.6rem;
}

.course-title-en,
.course-title-en-large {
  color: var(--text-muted, #647089);
  font-style: italic;
}

.course-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.2rem;
}

.course-tags span {
  padding: 0.32rem 0.68rem;
  border-radius: 999px;
  background: rgba(214, 168, 79, 0.12);
  color: #72572c;
  font-size: 0.82rem;
}

.teaching-back-link {
  display: inline-block;
  margin-bottom: 1.2rem;
  color: #264b8b;
  font-weight: 700;
  text-decoration: none;
}

.teaching-back-link:hover {
  color: #d6a84f;
  text-decoration: none;
}

.course-description {
  padding: 2rem;
  margin: 2rem 0;
}

.course-description p,
.lesson-content p,
.lesson-content li {
  line-height: 1.9;
  color: var(--text-muted, #647089);
  font-size: 1.02rem;
}

.course-outline {
  margin: 2.5rem 0 4rem;
}

.course-outline-header {
  margin-bottom: 1.3rem;
}

.course-outline-header p {
  color: var(--text-muted, #647089);
}

.course-module {
  padding: 1.4rem;
  margin-bottom: 1.3rem;
}

.course-module-header {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 1rem;
  align-items: start;
  margin-bottom: 1rem;
}

.course-module-header > span {
  display: inline-flex;
  justify-content: center;
  padding: 0.5rem 0.7rem;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, #264b8b, #d6a84f);
}

.course-module-header h3 {
  margin: 0 0 0.35rem;
}

.course-module-header p {
  margin: 0;
  color: var(--text-muted, #647089);
  line-height: 1.7;
}

.lesson-list {
  display: grid;
  gap: 0.8rem;
}

.lesson-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  color: inherit;
  text-decoration: none;
  background: rgba(246, 248, 252, 0.78);
  border: 1px solid rgba(30, 40, 70, 0.07);
  transition: transform 0.2s ease, background 0.2s ease;
}

.lesson-row:hover {
  color: inherit;
  text-decoration: none;
  transform: translateX(4px);
  background: rgba(255,255,255,0.95);
}

.lesson-order {
  display: inline-block;
  margin-bottom: 0.35rem;
  color: #264b8b;
  font-weight: 800;
  font-size: 0.85rem;
}

.lesson-row h4 {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
}

.lesson-row p {
  margin: 0;
  color: var(--text-muted, #647089);
  line-height: 1.65;
}

.lesson-arrow {
  font-size: 1.4rem;
  color: #d6a84f;
}

.lesson-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  margin: 2rem 0 4rem;
}

.lesson-sidebar {
  position: sticky;
  top: 90px;
  align-self: start;
  padding: 1.2rem;
}

.lesson-sidebar h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.lesson-sidebar-link {
  display: block;
  padding: 0.72rem 0.85rem;
  margin-bottom: 0.5rem;
  border-radius: 14px;
  color: #4c5870;
  text-decoration: none;
  background: rgba(246, 248, 252, 0.72);
}

.lesson-sidebar-link span {
  display: block;
  color: #264b8b;
  font-weight: 800;
  font-size: 0.78rem;
}

.lesson-sidebar-link:hover,
.lesson-sidebar-link.active {
  color: #18223c;
  text-decoration: none;
  background: linear-gradient(90deg, rgba(38, 75, 139, 0.12), rgba(214, 168, 79, 0.14));
}

.lesson-content {
  padding: 2rem;
}

.lesson-content h2 {
  margin-top: 1.8rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(30, 40, 70, 0.10);
}

.lesson-content h2:first-child {
  margin-top: 0;
}

.lesson-content h3 {
  margin-top: 1.4rem;
}

.lesson-content code {
  padding: 0.15rem 0.35rem;
  border-radius: 6px;
  background: rgba(38, 75, 139, 0.08);
  color: #264b8b;
}

@media (max-width: 992px) {
  .teaching-overview,
  .course-grid,
  .lesson-layout {
    grid-template-columns: 1fr;
  }

  .lesson-sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .teaching-hero,
  .course-hero,
  .lesson-hero {
    padding: 2.2rem 1.5rem;
  }

  .course-module-header {
    grid-template-columns: 1fr;
  }

  .lesson-content,
  .course-description {
    padding: 1.4rem;
  }
}
