/* =========================================
   SCHOOL HEALTH ISM PROJECT - Main Stylesheet
   Color Palette: CDC/WHO-inspired calm blues
   ========================================= */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Nunito:wght@400;600;700;800;900&display=swap');

/* ---- CSS Variables ---- */
:root {
  --blue-darkest:  #1E4F86;
  --blue-dark:     #1C76B9;
  --blue-mid:      #2F6FA8;
  --blue-light:    #C8DBF5;
  --blue-pale:     #EAF2FB;
  --teal:          #4FA7B8;
  --accent-yellow: #F4B34D;
  --accent-green:  #4CAF7D;
  --accent-red:    #E05A5A;
  --white:         #FFFFFF;
  --gray-dark:     #2F2F2F;
  --gray-mid:      #5A6170;
  --gray-light:    #F4F7FB;
  --shadow-sm:     0 2px 8px rgba(30,79,134,0.10);
  --shadow-md:     0 4px 18px rgba(30,79,134,0.15);
  --shadow-lg:     0 8px 32px rgba(30,79,134,0.18);
  --radius-sm:     8px;
  --radius-md:     14px;
  --radius-lg:     22px;
  --transition:    all 0.25s ease;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--gray-light);
  color: var(--gray-dark);
  line-height: 1.65;
  font-size: 16px;
}

h1,h2,h3,h4,h5 {
  font-family: 'Nunito', sans-serif;
  color: var(--blue-darkest);
  line-height: 1.25;
}

a { color: var(--blue-dark); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--blue-darkest); }

img { max-width: 100%; height: auto; display: block; }

/* ---- Navigation ---- */
.navbar {
  background: linear-gradient(135deg, var(--blue-darkest) 0%, var(--blue-mid) 100%);
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--white);
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  text-decoration: none;
}

.nav-brand .brand-icon {
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--white);
}

.nav-brand .brand-icon i {
  font-size: 1.1rem;
  color: var(--white);
}

.nav-brand span { color: var(--accent-yellow); }

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  align-items: center;
}

.nav-links a {
  color: rgba(255,255,255,0.85);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
}

.nav-links a:hover, .nav-links a.active {
  background: rgba(255,255,255,0.18);
  color: var(--white);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}

/* ---- Hero Section ---- */
.hero {
  background: linear-gradient(135deg, var(--blue-darkest) 0%, var(--blue-mid) 60%, var(--teal) 100%);
  color: var(--white);
  padding: 5rem 2rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  right: -5%;
  width: 400px;
  height: 400px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}

.hero-content { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; }

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--white);
  padding: 0.4rem 1.2rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: var(--white);
  font-weight: 900;
  margin-bottom: 1rem;
}

.hero h1 span { color: var(--accent-yellow); }

.hero p {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.88);
  max-width: 640px;
  margin: 0 auto 2rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--white);
  color: var(--blue-darkest);
}
.btn-primary:hover {
  background: var(--blue-pale);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--blue-darkest);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.6);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--white);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-blue {
  background: var(--blue-dark);
  color: var(--white);
}
.btn-blue:hover {
  background: var(--blue-darkest);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--white);
}

/* ---- Sections ---- */
.section {
  padding: 4rem 2rem;
}

.section-alt { background: var(--white); }

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--gray-mid);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

.section-label {
  display: inline-block;
  color: var(--blue-dark);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  background: var(--blue-pale);
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
}

/* ---- Disease Cards (Home) ---- */
.disease-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.disease-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--blue-light);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.disease-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--blue-dark), var(--teal));
}

.disease-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.disease-icon {
  width: 56px;
  height: 56px;
  background: var(--blue-pale);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--blue-dark);
  flex-shrink: 0;
}

.disease-icon i {
  font-size: 1.5rem;
  color: var(--blue-dark);
}

.disease-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.disease-card p {
  color: var(--gray-mid);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.age-badges {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.age-badge {
  padding: 0.2rem 0.7rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-elem  { background: #E8F5E9; color: #2E7D32; }
.badge-mid   { background: #FFF3E0; color: #E65100; }
.badge-high  { background: #E3F2FD; color: #1565C0; }

/* ---- Stat Cards ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}

.stat-card {
  background: linear-gradient(135deg, var(--blue-darkest), var(--blue-mid));
  color: var(--white);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 900;
  font-family: 'Nunito', sans-serif;
  color: var(--accent-yellow);
  display: block;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.85);
}

/* ---- Info Cards ---- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.info-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--blue-dark);
}

.info-card .icon {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  width: 46px;
  height: 46px;
  background: var(--blue-pale);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-card .icon i {
  font-size: 1.3rem;
  color: var(--blue-dark);
}

.info-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.info-card p { color: var(--gray-mid); font-size: 0.9rem; }

/* ---- Audience Section ---- */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.audience-card {
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  transition: var(--transition);
}

.audience-card:hover { transform: translateY(-4px); }

.audience-card.elem  { background: #E8F5E9; border-top: 5px solid #4CAF50; }
.audience-card.mid   { background: #FFF3E0; border-top: 5px solid #FF9800; }
.audience-card.high  { background: #E3F2FD; border-top: 5px solid #2196F3; }
.audience-card.staff { background: var(--blue-pale); border-top: 5px solid var(--blue-dark); }

.audience-card .aud-icon {
  font-size: 1rem;
  margin-bottom: 1rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  background: rgba(255,255,255,0.6);
}

.audience-card .aud-icon i {
  font-size: 1.6rem;
  color: var(--blue-darkest);
}

.audience-card.elem  .aud-icon i { color: #2E7D32; }
.audience-card.mid   .aud-icon i { color: #E65100; }
.audience-card.high  .aud-icon i { color: #1565C0; }
.audience-card.staff .aud-icon i { color: var(--blue-darkest); }

.audience-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.audience-card p  { font-size: 0.88rem; color: var(--gray-mid); }

/* ---- Page Header (inner pages) ---- */
.page-header {
  background: linear-gradient(135deg, var(--blue-darkest) 0%, var(--blue-mid) 100%);
  color: var(--white);
  padding: 3.5rem 2rem 3rem;
  text-align: center;
}

.page-header h1 { color: var(--white); font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 0.75rem; }
.page-header p  { color: rgba(255,255,255,0.85); font-size: 1.05rem; max-width: 600px; margin: 0 auto; }

/* ---- Disease Filter Tabs ---- */
.filter-bar {
  background: var(--white);
  border-bottom: 1px solid var(--blue-light);
  padding: 1.25rem 2rem;
  position: sticky;
  top: 68px;
  z-index: 900;
  box-shadow: var(--shadow-sm);
}

.filter-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.filter-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-mid);
  margin-right: 0.5rem;
}

.filter-btn {
  padding: 0.4rem 1rem;
  border-radius: 50px;
  border: 2px solid var(--blue-light);
  background: transparent;
  color: var(--blue-mid);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  color: var(--white);
}

.filter-btn i, .age-btn i {
  font-size: .85em;
}

/* ---- Age Level Selector ---- */
.age-selector {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.age-btn {
  padding: 0.6rem 1.5rem;
  border-radius: 50px;
  border: 2px solid transparent;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.age-btn.elem-btn  { background: #E8F5E9; color: #2E7D32; border-color: #A5D6A7; }
.age-btn.mid-btn   { background: #FFF3E0; color: #E65100; border-color: #FFCC80; }
.age-btn.high-btn  { background: #E3F2FD; color: #1565C0; border-color: #90CAF9; }

.age-btn.elem-btn.active  { background: #4CAF50; color: white; border-color: #4CAF50; }
.age-btn.mid-btn.active   { background: #FF9800; color: white; border-color: #FF9800; }
.age-btn.high-btn.active  { background: #2196F3; color: white; border-color: #2196F3; }

/* ---- Disease Factsheet Panel ---- */
.factsheet-wrap {
  margin-bottom: 3rem;
}

.factsheet-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: linear-gradient(135deg, var(--blue-darkest), var(--blue-mid));
  color: var(--white);
  padding: 1.5rem 2rem;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.factsheet-icon {
  width: 60px;
  height: 60px;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
  color: var(--white);
}

.factsheet-icon i {
  font-size: 1.6rem;
  color: var(--white);
}

.factsheet-title h2 { color: var(--white); font-size: 1.5rem; }
.factsheet-title p  { color: rgba(255,255,255,0.8); font-size: 0.9rem; }

.factsheet-body {
  background: var(--white);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--blue-light);
  border-top: none;
}

/* Age level panels */
.age-panel {
  display: none;
  padding: 2rem;
}
.age-panel.active { display: block; }

.age-panel-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--blue-light);
}

.age-panel-badge {
  padding: 0.35rem 1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.badge-elem-lg  { background: #4CAF50; color: white; }
.badge-mid-lg   { background: #FF9800; color: white; }
.badge-high-lg  { background: #2196F3; color: white; }

.age-panel-title { font-size: 1rem; color: var(--gray-mid); }

/* Factsheet sections grid */
.fs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 1.25rem;
}

.fs-section {
  background: var(--blue-pale);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  border-left: 4px solid var(--blue-dark);
}

.fs-section.spread-section  { border-left-color: var(--teal); }
.fs-section.symptom-section { border-left-color: var(--accent-yellow); }
.fs-section.school-section  { border-left-color: var(--accent-red); }
.fs-section.prevent-section { border-left-color: var(--accent-green); }
.fs-section.what-section    { border-left-color: var(--blue-dark); }

.fs-section h4 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--blue-darkest);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.fs-section ul {
  padding-left: 1.2rem;
  color: var(--gray-dark);
  font-size: 0.92rem;
}

.fs-section ul li { margin-bottom: 0.5rem; }
.fs-section ul li textarea.fill-line { margin-bottom: 0; }

.fs-section p {
  color: var(--gray-dark);
  font-size: 0.92rem;
}

/* Elementary visual helpers */
.emoji-list { list-style: none; padding-left: 0; }
.emoji-list li::before { content: '→  '; color: var(--blue-dark); font-weight: bold; }
.big-emoji { font-size: 1.2rem; }

/* ============================================
   EDITABLE CONTENT SYSTEM
   Click any highlighted text to edit it
   ============================================ */

/* The edit-mode toolbar */
#edit-toolbar {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  align-items: flex-end;
}
#edit-toolbar button {
  padding: .6rem 1.2rem;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: .85rem;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  display: flex;
  align-items: center;
  gap: .45rem;
  transition: all 0.2s;
}
#btn-edit-toggle {
  background: var(--blue-darkest);
  color: white;
}
#btn-edit-toggle:hover { background: var(--blue-dark); }
#btn-edit-toggle.active { background: #2E7D32; }
#btn-save-reminder {
  background: var(--accent-yellow);
  color: #4a3000;
  display: none;
  font-size: .78rem;
  padding: .5rem 1rem;
}

/* Editable elements — subtle highlight in edit mode */
body.edit-mode [contenteditable="true"] {
  outline: none;
  border-radius: 4px;
  transition: background 0.15s, box-shadow 0.15s;
  cursor: text;
  position: relative;
}
body.edit-mode [contenteditable="true"]:hover {
  background: rgba(199,219,245,0.35);
  box-shadow: 0 0 0 2px rgba(28,118,185,0.3);
}
body.edit-mode [contenteditable="true"]:focus {
  background: rgba(199,219,245,0.55);
  box-shadow: 0 0 0 2px var(--blue-dark);
}

/* Tiny "editable" badge that appears on hover in edit mode */
body.edit-mode [contenteditable="true"]:hover::after {
  content: '✎ edit';
  position: absolute;
  top: -1.3rem;
  left: 0;
  font-size: .65rem;
  font-weight: 700;
  background: var(--blue-dark);
  color: white;
  padding: .1rem .45rem;
  border-radius: 4px;
  pointer-events: none;
  white-space: nowrap;
  letter-spacing: .04em;
  z-index: 10;
}

/* ---- Factsheet content boxes (scroll box style) ---- */
.fill-line {
  display: block;
  width: 100%;
  /* Fixed height with scroll so text is always visible */
  height: 2.6rem;
  overflow-y: auto;
  border: 1.5px solid #C8DBF5;
  border-radius: 6px;
  background: rgba(255,255,255,0.85);
  color: var(--gray-dark);
  font-size: 0.91rem;
  font-family: inherit;
  line-height: 1.55;
  padding: 0.45rem 0.7rem;
  margin-bottom: 0.45rem;
  outline: none;
  resize: none;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
  scrollbar-width: thin;
  scrollbar-color: #A0BAD8 transparent;
}
.fill-line::-webkit-scrollbar { width: 4px; }
.fill-line::-webkit-scrollbar-thumb { background: #A0BAD8; border-radius: 4px; }
.fill-line:focus {
  border-color: var(--blue-dark);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(28,118,185,0.12);
}
.fill-line::placeholder {
  color: #A0BAD8;
  font-style: italic;
}

/* Paragraph content scroll box */
.fill-para {
  display: block;
  width: 100%;
  /* Fixed height with scroll — always shows content, never collapses */
  height: 8rem;
  overflow-y: auto;
  border: 1.5px solid #C8DBF5;
  border-radius: 6px;
  background: rgba(255,255,255,0.85);
  color: var(--gray-dark);
  font-size: 0.91rem;
  font-family: inherit;
  padding: 0.6rem 0.8rem;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  line-height: 1.7;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: #A0BAD8 transparent;
}
.fill-para::-webkit-scrollbar { width: 4px; }
.fill-para::-webkit-scrollbar-thumb { background: #A0BAD8; border-radius: 4px; }
.fill-para:focus {
  border-color: var(--blue-dark);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(28,118,185,0.12);
}
.fill-para::placeholder {
  color: #A0BAD8;
  font-style: italic;
}

/* hide truly empty li/p tags */
.fs-section ul li:empty,
.fs-section p:empty { display: none; }

/* Scroll-box label hint above fill-para */
.fs-section .fill-para + .scroll-hint,
.fs-scroll-hint {
  font-size: 0.72rem;
  color: #A0BAD8;
  text-align: right;
  margin-top: -0.25rem;
  margin-bottom: 0.4rem;
  font-style: italic;
}

/* edit-mode notice */
.edit-notice {
  background: linear-gradient(90deg, #FFF8E1, #FFFDE7);
  border: 1.5px solid #F4B34D;
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.1rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 1.75rem;
  font-size: 0.88rem;
  color: #5D4037;
}
.edit-notice i { color: #F4B34D; font-size: 1.1rem; flex-shrink: 0; margin-top:.1rem; }

/* ---- Data Trends Page ---- */
.chart-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--blue-light);
  margin-bottom: 2rem;
}

.chart-card h3 { margin-bottom: 1.25rem; font-size: 1.15rem; }

.chart-container {
  position: relative;
  height: 320px;
}

.risk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}

.risk-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--blue-dark);
  text-align: center;
}
.risk-card .risk-icon {
  margin-bottom: 0.75rem;
  width: 52px;
  height: 52px;
  background: var(--blue-pale);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
}

.risk-card .risk-icon i {
  font-size: 1.4rem;
  color: var(--blue-dark);
}
.risk-card h4 { font-size: 1rem; margin-bottom: 0.5rem; }
.risk-card p  { font-size: 0.85rem; color: var(--gray-mid); }

.progress-bar-wrap { margin-bottom: 1.25rem; }
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  font-weight: 500;
}
.progress-track {
  background: var(--blue-pale);
  height: 14px;
  border-radius: 50px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 50px;
  background: linear-gradient(90deg, var(--blue-dark), var(--teal));
  transition: width 1s ease;
}

/* ---- Sources Page ---- */
.source-category {
  margin-bottom: 3rem;
}

.source-category-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.75rem;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  color: var(--white);
  margin-bottom: 0;
}

.source-category-header.cdc  { background: linear-gradient(135deg, #1E4F86, #1C76B9); }
.source-category-header.who  { background: linear-gradient(135deg, #1A6E6E, #29A8A8); }
.source-category-header.aap  { background: linear-gradient(135deg, #5C3C9E, #8B62D4); }
.source-category-header.other { background: linear-gradient(135deg, #3D5A80, #607D9E); }

.source-category-header h2 {
  color: var(--white);
  font-size: 1.3rem;
}

.source-category-header .org-badge {
  background: rgba(255,255,255,0.2);
  padding: 0.2rem 0.8rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
}

.source-list {
  background: var(--white);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--blue-light);
  border-top: none;
  overflow: hidden;
}

.source-item {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--blue-pale);
  transition: var(--transition);
}

.source-item:last-child { border-bottom: none; }
.source-item:hover { background: var(--blue-pale); }

.source-item .source-title {
  font-weight: 600;
  color: var(--blue-darkest);
  margin-bottom: 0.25rem;
  font-size: 0.97rem;
}

.source-item .source-url {
  color: var(--blue-dark);
  font-size: 0.85rem;
  word-break: break-all;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.source-item .source-desc {
  color: var(--gray-mid);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

/* ---- Footer ---- */
.footer {
  background: var(--blue-darkest);
  color: rgba(255,255,255,0.75);
  padding: 3rem 2rem 1.5rem;
  margin-top: 3rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand h3 { color: var(--white); font-size: 1.1rem; margin-bottom: 0.75rem; }
.footer-brand p  { font-size: 0.87rem; line-height: 1.6; }

.footer-links h4 { color: var(--white); font-size: 0.95rem; margin-bottom: 0.75rem; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 0.4rem; }
.footer-links a  { color: rgba(255,255,255,0.7); font-size: 0.88rem; }
.footer-links a:hover { color: var(--accent-yellow); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 1.25rem;
  text-align: center;
  font-size: 0.83rem;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-bottom a { color: rgba(255,255,255,0.7); }

/* ---- Alerts / Notice Boxes ---- */
.notice-box {
  background: var(--blue-pale);
  border: 1px solid var(--blue-light);
  border-left: 5px solid var(--blue-dark);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.93rem;
  color: var(--blue-darkest);
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

/* ---- Hygiene Tips Banner ---- */
.hygiene-banner {
  background: linear-gradient(135deg, var(--teal) 0%, var(--blue-dark) 100%);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
}

.hygiene-banner h2 { color: var(--white); margin-bottom: 1rem; }
.hygiene-banner p  { color: rgba(255,255,255,0.88); margin-bottom: 1.75rem; }

.hygiene-tips {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.hygiene-tip {
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  min-width: 120px;
  text-align: center;
}

.hygiene-tip .tip-icon {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hygiene-tip .tip-icon i {
  font-size: 1.8rem;
  color: rgba(255,255,255,0.95);
}

.hygiene-tip p { font-size: 0.83rem; color: rgba(255,255,255,0.9); margin: 0; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0; background: var(--blue-darkest); padding: 1rem; gap: 0.25rem; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.75rem 1rem; }
  .nav-toggle { display: flex; }
  .hero { padding: 3.5rem 1.5rem 3rem; }
  .section { padding: 3rem 1.5rem; }
  .filter-bar { top: 68px; }
  .factsheet-header { flex-direction: column; text-align: center; }
  .fs-grid { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; align-items: center; }
  .chart-container { height: 240px; }
}

@media (max-width: 480px) {
  .disease-grid, .info-grid, .audience-grid, .stats-grid { grid-template-columns: 1fr; }
  .age-selector { justify-content: center; }
}

/* ---- Utility ---- */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0 !important; }
.hidden { display: none !important; }
.fade-in { animation: fadeIn 0.4s ease forwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* =============================================
   LANGUAGE TOGGLE BUTTON
   Fixed in bottom-left corner (opposite side
   from the edit-mode toolbar in bottom-right)
   ============================================= */
#lang-toggle-btn {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  z-index: 9999;
  background: linear-gradient(135deg, #1E4F86, #1C76B9);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 0.6rem 1.2rem;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(30,79,134,0.35);
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  letter-spacing: 0.01em;
}
#lang-toggle-btn:hover {
  background: linear-gradient(135deg, #15386B, #1460A0);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30,79,134,0.45);
}
#lang-toggle-btn:active {
  transform: translateY(0);
}

/* Spanish mode: subtle teal accent on the globe icon */
body[data-lang="es"] #lang-toggle-btn {
  background: linear-gradient(135deg, #1A6E6E, #4FA7B8);
}

/* Responsive: stack both fixed buttons on very small screens */
@media (max-width: 400px) {
  #lang-toggle-btn {
    bottom: 4.5rem;
    left: 1rem;
    padding: 0.5rem 1rem;
    font-size: 0.82rem;
  }
}
