/* ============================================
   CONDITIONS PAGES — Precision Clinical Education
   Extends style.css
   ============================================ */

/* ── Back bar ── */
.condition-back-bar {
  background-color: #f0f4f8;
  border-bottom: 1px solid #dce8f0;
  padding: 10px 0;
}
.cond-back-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.back-link {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #1a3c5e;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.back-link:hover { color: #f0b429; }

/* ── Hero ── */
.condition-hero {
  background-color: #1a3c5e;
  color: #fff;
  padding: 50px 24px 40px;
}
.condition-hero h1 { color: #fff; font-size: 2em; margin-bottom: 10px; text-align: center; }
.condition-hero .tagline {
  color: #d6eaf8;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1em;
  font-weight: 300;
  margin-bottom: 8px;
}
.condition-hero .subtext { color: #a8c4d8; font-size: 0.95em; max-width: 720px; margin: 0 auto; }
.condition-intro {
  color: #d6eaf8;
  font-size: 1.05em;
  max-width: 820px;
  line-height: 1.75;
  margin: 0 auto;
  text-align: center;
}

/* ── Main content ── */
.condition-main { padding: 44px 0 10px; }

.condition-section {
  margin-bottom: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid #e8ecef;
}
.condition-section:last-child { border-bottom: none; }

.condition-section h2 {
  font-size: 1.25em;
  color: #1a3c5e;
  padding-left: 14px;
  border-left: 4px solid #f0b429;
  margin-bottom: 16px;
  line-height: 1.3;
}
.condition-section ul { padding-left: 20px; margin-bottom: 10px; }
.condition-section ul li { margin-bottom: 6px; line-height: 1.65; }
.condition-section p { margin-bottom: 10px; line-height: 1.7; }

/* CMTO highlight */
.section-cmto {
  background-color: #fffbf0;
  border-radius: 6px;
  padding: 20px 24px 4px;
}
.section-cmto h2 { border-left-color: #f0b429; }

/* MT Considerations */
.section-mt h2 { border-left-color: #2e7d52; }

/* Key Takeaways */
.section-takeaways {
  background-color: #eef4fb;
  border: 1px solid #c4d9ef;
  border-radius: 8px;
  padding: 24px 28px 10px;
  border-bottom: none !important;
}
.section-takeaways h2 { border-left-color: #1a3c5e; }
.section-takeaways ul li { font-weight: 500; }

/* Assessment table */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.condition-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88em;
  margin-top: 8px;
}
.condition-table th {
  background-color: #1a3c5e;
  color: #fff;
  padding: 10px 12px;
  text-align: left;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82em;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.condition-table td {
  padding: 9px 12px;
  border-bottom: 1px solid #e8ecef;
  vertical-align: top;
  line-height: 1.55;
}
.condition-table tr:nth-child(even) td { background-color: #f8f9fa; }
.condition-table tr:hover td { background-color: #f0f5fb; }

/* ── Bottom panel ── */
.condition-bottom-panel {
  background-color: #f4f7fa;
  border-top: 2px solid #dce8f0;
  padding: 40px 0 50px;
  margin-top: 20px;
}
.bottom-related { margin-bottom: 32px; }
.bottom-related h3,
.bottom-sources h3 {
  font-size: 1.1em;
  color: #1a3c5e;
  margin-bottom: 14px;
  padding-left: 12px;
  border-left: 3px solid #f0b429;
}
.related-links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0;
}
.related-links li a {
  display: inline-block;
  background-color: #fff;
  border: 1px solid #c4d9ef;
  border-radius: 4px;
  padding: 6px 14px;
  font-size: 0.88em;
  color: #1a3c5e;
  transition: all 0.15s;
}
.related-links li a:hover {
  background-color: #1a3c5e;
  color: #fff;
  border-color: #1a3c5e;
}
.related-links li span {
  display: inline-block;
  background-color: #eee;
  border-radius: 4px;
  padding: 6px 14px;
  font-size: 0.88em;
  color: #666;
}

.bottom-sources { margin-bottom: 32px; }
.bottom-sources ul { padding-left: 18px; }
.bottom-sources ul li { margin-bottom: 6px; font-size: 0.9em; line-height: 1.6; color: #4a5a6a; }

.bottom-nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid #dce8f0;
}
.btn-outline-navy {
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.5px;
  padding: 10px 22px;
  border-radius: 4px;
  text-transform: uppercase;
  border: 2px solid #1a3c5e;
  color: #1a3c5e;
  background: transparent;
  transition: all 0.2s;
}
.btn-outline-navy:hover {
  background-color: #1a3c5e;
  color: #fff;
}

/* ── all-conditions.html ── */
.all-conditions-main { padding: 44px 0 60px; }

.jump-nav {
  background-color: #f8f9fa;
  border: 1px solid #e0e8f0;
  border-radius: 6px;
  padding: 16px 20px;
  margin-bottom: 44px;
}
.jump-nav p { margin-bottom: 10px; font-size: 0.9em; color: #4a5a6a; }
.jump-nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.jump-nav ul li a {
  background-color: #1a3c5e;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 5px 12px;
  border-radius: 3px;
  display: inline-block;
  transition: all 0.15s;
}
.jump-nav ul li a:hover { background-color: #f0b429; color: #1a3c5e; }

.system-section {
  margin-bottom: 52px;
  padding-bottom: 52px;
  border-bottom: 2px solid #e8ecef;
}
.system-section:last-child { border-bottom: none; }

.system-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}
.system-header h2 { font-size: 1.45em; color: #1a3c5e; margin: 0; }
.system-header h2 a { color: #1a3c5e; }
.system-header h2 a:hover { color: #f0b429; }

.overview-link {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  background-color: #1a3c5e;
  padding: 6px 14px;
  border-radius: 3px;
  white-space: nowrap;
  transition: all 0.15s;
}
.overview-link:hover { background-color: #f0b429; color: #1a3c5e; }

.condition-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}
.condition-list li a {
  display: block;
  padding: 8px 14px;
  background-color: #f8f9fa;
  border: 1px solid #dce8f0;
  border-radius: 4px;
  font-size: 0.88em;
  color: #2c3e50;
  line-height: 1.4;
  transition: all 0.15s;
}
.condition-list li a:hover {
  background-color: #1a3c5e;
  color: #fff;
  border-color: #1a3c5e;
}

/* CMTO legend box — all-conditions.html */
.cmto-legend {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background-color: #fffbef;
  border: 1px solid #d9a81c;
  border-left: 4px solid #f0b429;
  border-radius: 6px;
  padding: 14px 18px;
  margin-bottom: 40px;
}
.cmto-legend-badge {
  flex-shrink: 0;
  display: inline-block;
  background-color: #f0b429;
  color: #1a3c5e;
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 5px 12px;
  border-radius: 3px;
  white-space: nowrap;
  margin-top: 2px;
}
.cmto-legend p {
  margin: 0;
  font-size: 0.88em;
  color: #4a5a6a;
  line-height: 1.6;
}
@media (max-width: 600px) {
  .cmto-legend { flex-direction: column; gap: 10px; }
}

/* CMTO Priority links — all-conditions.html */
.condition-list li a.cmto-priority {
  background-color: #fffbef;
  border-color: #d9a81c;
  color: #1a3c5e;
  font-weight: 600;
}
.condition-list li a.cmto-priority::before {
  content: "★ ";
  color: #d4940a;
}
.condition-list li a.cmto-priority:hover {
  background-color: #f0b429;
  color: #1a3c5e;
  border-color: #d9a81c;
}

/* CMTO Focus badge — individual condition pages */
.cmto-badge-wrap {
  text-align: center;
  margin: 6px 0 16px;
}
.cmto-badge {
  display: inline-block;
  background-color: #f0b429;
  color: #1a3c5e;
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 4px 13px;
  border-radius: 3px;
}

/* Depth badges — all-conditions.html */
.depth-full {
  display: inline-block;
  background-color: #eef4fb;
  border: 1px solid #c4d9ef;
  border-radius: 3px;
  padding: 1px 6px;
  font-size: 0.75em;
  font-weight: 600;
  color: #1a3c5e;
  margin-left: 6px;
  vertical-align: middle;
}
.depth-emergency {
  display: inline-block;
  background-color: #fdedec;
  border: 1px solid #e6b0aa;
  border-radius: 3px;
  padding: 1px 6px;
  font-size: 0.75em;
  font-weight: 600;
  color: #c0392b;
  margin-left: 6px;
  vertical-align: middle;
}
.condition-list li a:hover .depth-full,
.condition-list li a:hover .depth-emergency {
  background: transparent;
  border-color: rgba(255,255,255,0.4);
  color: rgba(255,255,255,0.9);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .condition-hero h1 { font-size: 1.6em; }
  .condition-hero { padding: 36px 16px 28px; }
  .cond-back-row { flex-direction: column; gap: 4px; }
  .system-header { flex-direction: column; align-items: flex-start; }
  .condition-list { grid-template-columns: 1fr 1fr; }
  .bottom-nav { flex-direction: column; }
}
@media (max-width: 480px) {
  .condition-list { grid-template-columns: 1fr; }
  .related-links { flex-direction: column; }
}
