/* ============================================================
   mca-syllabus-enhanced.css
   Adds a readable, engaging, mobile-first layer on top of the
   existing syllabus-table.css. Nothing here removes ad slots or
   SEO markup — it only restyles what is already in the page.
   ============================================================ */

:root {
  --syl-primary: #1e3a8a;
  --syl-primary-dark: #0056b3;
  --syl-accent: #dc3545;
  --syl-core: #1e3a8a;
  --syl-dse: #0f766e;
  --syl-vac: #7c3aed;
  --syl-aec: #b45309;
  --syl-mdc: #be123c;
  --syl-sec: #0d9488;
  --syl-bg-soft: #f5f7fb;
  --syl-card-radius: 14px;
}

/* ---------- Subject cards ---------- */
.subject-intro-wrapper {
  background: #fff;
  border: 1px solid #e6e9f2;
  border-left: 5px solid var(--syl-primary);
  border-radius: var(--syl-card-radius);
  box-shadow: 0 2px 10px rgba(20, 30, 70, 0.06);
  padding: 1.1rem 1.25rem 1.3rem;
  margin: 1.25rem 0;
  scroll-margin-top: 90px;
  transition: box-shadow 0.15s ease;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
}

.subject-intro-wrapper:hover {
  box-shadow: 0 6px 18px rgba(20, 30, 70, 0.1);
}

/* Category accent colors, applied via a data attribute set on the wrapper */
.subject-intro-wrapper[data-cat="dse"] { border-left-color: var(--syl-dse); }
.subject-intro-wrapper[data-cat="vac"] { border-left-color: var(--syl-vac); }
.subject-intro-wrapper[data-cat="aec"] { border-left-color: var(--syl-aec); }
.subject-intro-wrapper[data-cat="mdc"] { border-left-color: var(--syl-mdc); }
.subject-intro-wrapper[data-cat="sec"] { border-left-color: var(--syl-sec); }

.subject-intro-wrapper h3 {
  line-height: 1.35;
}

.cat-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  background: var(--syl-primary);
  border-radius: 999px;
  padding: 0.18rem 0.6rem;
  margin-bottom: 0.5rem;
}

.subject-intro-wrapper[data-cat="dse"] .cat-badge { background: var(--syl-dse); }
.subject-intro-wrapper[data-cat="vac"] .cat-badge { background: var(--syl-vac); }
.subject-intro-wrapper[data-cat="aec"] .cat-badge { background: var(--syl-aec); }
.subject-intro-wrapper[data-cat="mdc"] .cat-badge { background: var(--syl-mdc); }
.subject-intro-wrapper[data-cat="sec"] .cat-badge { background: var(--syl-sec); }

/* ---------- Exam pattern note (per-subject marks breakdown) ---------- */
.exam-pattern-note {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1a3a6b;
  background: #eef6ff;
  border: 1px dashed #9fbde8;
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  margin: 0.15rem 0 0.85rem;
}

.exam-pattern-note strong { color: var(--syl-primary); }

/* ---------- Marks breakdown shown inside the credit table ---------- */
.syl-table .marks-split {
  display: inline-block;
  margin-top: 2px;
  font-size: 0.74em;
  font-weight: 500;
  color: #5b6472;
  white-space: nowrap;
}

/* ---------- Readable body copy ---------- */
.subject-intro {
  font-size: 0.98rem;
  line-height: 1.75;
  color: #2b2f3a;
  max-width: 72ch;
  width: 100%;
  overflow-wrap: break-word;
}

/* First strong = the subject header line (name, code, credits) */
.subject-intro strong:first-of-type {
  display: block;
  font-size: 1.02rem;
  color: var(--syl-primary);
  background: var(--syl-bg-soft);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  margin: 0 0 0.75rem;
}

/* Every subsequent strong = a "Unit ..." (or MDC option) heading.
   Turning it into a block makes the wall of text break into
   clearly separated, scannable sections — no HTML rewrite needed. */
.subject-intro strong:not(:first-of-type) {
  display: block;
  margin: 1.1rem 0 0.4rem;
  padding: 0.4rem 0.7rem 0.4rem 0.85rem;
  font-size: 0.92rem;
  color: var(--syl-primary-dark);
  background: linear-gradient(90deg, #eef3ff 0%, transparent 100%);
  border-left: 3px solid var(--syl-primary-dark);
  border-radius: 6px;
}

.subject-intro strong:not(:first-of-type)::before {
  content: "📘  ";
}

/* ---------- Ad slots: give them breathing room + a tiny label ---------- */
.ad-slot {
  margin: 1.75rem auto;
  max-width: 1000px;
  width: 100%;
  box-sizing: border-box;
  padding: 0 0.25rem;
  text-align: center;
  overflow: hidden;
}

/* ---------- Credit table: small polish on top of syllabus-table.css ---------- */
.syl-table tbody tr td:nth-child(3) {
  white-space: normal !important;
}

/* ---------- Mobile tuning ---------- */
@media (max-width: 640px) {
  .subject-intro-wrapper { padding: 0.9rem 1rem 1.1rem; margin: 1rem 0; }
  .subject-intro { font-size: 0.93rem; line-height: 1.7; }
  .subject-intro strong:not(:first-of-type) { font-size: 0.88rem; }
  .exam-pattern-note { font-size: 0.78rem; padding: 0.35rem 0.6rem; }
}

@media (max-width: 400px) {
  .cat-badge { font-size: 0.62rem; padding: 0.15rem 0.5rem; }
  .subject-intro strong:first-of-type { font-size: 0.95rem; padding: 0.5rem 0.65rem; }
  .exam-pattern-note { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  .subject-intro-wrapper { transition: none; }
}



.ad-slot {
  margin: 1.75rem auto;
  max-width: 1000px;
  width: 100%;
  box-sizing: border-box;
  padding: 0 0.25rem;
  text-align: center;
  overflow: hidden;
  min-height: 280px;
  contain: layout;
}

@media (max-width: 640px) {
  .ad-slot { min-height: 250px; }
}