Please explain me full content of genital flora

Reading File
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Finding Sources
Finding Sources
Loading Image
Finding Sources
Searching the Web

genital tract normal flora male female urethra vagina microbiology 2024

I now have comprehensive information from multiple authoritative textbooks. Let me compile the full, detailed response.

Genital Flora - Full Content

What is Genital Flora?

Genital flora refers to the community of microorganisms (bacteria, fungi, and occasionally protozoa) that normally inhabit the genital and lower urogenital tracts of healthy individuals. These organisms exist in a carefully balanced, symbiotic relationship with the host - they protect against pathogens, modulate immunity, and maintain local homeostasis. Disruption of this balance leads to disease.

1. Normal Microbiota of the Urethra (Both Sexes)

The anterior urethra of both males and females harbors a small number of organisms derived from the surrounding skin and perineum.
Common organisms found:
  • Staphylococcus epidermidis and other coagulase-negative staphylococci
  • Streptococcus species (viridans group)
  • Diphtheroids (Corynebacterium species)
  • Enterococcus species
  • Mycobacterium smegmatis (a non-pathogenic mycobacterium found in the periurethral area)
  • Small numbers of coliform bacteria (E. coli, Klebsiella)
These organisms regularly appear in normal voided urine in numbers of 10² - 10⁴/mL. The posterior urethra and bladder are normally sterile.
Jawetz, Melnick & Adelberg's Medical Microbiology, 28th Ed., p. 182

2. Normal Microbiota of the Vagina

This is the most studied and most clinically significant component of genital flora. It changes dramatically across the lifespan.

Gram Smear of Normal Vaginal Flora

Vaginal Gram smear showing budding yeast (long arrow), epithelial cells (short arrow), and a mixture of bacterial morphologies including long Gram-positive rods (likely lactobacilli)
Vaginal Gram smear: Long arrows = budding yeast; short arrows = epithelial cells; long Gram-positive rods = lactobacilli. (CDC/Sherris & Ryan's Medical Microbiology, 8th Ed.)

Age-Related Changes in Vaginal Flora

Life StageVaginal pHDominant Organisms
At birth (shortly after)AcidicAerobic Lactobacillus spp. (from maternal estrogen)
Infancy to pre-pubertyNeutral (6-7)Mixed cocci and bacilli
Reproductive age (puberty onwards)Acidic (3.8-4.5)Aerobic & anaerobic Lactobacillus spp. (dominant)
Post-menopauseRising to neutralMixed flora returns; lactobacilli diminish

Why Lactobacilli Dominate During Reproductive Years

At puberty, estrogen stimulates vaginal epithelial cells to deposit glycogen. Lactobacilli metabolize glycogen to produce:
  • Lactic acid - directly lowers vaginal pH to ~3.8-4.5
  • Hydrogen peroxide (H₂O₂) - toxic to anaerobes and many pathogens
  • Bacteriocins - inhibit competing microorganisms
This acidic, H₂O₂-rich environment prevents colonization by pathogens. Lactobacilli are therefore called Doderlein's bacilli (historically) and act as the primary guardians of vaginal health.
Jawetz, Melnick & Adelberg's Medical Microbiology, 28th Ed., p. 183

Full Organism List - Normal Vaginal Flora

Gram-positive organisms:
  • Lactobacillus spp. (dominant; acidophilus, crispatus, jensenii, iners, gasseri) - aerobic and anaerobic
  • Alpha-hemolytic streptococci (Streptococcus viridans)
  • Group B Streptococcus (GBS) / Streptococcus agalactiae - present in up to 25% of women of childbearing age (critical for neonatal risk)
  • Anaerobic streptococci (Peptostreptococci / Peptoniphilus spp.)
  • Diphtheroids (Corynebacterium spp.)
  • Enterococci
  • Staphylococcus epidermidis
  • Mobiluncus spp. (curved anaerobic rods - occasionally present)
Gram-negative organisms:
  • Prevotella spp. (anaerobes)
  • Gardnerella vaginalis (fastidious, Gram-variable coccobacillus)
  • Fusobacterium spp.
  • Occasionally Escherichia coli and other coliforms
Anaerobes:
  • Clostridia (occasionally)
  • Fusobacterium spp.
  • Bacteroides spp.
Fungi:
  • Candida albicans (present in low numbers in ~20% of healthy women)
Mycoplasma / Ureaplasma:
  • Ureaplasma urealyticum - normally present in many women
  • Mycoplasma hominis - occasionally present
Occasionally:
  • Listeria monocytogenes (rare normal colonizer)
Jawetz, Melnick & Adelberg's Medical Microbiology, 28th Ed., p. 183-184

Ethnic and Individual Variation

A landmark study on 396 asymptomatic reproductive-age women found significant variation in both vaginal pH and vaginal microbiome composition across ethnic groups (white, Black, Hispanic, and Asian). This means that defining "normal" vaginal flora requires considering ethnicity as an important factor when assessing whether flora is normal or abnormal.

Protective Functions of Vaginal Flora

  1. Competitive exclusion - resident lactobacilli occupy niches, blocking pathogen attachment
  2. Acid production - lactic acid maintains pH ~3.8-4.5, hostile to most pathogens
  3. H₂O₂ production - directly kills anaerobes and many STI pathogens
  4. Bacteriocin production - antimicrobial peptides against competing species
  5. Immune modulation - stimulate innate and regulatory immunity
  6. Exclusionary effect - vaginal flora dominated by lactobacilli creates an environment hostile to enteric pathogens
Medical Microbiology 9e (Murray); Sherris & Ryan's Medical Microbiology, 8th Ed.

3. What Happens When Vaginal Flora is Disrupted

Bacterial Vaginosis (BV)

BV is the most common consequence of vaginal flora disruption. It results from:
  • Unexplained disappearance of normal lactobacilli
  • Rise in vaginal pH (becomes alkaline)
  • Overgrowth of anaerobic and facultative organisms
BV-associated organisms that replace lactobacilli:
  • Gardnerella vaginalis (most prominent)
  • Prevotella spp.
  • Atopobium vaginae (now called Fannyhessea vaginae)
  • Sneathia spp.
  • Leptotrichia spp.
  • Megasphaera spp.
  • Mobiluncus spp.
  • Various other anaerobes
Clinical features of BV:
  • Malodorous ("fishy") vaginal discharge
  • Clue cells - vaginal epithelial cells coated with bacteria (pathognomonic)
  • Elevated pH (>4.5)
  • Positive whiff test (amine odor with KOH)
Sherris & Ryan's Medical Microbiology, 8th Ed., p. 38; Jawetz, 28th Ed., p. 183

Candidal Vaginitis

If lactobacilli are suppressed by antibiotics, Candida albicans (normally a minor commensal) can overgrow and cause vaginitis with:
  • White, "cottage cheese" discharge
  • Intense itching and inflammation
  • Normal or slightly elevated pH

4. Normal Microbiota of the Placenta and Uterus

Until recently, the placenta and uterus were considered sterile environments. However, modern molecular techniques (16S rRNA sequencing) have shown:
  • Commensal, nonpathogenic bacterial species reside in placental tissue
  • A variety of microorganisms inhabit the uterus of healthy, asymptomatic women of reproductive age
  • The uterine microbiome differs significantly from the vaginal and gastrointestinal microbiomes
The exact role and composition of the uterine microbiome is still under active investigation.
Jawetz, Melnick & Adelberg's Medical Microbiology, 28th Ed., p. 184

5. Male Genital Microbiota (Male Urogenital Tract - MUGT)

The male genital microbiota is less well studied but clinically important, especially due to its interaction with female vaginal flora.

Distinct Microenvironments in Males

SiteDominant Organisms
Penile skinStaphylococcus, Corynebacterium, Streptococcus
Balanopreputial sulcus (uncircumcised)Anaerobes: Anaerococcus, Peptoniphilus, Finegoldia, Prevotella spp.
UrethraSkin-associated organisms; coagulase-negative staphylococci
SemenVariable; low diversity

Effect of Circumcision

Circumcision significantly alters the penile microbiota - uncircumcised men have a higher load of anaerobic bacteria (many of which overlap with BV-associated bacteria in women) in the balanopreputial sulcus. This has clinical implications for female partner's vaginal health.

Male-Female Microbiota Interaction

There is evidence of bidirectional sharing of microorganisms between sexual partners:
  • BV-associated bacteria (Prevotella, anaerobes) are found in the foreskin and urethra of partners of women with BV
  • Concordance of vaginal and male urethral bacterial strains supports sexual transmission of BV
  • MUGT microbiota varies with circumcision status, sexual practices, and female partner's vaginal flora composition

6. Neonatal Significance of Maternal Genital Flora

Organisms colonizing the maternal vagina at delivery can be transmitted to the newborn during passage through the birth canal:
OrganismNeonatal Disease
Group B Streptococcus (S. agalactiae)Neonatal sepsis, meningitis
Neisseria gonorrhoeaeOphthalmia neonatorum
Chlamydia trachomatisNeonatal conjunctivitis, pneumonia
Candida albicansOral thrush, skin candidiasis
Herpes simplex virusNeonatal herpes encephalitis
Listeria monocytogenesNeonatal listeriosis, sepsis
Vaginally delivered infants acquire bacterial communities that resemble their mother's vaginal flora across all body habitats (skin, gut, mouth), unlike cesarean-section-born infants who acquire skin-associated hospital microbiota instead.
Jawetz, Melnick & Adelberg's Medical Microbiology, 28th Ed., p. 184

7. Factors That Alter Genital Flora

FactorEffect
Antibiotics (broad-spectrum)Suppress lactobacilli → BV or candidiasis
Hormonal changes (pregnancy, menstrual cycle, menopause)Alter glycogen levels → alter Lactobacillus dominance
Sexual activity / new partnersIntroduce new organisms; alter balance
Vaginal douchingDisrupts normal flora → BV risk
Intrauterine devices (IUDs)Alter uterine microenvironment
SpermicidesKill some beneficial organisms
Diabetes mellitusHigh glucose promotes Candida overgrowth
ImmunosuppressionAllows opportunistic organisms to proliferate
Diet and hygieneSoap, deodorants, fiber intake affect pH and microbiome

8. Clinical Relevance - Opportunistic Infections from Genital Flora

Normal genital flora can cause disease when they reach sterile sites:
  • E. coli from vaginal introitus/perineum ascending to the bladder - UTI
  • Genital flora contaminating the amniotic cavity - chorioamnionitis
  • Gardnerella, anaerobes in BV - increased risk of pelvic inflammatory disease (PID)
  • BV is associated with increased susceptibility to HIV acquisition
  • Cervicovaginal microbiota enzymes can unmask receptors that enhance attachment of Neisseria gonorrhoeae to the cervix - a fascinating example of commensal organisms facilitating pathogen entry
Sherris & Ryan's Medical Microbiology, 8th Ed., p. 334

Summary Table: Key Organisms of Genital Flora

OrganismSiteSignificance
Lactobacillus spp.VaginaDominant normal flora; protective; produces lactic acid + H₂O₂
Group B StreptococcusVagina25% of women; neonatal sepsis/meningitis risk
Gardnerella vaginalisVagina (minor)Overgrows in BV
Prevotella spp.VaginaNormal anaerobe; key BV organism when dominant
Ureaplasma urealyticumVagina/urethraNormal commensal; can cause NGU
Candida albicansVaginaMinor commensal; causes vaginitis when flora disrupted
Coagulase-negative StaphUrethra (both sexes)Normal contaminant of voided urine
Mycobacterium smegmatisMale genitaliaNon-pathogenic; found in periurethral smegma
Anaerococcus, PrevotellaMale foreskinOverlap with BV flora; sexually transmissible

Key Takeaway: The vaginal microbiome, dominated by Lactobacillus species during reproductive years, is a finely tuned protective system. When this is disturbed - by antibiotics, hormonal changes, sexual behavior, or hygiene practices - the resulting dysbiosis leads to BV, vaginitis, increased STI susceptibility, and obstetric complications. Understanding genital flora is therefore foundational to obstetrics, gynecology, urology, and infectious disease.
Sources: Jawetz, Melnick & Adelberg's Medical Microbiology, 28th Ed.; Sherris & Ryan's Medical Microbiology, 8th Ed.; Medical Microbiology 9e (Murray)

Can u make it as a ppt presentation for seminar

Reading File
Reading File
Reading File
Running Command

ls /home/daytona/workspace/ 2>/dev/null || echo "workspace empty or not found"

Running Command

mkdir -p /home/daytona/workspace/genital-flora-ppt && echo "done"

Writing File

~/genital-flora-ppt/create_ppt.js

const pptxgen = require("pptxgenjs");

const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Genital Flora - A Comprehensive Seminar";
pres.author = "Medical Microbiology Seminar";

// ─── COLOR PALETTE ───────────────────────────────────────────────────────────
const C = {
  navy:      "0D2B4E",   // dominant dark bg
  teal:      "1A7A8A",   // accent heading blocks
  tealLight: "2EABB C",  // lighter teal (unused placeholder)
  mint:      "D6F0EE",   // soft bg for content cards
  white:     "FFFFFF",
  offWhite:  "F4F9FA",
  gold:      "E8A020",   // accent highlights
  lightGold: "FFF3DC",
  coral:     "E05050",   // danger/warning accent
  gray:      "546E7A",
  lightGray: "ECF2F4",
  textDark:  "1C2B36",
  textMid:   "3D5565",
};

// ─── HELPERS ─────────────────────────────────────────────────────────────────

function darkSlide(slide) {
  slide.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 0, w: 10, h: 5.625,
    fill: { color: C.navy }, line: { color: C.navy }
  });
}

function addHeaderBar(slide, color) {
  slide.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 0, w: 10, h: 0.9,
    fill: { color: color || C.teal }, line: { color: color || C.teal }
  });
}

function addFooter(slide, text) {
  slide.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 5.3, w: 10, h: 0.325,
    fill: { color: C.navy }, line: { color: C.navy }
  });
  slide.addText(text || "Genital Flora | Medical Microbiology Seminar", {
    x: 0, y: 5.3, w: 10, h: 0.325,
    fontSize: 8, color: "AABBCC", align: "center", valign: "middle"
  });
}

function slideTitle(slide, title, subtitle) {
  slide.addText(title, {
    x: 0.3, y: 0.05, w: 9.4, h: 0.8,
    fontSize: 20, bold: true, color: C.white,
    valign: "middle", margin: 4
  });
  if (subtitle) {
    slide.addText(subtitle, {
      x: 0.3, y: 0.85, w: 9.4, h: 0.35,
      fontSize: 11, color: C.mint, italic: true, valign: "top", margin: 0
    });
  }
}

function card(slide, x, y, w, h, color) {
  slide.addShape(pres.shapes.ROUNDED_RECTANGLE, {
    x, y, w, h,
    fill: { color: color || C.white },
    line: { color: "D0E8ED", width: 0.5 },
    shadow: { type: "outer", color: "000000", blur: 5, offset: 2, angle: 135, opacity: 0.1 },
    rectRadius: 0.08
  });
}

function accentLine(slide, x, y, w, color) {
  slide.addShape(pres.shapes.RECTANGLE, {
    x, y, w, h: 0.04,
    fill: { color: color || C.gold }, line: { color: color || C.gold }
  });
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 1 - TITLE SLIDE
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  darkSlide(s);

  // Decorative teal block left
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 0, w: 0.18, h: 5.625,
    fill: { color: C.teal }, line: { color: C.teal }
  });
  // Decorative teal block right small
  s.addShape(pres.shapes.RECTANGLE, {
    x: 9.82, y: 0, w: 0.18, h: 5.625,
    fill: { color: C.gold }, line: { color: C.gold }
  });

  // Top badge
  s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
    x: 3.2, y: 0.4, w: 3.6, h: 0.4,
    fill: { color: C.teal }, line: { color: C.teal }, rectRadius: 0.12
  });
  s.addText("MEDICAL MICROBIOLOGY SEMINAR", {
    x: 3.2, y: 0.4, w: 3.6, h: 0.4,
    fontSize: 8, bold: true, color: C.white, align: "center", valign: "middle", charSpacing: 1.5
  });

  // Main title
  s.addText("GENITAL FLORA", {
    x: 0.5, y: 1.1, w: 9, h: 1.3,
    fontSize: 52, bold: true, color: C.white, align: "center", valign: "middle",
    fontFace: "Calibri"
  });

  // Gold accent under title
  s.addShape(pres.shapes.RECTANGLE, {
    x: 2.5, y: 2.45, w: 5, h: 0.07,
    fill: { color: C.gold }, line: { color: C.gold }
  });

  // Subtitle
  s.addText("Normal Microbiota of the Urogenital Tract", {
    x: 1, y: 2.6, w: 8, h: 0.5,
    fontSize: 18, color: "A0C8D0", align: "center", italic: true
  });

  // Info row
  s.addText("Composition  •  Functions  •  Lifecycle  •  Clinical Significance  •  Dysbiosis", {
    x: 1, y: 3.2, w: 8, h: 0.4,
    fontSize: 11, color: "607D8B", align: "center"
  });

  // Bottom source note
  s.addText("Sources: Jawetz Medical Microbiology 28e  |  Sherris & Ryan 8e  |  Murray Medical Microbiology 9e", {
    x: 1, y: 5.1, w: 8, h: 0.3,
    fontSize: 8, color: "455A64", align: "center"
  });
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 2 - OVERVIEW / CONTENTS
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:5.625, fill:{color:C.offWhite}, line:{color:C.offWhite} });
  addHeaderBar(s, C.navy);
  slideTitle(s, "📋  Seminar Outline");
  addFooter(s);

  const topics = [
    ["01", "What is Genital Flora?", "Definition, scope and symbiotic relationship"],
    ["02", "Urethral Flora (Both Sexes)", "Organisms, density and significance"],
    ["03", "Vaginal Flora – Age-Lifecycle", "Changes from birth to menopause"],
    ["04", "Vaginal Flora – Organisms", "Complete organism list & roles"],
    ["05", "Protective Mechanisms", "How Lactobacillus protects the host"],
    ["06", "Male Genital Microbiota", "Penis, urethra, semen, foreskin"],
    ["07", "Bacterial Vaginosis (BV)", "Dysbiosis, clue cells, organisms"],
    ["08", "Placenta & Uterine Flora", "Sterile myth debunked"],
    ["09", "Neonatal Significance", "Transmission at birth & risks"],
    ["10", "Factors Altering Genital Flora", "Antibiotics, hormones, lifestyle"],
    ["11", "Clinical Relevance", "Opportunistic infections & STIs"],
    ["12", "Summary & Key Takeaways", ""],
  ];

  const cols = 2;
  const perCol = Math.ceil(topics.length / cols);
  topics.forEach(([num, title, sub], i) => {
    const col = Math.floor(i / perCol);
    const row = i % perCol;
    const x = 0.35 + col * 4.85;
    const y = 1.1 + row * 0.72;

    s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
      x, y, w: 4.6, h: 0.62,
      fill: { color: C.white },
      line: { color: "D5E8ED", width: 0.5 },
      rectRadius: 0.06,
      shadow: { type: "outer", color: "000000", blur: 3, offset: 1, angle: 135, opacity: 0.08 }
    });
    // Number badge
    s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
      x: x + 0.06, y: y + 0.1, w: 0.36, h: 0.36,
      fill: { color: C.teal }, line: { color: C.teal }, rectRadius: 0.06
    });
    s.addText(num, { x: x+0.06, y: y+0.1, w: 0.36, h: 0.36, fontSize: 9, bold: true, color: C.white, align:"center", valign:"middle" });
    s.addText(title, { x: x+0.5, y: y+0.06, w: 4.0, h: 0.28, fontSize: 10, bold: true, color: C.textDark, valign:"middle", margin:0 });
    if (sub) {
      s.addText(sub, { x: x+0.5, y: y+0.33, w: 4.0, h: 0.22, fontSize: 8, color: C.gray, valign:"middle", margin:0 });
    }
  });
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 3 - WHAT IS GENITAL FLORA?
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:5.625, fill:{color:C.offWhite}, line:{color:C.offWhite} });
  addHeaderBar(s, C.teal);
  slideTitle(s, "What is Genital Flora?", "Slide 01");
  addFooter(s);

  // Definition card
  card(s, 0.3, 1.05, 9.4, 1.1, C.white);
  s.addText([
    { text: "Definition: ", options: { bold: true, color: C.teal } },
    { text: "Genital flora refers to the community of microorganisms (bacteria, fungi, occasionally protozoa) that normally inhabit the genital and lower urogenital tracts of healthy individuals. These organisms exist in a balanced, symbiotic relationship with the host.", options: { color: C.textDark } }
  ], { x: 0.55, y: 1.1, w: 8.9, h: 1.0, fontSize: 11.5, valign: "middle", margin: 6 });

  // Three concept boxes
  const concepts = [
    { icon: "🏠", head: "HOST PROVIDES", items: ["Place to colonize", "Nutrients & warmth", "Protection via innate immunity"] },
    { icon: "🦠", head: "MICROBES PROVIDE", items: ["Metabolic functions", "Immune stimulation", "Pathogen exclusion"] },
    { icon: "⚖️", head: "KEY PRINCIPLE", items: ["Symbiotic balance", "Core vs secondary microbiota", "Disruption → Disease"] },
  ];
  concepts.forEach((c, i) => {
    const x = 0.3 + i * 3.15;
    card(s, x, 2.3, 3.0, 2.75, C.white);
    s.addShape(pres.shapes.RECTANGLE, {
      x, y: 2.3, w: 3.0, h: 0.5,
      fill: { color: C.navy }, line: { color: C.navy }
    });
    s.addText(c.icon + " " + c.head, {
      x, y: 2.3, w: 3.0, h: 0.5,
      fontSize: 10, bold: true, color: C.white, align: "center", valign: "middle"
    });
    s.addText(c.items.map(t => "• " + t).join("\n"), {
      x: x + 0.15, y: 2.87, w: 2.7, h: 2.0,
      fontSize: 10.5, color: C.textDark, valign: "top", lineSpacingMultiple: 1.3
    });
  });
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 4 - URETHRAL FLORA
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:5.625, fill:{color:C.offWhite}, line:{color:C.offWhite} });
  addHeaderBar(s, C.teal);
  slideTitle(s, "Normal Microbiota of the Urethra", "Slide 02  |  Both Sexes");
  addFooter(s);

  // Key fact banner
  card(s, 0.3, 1.05, 9.4, 0.7, C.lightGold);
  s.addShape(pres.shapes.RECTANGLE, { x:0.3, y:1.05, w:0.08, h:0.7, fill:{color:C.gold}, line:{color:C.gold} });
  s.addText("Key Fact: The anterior urethra of both sexes contains small numbers of organisms derived from surrounding skin and perineum. Normal voided urine contains 10² – 10⁴ organisms/mL.", {
    x: 0.55, y: 1.05, w: 9.0, h: 0.7, fontSize: 11, color: C.textDark, valign: "middle"
  });

  // Organisms list
  const orgs = [
    ["Staphylococcus epidermidis", "Coagulase-negative; most common"],
    ["Diphtheroids (Corynebacterium spp.)", "Gram-positive rods; skin origin"],
    ["Streptococcus viridans group", "Alpha-hemolytic streptococci"],
    ["Enterococcus spp.", "Facultative anaerobes from perineum"],
    ["Mycobacterium smegmatis", "Non-pathogenic; periurethral smegma"],
    ["Coliforms (E. coli, Klebsiella)", "In small numbers; perineal origin"],
  ];

  card(s, 0.3, 1.9, 9.4, 3.1, C.white);
  s.addText("Organisms Found in the Anterior Urethra", {
    x: 0.5, y: 1.98, w: 9.0, h: 0.35,
    fontSize: 12, bold: true, color: C.navy
  });

  orgs.forEach(([name, desc], i) => {
    const col = Math.floor(i / 3);
    const row = i % 3;
    const x = 0.5 + col * 4.7;
    const y = 2.42 + row * 0.72;
    s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
      x, y, w: 4.5, h: 0.6, fill:{color:C.lightGray}, line:{color:"D0DDE5", width:0.5}, rectRadius:0.05
    });
    s.addShape(pres.shapes.RECTANGLE, { x, y, w:0.07, h:0.6, fill:{color:C.teal}, line:{color:C.teal} });
    s.addText(name, { x:x+0.15, y:y+0.04, w:4.3, h:0.28, fontSize:10.5, bold:true, color:C.textDark, margin:0 });
    s.addText(desc,  { x:x+0.15, y:y+0.32, w:4.3, h:0.22, fontSize:9,    color:C.gray,    margin:0 });
  });

  s.addText("⚠  The posterior urethra and urinary bladder are normally STERILE", {
    x: 0.5, y: 4.95, w: 9.0, h: 0.25,
    fontSize: 9.5, bold: true, color: C.coral, align: "center"
  });
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 5 - VAGINAL FLORA LIFECYCLE
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:5.625, fill:{color:C.offWhite}, line:{color:C.offWhite} });
  addHeaderBar(s, C.teal);
  slideTitle(s, "Vaginal Flora – Changes Across Lifecycle", "Slide 03");
  addFooter(s);

  const stages = [
    { phase: "AT BIRTH", pH: "Acidic", flora: "Aerobic Lactobacillus spp.", reason: "Maternal estrogen effect (transient)", col: C.teal },
    { phase: "INFANCY →\nPRE-PUBERTY", pH: "Neutral 6–7", flora: "Mixed cocci & bacilli", reason: "No estrogen; low glycogen", col: "6B8E9F" },
    { phase: "PUBERTY &\nREPRODUCTIVE AGE", pH: "Acidic 3.8–4.5", flora: "Lactobacillus dominant", reason: "Estrogen ↑ glycogen → lactic acid + H₂O₂", col: C.navy },
    { phase: "POST-\nMENOPAUSE", pH: "Rising → Neutral", flora: "Mixed flora returns", reason: "Estrogen ↓ → glycogen ↓ → lactobacilli ↓", col: "8D6E63" },
  ];

  // Arrow bar
  s.addShape(pres.shapes.RECTANGLE, { x:0.3, y:2.22, w:9.4, h:0.08, fill:{color:"C5D5DA"}, line:{color:"C5D5DA"} });

  stages.forEach((st, i) => {
    const x = 0.3 + i * 2.35;
    // connector dot
    s.addShape(pres.shapes.OVAL, { x: x+0.9, y: 2.17, w:0.18, h:0.18, fill:{color:st.col}, line:{color:st.col} });

    // upper box (phase)
    s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
      x, y:1.0, w:2.2, h:1.1,
      fill:{color:st.col}, line:{color:st.col}, rectRadius:0.08
    });
    s.addText(st.phase, { x, y:1.0, w:2.2, h:1.1, fontSize:11, bold:true, color:C.white, align:"center", valign:"middle" });

    // lower card
    card(s, x, 2.45, 2.2, 2.8, C.white);
    s.addText("pH: " + st.pH, { x:x+0.1, y:2.52, w:2.0, h:0.3, fontSize:10, bold:true, color:C.teal, margin:0 });
    accentLine(s, x+0.1, 2.83, 1.8, C.gold);
    s.addText(st.flora, { x:x+0.1, y:2.9, w:2.0, h:0.6, fontSize:9.5, bold:true, color:C.textDark, lineSpacingMultiple:1.2 });
    s.addText(st.reason, { x:x+0.1, y:3.55, w:2.0, h:1.5, fontSize:8.5, color:C.gray, lineSpacingMultiple:1.2, valign:"top" });
  });
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 6 - VAGINAL FLORA ORGANISMS (Full List)
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:5.625, fill:{color:C.offWhite}, line:{color:C.offWhite} });
  addHeaderBar(s, C.teal);
  slideTitle(s, "Normal Vaginal Flora – Complete Organism List", "Slide 04  |  Reproductive-Age Women");
  addFooter(s);

  const groups = [
    {
      label: "GRAM-POSITIVE", color: C.teal,
      items: ["Lactobacillus spp. (dominant – crispatus, iners, jensenii)", "Group B Streptococcus – 25% of women ⚠", "Alpha-hemolytic Streptococci (viridans)", "Peptostreptococcus / Peptoniphilus spp.", "Corynebacterium spp. (Diphtheroids)", "Staphylococcus epidermidis", "Mobiluncus spp. (curved anaerobic rods)"]
    },
    {
      label: "GRAM-NEGATIVE / ANAEROBES", color: C.navy,
      items: ["Prevotella spp.", "Gardnerella vaginalis (Gram-variable)", "Fusobacterium spp.", "Bacteroides spp.", "Clostridium spp. (occasionally)", "E. coli (in small numbers near introitus)"]
    },
    {
      label: "FUNGI / MYCOPLASMA", color: "7B5EA7",
      items: ["Candida albicans (~20% healthy women)", "Ureaplasma urealyticum", "Mycoplasma hominis", "Listeria monocytogenes (rare)"]
    },
  ];

  groups.forEach((g, i) => {
    const x = 0.22 + i * 3.27;
    card(s, x, 1.05, 3.1, 4.3, C.white);
    s.addShape(pres.shapes.RECTANGLE, {
      x, y:1.05, w:3.1, h:0.45,
      fill:{color:g.color}, line:{color:g.color}
    });
    s.addText(g.label, { x, y:1.05, w:3.1, h:0.45, fontSize:9.5, bold:true, color:C.white, align:"center", valign:"middle", charSpacing:1 });
    s.addText(g.items.map(t => "• " + t).join("\n"), {
      x: x+0.12, y:1.58, w:2.86, h:3.6,
      fontSize: 9.2, color: C.textDark, valign:"top", lineSpacingMultiple:1.4
    });
  });

  s.addText("⚠ Group B Streptococcus present in 25% of childbearing-age women — major neonatal risk factor", {
    x: 0.3, y: 5.28, w: 9.4, h: 0.22,
    fontSize: 8.5, color: C.coral, align: "center", bold: true
  });
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 7 - PROTECTIVE MECHANISMS OF LACTOBACILLUS
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  darkSlide(s);
  addFooter(s, "Genital Flora | Slide 05 – Protective Mechanisms");

  // Header
  s.addShape(pres.shapes.RECTANGLE, {x:0, y:0, w:10, h:0.9, fill:{color:C.teal}, line:{color:C.teal}});
  s.addText("Protective Mechanisms of Lactobacillus (Döderlein's Bacilli)", {
    x:0.3, y:0.05, w:9.4, h:0.8, fontSize:18, bold:true, color:C.white, valign:"middle"
  });

  // Central concept
  s.addShape(pres.shapes.OVAL, {
    x:3.8, y:1.9, w:2.4, h:1.5,
    fill:{color:C.teal}, line:{color:C.gold, width:2}
  });
  s.addText("Lactobacillus\nDominance\n(Core Flora)", {
    x:3.8, y:1.9, w:2.4, h:1.5,
    fontSize:11, bold:true, color:C.white, align:"center", valign:"middle"
  });

  const mechanisms = [
    { x:0.2,  y:1.1,  label:"🧪 Lactic Acid Production", body:"Metabolizes glycogen → lactic acid\nMaintains pH 3.8–4.5" },
    { x:7.1,  y:1.1,  label:"⚗️ H₂O₂ Production", body:"Hydrogen peroxide kills\nanaerobes & pathogens" },
    { x:0.2,  y:3.1,  label:"🛡️ Bacteriocins", body:"Antimicrobial peptides\ninhibit competing organisms" },
    { x:7.1,  y:3.1,  label:"🔒 Competitive Exclusion", body:"Occupy attachment sites\nBlock pathogen colonization" },
    { x:3.6,  y:4.55, label:"🧬 Immune Modulation", body:"Stimulate innate & regulatory immunity; reduce inflammatory response" },
  ];

  mechanisms.forEach((m) => {
    card(s, m.x, m.y, 2.7, 1.1, "0D3D54");
    s.addText(m.label, { x:m.x+0.12, y:m.y+0.05, w:2.46, h:0.38, fontSize:10, bold:true, color:C.gold, margin:0 });
    s.addText(m.body,  { x:m.x+0.12, y:m.y+0.42, w:2.46, h:0.6,  fontSize:9,  color:"C8E0E8", lineSpacingMultiple:1.2, margin:0 });
  });

  // Connecting lines (decorative)
  s.addShape(pres.shapes.RECTANGLE, { x:2.9, y:1.65, w:0.9, h:0.04, fill:{color:C.gold}, line:{color:C.gold} });
  s.addShape(pres.shapes.RECTANGLE, { x:6.2, y:1.65, w:0.9, h:0.04, fill:{color:C.gold}, line:{color:C.gold} });
  s.addShape(pres.shapes.RECTANGLE, { x:2.9, y:3.65, w:0.9, h:0.04, fill:{color:C.gold}, line:{color:C.gold} });
  s.addShape(pres.shapes.RECTANGLE, { x:6.2, y:3.65, w:0.9, h:0.04, fill:{color:C.gold}, line:{color:C.gold} });
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 8 - MALE GENITAL MICROBIOTA
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:5.625, fill:{color:C.offWhite}, line:{color:C.offWhite} });
  addHeaderBar(s, C.navy);
  slideTitle(s, "Male Genital Microbiota (MUGT)", "Slide 06  |  Male Urogenital Tract");
  addFooter(s);

  const sites = [
    { site:"Penile Skin", color:C.teal, orgs:["Staphylococcus spp.", "Corynebacterium spp.", "Streptococcus spp."] },
    { site:"Foreskin / Balanopreputial Sulcus\n(Uncircumcised)", color:"8D5524", orgs:["Anaerococcus spp.", "Peptoniphilus spp.", "Finegoldia spp.", "Prevotella spp. ⚠ BV-overlap"] },
    { site:"Urethra", color:C.navy, orgs:["Coagulase-negative Staph", "Diphtheroids", "Occasional coliforms"] },
    { site:"Semen", color:"546E7A", orgs:["Low diversity", "Variable composition", "Lactobacillus (variable)"] },
  ];

  sites.forEach((site, i) => {
    const col = i % 2;
    const row = Math.floor(i / 2);
    const x = 0.3 + col * 4.85;
    const y = 1.05 + row * 2.15;
    card(s, x, y, 4.6, 1.95, C.white);
    s.addShape(pres.shapes.RECTANGLE, { x, y, w:4.6, h:0.42, fill:{color:site.color}, line:{color:site.color} });
    s.addText(site.site, { x, y, w:4.6, h:0.42, fontSize:10.5, bold:true, color:C.white, align:"center", valign:"middle" });
    s.addText(site.orgs.map(o => "• " + o).join("\n"), {
      x:x+0.15, y:y+0.5, w:4.3, h:1.3,
      fontSize:9.5, color:C.textDark, valign:"top", lineSpacingMultiple:1.3
    });
  });

  // Key point box
  s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
    x:0.3, y:5.18, w:9.4, h:0.22,
    fill:{color:"FFF0F0"}, line:{color:C.coral, width:0.5}, rectRadius:0.04
  });
  s.addText("⚠  Uncircumcised men harbor BV-associated anaerobes (Prevotella, Anaerococcus) — supporting sexual transmission of BV to female partners", {
    x:0.4, y:5.18, w:9.2, h:0.22,
    fontSize:8.5, color:C.coral, align:"center", valign:"middle"
  });
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 9 - BACTERIAL VAGINOSIS
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  darkSlide(s);
  s.addShape(pres.shapes.RECTANGLE, {x:0, y:0, w:10, h:0.9, fill:{color:C.coral}, line:{color:C.coral}});
  s.addText("Bacterial Vaginosis (BV) – Vaginal Flora Dysbiosis", {
    x:0.3, y:0.05, w:9.4, h:0.8, fontSize:18, bold:true, color:C.white, valign:"middle"
  });
  s.addText("Slide 07", { x:0.3, y:0.72, w:9, h:0.22, fontSize:9, color:"FFCCCC", italic:true });
  addFooter(s, "Genital Flora | Slide 07 – Bacterial Vaginosis");

  // Left: what happens
  card(s, 0.2, 1.0, 4.5, 4.1, "0D2B3E");
  s.addText("PATHOPHYSIOLOGY", { x:0.35, y:1.05, w:4.2, h:0.35, fontSize:11, bold:true, color:C.gold, charSpacing:1 });
  accentLine(s, 0.35, 1.42, 3.5, C.coral);
  s.addText([
    { text: "1. Unexplained disappearance of Lactobacillus\n", options:{ bold:true } },
    { text: "2. Vaginal pH rises above 4.5\n" },
    { text: "3. Anaerobes & facultative organisms overgrow\n" },
    { text: "4. Amine (fishy) odor produced\n" },
    { text: "5. Clue cells form — hallmark finding" },
  ], { x:0.35, y:1.5, w:4.2, h:2.1, fontSize:10, color:C.white, valign:"top", lineSpacingMultiple:1.5 });
  s.addText("BV Organisms:", { x:0.35, y:3.65, w:4.2, h:0.3, fontSize:10, bold:true, color:C.gold });
  s.addText("Gardnerella vaginalis • Prevotella spp. • Mobiluncus • Atopobium vaginae • Sneathia spp. • Leptotrichia • Megasphaera spp.", {
    x:0.35, y:3.95, w:4.1, h:0.95, fontSize:9.5, color:"C8D8E0", lineSpacingMultiple:1.3
  });

  // Right: Clinical features + Amsel criteria
  card(s, 4.85, 1.0, 4.9, 4.1, "0D2B3E");
  s.addText("CLINICAL FEATURES (Amsel Criteria)", { x:5.0, y:1.05, w:4.6, h:0.35, fontSize:11, bold:true, color:C.gold, charSpacing:1 });
  accentLine(s, 5.0, 1.42, 3.5, C.coral);
  const amsel = [
    ["1", "Homogeneous, thin grey-white discharge"],
    ["2", "Vaginal pH > 4.5"],
    ["3", "Positive Whiff test (fishy odor with 10% KOH)"],
    ["4", "Clue cells on wet mount (≥20% epithelial cells)"],
  ];
  amsel.forEach(([n, text], i) => {
    s.addShape(pres.shapes.OVAL, { x:5.0, y:1.58+i*0.55, w:0.28, h:0.28, fill:{color:C.coral}, line:{color:C.coral} });
    s.addText(n, { x:5.0, y:1.58+i*0.55, w:0.28, h:0.28, fontSize:9, bold:true, color:C.white, align:"center", valign:"middle" });
    s.addText(text, { x:5.35, y:1.6+i*0.55, w:4.3, h:0.25, fontSize:10, color:C.white, margin:0 });
  });
  s.addText("⚡  Diagnosis: ≥ 3 of 4 Amsel criteria", {
    x:5.0, y:3.82, w:4.6, h:0.3, fontSize:10, bold:true, color:C.gold
  });
  s.addText("Complications: PID risk ↑ • HIV susceptibility ↑ • Preterm birth risk ↑ • STI acquisition ↑", {
    x:5.0, y:4.15, w:4.6, h:0.75, fontSize:9.5, color:"FFAAAA", lineSpacingMultiple:1.4
  });
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 10 - PLACENTA & UTERINE FLORA
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:5.625, fill:{color:C.offWhite}, line:{color:C.offWhite} });
  addHeaderBar(s, C.teal);
  slideTitle(s, "Placenta & Uterine Microbiome", "Slide 08  |  Sterile Myth Debunked");
  addFooter(s);

  // Myth vs Reality
  s.addShape(pres.shapes.RECTANGLE, { x:0.3, y:1.05, w:4.55, h:3.8, fill:{color:"FFF0F0"}, line:{color:C.coral, width:1} });
  s.addShape(pres.shapes.RECTANGLE, { x:5.15, y:1.05, w:4.55, h:3.8, fill:{color:"EAF7F0"}, line:{color:"2E9E6A", width:1} });

  s.addText("❌  OLD BELIEF", { x:0.5, y:1.12, w:4.1, h:0.4, fontSize:13, bold:true, color:C.coral });
  s.addText("The placenta and uterus were considered STERILE environments. Any microorganism found was considered pathological contamination.", {
    x:0.5, y:1.6, w:4.1, h:1.3, fontSize:10.5, color:C.textDark, lineSpacingMultiple:1.4
  });

  s.addText("✅  CURRENT EVIDENCE", { x:5.35, y:1.12, w:4.1, h:0.4, fontSize:13, bold:true, color:"2E9E6A" });
  s.addText("Molecular (16S rRNA) sequencing revealed commensal, non-pathogenic bacteria in placental tissue and uterus of healthy, asymptomatic women.", {
    x:5.35, y:1.6, w:4.1, h:1.3, fontSize:10.5, color:C.textDark, lineSpacingMultiple:1.4
  });

  // Facts
  const facts = [
    { icon:"🔬", text:"Uterine microbiome differs significantly from vaginal and GI microbiomes" },
    { icon:"🧬", text:"Identified by 16S rRNA sequencing — organisms are unculturable by standard methods" },
    { icon:"❓", text:"Exact role and clinical significance is still under active investigation" },
    { icon:"⚠️",  text:"Disruption of uterine microbiome may affect implantation, pregnancy outcome" },
  ];
  facts.forEach((f, i) => {
    const y = 3.1 + i * 0.6;
    s.addShape(pres.shapes.RECTANGLE, { x:0.3, y, w:9.4, h:0.5, fill:{color: i%2===0 ? C.white : C.lightGray}, line:{color:"D5E0E8", width:0.3} });
    s.addText(f.icon, { x:0.4, y, w:0.5, h:0.5, fontSize:14, align:"center", valign:"middle" });
    s.addText(f.text, { x:1.0, y, w:8.5, h:0.5, fontSize:10.5, color:C.textDark, valign:"middle" });
  });
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 11 - NEONATAL SIGNIFICANCE
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:5.625, fill:{color:C.offWhite}, line:{color:C.offWhite} });
  addHeaderBar(s, C.navy);
  slideTitle(s, "Neonatal Significance of Maternal Genital Flora", "Slide 09");
  addFooter(s);

  s.addText("Organisms colonizing the maternal vagina at delivery can be transmitted to the newborn during birth", {
    x:0.3, y:1.0, w:9.4, h:0.4, fontSize:11, color:C.gray, italic:true
  });

  const rows = [
    ["Organism", "Transmission Route", "Neonatal Disease", "header"],
    ["Group B Streptococcus\n(S. agalactiae)", "Vaginal colonization", "Neonatal SEPSIS & MENINGITIS\n(~25% of mothers colonized)", "high"],
    ["Neisseria gonorrhoeae", "Contact during delivery", "Ophthalmia neonatorum\n(gonococcal eye infection)", "high"],
    ["Chlamydia trachomatis", "Birth canal exposure", "Neonatal conjunctivitis\nChlamydial pneumonia", "med"],
    ["Candida albicans", "Birth canal", "Oral thrush\nNeonatal skin candidiasis", "low"],
    ["Herpes simplex virus", "Primary HSV lesions", "Neonatal herpes encephalitis\n(high mortality)", "high"],
    ["Listeria monocytogenes", "Rare vaginal colonizer", "Neonatal listeriosis\nEarly-onset sepsis", "med"],
  ];

  const colW = [2.5, 2.3, 3.7, 0.9];
  const colX = [0.3, 2.8, 5.1, 8.8];
  const rowH = 0.62;

  rows.forEach((row, ri) => {
    const y = 1.45 + ri * rowH;
    const bgColor = row[3]==="header" ? C.navy : row[3]==="high" ? "FFF0F0" : row[3]==="med" ? "FFF8E8" : C.white;
    const txtColor = row[3]==="header" ? C.white : C.textDark;
    s.addShape(pres.shapes.RECTANGLE, { x:0.3, y, w:9.4, h:rowH, fill:{color:bgColor}, line:{color:"D5E0E8", width:0.5} });
    row.slice(0,3).forEach((cell, ci) => {
      s.addText(cell, {
        x:colX[ci]+0.08, y:y+0.04, w:colW[ci]-0.12, h:rowH-0.08,
        fontSize: ri===0 ? 10 : 9.5,
        bold: ri===0,
        color: row[3]==="high" && ci===2 ? C.coral : ri===0 ? C.white : txtColor,
        valign:"middle"
      });
    });
    if (row[3]==="high") {
      s.addText("⚠", { x:colX[3], y, w:0.7, h:rowH, fontSize:14, align:"center", valign:"middle" });
    }
  });
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 12 - FACTORS ALTERING GENITAL FLORA
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:5.625, fill:{color:C.offWhite}, line:{color:C.offWhite} });
  addHeaderBar(s, C.teal);
  slideTitle(s, "Factors That Alter Genital Flora", "Slide 10");
  addFooter(s);

  const factors = [
    { icon:"💊", label:"Antibiotics", effect:"Suppress Lactobacillus\n→ BV or Candida vaginitis" },
    { icon:"🌡️", label:"Hormonal Changes", effect:"Pregnancy / menopause\nalter glycogen & pH" },
    { icon:"💑",  label:"Sexual Activity", effect:"New organisms introduced;\nBV sexually transmissible" },
    { icon:"🚿", label:"Vaginal Douching", effect:"Disrupts normal flora\nMajor BV risk factor" },
    { icon:"🩺", label:"IUDs / Devices", effect:"Alter uterine microenvironment" },
    { icon:"🧪", label:"Spermicides", effect:"Kill beneficial organisms\nalong with pathogens" },
    { icon:"🍬", label:"Diabetes Mellitus", effect:"High glucose → Candida\novergrowth" },
    { icon:"🛡️", label:"Immunosuppression", effect:"Opportunistic organisms\nproliferate" },
    { icon:"🥗", label:"Diet & Hygiene", effect:"Fiber, soap, deodorants\nalter pH and microbiome" },
  ];

  const perRow = 3;
  factors.forEach((f, i) => {
    const col = i % perRow;
    const row = Math.floor(i / perRow);
    const x = 0.28 + col * 3.22;
    const y = 1.1 + row * 1.48;
    card(s, x, y, 3.05, 1.32, C.white);
    s.addShape(pres.shapes.RECTANGLE, { x, y, w:3.05, h:0.08, fill:{color:C.gold}, line:{color:C.gold} });
    s.addText(f.icon + "  " + f.label, { x:x+0.1, y:y+0.14, w:2.85, h:0.35, fontSize:11, bold:true, color:C.navy, margin:0 });
    s.addText(f.effect, { x:x+0.1, y:y+0.5, w:2.85, h:0.72, fontSize:9.5, color:C.gray, lineSpacingMultiple:1.25, valign:"top" });
  });
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 13 - CLINICAL RELEVANCE
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  darkSlide(s);
  s.addShape(pres.shapes.RECTANGLE, {x:0, y:0, w:10, h:0.9, fill:{color:"1A6B3C"}, line:{color:"1A6B3C"}});
  s.addText("Clinical Relevance – Opportunistic Infections & STI Interactions", {
    x:0.3, y:0.05, w:9.4, h:0.8, fontSize:17, bold:true, color:C.white, valign:"middle"
  });
  addFooter(s, "Genital Flora | Slide 11 – Clinical Relevance");

  const clinPoints = [
    { icon:"🦠", head:"Urinary Tract Infection (UTI)", body:"E. coli from vaginal introitus/perineum ascends to bladder. Heavy introital flora resembling perineal flora is a predisposing factor for recurrent UTIs." },
    { icon:"🤱", head:"Chorioamnionitis", body:"Ascending genital flora through cervix contaminates amniotic cavity → intrauterine infection, preterm birth, fetal damage, postpartum endometritis." },
    { icon:"🔬", head:"Pelvic Inflammatory Disease (PID)", body:"BV organisms (Gardnerella, anaerobes) ascend from vagina to upper genital tract → salpingitis, infertility, ectopic pregnancy risk." },
    { icon:"🔴", head:"HIV Acquisition", body:"BV (disrupted vaginal flora) significantly increases susceptibility to HIV acquisition. Lactobacillus-dominant flora provides protection against HIV." },
    { icon:"🧫", head:"Gonorrhoea Enhancement", body:"Cervicovaginal microbiota enzymes unmask receptors on cervical cells that enhance attachment of Neisseria gonorrhoeae — microbiota can facilitate STI pathogenesis." },
    { icon:"💉", head:"Surgical Site Infections", body:"Post-hysterectomy, post-cesarean infections often due to vaginal flora organisms (anaerobes, GBS, Prevotella) entering surgical sites." },
  ];

  clinPoints.forEach((p, i) => {
    const col = i % 2;
    const row = Math.floor(i / 2);
    const x = 0.2 + col * 4.9;
    const y = 1.05 + row * 1.5;
    card(s, x, y, 4.65, 1.35, "0D3045");
    s.addShape(pres.shapes.RECTANGLE, { x, y, w:0.07, h:1.35, fill:{color:"2E9E6A"}, line:{color:"2E9E6A"} });
    s.addText(p.icon + " " + p.head, { x:x+0.18, y:y+0.08, w:4.3, h:0.35, fontSize:11, bold:true, color:C.gold, margin:0 });
    s.addText(p.body, { x:x+0.18, y:y+0.45, w:4.3, h:0.82, fontSize:9, color:"C0D8E0", lineSpacingMultiple:1.3, valign:"top" });
  });
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 14 - SUMMARY TABLE
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:5.625, fill:{color:C.offWhite}, line:{color:C.offWhite} });
  addHeaderBar(s, C.navy);
  slideTitle(s, "Quick Reference Summary Table", "Slide 12");
  addFooter(s);

  const tableData = [
    ["Organism", "Site", "Role / Significance"],
    ["Lactobacillus spp.", "Vagina (dominant)", "Core protective flora; lactic acid + H₂O₂ producer"],
    ["Group B Streptococcus", "Vagina (25% women)", "Normal commensal; neonatal sepsis/meningitis risk"],
    ["Gardnerella vaginalis", "Vagina (minor)", "Overgrows in BV; key diagnostic marker"],
    ["Prevotella spp.", "Vagina / foreskin", "Normal anaerobe; dominant in BV"],
    ["Ureaplasma urealyticum", "Vagina / urethra", "Normal commensal; can cause NGU"],
    ["Candida albicans", "Vagina (~20%)", "Minor commensal; vaginitis when flora disrupted"],
    ["CoNS (S. epidermidis)", "Urethra (both sexes)", "Normal contaminant of voided urine"],
    ["Mycobacterium smegmatis", "Male genitalia", "Non-pathogenic; periurethral smegma"],
    ["Anaerococcus / Finegoldia", "Male foreskin", "BV-overlap anaerobes; sexually transmissible"],
  ];

  const colWidths = [2.4, 2.2, 4.6];
  const colXs = [0.3, 2.7, 4.9];
  const rowH = 0.46;

  tableData.forEach((row, ri) => {
    const y = 1.0 + ri * rowH;
    const isHeader = ri === 0;
    const bg = isHeader ? C.navy : ri%2===0 ? C.white : C.lightGray;
    s.addShape(pres.shapes.RECTANGLE, { x:0.3, y, w:9.2, h:rowH, fill:{color:bg}, line:{color:"C8D5DA", width:0.3} });
    row.forEach((cell, ci) => {
      s.addText(cell, {
        x:colXs[ci]+0.08, y:y+0.03, w:colWidths[ci]-0.12, h:rowH-0.06,
        fontSize: isHeader ? 10 : 9.2,
        bold: isHeader || ci===0,
        color: isHeader ? C.white : ci===0 ? C.teal : C.textDark,
        valign:"middle"
      });
    });
  });
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 15 - KEY TAKEAWAYS
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  darkSlide(s);
  s.addShape(pres.shapes.RECTANGLE, {x:0, y:0, w:10, h:0.9, fill:{color:C.gold}, line:{color:C.gold}});
  s.addText("Key Takeaways", { x:0.3, y:0.05, w:9.4, h:0.8, fontSize:24, bold:true, color:C.navy, valign:"middle" });
  addFooter(s, "Genital Flora | Key Takeaways");

  const takeaways = [
    { n:"01", t:"Vaginal flora is hormonally driven", b:"Estrogen → glycogen → Lactobacillus → lactic acid + H₂O₂ → protection. This cycle defines reproductive-age vaginal health." },
    { n:"02", t:"Lactobacillus is the guardian of vaginal health", b:"Its dominance is not just about pH — it provides competitive exclusion, immune modulation, and bacteriocin production." },
    { n:"03", t:"BV is flora dysbiosis, not a simple infection", b:"It is a polymicrobial syndrome with complex microbiome shifts. No single organism causes BV — it requires ecological collapse." },
    { n:"04", t:"Genital flora has critical obstetric implications", b:"Group B Streptococcus (25% of women) causes neonatal meningitis/sepsis. Neonates acquire flora from the birth canal." },
    { n:"05", t:"Male genital flora interacts with female flora", b:"Uncircumcised men carry BV-associated anaerobes. Sexual transmission of BV is evidenced by partner concordance studies." },
    { n:"06", t:"Antibiotics disrupt flora — with consequences", b:"Broad-spectrum antibiotics suppress Lactobacillus, creating an ecologic vacuum filled by Candida or BV organisms." },
  ];

  takeaways.forEach((t, i) => {
    const col = i % 2;
    const row = Math.floor(i / 2);
    const x = 0.2 + col * 4.9;
    const y = 1.0 + row * 1.5;
    card(s, x, y, 4.65, 1.35, "0D2B3E");
    s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x:x+0.1, y:y+0.1, w:0.42, h:0.42, fill:{color:C.gold}, line:{color:C.gold}, rectRadius:0.05 });
    s.addText(t.n, { x:x+0.1, y:y+0.1, w:0.42, h:0.42, fontSize:11, bold:true, color:C.navy, align:"center", valign:"middle" });
    s.addText(t.t, { x:x+0.62, y:y+0.1, w:3.88, h:0.38, fontSize:10.5, bold:true, color:C.gold, margin:0, valign:"middle" });
    s.addText(t.b, { x:x+0.1, y:y+0.58, w:4.4, h:0.7, fontSize:8.8, color:"BFCDD4", lineSpacingMultiple:1.3, valign:"top" });
  });
}

// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 16 - THANK YOU / REFERENCES
// ═══════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  darkSlide(s);
  s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:0.22, h:5.625, fill:{color:C.teal}, line:{color:C.teal} });
  s.addShape(pres.shapes.RECTANGLE, { x:9.78, y:0, w:0.22, h:5.625, fill:{color:C.gold}, line:{color:C.gold} });

  s.addText("Thank You", { x:1, y:0.6, w:8, h:1.1, fontSize:48, bold:true, color:C.white, align:"center", fontFace:"Calibri" });
  s.addShape(pres.shapes.RECTANGLE, { x:2.5, y:1.75, w:5, h:0.07, fill:{color:C.gold}, line:{color:C.gold} });
  s.addText("Questions & Discussion Welcome", { x:1, y:1.9, w:8, h:0.5, fontSize:16, color:"A0C8D0", align:"center", italic:true });

  // References
  s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
    x:0.5, y:2.55, w:9, h:2.7,
    fill:{color:"0D1F30"}, line:{color:C.teal, width:1}, rectRadius:0.08
  });
  s.addText("References", { x:0.8, y:2.62, w:8.4, h:0.38, fontSize:12, bold:true, color:C.gold });
  s.addText([
    { text: "1.  Jawetz, Melnick & Adelberg's Medical Microbiology, 28th Edition — Normal Microbiota of the Urethra & Vagina, pp.182–184\n", options:{} },
    { text: "2.  Sherris & Ryan's Medical Microbiology, 8th Edition — Vaginal Flora, BV, Exclusionary Effect, pp.37–39\n", options:{} },
    { text: "3.  Murray PR et al. Medical Microbiology, 9th Edition — Evolution of the Microbiome & Normal Flora, pp.22–26\n", options:{} },
    { text: "4.  Donders GGG et al. Pathogenesis of abnormal vaginal bacterial flora. Am J Obstet Gynecol. 2000\n", options:{} },
    { text: "5.  Ravel J et al. Vaginal microbiome of reproductive-age women. PNAS. 2011;108 Suppl 1:4680–4687", options:{} },
  ], { x:0.8, y:3.05, w:8.4, h:2.05, fontSize:9, color:"A0B8C0", lineSpacingMultiple:1.4, valign:"top" });
}

// ─── WRITE FILE ───────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/genital-flora-ppt/Genital_Flora_Seminar.pptx" })
  .then(() => console.log("✅  Presentation saved successfully!"))
  .catch(err => console.error("❌  Error:", err));
Running Command

cd /home/daytona/workspace/genital-flora-ppt && node create_ppt.js 2>&1

Running Command

ls -lh /home/daytona/workspace/genital-flora-ppt/

Your seminar presentation is ready! Here's the download link:

Genital Flora Seminar

Presentation · PPTX


The presentation is 16 slides with a professional medical seminar design (navy/teal/gold color scheme). Here's what's covered:
SlideContent
1Title Slide - Bold title with subtitle
2Seminar Outline - 12-topic index with numbered cards
3What is Genital Flora? - Definition + host-microbe relationship
4Urethral Flora - Both sexes, organism list with descriptions
5Vaginal Flora – Lifecycle - 4-stage timeline (birth to menopause)
6Vaginal Flora – Full Organism List - Gram+, Gram-, fungi/mycoplasma columns
7Protective Mechanisms of Lactobacillus - Dark visual with 5-mechanism diagram
8Male Genital Microbiota - 4 sites (skin, foreskin, urethra, semen)
9Bacterial Vaginosis - Dark urgent slide with Amsel criteria & complications
10Placenta & Uterine Flora - Old belief vs. current molecular evidence
11Neonatal Significance - Transmission table with disease outcomes
12Factors Altering Flora - 9-factor grid (antibiotics, hormones, etc.)
13Clinical Relevance - 6 clinical scenarios (UTI, PID, HIV, gonorrhoea)
14Quick Reference Summary Table - All key organisms in one table
15Key Takeaways - 6 core learning points
16Thank You + References - 5 cited sources

Make a presentation for seminar for department presentation

Asking for Preferences
Reading File
Writing File

~/genital-flora-ppt/dept_ppt.js

const pptxgen = require("pptxgenjs");

const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Genital Flora – Department Seminar Presentation";
pres.author = "Department of Microbiology";

// ─── PALETTE ─────────────────────────────────────────────────────────────────
const C = {
  bg:        "F7F9FC",
  navy:      "0A2540",
  deepTeal:  "0B6E72",
  teal:      "1A8A8E",
  tealLight: "D0EEF0",
  gold:      "C8860A",
  goldLight: "FDF3DC",
  coral:     "C0392B",
  coralLight:"FDE8E6",
  green:     "1B7A4A",
  greenLight:"E2F5EC",
  white:     "FFFFFF",
  gray1:     "E8EEF3",
  gray2:     "90A4AE",
  textDark:  "0D1B2A",
  textMid:   "3A4F5C",
};

// ─── UTILITY FUNCTIONS ───────────────────────────────────────────────────────
function fillBg(s, color) {
  s.addShape(pres.shapes.RECTANGLE, { x:0,y:0,w:10,h:5.625, fill:{color:color||C.bg}, line:{color:color||C.bg} });
}
function fillDark(s) { fillBg(s, C.navy); }

function topBar(s, color, h) {
  s.addShape(pres.shapes.RECTANGLE, { x:0,y:0,w:10,h:h||0.85, fill:{color:color||C.navy}, line:{color:color||C.navy} });
}
function leftAccent(s, color, w) {
  s.addShape(pres.shapes.RECTANGLE, { x:0,y:0,w:w||0.15,h:5.625, fill:{color:color||C.teal}, line:{color:color||C.teal} });
}
function footer(s, right) {
  s.addShape(pres.shapes.RECTANGLE, { x:0,y:5.33,w:10,h:0.295, fill:{color:C.navy}, line:{color:C.navy} });
  s.addText("Department Seminar  •  Genital Flora  •  Medical Microbiology", {
    x:0.25,y:5.33,w:7,h:0.295, fontSize:7.5, color:"6B8BAD", valign:"middle"
  });
  if (right) s.addText(right, { x:8.5,y:5.33,w:1.4,h:0.295, fontSize:7.5, color:"6B8BAD", align:"right", valign:"middle" });
}
function hRule(s, x, y, w, color) {
  s.addShape(pres.shapes.RECTANGLE, { x,y,w,h:0.035, fill:{color:color||C.teal}, line:{color:color||C.teal} });
}
function sectionTag(s, text, x, y, color) {
  s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x,y,w:1.55,h:0.3, fill:{color:color||C.teal}, line:{color:color||C.teal}, rectRadius:0.08 });
  s.addText(text, { x,y,w:1.55,h:0.3, fontSize:8, bold:true, color:C.white, align:"center", valign:"middle", charSpacing:0.8 });
}
function slideH(s, txt, sub) {
  s.addText(txt, { x:0.28,y:0.07,w:9.5,h:0.72, fontSize:19, bold:true, color:C.white, valign:"middle", margin:4, fontFace:"Calibri" });
  if (sub) s.addText(sub, { x:0.28,y:0.72,w:9.5,h:0.22, fontSize:9.5, color:"A0C8D0", italic:true, valign:"top", margin:0 });
}
function card(s, x, y, w, h, fill, lineColor) {
  s.addShape(pres.shapes.ROUNDED_RECTANGLE, {
    x,y,w,h, fill:{color:fill||C.white}, rectRadius:0.07,
    line:{color:lineColor||"D0DDE8", width:0.5},
    shadow:{type:"outer",color:"000000",blur:4,offset:2,angle:135,opacity:0.09}
  });
}

// ═════════════════════════════════════════════════════════════════════════════
// SLIDE 1 — COVER
// ═════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  fillDark(s);

  // Decorative geometry
  s.addShape(pres.shapes.RECTANGLE, { x:0,y:0,w:0.22,h:5.625, fill:{color:C.teal}, line:{color:C.teal} });
  s.addShape(pres.shapes.RECTANGLE, { x:9.78,y:0,w:0.22,h:5.625, fill:{color:C.gold}, line:{color:C.gold} });
  s.addShape(pres.shapes.RECTANGLE, { x:0.22,y:4.6,w:9.56,h:0.08, fill:{color:C.teal}, line:{color:C.teal} });

  // Institution / department tag
  s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x:3.0,y:0.3,w:4.0,h:0.38, fill:{color:C.deepTeal}, line:{color:C.deepTeal}, rectRadius:0.1 });
  s.addText("DEPARTMENT OF MICROBIOLOGY  •  SEMINAR", { x:3.0,y:0.3,w:4.0,h:0.38, fontSize:8, bold:true, color:C.white, align:"center", valign:"middle", charSpacing:1 });

  // Main title
  s.addText("GENITAL FLORA", { x:0.4,y:0.85,w:9.2,h:1.45, fontSize:58, bold:true, color:C.white, align:"center", fontFace:"Calibri" });
  hRule(s, 2.0, 2.35, 6.0, C.gold);

  // Subtitle
  s.addText("Normal Microbiota of the Urogenital Tract:\nComposition, Function, Dysbiosis & Clinical Significance", {
    x:0.6,y:2.48,w:8.8,h:0.9, fontSize:15, color:"9AC8D2", align:"center", italic:true, lineSpacingMultiple:1.5
  });

  // Presenter line
  s.addShape(pres.shapes.RECTANGLE, { x:2.8,y:3.55,w:4.4,h:0.5, fill:{color:"102038"}, line:{color:C.teal, width:0.8} });
  s.addText("Presenter: [Your Name]   |   Moderator: [Faculty Name]", {
    x:2.8,y:3.55,w:4.4,h:0.5, fontSize:10, color:"A8C8D8", align:"center", valign:"middle"
  });

  // Date
  s.addText("Date: ___________   |   Venue: Department Seminar Hall", {
    x:1,y:4.18,w:8,h:0.3, fontSize:10, color:"607890", align:"center"
  });

  // Keywords strip
  s.addText("LACTOBACILLUS  •  VAGINAL MICROBIOME  •  BACTERIAL VAGINOSIS  •  NEONATAL FLORA  •  DYSBIOSIS", {
    x:0.25,y:4.7,w:9.5,h:0.28, fontSize:8, color:"456070", align:"center", charSpacing:0.5
  });

  // Source note
  s.addText("Sources: Jawetz Medical Microbiology 28e  |  Sherris & Ryan 8e  |  Murray Medical Microbiology 9e  |  Ravel et al. PNAS 2011", {
    x:0.25,y:5.28,w:9.5,h:0.22, fontSize:7.5, color:"3A5060", align:"center"
  });
}

// ═════════════════════════════════════════════════════════════════════════════
// SLIDE 2 — TABLE OF CONTENTS
// ═════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  fillBg(s);
  topBar(s, C.navy);
  slideH(s, "Contents at a Glance");
  footer(s, "Slide 2");

  const sections = [
    { num:"A", title:"Introduction & Definitions",        sub:"Scope, symbiosis, microbiome basics" },
    { num:"B", title:"Urethral Flora (Both Sexes)",        sub:"Organisms, density, sterile zones" },
    { num:"C", title:"Vaginal Flora – Lifecycle Changes",  sub:"Birth → puberty → menopause" },
    { num:"D", title:"Vaginal Flora – Organism Inventory", sub:"Complete list by Gram category" },
    { num:"E", title:"Protective Mechanisms",              sub:"Lactobacillus as guardian flora" },
    { num:"F", title:"Male Genital Microbiota",            sub:"Foreskin, urethra, semen, circumcision" },
    { num:"G", title:"Bacterial Vaginosis (BV)",           sub:"Dysbiosis, Amsel criteria, organisms" },
    { num:"H", title:"Placenta & Uterine Microbiome",      sub:"Sterile myth vs. molecular evidence" },
    { num:"I", title:"Neonatal Significance",              sub:"Vertical transmission & disease" },
    { num:"J", title:"Altering Factors & Clinical Impact", sub:"Drugs, hormones, opportunistic infections" },
    { num:"K", title:"Summary & Key Takeaways",            sub:"Core learning points" },
  ];

  const COLS = 2, perCol = Math.ceil(sections.length / COLS);
  sections.forEach((sec, i) => {
    const col = Math.floor(i / perCol);
    const row = i % perCol;
    const x = 0.28 + col * 4.87;
    const y = 0.95 + row * 0.42;

    s.addShape(pres.shapes.RECTANGLE, { x,y,w:4.65,h:0.38,
      fill:{color: i%2===0?C.white:C.gray1}, line:{color:"D5E2E8",width:0.4} });
    // Letter badge
    s.addShape(pres.shapes.RECTANGLE, { x,y,w:0.35,h:0.38, fill:{color:C.deepTeal}, line:{color:C.deepTeal} });
    s.addText(sec.num, { x,y,w:0.35,h:0.38, fontSize:11, bold:true, color:C.white, align:"center", valign:"middle" });
    s.addText(sec.title, { x:x+0.42,y:y+0.02,w:3.8,h:0.2, fontSize:10, bold:true, color:C.textDark, margin:0 });
    s.addText(sec.sub,   { x:x+0.42,y:y+0.22,w:3.8,h:0.15, fontSize:8,  color:C.gray2, margin:0 });
  });
}

// ═════════════════════════════════════════════════════════════════════════════
// SLIDE 3 — INTRODUCTION
// ═════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  fillBg(s);
  topBar(s, C.deepTeal);
  leftAccent(s, C.deepTeal);
  slideH(s, "Introduction – What Is Genital Flora?", "Section A");
  footer(s, "Slide 3");

  // Definition box
  card(s, 0.28,0.95,9.44,1.15,C.tealLight);
  s.addShape(pres.shapes.RECTANGLE, { x:0.28,y:0.95,w:0.09,h:1.15, fill:{color:C.teal}, line:{color:C.teal} });
  s.addText([
    { text:"Definition: ", options:{bold:true, color:C.deepTeal} },
    { text:"Genital flora comprises the community of microorganisms — predominantly bacteria, with fungi and occasionally protozoa — that normally inhabit the genital and lower urogenital tracts of healthy individuals. These form a dynamic, symbiotic ecosystem with the host that evolves with age, hormonal status, and environment.", options:{color:C.textDark} }
  ], { x:0.5,y:1.0,w:9.1,h:1.05, fontSize:11, valign:"middle" });

  // Three pillars
  const pillars = [
    { head:"HOST PROVIDES", color:C.teal, items:["Site of colonization","Nutrients & warmth","Innate immune protection","Hormonal environment"] },
    { head:"MICROBES PROVIDE", color:C.navy, items:["Metabolic functions","Immune priming","Pathogen exclusion","Bacteriocin production"] },
    { head:"RESULT", color:C.green, items:["Symbiotic homeostasis","Protection from pathogens","Optimal pH maintenance","Reproductive health support"] },
  ];
  pillars.forEach((p, i) => {
    const x = 0.28 + i * 3.2;
    card(s, x, 2.22, 3.05, 2.9, C.white);
    s.addShape(pres.shapes.RECTANGLE, { x,y:2.22,w:3.05,h:0.45, fill:{color:p.color}, line:{color:p.color} });
    s.addText(p.head, { x,y:2.22,w:3.05,h:0.45, fontSize:10.5, bold:true, color:C.white, align:"center", valign:"middle", charSpacing:0.8 });
    p.items.forEach((item, j) => {
      s.addShape(pres.shapes.RECTANGLE, { x:x+0.14,y:2.82+j*0.52,w:2.77,h:0.44,
        fill:{color:j%2===0?C.gray1:C.white}, line:{color:"D8E5EA",width:0.3} });
      s.addText("→  "+item, { x:x+0.22,y:2.82+j*0.52,w:2.65,h:0.44, fontSize:10, color:C.textDark, valign:"middle" });
    });
  });
}

// ═════════════════════════════════════════════════════════════════════════════
// SLIDE 4 — URETHRAL FLORA
// ═════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  fillBg(s);
  topBar(s, C.navy);
  leftAccent(s, C.teal);
  slideH(s, "Normal Microbiota of the Urethra", "Section B  |  Both Sexes");
  footer(s, "Slide 4");

  // Key fact
  card(s, 0.28,0.95,9.44,0.65,C.goldLight);
  s.addShape(pres.shapes.RECTANGLE, { x:0.28,y:0.95,w:0.09,h:0.65, fill:{color:C.gold}, line:{color:C.gold} });
  s.addText("Key Point: The anterior urethra of BOTH sexes harbors small numbers of organisms from surrounding skin and perineum. Normal voided urine contains 10² – 10⁴ organisms/mL. The posterior urethra and bladder are STERILE.", {
    x:0.5,y:0.97,w:9.1,h:0.62, fontSize:10.5, color:C.textDark, valign:"middle"
  });

  // Organisms table
  const orgs = [
    ["Organism","Gram Stain","Notes","Risk"],
    ["Staphylococcus epidermidis","Gram +ve cocci","Most common; skin origin","Low"],
    ["Diphtheroids (Corynebacterium spp.)","Gram +ve rods","Aerobic skin commensal","Low"],
    ["Streptococcus viridans group","Gram +ve cocci","Alpha-hemolytic","Low"],
    ["Enterococcus faecalis","Gram +ve cocci","From perineum","Mod"],
    ["Mycobacterium smegmatis","Acid-fast rods","Periurethral smegma; non-pathogenic","Low"],
    ["E. coli / Klebsiella (coliforms)","Gram -ve rods","Small numbers; perineal origin","Mod"],
    ["Anaerobic cocci (occasional)","Gram +ve","From perineal skin","Low"],
  ];

  const cw = [3.0,2.0,3.4,0.85];
  const cx = [0.28,3.28,5.28,8.68];
  orgs.forEach(([c0,c1,c2,c3], ri) => {
    const y = 1.7 + ri * 0.48;
    const isH = ri===0;
    const bg = isH?C.navy: ri%2===0?C.white:C.gray1;
    s.addShape(pres.shapes.RECTANGLE, { x:0.28,y,w:9.25,h:0.46, fill:{color:bg}, line:{color:"C8D8E0",width:0.35} });
    [[c0,0],[c1,1],[c2,2],[c3,3]].forEach(([txt,ci]) => {
      const riskColor = txt==="Mod"?C.gold:txt==="Low"?"2E9E6A":C.textDark;
      s.addText(txt, { x:cx[ci]+0.07,y:y+0.04,w:cw[ci]-0.1,h:0.38,
        fontSize:isH?9.5:9.2, bold:isH, color:isH?C.white:ci===3?riskColor:C.textDark, valign:"middle" });
    });
  });
}

// ═════════════════════════════════════════════════════════════════════════════
// SLIDE 5 — VAGINAL FLORA LIFECYCLE
// ═════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  fillBg(s);
  topBar(s, C.deepTeal);
  leftAccent(s, C.deepTeal);
  slideH(s, "Vaginal Flora – Changes Across the Lifespan", "Section C");
  footer(s, "Slide 5");

  const phases = [
    { label:"NEONATAL\n(Birth–Weeks)", pH:"Acidic", dominant:"Aerobic\nLactobacillus spp.", mechanism:"Maternal estrogen\ntransferred in utero", color:C.teal, note:"Transient" },
    { label:"CHILDHOOD\n(Weeks–Puberty)", pH:"Neutral\n6.0–7.0", dominant:"Mixed cocci\n& bacilli", mechanism:"No estrogen,\nlow glycogen", color:"607D8B", note:"Mixed flora" },
    { label:"REPRODUCTIVE\nAGE (Puberty–)", pH:"Acidic\n3.8–4.5", dominant:"Lactobacillus\n(dominant)", mechanism:"Estrogen → glycogen\n→ lactic acid + H₂O₂", color:C.navy, note:"Protective state" },
    { label:"PREGNANCY", pH:"pH ↓ further\n(more acidic)", dominant:"Lactobacillus\n(↑ further)", mechanism:"High estrogen &\nprogesterone", color:C.deepTeal, note:"Max protection" },
    { label:"POST-\nMENOPAUSE", pH:"Rising\n→ Neutral", dominant:"Mixed flora\nreturns", mechanism:"Estrogen ↓,\nglycogens ↓", color:"8D6E63", note:"Vulnerable" },
  ];

  // Horizontal timeline bar
  s.addShape(pres.shapes.RECTANGLE, { x:0.3,y:2.26,w:9.4,h:0.07, fill:{color:"C5D5DC"}, line:{color:"C5D5DC"} });

  phases.forEach((ph, i) => {
    const x = 0.28 + i * 1.9;
    // Top phase box
    s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x,y:1.0,w:1.78,h:1.18, fill:{color:ph.color}, line:{color:ph.color}, rectRadius:0.07 });
    s.addText(ph.label, { x,y:1.0,w:1.78,h:1.18, fontSize:10.5, bold:true, color:C.white, align:"center", valign:"middle", lineSpacingMultiple:1.3 });
    // Timeline dot
    s.addShape(pres.shapes.OVAL, { x:x+0.65,y:2.2,w:0.2,h:0.2, fill:{color:ph.color}, line:{color:ph.color} });
    // Bottom card
    card(s, x, 2.48, 1.78, 2.85, C.white);
    s.addText("pH: "+ph.pH, { x:x+0.1,y:2.56,w:1.6,h:0.38, fontSize:10, bold:true, color:ph.color, lineSpacingMultiple:1.1 });
    hRule(s, x+0.08, 2.96, 1.45, C.gold);
    s.addText(ph.dominant, { x:x+0.1,y:3.03,w:1.6,h:0.55, fontSize:9.5, bold:true, color:C.textDark, lineSpacingMultiple:1.2 });
    s.addText(ph.mechanism, { x:x+0.1,y:3.62,w:1.6,h:0.62, fontSize:8.8, color:C.textMid, lineSpacingMultiple:1.2 });
    // Note badge
    s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x:x+0.1,y:5.05,w:1.55,h:0.22, fill:{color:ph.color}, line:{color:ph.color}, rectRadius:0.04 });
    s.addText(ph.note, { x:x+0.1,y:5.05,w:1.55,h:0.22, fontSize:8, bold:true, color:C.white, align:"center", valign:"middle" });
  });
}

// ═════════════════════════════════════════════════════════════════════════════
// SLIDE 6 — ORGANISM INVENTORY (two-column detailed)
// ═════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  fillBg(s);
  topBar(s, C.navy);
  leftAccent(s, C.teal);
  slideH(s, "Normal Vaginal Flora – Organism Inventory", "Section D  |  Reproductive-Age Women");
  footer(s, "Slide 6");

  // Left column: Gram-positive
  card(s, 0.24, 0.95, 4.55, 4.4, C.white);
  s.addShape(pres.shapes.RECTANGLE, { x:0.24,y:0.95,w:4.55,h:0.42, fill:{color:C.teal}, line:{color:C.teal} });
  s.addText("GRAM-POSITIVE ORGANISMS", { x:0.24,y:0.95,w:4.55,h:0.42, fontSize:10.5, bold:true, color:C.white, align:"center", valign:"middle", charSpacing:0.8 });

  const gpOrgs = [
    ["Lactobacillus spp.", "DOMINANT", C.teal, "L. crispatus, iners, jensenii, gasseri — core protective flora"],
    ["Group B Streptococcus", "⚠ 25%", C.coral, "S. agalactiae; present in 25% of childbearing women"],
    ["Streptococcus viridans", "Common", C.teal, "Alpha-hemolytic; low virulence"],
    ["Peptostreptococcus", "Anaerobe", C.gray2, "Anaerobic streptococci; normal minority flora"],
    ["Corynebacterium spp.", "Common", C.gray2, "Diphtheroids; skin-derived commensals"],
    ["Staphylococcus epidermidis", "Common", C.gray2, "Coagulase-negative; low pathogenicity"],
    ["Mobiluncus spp.", "Minor", C.gold, "Curved anaerobic rods; associated with BV if dominant"],
  ];
  gpOrgs.forEach(([name, badge, bc, desc], i) => {
    const y = 1.47 + i * 0.56;
    s.addShape(pres.shapes.RECTANGLE, { x:0.28,y,w:4.47,h:0.5, fill:{color:i%2===0?C.gray1:C.white}, line:{color:"D5E2E8",width:0.3} });
    s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x:0.34,y:y+0.1,w:0.82,h:0.28, fill:{color:bc}, line:{color:bc}, rectRadius:0.04 });
    s.addText(badge, { x:0.34,y:y+0.1,w:0.82,h:0.28, fontSize:7.5, bold:true, color:C.white, align:"center", valign:"middle" });
    s.addText(name, { x:1.24,y:y+0.02,w:3.38,h:0.22, fontSize:10, bold:true, color:C.textDark, margin:0 });
    s.addText(desc, { x:1.24,y:y+0.24,w:3.38,h:0.22, fontSize:8.2, color:C.gray2, margin:0 });
  });

  // Right column: GN + Fungi/Other
  card(s, 5.03, 0.95, 4.73, 4.4, C.white);
  s.addShape(pres.shapes.RECTANGLE, { x:5.03,y:0.95,w:4.73,h:0.42, fill:{color:C.navy}, line:{color:C.navy} });
  s.addText("GRAM-NEGATIVE  /  FUNGI  /  MYCOPLASMA", { x:5.03,y:0.95,w:4.73,h:0.42, fontSize:10.5, bold:true, color:C.white, align:"center", valign:"middle", charSpacing:0.8 });

  const gnOrgs = [
    ["Prevotella spp.", "Anaerobe", C.gold, "Normal anaerobe; key BV organism when dominant"],
    ["Gardnerella vaginalis", "Gram-variable", C.coral, "Minor commensal; overgrows in BV → clue cells"],
    ["Fusobacterium spp.", "Anaerobe", C.gray2, "Obligate anaerobe; minor commensal"],
    ["Bacteroides spp.", "Anaerobe", C.gray2, "Part of normal anaerobic flora"],
    ["Candida albicans", "Fungus", "7B5EA7", "~20% healthy women; vaginitis when Lactobacillus lost"],
    ["Ureaplasma urealyticum", "Mycoplasma", C.deepTeal, "No cell wall; normal commensal; can cause NGU"],
    ["Mycoplasma hominis", "Mycoplasma", C.deepTeal, "Normal commensal; associated with BV occasionally"],
    ["Listeria monocytogenes", "Rare", C.coral, "Rare colonizer; neonatal listeriosis risk if present"],
  ];
  gnOrgs.forEach(([name, badge, bc, desc], i) => {
    const y = 1.47 + i * 0.485;
    s.addShape(pres.shapes.RECTANGLE, { x:5.07,y,w:4.65,h:0.44, fill:{color:i%2===0?C.gray1:C.white}, line:{color:"D5E2E8",width:0.3} });
    s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x:5.12,y:y+0.08,w:0.92,h:0.26, fill:{color:bc}, line:{color:bc}, rectRadius:0.04 });
    s.addText(badge, { x:5.12,y:y+0.08,w:0.92,h:0.26, fontSize:7, bold:true, color:C.white, align:"center", valign:"middle" });
    s.addText(name, { x:6.12,y:y+0.01,w:3.5,h:0.2,  fontSize:9.8, bold:true, color:C.textDark, margin:0 });
    s.addText(desc, { x:6.12,y:y+0.22,w:3.5,h:0.2,  fontSize:7.8, color:C.gray2, margin:0 });
  });
}

// ═════════════════════════════════════════════════════════════════════════════
// SLIDE 7 — PROTECTIVE MECHANISMS
// ═════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  fillDark(s);
  s.addShape(pres.shapes.RECTANGLE, { x:0,y:0,w:10,h:0.85, fill:{color:C.teal}, line:{color:C.teal} });
  s.addText("Protective Mechanisms of Vaginal Flora", { x:0.25,y:0.05,w:9.5,h:0.76, fontSize:19, bold:true, color:C.white, valign:"middle" });
  s.addText("Section E  |  Döderlein's Bacilli & the Vaginal Defence System", { x:0.25,y:0.68,w:9.5,h:0.2, fontSize:9, color:"A0D0D8", italic:true, margin:0 });
  footer(s, "Slide 7");

  // Mechanism cards (6 mechanisms in 2x3 grid)
  const mechs = [
    { icon:"🧪", title:"Lactic Acid Production", body:"Lactobacillus ferments glycogen (from estrogen-primed epithelium) → lactic acid → pH 3.8–4.5. Most vaginal pathogens cannot survive below pH 4.5.", color:C.teal },
    { icon:"⚗️", title:"Hydrogen Peroxide (H₂O₂)", body:"H₂O₂-producing Lactobacillus strains (esp. L. crispatus) generate H₂O₂ that is directly toxic to anaerobes, Gardnerella, Trichomonas, and HIV.", color:C.deepTeal },
    { icon:"🛡️", title:"Bacteriocins", body:"Low-molecular-weight antimicrobial peptides (lactocins, acidocins) produced by Lactobacillus inhibit competing Gram-positive and some Gram-negative bacteria.", color:"1B5E8C" },
    { icon:"🔒", title:"Competitive Exclusion", body:"Lactobacillus occupies epithelial adhesion sites, preventing pathogen attachment. A Lactobacillus-dominated flora is an environment hostile to enteric pathogens.", color:"1A6B3C" },
    { icon:"🧬", title:"Immune Modulation", body:"Vaginal flora stimulates innate immunity (TLRs, defensins) and induces regulatory T-cell responses that maintain tolerance while enabling pathogen responses.", color:"6B3C7A" },
    { icon:"🦠", title:"Biosurfactants & Coaggregation", body:"Lactobacillus produces biosurfactants that reduce pathogen biofilm formation and coaggregation proteins that cluster pathogens away from epithelial surfaces.", color:"7A5030" },
  ];

  mechs.forEach((m, i) => {
    const col = i % 3;
    const row = Math.floor(i / 3);
    const x = 0.2 + col * 3.25;
    const y = 1.0 + row * 2.18;
    card(s, x, y, 3.1, 2.08, "0C2234");
    s.addShape(pres.shapes.RECTANGLE, { x,y,w:3.1,h:0.44, fill:{color:m.color}, line:{color:m.color} });
    s.addText(m.icon+"  "+m.title, { x,y,w:3.1,h:0.44, fontSize:10.5, bold:true, color:C.white, align:"center", valign:"middle" });
    s.addText(m.body, { x:x+0.14,y:y+0.52,w:2.82,h:1.48, fontSize:9.5, color:"BDD4E0", lineSpacingMultiple:1.4, valign:"top" });
  });
}

// ═════════════════════════════════════════════════════════════════════════════
// SLIDE 8 — MALE GENITAL MICROBIOTA
// ═════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  fillBg(s);
  topBar(s, C.navy);
  leftAccent(s, C.gold);
  slideH(s, "Male Urogenital Tract Microbiota (MUGT)", "Section F");
  footer(s, "Slide 8");

  // Intro line
  s.addText("The MUGT includes several distinct microbial environments: penile skin, balanopreputial sulcus (foreskin), urethra, and semen. Circumcision status, sexual behaviour, and female partner's flora all influence composition.", {
    x:0.3,y:0.92,w:9.4,h:0.5, fontSize:10.5, color:C.textMid, italic:true
  });

  // 4 site cards top row
  const sites = [
    { site:"Penile Skin", icon:"🩺", color:C.teal, orgs:["Staphylococcus spp.","Corynebacterium spp.","Streptococcus spp.","Malassezia (fungi)"] },
    { site:"Foreskin (Uncircumcised)", icon:"⚠️", color:C.coral, orgs:["Anaerococcus spp.","Peptoniphilus spp.","Finegoldia spp.","Prevotella spp. (BV-overlap)"] },
    { site:"Urethra", icon:"🔬", color:C.navy, orgs:["CoNS (S. epidermidis)","Corynebacterium spp.","Occasional coliforms","Mycobacterium smegmatis"] },
    { site:"Semen", icon:"🧫", color:"546E7A", orgs:["Variable, low diversity","Lactobacillus (variable)","Prevotella, Finegoldia","Streptococcus (occasional)"] },
  ];
  sites.forEach((st, i) => {
    const x = 0.24 + i * 2.4;
    card(s, x, 1.52, 2.25, 2.65, C.white);
    s.addShape(pres.shapes.RECTANGLE, { x,y:1.52,w:2.25,h:0.44, fill:{color:st.color}, line:{color:st.color} });
    s.addText(st.icon+" "+st.site, { x,y:1.52,w:2.25,h:0.44, fontSize:10, bold:true, color:C.white, align:"center", valign:"middle" });
    st.orgs.forEach((org, j) => {
      s.addText("• "+org, { x:x+0.1,y:2.06+j*0.52,w:2.05,h:0.46, fontSize:9.5, color:C.textDark, valign:"middle" });
    });
  });

  // Circumcision insight
  card(s, 0.24, 4.28, 9.52, 0.88, C.goldLight);
  s.addShape(pres.shapes.RECTANGLE, { x:0.24,y:4.28,w:0.09,h:0.88, fill:{color:C.gold}, line:{color:C.gold} });
  s.addText([
    { text:"Circumcision Effect: ", options:{bold:true, color:C.gold} },
    { text:"Circumcision significantly reduces anaerobic load (Prevotella, Anaerococcus, Peptoniphilus) in the balanopreputial sulcus. These organisms overlap with BV-associated bacteria. Concordance studies show sexual transmission of BV strains between partners, supporting the role of male genital flora in female vaginal health.", options:{color:C.textDark} }
  ], { x:0.45,y:4.3,w:9.15,h:0.82, fontSize:10, valign:"middle" });
}

// ═════════════════════════════════════════════════════════════════════════════
// SLIDE 9 — BACTERIAL VAGINOSIS (2-column detail)
// ═════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  fillDark(s);
  s.addShape(pres.shapes.RECTANGLE, { x:0,y:0,w:10,h:0.85, fill:{color:C.coral}, line:{color:C.coral} });
  s.addText("Bacterial Vaginosis (BV) – Vaginal Dysbiosis", { x:0.25,y:0.05,w:9.5,h:0.76, fontSize:19, bold:true, color:C.white, valign:"middle" });
  s.addText("Section G  |  Most Common Cause of Vaginal Discharge in Reproductive-Age Women", { x:0.25,y:0.68,w:9.5,h:0.2, fontSize:9, color:"FFBBBB", italic:true, margin:0 });
  footer(s, "Slide 9");

  // Col 1: Pathophysiology
  card(s, 0.2,0.95,4.7,4.35,"0D1E2C");
  s.addText("PATHOPHYSIOLOGY", { x:0.35,y:1.0,w:4.4,h:0.32, fontSize:11, bold:true, color:C.gold, charSpacing:1.2 });
  hRule(s, 0.35, 1.34, 3.8, C.coral);
  const path = [
    "1.  Unexplained disappearance of Lactobacillus",
    "2.  Vaginal pH rises above 4.5",
    "3.  Anaerobic bacterial overgrowth",
    "4.  Amines (putrescine, cadaverine) produced → fishy odor",
    "5.  Epithelial cells coated with bacteria → Clue cells",
  ];
  path.forEach((p, i) => {
    s.addText(p, { x:0.35,y:1.42+i*0.46,w:4.4,h:0.42, fontSize:10, color:C.white, valign:"middle" });
  });
  s.addText("BV-ASSOCIATED ORGANISMS:", { x:0.35,y:3.76,w:4.4,h:0.28, fontSize:10, bold:true, color:C.gold });
  s.addText("Gardnerella vaginalis (hallmark)  •  Prevotella spp.  •  Mobiluncus spp.  •  Atopobium vaginae  •  Sneathia spp.  •  Leptotrichia spp.  •  Megasphaera spp.", {
    x:0.35,y:4.05,w:4.4,h:1.1, fontSize:9.5, color:"FFBBAA", lineSpacingMultiple:1.4
  });

  // Col 2: Clinical + complications
  card(s, 5.1,0.95,4.7,4.35,"0D1E2C");
  s.addText("AMSEL DIAGNOSTIC CRITERIA", { x:5.25,y:1.0,w:4.4,h:0.32, fontSize:11, bold:true, color:C.gold, charSpacing:1.2 });
  hRule(s, 5.25, 1.34, 3.8, C.coral);
  s.addText("Diagnosis requires ≥ 3 of 4:", { x:5.25,y:1.4,w:4.4,h:0.28, fontSize:9.5, color:"FFDDDD", italic:true });
  const amsel = [
    ["1","Homogeneous, thin grey-white discharge"],
    ["2","Vaginal pH > 4.5"],
    ["3","Positive Whiff test (10% KOH → fishy odor)"],
    ["4","Clue cells ≥20% on wet mount (pathognomonic)"],
  ];
  amsel.forEach(([n, t], i) => {
    s.addShape(pres.shapes.OVAL, { x:5.25,y:1.78+i*0.5,w:0.3,h:0.3, fill:{color:C.coral}, line:{color:C.coral} });
    s.addText(n, { x:5.25,y:1.78+i*0.5,w:0.3,h:0.3, fontSize:9.5, bold:true, color:C.white, align:"center", valign:"middle" });
    s.addText(t, { x:5.65,y:1.8+i*0.5,w:4.0,h:0.27, fontSize:10, color:C.white, margin:0 });
  });
  s.addText("COMPLICATIONS OF BV:", { x:5.25,y:3.82,w:4.4,h:0.28, fontSize:10, bold:true, color:C.gold });
  const comps = ["PID & upper genital tract infection","HIV acquisition risk ↑ 2–3x","Preterm birth & PPROM in pregnancy","Post-surgical infections","Increased STI susceptibility","Neonatal complications"];
  comps.forEach((c, i) => {
    const col = i<3?0:1;
    const row = i%3;
    s.addText("⚠ "+c, { x:5.25+col*2.3,y:4.12+row*0.35,w:2.2,h:0.32, fontSize:9, color:"FFCCAA", margin:0 });
  });
}

// ═════════════════════════════════════════════════════════════════════════════
// SLIDE 10 — PLACENTA & UTERINE MICROBIOME
// ═════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  fillBg(s);
  topBar(s, C.deepTeal);
  leftAccent(s, C.deepTeal);
  slideH(s, "Placenta & Uterine Microbiome", "Section H  |  The 'Sterile Womb' Hypothesis Revisited");
  footer(s, "Slide 10");

  // Split design
  card(s, 0.24,0.95,4.6,4.4,"FFF0F0");
  s.addShape(pres.shapes.RECTANGLE, { x:0.24,y:0.95,w:4.6,h:0.42, fill:{color:C.coral}, line:{color:C.coral} });
  s.addText("❌  HISTORICAL VIEW (Pre-2012)", { x:0.24,y:0.95,w:4.6,h:0.42, fontSize:11, bold:true, color:C.white, align:"center", valign:"middle" });
  s.addText("• Placenta = sterile\n• Uterus = sterile\n• Any microorganism found = contamination or infection\n• Basis: Culture-based studies (detection limit issue)\n• Used to justify aggressive antibiotic use in pregnancy", {
    x:0.38,y:1.47,w:4.3,h:2.5, fontSize:10.5, color:C.textDark, lineSpacingMultiple:1.55
  });

  card(s, 5.16,0.95,4.6,4.4,"E8F7F0");
  s.addShape(pres.shapes.RECTANGLE, { x:5.16,y:0.95,w:4.6,h:0.42, fill:{color:C.green}, line:{color:C.green} });
  s.addText("✅  CURRENT EVIDENCE (Post-2012)", { x:5.16,y:0.95,w:4.6,h:0.42, fontSize:11, bold:true, color:C.white, align:"center", valign:"middle" });
  s.addText("• 16S rRNA sequencing identified commensal bacteria in placenta\n• Uterus harbors microorganisms in healthy asymptomatic women\n• Uterine microbiome differs from vagina and gut\n• May influence implantation, pregnancy outcome\n• Role in preterm birth under active investigation", {
    x:5.3,y:1.47,w:4.3,h:2.5, fontSize:10.5, color:C.textDark, lineSpacingMultiple:1.55
  });

  // Key message
  card(s, 0.24,5.1,9.52,0.3,C.goldLight);
  s.addShape(pres.shapes.RECTANGLE, { x:0.24,y:5.1,w:0.09,h:0.3, fill:{color:C.gold}, line:{color:C.gold} });
  s.addText("Clinical Significance: Disruption of the uterine microbiome may impair implantation and predispose to recurrent pregnancy loss — an area of active research.", {
    x:0.45,y:5.1,w:9.15,h:0.3, fontSize:9.5, color:C.textDark, valign:"middle", italic:true
  });
}

// ═════════════════════════════════════════════════════════════════════════════
// SLIDE 11 — NEONATAL SIGNIFICANCE
// ═════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  fillBg(s);
  topBar(s, C.navy);
  leftAccent(s, C.coral);
  slideH(s, "Neonatal Significance of Maternal Genital Flora", "Section I  |  Vertical Transmission");
  footer(s, "Slide 11");

  s.addText("Organisms colonizing the maternal vagina/cervix at delivery are transmitted to the neonate during passage through the birth canal:", {
    x:0.28,y:0.9,w:9.4,h:0.36, fontSize:10.5, color:C.textMid, italic:true
  });

  const rows = [
    { org:"Organism", route:"Transmission", disease:"Neonatal Disease / Manifestation", timing:"Timing", hdr:true },
    { org:"Group B Streptococcus", route:"Vaginal colonization", disease:"Sepsis, Meningitis, Pneumonia (25% of mothers colonized)", timing:"Early-onset", hdr:false },
    { org:"Neisseria gonorrhoeae", route:"Direct mucosal contact", disease:"Ophthalmia neonatorum — purulent conjunctivitis (may → blindness)", timing:"1–4 days", hdr:false },
    { org:"Chlamydia trachomatis", route:"Birth canal secretions", disease:"Neonatal conjunctivitis; Chlamydial pneumonia at 2–12 weeks", timing:"5–14 days", hdr:false },
    { org:"Herpes simplex virus", route:"Active genital HSV lesions", disease:"Neonatal herpes — encephalitis, disseminated (high mortality)", timing:"0–4 days", hdr:false },
    { org:"Candida albicans", route:"Vaginal colonization", disease:"Oral thrush, cutaneous candidiasis, rarely systemic", timing:"Days–weeks", hdr:false },
    { org:"Listeria monocytogenes", route:"Rare vaginal colonizer", disease:"Early-onset neonatal sepsis, meningitis, granulomatosis infantiseptica", timing:"Hours–days", hdr:false },
  ];

  const CW = [2.2, 2.1, 3.9, 1.0];
  const CX = [0.28, 2.48, 4.58, 8.48];
  rows.forEach((row, ri) => {
    const y = 1.32 + ri * 0.58;
    const isH = row.hdr;
    const isHigh = ["Group B Streptococcus","Herpes simplex virus"].includes(row.org);
    const bg = isH?C.navy: isHigh?"FFF0F0": ri%2===0?C.white:C.gray1;
    s.addShape(pres.shapes.RECTANGLE, { x:0.28,y,w:9.25,h:0.53, fill:{color:bg}, line:{color:"C8D8E0",width:0.35} });
    [[row.org,0],[row.route,1],[row.disease,2],[row.timing,3]].forEach(([txt,ci]) => {
      s.addText(txt, { x:CX[ci]+0.07,y:y+0.03,w:CW[ci]-0.1,h:0.47,
        fontSize:isH?9.5:9.2, bold:isH||ci===0, color:isH?C.white:ci===0?C.teal:C.textDark, valign:"middle" });
    });
    if (isHigh) {
      s.addText("⚠", { x:9.52,y,w:0.22,h:0.53, fontSize:12, align:"center", valign:"middle" });
    }
  });
}

// ═════════════════════════════════════════════════════════════════════════════
// SLIDE 12 — ALTERING FACTORS + CLINICAL IMPACT
// ═════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  fillBg(s);
  topBar(s, C.navy);
  leftAccent(s, C.teal);
  slideH(s, "Factors Altering Genital Flora & Clinical Impact", "Section J");
  footer(s, "Slide 12");

  // Left: factors
  card(s, 0.22,0.95,5.1,4.5,C.white);
  s.addShape(pres.shapes.RECTANGLE, { x:0.22,y:0.95,w:5.1,h:0.4, fill:{color:C.deepTeal}, line:{color:C.deepTeal} });
  s.addText("FACTORS THAT ALTER FLORA", { x:0.22,y:0.95,w:5.1,h:0.4, fontSize:10.5, bold:true, color:C.white, align:"center", valign:"middle", charSpacing:0.8 });

  const factors = [
    { icon:"💊", label:"Broad-spectrum antibiotics",  effect:"Suppress Lactobacillus → BV or Candida vaginitis" },
    { icon:"🌡️", label:"Hormonal changes",            effect:"Pregnancy, menopause alter glycogen & Lactobacillus" },
    { icon:"🚿", label:"Vaginal douching",             effect:"Disrupts normal flora; major BV risk factor" },
    { icon:"💑", label:"Sexual activity / new partner",effect:"New organisms; BV sexually transmissible" },
    { icon:"🩺", label:"IUD / Contraceptive devices",  effect:"Alter uterine and cervical microenvironment" },
    { icon:"🍬", label:"Diabetes mellitus",            effect:"Elevated glucose → Candida overgrowth" },
    { icon:"🛡️", label:"Immunosuppression",           effect:"Opportunistic organisms flourish" },
    { icon:"🧪", label:"Spermicides",                  effect:"Nonoxynol-9 kills Lactobacillus as well as sperm" },
  ];
  factors.forEach((f, i) => {
    const y = 1.44 + i * 0.48;
    s.addShape(pres.shapes.RECTANGLE, { x:0.26,y,w:5.02,h:0.44, fill:{color:i%2===0?C.gray1:C.white}, line:{color:"D5E2E8",width:0.3} });
    s.addText(f.icon, { x:0.3,y,w:0.38,h:0.44, fontSize:13, align:"center", valign:"middle" });
    s.addText(f.label, { x:0.72,y:y+0.01,w:2.5,h:0.2, fontSize:9.8, bold:true, color:C.textDark, margin:0 });
    s.addText(f.effect, { x:0.72,y:y+0.22,w:4.4,h:0.2, fontSize:8.5, color:C.gray2, margin:0 });
  });

  // Right: opportunistic infections
  card(s, 5.55,0.95,4.25,4.5,C.white);
  s.addShape(pres.shapes.RECTANGLE, { x:5.55,y:0.95,w:4.25,h:0.4, fill:{color:C.navy}, line:{color:C.navy} });
  s.addText("OPPORTUNISTIC INFECTIONS", { x:5.55,y:0.95,w:4.25,h:0.4, fontSize:10.5, bold:true, color:C.white, align:"center", valign:"middle", charSpacing:0.8 });

  const opps = [
    { icon:"💧", name:"Urinary Tract Infection", detail:"E. coli from vaginal introitus ascends urethra; heavy introital flora = recurrent UTI risk", color:C.teal },
    { icon:"🔥", name:"Pelvic Inflammatory Disease", detail:"BV organisms ascend to uterus/tubes → salpingitis, infertility, ectopic pregnancy", color:C.coral },
    { icon:"🤱", name:"Chorioamnionitis", detail:"Ascending vaginal flora infects amniotic cavity → preterm birth, fetal damage", color:"C0761B" },
    { icon:"🔴", name:"HIV Susceptibility ↑↑", detail:"BV disrupts mucosal barrier; HIV risk 2–3x higher with BV vs. Lactobacillus-dominated flora", color:C.coral },
    { icon:"🧫", name:"Gonorrhoea Enhancement", detail:"Cervicovaginal microbiota unmask receptors on cervical cells, enhancing N. gonorrhoeae attachment", color:C.deepTeal },
    { icon:"🏥", name:"Surgical Site Infections", detail:"Post-hysterectomy/cesarean infections from ascending vaginal flora (anaerobes, GBS)", color:C.navy },
  ];
  opps.forEach((op, i) => {
    const y = 1.44 + i * 0.67;
    s.addShape(pres.shapes.RECTANGLE, { x:5.6,y,w:4.15,h:0.6, fill:{color:i%2===0?C.gray1:C.white}, line:{color:"D5E2E8",width:0.3} });
    s.addShape(pres.shapes.RECTANGLE, { x:5.6,y,w:0.06,h:0.6, fill:{color:op.color}, line:{color:op.color} });
    s.addText(op.icon+" "+op.name, { x:5.72,y:y+0.02,w:4.0,h:0.24, fontSize:9.8, bold:true, color:op.color, margin:0 });
    s.addText(op.detail, { x:5.72,y:y+0.28,w:4.0,h:0.26, fontSize:8.2, color:C.textMid, margin:0 });
  });
}

// ═════════════════════════════════════════════════════════════════════════════
// SLIDE 13 — ETHNIC VARIATION & SPECIAL POPULATIONS
// ═════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  fillBg(s);
  topBar(s, C.deepTeal);
  leftAccent(s, C.deepTeal);
  slideH(s, "Ethnic Variation & Special Populations", "Section D (continued)  |  Ravel et al., PNAS 2011");
  footer(s, "Slide 13");

  // Study card
  card(s, 0.24,0.95,9.52,1.0,C.tealLight);
  s.addShape(pres.shapes.RECTANGLE, { x:0.24,y:0.95,w:0.09,h:1.0, fill:{color:C.teal}, line:{color:C.teal} });
  s.addText([
    { text:"Landmark Study: ", options:{bold:true, color:C.deepTeal} },
    { text:"Ravel et al. (PNAS 2011) analyzed the vaginal microbiome of ", options:{color:C.textDark} },
    { text:"396 asymptomatic reproductive-age women ", options:{bold:true, color:C.textDark} },
    { text:"across four ethnic groups and found significant variation in both vaginal pH and microbiome composition. This challenged the uniform definition of 'normal' vaginal flora.", options:{color:C.textDark} }
  ], { x:0.45,y:0.97,w:9.15,h:0.96, fontSize:11, valign:"middle" });

  // Ethnic comparison cards
  const groups = [
    { eth:"White Women",    color:C.teal,    dominant:"L. crispatus (dominant)", pH:"3.8–4.2", notes:"Most consistently Lactobacillus-dominant; lowest BV prevalence" },
    { eth:"Asian Women",    color:C.navy,    dominant:"L. crispatus or iners",    pH:"3.8–4.4", notes:"High Lactobacillus dominance; similar to White women pattern" },
    { eth:"Hispanic Women", color:"8B6914",  dominant:"L. iners dominant",       pH:"4.0–4.6", notes:"More L. iners (less protective than L. crispatus); moderate BV risk" },
    { eth:"Black Women",    color:C.coral,   dominant:"Mixed anaerobic flora",   pH:"4.5–5.5", notes:"Higher proportion with Lactobacillus-deficient microbiome; highest BV prevalence" },
  ];

  groups.forEach((g, i) => {
    const x = 0.24 + i * 2.4;
    card(s, x, 2.08, 2.28, 2.95, C.white);
    s.addShape(pres.shapes.RECTANGLE, { x,y:2.08,w:2.28,h:0.44, fill:{color:g.color}, line:{color:g.color} });
    s.addText(g.eth, { x,y:2.08,w:2.28,h:0.44, fontSize:11, bold:true, color:C.white, align:"center", valign:"middle" });
    s.addText("Dominant Flora:", { x:x+0.1,y:2.6,w:2.08,h:0.22, fontSize:9, bold:true, color:g.color, margin:0 });
    s.addText(g.dominant, { x:x+0.1,y:2.82,w:2.08,h:0.24, fontSize:10, color:C.textDark, margin:0 });
    s.addText("Typical pH: "+g.pH, { x:x+0.1,y:3.1,w:2.08,h:0.24, fontSize:10, bold:true, color:C.textMid, margin:0 });
    hRule(s, x+0.1, 3.36, 1.8, g.color);
    s.addText(g.notes, { x:x+0.1,y:3.45,w:2.08,h:1.42, fontSize:8.8, color:C.textMid, lineSpacingMultiple:1.35, valign:"top" });
  });

  card(s, 0.24,5.12,9.52,0.3,C.goldLight);
  s.addShape(pres.shapes.RECTANGLE, { x:0.24,y:5.12,w:0.09,h:0.3, fill:{color:C.gold}, line:{color:C.gold} });
  s.addText("Clinical Implication: Ethnicity must be considered when defining 'normal' vs. 'abnormal' vaginal flora. Black women have higher BV rates not solely due to risk behavior, but due to underlying microbiome differences.", {
    x:0.45,y:5.12,w:9.15,h:0.3, fontSize:9, color:C.textDark, valign:"middle", italic:true
  });
}

// ═════════════════════════════════════════════════════════════════════════════
// SLIDE 14 — KEY TAKEAWAYS
// ═════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  fillDark(s);
  s.addShape(pres.shapes.RECTANGLE, { x:0,y:0,w:10,h:0.85, fill:{color:C.gold}, line:{color:C.gold} });
  s.addText("Key Takeaways", { x:0.25,y:0.06,w:9.5,h:0.76, fontSize:22, bold:true, color:C.navy, valign:"middle", fontFace:"Calibri" });
  footer(s, "Slide 14");

  const kts = [
    { n:"01", title:"Vaginal flora is estrogen-driven", body:"Estrogen → glycogen deposition → Lactobacillus dominance → lactic acid + H₂O₂ → pH 3.8–4.5. This entire cascade collapses at menopause and before puberty." },
    { n:"02", title:"Lactobacillus = multifactorial guardian", body:"Protection is not just from pH. Bacteriocins, H₂O₂, competitive exclusion, immune modulation and biosurfactants all contribute to its defensive role." },
    { n:"03", title:"BV is ecological collapse, not infection", body:"No single pathogen causes BV. It is a polymicrobial dysbiosis — a loss of Lactobacillus dominance and takeover by a mixed anaerobic community." },
    { n:"04", title:"GBS colonization is a silent neonatal threat", body:"25% of childbearing women carry GBS. Without intrapartum prophylaxis, neonatal sepsis and meningitis can result — one of the most preventable neonatal tragedies." },
    { n:"05", title:"Male flora affects female vaginal health", body:"Uncircumcised men harbor BV-associated anaerobes (Prevotella, Anaerococcus). Sexual partners share microbial strains — BV has a sexual transmission component." },
    { n:"06", title:"Antibiotic stewardship matters here too", body:"Broad-spectrum antibiotics do not just create resistance. They strip the vaginal microbiome, creating an ecological vacuum filled by Candida or BV organisms." },
  ];

  kts.forEach((k, i) => {
    const col = i % 2;
    const row = Math.floor(i / 2);
    const x = 0.2 + col * 4.95;
    const y = 0.95 + row * 1.55;
    card(s, x, y, 4.7, 1.45, "0C1F30");
    s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x:x+0.1,y:y+0.12,w:0.44,h:0.44, fill:{color:C.gold}, line:{color:C.gold}, rectRadius:0.06 });
    s.addText(k.n, { x:x+0.1,y:y+0.12,w:0.44,h:0.44, fontSize:12, bold:true, color:C.navy, align:"center", valign:"middle" });
    s.addText(k.title, { x:x+0.65,y:y+0.12,w:3.95,h:0.38, fontSize:11, bold:true, color:C.gold, margin:0, valign:"middle" });
    s.addText(k.body, { x:x+0.14,y:y+0.62,w:4.42,h:0.76, fontSize:9, color:"B8CED8", lineSpacingMultiple:1.35, valign:"top" });
  });
}

// ═════════════════════════════════════════════════════════════════════════════
// SLIDE 15 — REFERENCES & THANK YOU
// ═════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  fillDark(s);
  s.addShape(pres.shapes.RECTANGLE, { x:0,y:0,w:0.22,h:5.625, fill:{color:C.teal}, line:{color:C.teal} });
  s.addShape(pres.shapes.RECTANGLE, { x:9.78,y:0,w:0.22,h:5.625, fill:{color:C.gold}, line:{color:C.gold} });
  s.addShape(pres.shapes.RECTANGLE, { x:0.22,y:4.65,w:9.56,h:0.07, fill:{color:C.teal}, line:{color:C.teal} });

  s.addText("Thank You", { x:0.5,y:0.35,w:9,h:1.1, fontSize:52, bold:true, color:C.white, align:"center", fontFace:"Calibri" });
  hRule(s, 2.5, 1.5, 5.0, C.gold);
  s.addText("Open for Discussion & Questions", { x:0.5,y:1.62,w:9,h:0.48, fontSize:16, color:"8EC8D2", align:"center", italic:true });

  // References box
  card(s, 0.5,2.22,9.0,2.55,"0D1E2C");
  s.addText("References", { x:0.7,y:2.3,w:8.6,h:0.36, fontSize:13, bold:true, color:C.gold });
  hRule(s, 0.7, 2.68, 6.0, C.teal);
  const refs = [
    "1.  Jawetz E, Melnick JL, Adelberg EA. Medical Microbiology, 28th Ed. McGraw-Hill; 2019. Ch. 11 — Normal Human Microbiota, pp. 180–186.",
    "2.  Ryan KJ, Ray CG. Sherris & Ryan's Medical Microbiology, 8th Ed. McGraw-Hill; 2022. pp. 37–39.",
    "3.  Murray PR, Rosenthal KS, Pfaller MA. Medical Microbiology, 9th Ed. Elsevier; 2021. Ch. 2 — Normal Flora, pp. 19–30.",
    "4.  Ravel J et al. Vaginal microbiome of reproductive-age women. Proc Natl Acad Sci USA. 2011;108 Suppl 1:4680–4687.",
    "5.  Amsel R et al. Nonspecific vaginitis: Diagnostic criteria and microbial and epidemiologic associations. Am J Med. 1983;74(1):14–22.",
  ];
  refs.forEach((r, i) => {
    s.addText(r, { x:0.7,y:2.78+i*0.38,w:8.6,h:0.36, fontSize:8.8, color:"90B8C8", lineSpacingMultiple:1.1, valign:"middle" });
  });
}

// ─── WRITE ────────────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/genital-flora-ppt/Genital_Flora_Department_Seminar.pptx" })
  .then(() => console.log("✅  Department PPT saved!"))
  .catch(err => console.error("❌  Error:", err));
Running Command

cd /home/daytona/workspace/genital-flora-ppt && node dept_ppt.js 2>&1

Running Command

ls -lh /home/daytona/workspace/genital-flora-ppt/

Your department seminar presentation is ready:

Genital Flora Department Seminar

Presentation · PPTX


This is a fully upgraded 15-slide department-level presentation (487 KB), significantly more detailed than the previous version. Here's what's inside:
SlideContent
1Cover - Formal title with presenter/moderator/date fields
2Contents - Labelled A–K section index with descriptions
3Introduction - Definition + host-microbe relationship (3-pillar layout)
4Urethral Flora - Detailed table with Gram stain, notes, risk level
5Vaginal Flora Lifecycle - 5-phase timeline (including pregnancy phase)
6Organism Inventory - Two-column full list with badge labels (Dominant/Common/Anaerobe etc.)
7Protective Mechanisms - Dark slide with 6-mechanism grid (lactic acid, H₂O₂, bacteriocins, exclusion, immune modulation, biosurfactants)
8Male Genital Microbiota - 4-site cards + circumcision evidence panel
9Bacterial Vaginosis - Full Amsel criteria + BV organism list + 6 complications
10Placenta & Uterine Microbiome - Historical vs. current evidence split
11Neonatal Significance - Detailed 7-organism transmission table
12Altering Factors + Clinical Impact - 8 factors + 6 opportunistic infections
13Ethnic Variation - Ravel et al. 2011 study; 4 ethnic group comparison cards
14Key Takeaways - 6 core learning points in dark styled cards
15Thank You + References - 5 formatted academic references
Key upgrades over the seminar version:
  • Presenter/moderator/date placeholder fields on cover
  • Added the ethnic variation slide (Ravel 2011 study) - clinically important and rarely covered
  • Added pregnancy as a separate flora phase in the lifecycle
  • Deeper organism details with Gram stain classification and risk levels
  • Richer BV slide with full complications list
  • Biosurfactant mechanism added to protective mechanisms slide
  • More formal academic referencing style
This is a shared conversation. Sign in to Orris to start your own chat.