/* ============================================================
   VAC EDUCATION — SHARED LESSON STYLESHEET
   Single source of truth for module rendering across the main
   portal (index.html) and every client suite (suite.html).
   Brand palette: petrol #184868 · wine #783838 · gold #b8924a
   ============================================================ */

:root {
    /* Fallbacks — templates that already define these win. */
    --petrol: #184868;
    --petrol-deep: #0f3149;
    --petrol-soft: #2a6188;
    --petrol-pale: #e7eef4;
    --wine: #783838;
    --wine-deep: #5a2828;
    --wine-soft: #9a4848;
    --wine-pale: #f4eaea;
    --gold: #b8924a;
    --gold-light: #d4b272;
    --gold-pale: #f7efde;
    --success: #2f7a52;
    --success-light: #e8f3ec;
    --gray-100: #f1f0eb;
    --gray-200: #e3e1da;
    --gray-400: #a3a299;
    --gray-600: #5b5a52;
    --gray-800: #2d2c28;
    --radius: 12px;
    --radius-sm: 8px;
}

/* ── Lesson typography ─────────────────────────────────────── */
.lesson-container { line-height: 1.65; }

h1.section-head,
h2.section-head {
    font-family: 'Playfair Display', serif;
    color: var(--petrol);
    border-bottom: 2px solid var(--wine);
    padding-bottom: 10px;
    margin: 28px 0 16px;
    font-weight: 700;
}
h1.section-head { font-size: 28px; }
h2.section-head { font-size: 23px; }

h3.sub-head, .sub-head {
    font-family: 'Source Sans 3', sans-serif;
    color: var(--petrol-deep);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.2px;
    margin: 22px 0 10px;
    padding-left: 12px;
    border-left: 3px solid var(--gold);
}

/* ── Module header banner ──────────────────────────────────── */
.module-banner {
    background: linear-gradient(125deg, var(--petrol) 0%, var(--petrol-deep) 80%);
    color: #fff;
    border-radius: var(--radius);
    padding: 22px 26px;
    margin-bottom: 25px;
}
.module-banner h1, .module-banner h2 { color: #fff; margin: 0; font-family: 'Playfair Display', serif; }
.module-banner p { margin: 6px 0 0; opacity: 0.85; }

/* ── Branded label chips (replace emojis) ──────────────────── */
.vac-chip {
    display: inline-block;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 3px;
    line-height: 1.5;
    vertical-align: middle;
    margin-right: 8px;
    white-space: nowrap;
}
.vac-chip--key      { background: var(--petrol);      color: #fff; }             /* Key Point */
.vac-chip--caution  { background: var(--wine);        color: #fff; }             /* Caution / Warning */
.vac-chip--alert    { background: var(--wine-deep);   color: #fff; }             /* Critical / Emergency */
.vac-chip--pearl    { background: var(--gold-pale);   color: #6e5524; border: 1px solid rgba(184,146,74,0.45); } /* Clinical Pearl */
.vac-chip--objective{ background: var(--petrol-pale); color: var(--petrol); border: 1px solid rgba(24,72,104,0.30); } /* Objectives */
.vac-chip--reference{ background: var(--gray-100);    color: var(--gray-600); border: 1px solid var(--gray-200); }    /* References */
.vac-chip--update   { background: var(--wine-pale);   color: var(--wine);   border: 1px solid rgba(120,56,56,0.30); } /* Clinical Update Watch */
.vac-chip--step     { background: var(--petrol-pale); color: var(--petrol); border: 1px solid rgba(24,72,104,0.30); } /* Step n */
.vac-chip--note     { background: var(--gray-100);    color: var(--gray-800); border: 1px solid var(--gray-200); }    /* Note / Remember */

/* ── Check / cross marks ───────────────────────────────────── */
.vac-check { color: var(--success); font-weight: 700; margin-right: 4px; }
.vac-cross { color: var(--wine);    font-weight: 700; margin-right: 4px; }

/* ── Callout boxes ─────────────────────────────────────────── */
.alert-yellow { background: var(--gold-pale);    border-left: 4px solid var(--gold);   border-radius: var(--radius-sm); padding: 14px 18px; margin: 16px 0; }
.alert-blue   { background: var(--petrol-pale);  border-left: 4px solid var(--petrol); border-radius: var(--radius-sm); padding: 14px 18px; margin: 16px 0; }
.alert-green  { background: var(--success-light);border-left: 4px solid var(--success);border-radius: var(--radius-sm); padding: 14px 18px; margin: 16px 0; }
.alert-red    { background: var(--wine-pale);    border-left: 4px solid var(--wine);   border-radius: var(--radius-sm); padding: 14px 18px; margin: 16px 0; }

/* ── Structural blocks used inside lessons ─────────────────── */
.step-section { margin: 26px 0; }
.subsection   { margin: 18px 0; }
.content-box  {
    background: #fff;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    margin: 12px 0;
}
.compare-box  { display: flex; gap: 16px; margin: 16px 0; flex-wrap: wrap; }
.compare-card { flex: 1; min-width: 250px; border-radius: var(--radius-sm); padding: 20px; border: 1.5px solid var(--gray-200); background: #fff; }
.anatomy-box  { background: var(--gray-100); border: 1.5px solid var(--petrol-soft); border-radius: var(--radius-sm); padding: 20px; margin: 16px 0; }

/* ── Tables inside lessons ─────────────────────────────────── */
.lesson-container table, #lesson-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
    background: #fff;
}
.lesson-container th, #lesson-content th {
    background: var(--petrol);
    color: #fff;
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
}
.lesson-container td, #lesson-content td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--gray-200);
    vertical-align: top;
}
.lesson-container tr:nth-child(even) td, #lesson-content tr:nth-child(even) td { background: #fbfaf6; }

/* ── Video embeds ──────────────────────────────────────────── */
.video-wrap {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius);
    margin: 12px 0 28px;
    box-shadow: 0 4px 14px rgba(15,49,73,0.12);
}
.video-wrap iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

/* ── Print ─────────────────────────────────────────────────── */
@media print {
    .vac-chip { border: 1px solid #000; background: none !important; color: #000 !important; }
    .video-wrap { display: none; }
}
