/* ============================================================
   EQUATION STATION SA — Premium Topic Page Styles
   Full redesign: hero, cards, formulas, CTA, sidebar
   ============================================================ */

/* ── TOPIC HERO (Upgraded) ── */
.topic-hero {
  position: relative;
  padding: 7rem 0 5rem;
  background: var(--navy-dark);
  overflow: hidden;
  margin-top: 64px;
}
.topic-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26,42,58,0.97) 0%, rgba(26,42,58,0.8) 50%, rgba(26,42,58,0.92) 100%);
  z-index: 1;
}
.topic-hero-bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.3;
}
.topic-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
}
.topic-hero-content { max-width: 680px; }
.topic-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  margin-bottom: 1.5rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.topic-breadcrumb a { color: rgba(255,255,255,0.45); transition: color var(--transition); }
.topic-breadcrumb a:hover { color: var(--gold); }
.topic-breadcrumb svg { width: 12px; height: 12px; opacity: 0.4; }

.topic-hero h1 {
  color: var(--white);
  margin-bottom: 1rem;
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  line-height: 1.1;
}
.topic-hero h1 span { color: var(--gold); }
.topic-hero-desc {
  color: rgba(255,255,255,0.65);
  font-size: 1.05rem;
  line-height: 1.75;
  max-width: 560px;
  margin-bottom: 2rem;
}
.topic-hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  background: var(--gold);
  color: var(--navy-dark);
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: all var(--transition);
  border: 2px solid var(--gold);
}
.btn-hero-primary:hover {
  background: #c9a24e;
  border-color: #c9a24e;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(176,141,87,0.4);
}
.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  background: transparent;
  color: rgba(255,255,255,0.85);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: all var(--transition);
  border: 2px solid rgba(255,255,255,0.3);
}
.btn-hero-secondary:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.6);
  transform: translateY(-2px);
}
.topic-hero-meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.topic-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  background: rgba(176,141,87,0.12);
  border: 1px solid rgba(176,141,87,0.3);
  border-radius: 50px;
  font-size: 0.72rem;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.topic-meta-pill svg { width: 11px; height: 11px; }

/* Topic hero image panel (right side) */
.topic-hero-image-panel {
  display: flex;
  align-items: center;
  justify-content: center;
}
.topic-hero-svg-wrap {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(176,141,87,0.08);
  border: 2px solid rgba(176,141,87,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ── TOPIC LAYOUT ── */
.topic-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  align-items: start;
  padding-top: 4rem;
  padding-bottom: 5rem;
}

/* ── CONTENT SECTIONS ── */
.content-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}
.content-block:hover { box-shadow: var(--shadow-md); }
.content-block-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.content-block-header-icon {
  width: 40px;
  height: 40px;
  background: var(--gold-pale);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.content-block-header-icon svg { width: 18px; height: 18px; color: var(--gold); }
.content-block-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy-dark);
  margin: 0;
}
.content-block-header p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0.2rem 0 0;
}
.content-section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.content-section-title svg { width: 20px; height: 20px; color: var(--gold); }
.content-section-title h2 { font-size: 1.25rem; font-weight: 700; margin: 0; color: var(--navy-dark); }

/* ── VIDEO SECTION ── */
.video-section {
  background: var(--navy-dark);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  margin-bottom: 2rem;
}
.video-section .content-block-header { border-bottom-color: rgba(255,255,255,0.1); }
.video-section .content-block-header h2 { color: var(--white); }
.video-section .content-block-header p { color: rgba(255,255,255,0.45); }
.video-section .content-block-header-icon { background: rgba(176,141,87,0.15); }
.video-embed-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
}
.video-embed-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}
.video-embed-wrap .yt-embed-wrapper {
  position: absolute;
  inset: 0;
  height: 100%;
  min-height: 0;
  border-radius: 8px;
  transform: none;
}
.video-embed-wrap .yt-embed-wrapper:hover {
  transform: none;
}
.video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: rgba(26,42,58,0.8);
}
.video-play-circle {
  width: 72px; height: 72px;
  background: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(176,141,87,0.4);
}
.video-play-circle svg { width: 28px; height: 28px; color: var(--navy-dark); margin-left: 4px; }
.video-placeholder-text { color: rgba(255,255,255,0.5); font-size: 0.82rem; text-align: center; }
.video-note {
  margin-top: 1.25rem;
  font-size: 0.84rem;
  color: rgba(255,255,255,0.5);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.video-note svg { width: 14px; height: 14px; color: var(--gold); flex-shrink: 0; }

/* ── CONCEPT CARDS ── */
.concept-grid {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.concept-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem 1.5rem;
  background: var(--off-white);
  border-radius: 8px;
  border-left: 3px solid var(--gold);
  transition: all var(--transition);
}
.concept-card:hover {
  background: var(--gold-pale);
  transform: translateX(3px);
}
.concept-icon {
  width: 32px; height: 32px;
  background: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.concept-icon svg { width: 14px; height: 14px; color: var(--navy-dark); }
.concept-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy-dark);
  margin: 0 0 0.35rem;
  font-family: var(--font-body);
}
.concept-card p {
  font-size: 0.87rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}

/* ── FORMULA CARDS (Premium) ── */
.formula-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.formula-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem;
  position: relative;
  overflow: visible;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.formula-block:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(176,141,87,0.3);
}
.formula-block::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
}
.formula-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
}
.formula-display {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: var(--navy);
  line-height: 1.8;
  background: transparent;
  padding: 1.25rem 0;
  border-radius: 0;
  margin-bottom: 1rem;
  border: none;
  overflow: visible;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.formula-display .MJX-TEX { color: var(--navy); }
.formula-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
  font-style: italic;
}

.formula-display {
  flex-direction: column;
  gap: 0.45rem;
}

.formula-display::after {
  content: 'Source: Equation Station SA';
  display: block;
  width: 100%;
  text-align: center;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(26,42,58,0.55);
}

/* ── MISTAKE CARDS ── */
.mistake-grid {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.mistake-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem 1.5rem;
  background: #fff5f5;
  border-radius: 8px;
  border-left: 3px solid #e74c3c;
  transition: all var(--transition);
}
.mistake-card:hover { background: #ffeaea; }
.mistake-badge {
  width: 28px; height: 28px;
  background: #e74c3c;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mistake-badge svg { width: 13px; height: 13px; color: white; }
.mistake-card h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #c0392b;
  margin: 0 0 0.3rem;
  font-family: var(--font-body);
}
.mistake-card p {
  font-size: 0.87rem;
  color: #666;
  line-height: 1.65;
  margin: 0;
}

/* ── OUTCOME GRID ── */
.outcome-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.outcome-pill {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--off-white);
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.outcome-pill:hover {
  background: var(--gold-pale);
  border-color: rgba(176,141,87,0.3);
}
.outcome-check {
  width: 26px; height: 26px;
  background: var(--gold-pale);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.outcome-check svg { width: 13px; height: 13px; color: var(--gold); }
.outcome-pill span { font-size: 0.87rem; color: var(--navy); font-weight: 500; line-height: 1.45; }

/* ── RESOURCES (Premium) ── */
.resource-cards-premium {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1rem;
}
.resource-card-premium {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0;
}
.resource-card-premium:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(176,141,87,0.35);
}
.rcp-top {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}
.rcp-pdf-icon {
  flex-shrink: 0;
  width: 44px;
  height: 52px;
  background: #c0392b;
  border-radius: 6px 6px 6px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  position: relative;
}
.rcp-pdf-icon::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 0; height: 0;
  border-style: solid;
  border-width: 0 8px 8px 0;
  border-color: transparent rgba(255,255,255,0.2) transparent transparent;
}
.rcp-pdf-icon svg { width: 16px; height: 16px; color: white; }
.rcp-pdf-icon span { color: white; font-size: 0.58rem; font-weight: 800; letter-spacing: 0.06em; }
.rcp-meta { font-size: 0.7rem; color: var(--text-muted); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.3rem; }
.rcp-title { font-size: 0.95rem; font-weight: 700; color: var(--navy-dark); line-height: 1.4; margin: 0; }
.rcp-desc { font-size: 0.84rem; color: var(--text-muted); line-height: 1.65; margin: 0 0 1.25rem; flex: 1; }
.rcp-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--gold-pale);
  border: 1px solid rgba(176,141,87,0.25);
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 3px;
  margin-bottom: 1.25rem;
}
.rcp-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.72rem 1.4rem;
  background: var(--gold);
  color: var(--navy-dark);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  transition: all var(--transition);
  margin-top: auto;
  align-self: flex-start;
}
.rcp-download-btn:hover {
  background: #c9a24e;
  border-color: #c9a24e;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(176,141,87,0.32);
}
.rcp-download-btn svg { width: 13px; height: 13px; }

/* ── RELATED TOPICS GRID ── */
.related-topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}
.related-topic-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.related-topic-card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform var(--transition);
}
.related-topic-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(176,141,87,0.3);
}
.related-topic-card:hover::before { transform: scaleX(1); }
.rtc-icon {
  width: 36px; height: 36px;
  background: var(--gold-pale);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.25rem;
}
.rtc-icon svg { width: 16px; height: 16px; color: var(--gold); }
.related-topic-card h4 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--navy-dark);
  margin: 0;
  font-family: var(--font-body);
}
.related-topic-card p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}
.rtc-arrow {
  margin-top: auto;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 600;
}
.rtc-arrow svg { width: 13px; height: 13px; }

/* ── PREMIUM SIDEBAR ── */
.topic-sidebar-premium {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.sidebar-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.sidebar-block-title {
  padding: 1rem 1.25rem;
  background: var(--navy-dark);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.sidebar-block-body { padding: 1.25rem; }

/* Tutor card in sidebar */
.sidebar-tutor-card {
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.sidebar-tutor-img-wrap {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
}
.sidebar-tutor-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  filter: brightness(0.92);
}
.sidebar-tutor-img-wrap::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: linear-gradient(to top, var(--navy-dark), transparent);
}
.sidebar-tutor-body {
  padding: 1.25rem 1.5rem 1.5rem;
}
.sidebar-tutor-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.25rem;
}
.sidebar-tutor-title {
  font-size: 0.75rem;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}
.sidebar-tutor-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.sidebar-tutor-bullets li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.65);
}
.sidebar-tutor-bullets li svg { width: 12px; height: 12px; color: var(--gold); flex-shrink: 0; }
.sidebar-book-btn-premium {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.9rem 1.5rem;
  background: var(--gold);
  color: var(--navy-dark);
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: all var(--transition);
}
.sidebar-book-btn-premium:hover {
  background: #c9a24e;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(176,141,87,0.4);
}
.sidebar-book-btn-premium svg { width: 16px; height: 16px; }

/* Page nav in sidebar */
.page-nav-list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.page-nav-list li a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.75rem;
  border-radius: 6px;
  font-size: 0.84rem;
  color: var(--navy);
  font-weight: 500;
  transition: all var(--transition);
}
.page-nav-list li a:hover {
  background: var(--gold-pale);
  color: var(--gold);
}
.page-nav-list li a svg { width: 13px; height: 13px; color: var(--gold); opacity: 0.7; }

/* All topics list in sidebar */
.all-topics-list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
}
.all-topics-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  font-size: 0.83rem;
  color: var(--navy);
  font-weight: 500;
  transition: all var(--transition);
}
.all-topics-list li a:hover {
  background: var(--gold-pale);
  color: var(--gold);
}
.all-topics-list li a.active {
  background: var(--navy-dark);
  color: var(--gold);
  font-weight: 700;
}
.all-topics-list li a svg { width: 12px; height: 12px; opacity: 0.5; }
.all-topics-list li a.active svg { opacity: 1; color: var(--gold); }

/* ── BOTTOM CTA (Premium Booking) ── */
.topic-cta-section {
  background: var(--navy-dark);
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}
.topic-cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(176,141,87,0.08) 0%, transparent 60%);
}
.topic-cta-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}
.topic-cta-text .section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(176,141,87,0.12);
  border: 1px solid rgba(176,141,87,0.3);
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.85rem;
  border-radius: 50px;
  margin-bottom: 1.25rem;
}
.topic-cta-text h2 {
  color: var(--white);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin-bottom: 0.85rem;
}
.topic-cta-text p {
  color: rgba(255,255,255,0.55);
  font-size: 1rem;
  max-width: 480px;
  line-height: 1.75;
}
.topic-cta-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  justify-content: center;
}
.topic-cta-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 3px solid rgba(176,141,87,0.4);
  box-shadow: 0 0 0 6px rgba(176,141,87,0.1);
  display: block;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .topic-layout { grid-template-columns: 1fr; gap: 2rem; }
  .topic-sidebar-premium { position: static; }
  .topic-hero-inner { grid-template-columns: 1fr; }
  .topic-hero-image-panel { display: none; }
  .topic-cta-inner { grid-template-columns: 1fr; }
  .topic-cta-photo { display: none; }
}
@media (max-width: 768px) {
  .topic-hero { padding: 5.5rem 0 3.5rem; }
  .formula-grid { grid-template-columns: 1fr; }
  .outcome-grid { grid-template-columns: 1fr 1fr; }
  .related-topics-grid { grid-template-columns: 1fr 1fr; }
  .resource-cards-premium { grid-template-columns: 1fr; }
  .topic-cta-inner { text-align: center; }
  .topic-cta-actions { justify-content: center; }
}
@media (max-width: 480px) {
  .outcome-grid { grid-template-columns: 1fr; }
  .related-topics-grid { grid-template-columns: 1fr; }
  .topic-hero-actions { flex-direction: column; }
}

/* ── WHATSAPP CTA BUTTON ── */
.btn-whatsapp-premium {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.85rem;
  background: var(--gold);
  color: var(--navy-dark);
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: all var(--transition);
  border: 2px solid var(--gold);
}
.btn-whatsapp-premium:hover {
  background: #c9a24e;
  border-color: #c9a24e;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(176,141,87,0.35);
}
.btn-whatsapp-premium svg { color: var(--navy-dark); }
.btn-back-topics {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.85rem;
  background: transparent;
  color: rgba(255,255,255,0.75);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: all var(--transition);
  border: 2px solid rgba(255,255,255,0.25);
}
.btn-back-topics:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.5);
  color: var(--white);
}

/* ── TOPIC ICON SVG ILLUSTRATIONS ── */
.topic-illustration {
  width: 160px;
  height: 160px;
  opacity: 0.85;
}

/* ── RESOURCES NOTICE ── */
.resources-notice {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--gold-pale);
  border: 1px solid rgba(176,141,87,0.25);
  border-radius: 8px;
  font-size: 0.84rem;
  color: var(--navy);
  margin-top: 1rem;
}
.resources-notice svg { width: 16px; height: 16px; color: var(--gold); flex-shrink: 0; }
.resources-notice a { color: var(--gold); font-weight: 700; }

/* ── FORMULA DISPLAY IMPROVEMENTS ── */
.formula-block {
  background: var(--navy);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 1.75rem 1.8rem;
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(26,42,58,0.12);
}
.formula-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
  display: block;
}
.formula-display {
  font-size: 1.15rem;
  text-align: center;
  padding: 0.65rem 0;
  color: var(--white);
  overflow-x: auto;
  max-width: 100%;
  white-space: nowrap;
}
.formula-display .MJX-TEX {
  font-size: 1.2rem !important;
  color: var(--white) !important;
}
.formula-note {
  font-size: 0.84rem;
  color: rgba(255,255,255,0.7);
  margin-top: 0.9rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 0.75rem;
  line-height: 1.65;
}
/* Ensure MathJax never overflows */
.MathJax_Display, mjx-container[display="true"] {
  overflow-x: auto !important;
  max-width: 100% !important;
}

/* ── ACTIVE NAV LINK ── */
.nav-links a.active {
  color: #b08d57 !important;
}

/* ── AD CONTAINER IMPROVEMENTS ── */
.ad-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  min-height: 90px;
  background: rgba(10,22,40,0.3);
  border-top: 1px solid rgba(176,141,87,0.06);
  border-bottom: 1px solid rgba(176,141,87,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile polish overrides */
@media (max-width: 640px) {
  .topic-hero {
    padding: 5rem 0 3rem;
  }

  .topic-breadcrumb {
    flex-wrap: wrap;
    gap: 0.35rem;
    font-size: 0.7rem;
  }

  .topic-hero h1 {
    font-size: clamp(2rem, 9vw, 2.6rem);
  }

  .topic-hero-desc {
    font-size: 0.96rem;
    line-height: 1.7;
  }

  .topic-hero-actions {
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 2rem;
  }

  .btn-hero-primary,
  .btn-hero-secondary,
  .btn-whatsapp-premium,
  .btn-back-topics,
  .topic-cta-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .topic-layout {
    padding-top: 2rem;
    padding-bottom: 3.5rem;
  }

  .content-block,
  .video-section,
  .sidebar-block,
  .sidebar-tutor-card {
    padding: 1.25rem;
    margin-bottom: 1.25rem;
  }

  .content-block-header {
    align-items: flex-start;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
  }

  .content-block-header h2 {
    font-size: 1.08rem;
  }

  .content-block-header p,
  .topic-cta-text p,
  .concept-card p,
  .mistake-card p,
  .formula-note,
  .resources-notice,
  .faq-item p {
    font-size: 0.92rem;
    line-height: 1.65;
  }

  .concept-card,
  .mistake-card,
  .resource-card-premium,
  .related-topic-card {
    padding: 1rem;
  }

  .formula-block {
    padding: 1.15rem;
  }

  .formula-display {
    font-size: 1rem;
  }

  .resources-notice {
    align-items: flex-start;
  }

  .topic-cta-section {
    padding: 3.5rem 0;
  }

  .topic-cta-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ================================================================
   TOPIC PAGE PREMIUM ENHANCEMENTS
   ================================================================ */

/* Topic Hero Premium */
.topic-hero {
  background: linear-gradient(160deg, #0f1c28 0%, #162a3d 50%, #1a2a3a 100%);
}
.topic-hero::before {
  background: linear-gradient(135deg, rgba(26,42,58,0.97) 0%, rgba(26,42,58,0.8) 50%, rgba(26,42,58,0.92) 100%);
}

.topic-hero-svg-wrap {
  background: rgba(176,141,87,0.06);
  border: 2px solid rgba(176,141,87,0.18);
  box-shadow: 0 0 40px rgba(176,141,87,0.08);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.topic-hero-svg-wrap:hover {
  transform: scale(1.05);
  border-color: rgba(176,141,87,0.3);
  box-shadow: 0 0 60px rgba(176,141,87,0.12);
}

.btn-hero-primary {
  background: linear-gradient(135deg, var(--gold) 0%, #c9a96e 100%);
  border: none;
  box-shadow: 0 4px 14px rgba(176,141,87,0.25);
}
.btn-hero-primary:hover {
  background: linear-gradient(135deg, #c9a24e 0%, #b08d57 100%);
  box-shadow: 0 8px 24px rgba(176,141,87,0.35);
}

.btn-hero-secondary {
  border: 2px solid rgba(255,255,255,0.25);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-hero-secondary:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.5);
  transform: translateY(-2px);
}

.topic-meta-pill {
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  background: rgba(176,141,87,0.1);
}

/* Content Block Premium */
.content-block {
  border-radius: 14px;
  background: linear-gradient(145deg, var(--white) 0%, #fdfcfa 100%);
  border: 1px solid rgba(26,42,58,0.08);
  box-shadow: 0 1px 2px rgba(26,42,58,0.04), 0 4px 12px rgba(26,42,58,0.06);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.content-block:hover {
  box-shadow: 0 4px 6px rgba(26,42,58,0.03), 0 12px 28px rgba(26,42,58,0.09);
}

.content-block-header-icon {
  background: linear-gradient(135deg, var(--gold-pale) 0%, #f5efe6 100%);
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(176,141,87,0.1);
}

/* Video Section Premium */
.video-section {
  border-radius: 14px;
  background: linear-gradient(145deg, var(--navy-dark) 0%, #152536 100%);
  border: 1px solid rgba(176,141,87,0.1);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.video-play-circle {
  background: linear-gradient(135deg, var(--gold) 0%, #c9a96e 100%);
  box-shadow: 0 6px 24px rgba(176,141,87,0.4);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.video-play-circle:hover {
  transform: scale(1.1);
}

/* Concept Card Premium */
.concept-card {
  border-radius: 12px;
  background: linear-gradient(145deg, var(--off-white) 0%, #f8f5f1 100%);
  border: 1px solid rgba(26,42,58,0.06);
  border-left: 3px solid var(--gold);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.concept-card:hover {
  background: linear-gradient(145deg, var(--gold-pale) 0%, #f5efe6 100%);
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(176,141,87,0.08);
}

.concept-icon {
  background: linear-gradient(135deg, var(--gold) 0%, #c9a96e 100%);
  box-shadow: 0 3px 10px rgba(176,141,87,0.25);
}

/* Formula Block Premium */
.formula-block {
  border-radius: 14px;
  background: linear-gradient(145deg, var(--navy) 0%, #1e3042 100%);
  border: 1px solid rgba(176,141,87,0.12);
  box-shadow: 0 10px 30px rgba(26,42,58,0.12);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.formula-block:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(26,42,58,0.18), 0 0 30px rgba(176,141,87,0.06);
  border-color: rgba(176,141,87,0.2);
}

.formula-block::before {
  background: linear-gradient(90deg, var(--gold), #d4b47a);
}

/* Mistake Card Premium */
.mistake-card {
  border-radius: 12px;
  background: linear-gradient(145deg, #fff5f5 0%, #fdf0f0 100%);
  border: 1px solid rgba(231,76,60,0.08);
  border-left: 3px solid #e74c3c;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.mistake-card:hover {
  background: linear-gradient(145deg, #ffeaea 0%, #fff0f0 100%);
  box-shadow: 0 4px 12px rgba(231,76,60,0.08);
  transform: translateX(3px);
}

.mistake-badge {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  box-shadow: 0 2px 8px rgba(231,76,60,0.25);
}

/* Outcome Pill Premium */
.outcome-pill {
  border-radius: 12px;
  background: linear-gradient(145deg, var(--off-white) 0%, #f8f5f1 100%);
  border: 1px solid rgba(26,42,58,0.06);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.outcome-pill:hover {
  background: linear-gradient(145deg, var(--gold-pale) 0%, #f5efe6 100%);
  border-color: rgba(176,141,87,0.2);
  box-shadow: 0 4px 12px rgba(176,141,87,0.06);
  transform: translateY(-2px);
}

.outcome-check {
  background: linear-gradient(135deg, var(--gold-pale) 0%, #f5efe6 100%);
}

/* Resource Card Premium */
.resource-card-premium {
  border-radius: 14px;
  background: linear-gradient(145deg, var(--white) 0%, #fdfcfa 100%);
  border: 1px solid rgba(26,42,58,0.08);
  box-shadow: 0 1px 2px rgba(26,42,58,0.04), 0 4px 12px rgba(26,42,58,0.06);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.resource-card-premium:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 6px rgba(26,42,58,0.03), 0 12px 28px rgba(26,42,58,0.09);
  border-color: rgba(176,141,87,0.18);
}

.rcp-download-btn {
  background: linear-gradient(135deg, var(--gold) 0%, #c9a96e 100%);
  border: none;
  box-shadow: 0 2px 8px rgba(176,141,87,0.2);
}
.rcp-download-btn:hover {
  background: linear-gradient(135deg, #c9a24e 0%, #b08d57 100%);
  box-shadow: 0 6px 20px rgba(176,141,87,0.3);
}

/* Related Topic Card Premium */
.related-topic-card {
  border-radius: 14px;
  background: linear-gradient(145deg, var(--white) 0%, #fdfcfa 100%);
  border: 1px solid rgba(26,42,58,0.08);
  box-shadow: 0 1px 2px rgba(26,42,58,0.04), 0 4px 12px rgba(26,42,58,0.06);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.related-topic-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 6px rgba(26,42,58,0.03), 0 12px 28px rgba(26,42,58,0.09);
  border-color: rgba(176,141,87,0.18);
}

.related-topic-card::before {
  background: linear-gradient(90deg, var(--gold), #d4b47a);
}

.rtc-icon {
  background: linear-gradient(135deg, var(--gold-pale) 0%, #f5efe6 100%);
  box-shadow: 0 2px 6px rgba(176,141,87,0.08);
}

/* Sidebar Premium */
.sidebar-block {
  border-radius: 14px;
  background: linear-gradient(145deg, var(--white) 0%, #fdfcfa 100%);
  border: 1px solid rgba(26,42,58,0.08);
  box-shadow: 0 1px 2px rgba(26,42,58,0.04), 0 4px 12px rgba(26,42,58,0.06);
}

.sidebar-block-title {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
}

.sidebar-tutor-card {
  border-radius: 14px;
  background: linear-gradient(145deg, var(--navy-dark) 0%, #152536 100%);
  border: 1px solid rgba(176,141,87,0.1);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.sidebar-book-btn-premium {
  background: linear-gradient(135deg, var(--gold) 0%, #c9a96e 100%);
  border: none;
  box-shadow: 0 4px 14px rgba(176,141,87,0.25);
}
.sidebar-book-btn-premium:hover {
  background: linear-gradient(135deg, #c9a24e 0%, #b08d57 100%);
  box-shadow: 0 8px 24px rgba(176,141,87,0.35);
}

.page-nav-list li a {
  border-radius: 8px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.page-nav-list li a:hover {
  background: linear-gradient(90deg, var(--gold-pale) 0%, rgba(245,239,230,0.5) 100%);
  transform: translateX(3px);
}

.all-topics-list li a {
  border-radius: 8px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.all-topics-list li a:hover {
  background: linear-gradient(90deg, var(--gold-pale) 0%, rgba(245,239,230,0.5) 100%);
  transform: translateX(3px);
}

/* CTA Section Premium */
.topic-cta-section {
  background: linear-gradient(160deg, #0f1c28 0%, #162a3d 50%, #1a2a3a 100%);
}
.topic-cta-section::before {
  background: linear-gradient(135deg, rgba(176,141,87,0.08) 0%, transparent 60%);
}

.topic-cta-photo {
  border: 3px solid rgba(176,141,87,0.35);
  box-shadow: 0 0 0 6px rgba(176,141,87,0.08), 0 10px 30px rgba(0,0,0,0.2);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.topic-cta-photo:hover {
  transform: scale(1.05);
  box-shadow: 0 0 0 8px rgba(176,141,87,0.12), 0 16px 40px rgba(0,0,0,0.25);
}

.btn-whatsapp-premium {
  background: linear-gradient(135deg, var(--gold) 0%, #c9a96e 100%);
  border: none;
  box-shadow: 0 4px 14px rgba(176,141,87,0.25);
}
.btn-whatsapp-premium:hover {
  background: linear-gradient(135deg, #c9a24e 0%, #b08d57 100%);
  box-shadow: 0 8px 24px rgba(176,141,87,0.35);
}

.btn-back-topics {
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-back-topics:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.5);
  transform: translateY(-2px);
}

/* Resources Notice Premium */
.resources-notice {
  border-radius: 12px;
  background: linear-gradient(145deg, var(--gold-pale) 0%, #f5efe6 100%);
  border: 1px solid rgba(176,141,87,0.15);
}

/* Grain texture for dark sections */
.topic-hero::after,
.video-section::after,
.topic-cta-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 180px 180px;
  pointer-events: none;
  z-index: 1;
}

.topic-hero > *,
.video-section > *,
.topic-cta-section > * {
  position: relative;
  z-index: 2;
}
