/* =============================================
   BCI 50 OPINIONS – Professional Ethics
   CSS Stylesheet – TOP NAV VERSION
   ============================================= */

:root {
  --bg-main: rgb(230, 242, 255);
  --bg-topnav: rgb(10, 45, 95);
  --bg-header: linear-gradient(135deg, rgb(10, 50, 100), rgb(0, 90, 160), rgb(0, 140, 200));
  --blue-dark: rgb(12, 55, 103);
  --blue-mid: rgb(0, 102, 179);
  --blue-light: rgb(173, 216, 250);
  --gold: rgb(210, 160, 10);
  --white: rgb(255, 255, 255);
  --card-bg: rgb(255, 255, 255);
  --border: rgb(0, 102, 179);
  --border-light: rgb(173, 216, 250);
  --text-dark: rgb(10, 30, 60);
  --text-mid: rgb(20, 60, 110);
  --text-light: rgb(255, 255, 255);
  --danger: rgb(180, 30, 30);
  --success: rgb(20, 120, 60);
  --shadow: 0 4px 20px rgba(0, 90, 160, 0.15);
  --shadow-heavy: 0 8px 32px rgba(0, 60, 120, 0.28);
  --radius: 12px;
  --radius-sm: 8px;
  --topnav-height: 68px;
  --font-head: 'Merriweather', Georgia, serif;
  --font-body: 'Source Sans 3', 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 700;
  background-color: var(--bg-main);
  color: var(--text-dark);
  min-height: 100vh;
  padding-top: var(--topnav-height);
}

/* =============================================
   TOP NAVIGATION BAR
   ============================================= */
.topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topnav-height);
  background: var(--bg-topnav);
  border-bottom: 4px solid var(--gold);
  box-shadow: 0 4px 24px rgba(0,0,0,0.35);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 16px;
}

.topnav-brand {
  flex-shrink: 0;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 900;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 14px;
  border-right: 2px solid rgba(255,255,255,0.2);
  white-space: nowrap;
  margin-right: 10px;
}
.topnav-brand span { font-size: 0.88rem; }

/* Scrollable container for nav buttons */
.topnav-scroll {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) transparent;
  padding: 6px 4px;
  scroll-behavior: smooth;
}
.topnav-scroll::-webkit-scrollbar { height: 4px; }
.topnav-scroll::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 4px; }

/* NAV BUTTONS */
.nav-btn {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 8px 14px;
  background: rgba(255,255,255,0.08);
  color: rgb(210, 230, 255);
  text-decoration: none;
  border-radius: 30px;
  border: 2px solid rgba(255,255,255,0.15);
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}
.nav-btn:hover {
  background: var(--blue-mid);
  border-color: var(--gold);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}
.nav-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: rgb(10,30,60);
  font-weight: 900;
}

/* Category colour coded buttons */
.cat1-btn { border-color: rgb(0,130,200); color: rgb(180,220,255); }
.cat2-btn { border-color: rgb(220,80,80); color: rgb(255,200,200); }
.cat3-btn { border-color: rgb(0,180,110); color: rgb(180,255,220); }
.cat4-btn { border-color: rgb(220,120,0); color: rgb(255,220,170); }
.cat5-btn { border-color: rgb(160,60,220); color: rgb(230,190,255); }
.cat6-btn { border-color: rgb(0,180,180); color: rgb(180,250,255); }
.cat7-btn { border-color: rgb(140,160,0); color: rgb(230,240,170); }

.cat1-btn:hover { background: rgb(0,100,180); border-color: rgb(0,150,220); }
.cat2-btn:hover { background: rgb(170,30,30); border-color: rgb(220,80,80); }
.cat3-btn:hover { background: rgb(0,130,70); border-color: rgb(0,180,110); }
.cat4-btn:hover { background: rgb(160,80,0); border-color: rgb(220,120,0); }
.cat5-btn:hover { background: rgb(100,20,160); border-color: rgb(160,60,220); }
.cat6-btn:hover { background: rgb(0,130,130); border-color: rgb(0,180,180); }
.cat7-btn:hover { background: rgb(80,100,0); border-color: rgb(140,160,0); }

/* Print button inside nav */
.nav-print-btn {
  flex-shrink: 0;
  padding: 9px 18px;
  background: var(--gold);
  color: rgb(10,30,60);
  border: none;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 900;
  font-family: var(--font-body);
  cursor: pointer;
  margin-left: 6px;
  white-space: nowrap;
  transition: background 0.2s, transform 0.15s;
  box-shadow: 0 3px 12px rgba(0,0,0,0.25);
}
.nav-print-btn:hover { background: rgb(240,190,20); transform: scale(1.05); }

/* =============================================
   MAIN CONTENT (full width now, no sidebar)
   ============================================= */
.main-content {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 0 60px 0;
}

/* =============================================
   PAGE HEADER
   ============================================= */
.page-header {
  background: var(--bg-header);
  color: var(--text-light);
  padding: 50px 40px 40px;
  border-bottom: 5px solid var(--gold);
  text-align: center;
}
.header-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--blue-dark);
  padding: 5px 18px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 900;
  margin-bottom: 20px;
}
.page-header h1 {
  font-family: var(--font-head);
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 14px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.header-sub {
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue-light);
  margin-bottom: 20px;
}
.header-tags { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.tag {
  background: rgba(255,255,255,0.12);
  border: 2px solid rgba(255,255,255,0.3);
  color: var(--white);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
}

/* =============================================
   SECTIONS
   ============================================= */
.section {
  padding: 36px 36px 20px;
  border-bottom: 2px solid var(--border-light);
  scroll-margin-top: calc(var(--topnav-height) + 12px);
}
.section:last-child { border-bottom: none; }

.section-title-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  border-radius: var(--radius);
  margin-bottom: 28px;
  border: 3px solid var(--border);
  background: linear-gradient(90deg, rgb(0,80,160), rgb(0,120,210));
}
.section-icon { font-size: 1.6rem; flex-shrink: 0; }
.section-title-bar h2 {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--white);
  margin: 0;
}

.cat1-bar { background: linear-gradient(90deg, rgb(0,80,150), rgb(0,130,200)); border-color: rgb(0,130,200); }
.cat2-bar { background: linear-gradient(90deg, rgb(140,30,30), rgb(200,60,60)); border-color: rgb(200,60,60); }
.cat3-bar { background: linear-gradient(90deg, rgb(0,110,70), rgb(0,160,110)); border-color: rgb(0,160,110); }
.cat4-bar { background: linear-gradient(90deg, rgb(110,50,0), rgb(200,100,0)); border-color: rgb(200,100,0); }
.cat5-bar { background: linear-gradient(90deg, rgb(80,0,120), rgb(130,40,180)); border-color: rgb(130,40,180); }
.cat6-bar { background: linear-gradient(90deg, rgb(0,100,120), rgb(0,160,160)); border-color: rgb(0,160,160); }
.cat7-bar { background: linear-gradient(90deg, rgb(50,60,0), rgb(100,120,0)); border-color: rgb(100,120,0); }
.summary-bar { background: linear-gradient(90deg, rgb(10,50,100), rgb(0,100,180)); }
.flow-bar { background: linear-gradient(90deg, rgb(0,70,120), rgb(0,140,190)); }
.mind-bar { background: linear-gradient(90deg, rgb(80,0,100), rgb(140,40,160)); }
.road-bar { background: linear-gradient(90deg, rgb(20,80,0), rgb(40,150,30)); }
.disclaimer-bar { background: linear-gradient(90deg, rgb(120,80,0), rgb(200,140,0)); border-color: rgb(200,140,0); }

/* =============================================
   CARDS
   ============================================= */
.card {
  background: var(--card-bg);
  border: 2.5px solid var(--border-light);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
}
.card:last-child { margin-bottom: 0; }
.card p {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.75;
  color: var(--text-dark);
  margin-bottom: 14px;
}
.card p:last-child { margin-bottom: 0; }
.card-title {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--blue-dark);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-light);
}
.intro-card { border-color: var(--blue-mid); border-width: 3px; background: rgb(240,249,255); }

/* =============================================
   HIGHLIGHT BOX
   ============================================= */
.highlight-box {
  background: rgb(210, 238, 255);
  border: 2.5px solid var(--blue-mid);
  border-left: 6px solid var(--blue-mid);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-top: 14px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--blue-dark);
  line-height: 1.6;
}
.highlight-box.danger {
  background: rgb(255,235,235);
  border-color: var(--danger);
  border-left-color: var(--danger);
  color: rgb(120,10,10);
}

/* =============================================
   STYLED LISTS
   ============================================= */
.styled-list { list-style: none; padding: 0; }
.styled-list li {
  padding: 10px 14px 10px 40px;
  margin-bottom: 8px;
  background: rgb(240,248,255);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.6;
  position: relative;
}
.styled-list li::before {
  content: "▶";
  position: absolute;
  left: 14px;
  color: var(--blue-mid);
  font-size: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
}
.styled-list.green li { background: rgb(235,255,245); border-color: rgb(150,220,180); }
.styled-list.green li::before { color: var(--success); }
.styled-list li strong { color: var(--blue-dark); }

/* =============================================
   CASE BOX
   ============================================= */
.case-box {
  background: rgb(245,252,255);
  border: 2.5px solid var(--blue-mid);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.case-row {
  display: flex;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1.5px solid var(--border-light);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.6;
}
.case-row:last-child { border-bottom: none; }
.case-label {
  flex-shrink: 0;
  min-width: 130px;
  font-weight: 900;
  color: var(--blue-dark);
  background: rgb(210,235,255);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
}

/* =============================================
   TABLES
   ============================================= */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 3px solid var(--border);
  box-shadow: var(--shadow);
}
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; font-weight: 700; }
th {
  background: var(--blue-dark);
  color: var(--white);
  padding: 13px 16px;
  text-align: left;
  font-family: var(--font-head);
  font-size: 0.88rem;
  font-weight: 900;
  border: 2px solid var(--blue-mid);
}
td {
  padding: 11px 14px;
  border: 1.5px solid var(--border-light);
  color: var(--text-dark);
  font-weight: 700;
  line-height: 1.5;
  vertical-align: top;
}
tr:nth-child(even) td { background: rgb(240,249,255); }
tr:hover td { background: rgb(210,238,255); transition: background 0.15s; }

.row-cat1 td { border-left: 4px solid rgb(0,130,200); }
.row-cat2 td { border-left: 4px solid rgb(200,60,60); }
.row-cat3 td { border-left: 4px solid rgb(0,160,110); }
.row-cat4 td { border-left: 4px solid rgb(200,100,0); }
.row-cat5 td { border-left: 4px solid rgb(130,40,180); }
.row-cat6 td { border-left: 4px solid rgb(0,160,160); }
.row-cat7 td { border-left: 4px solid rgb(100,120,0); }

/* =============================================
   CATEGORY GRID (Overview)
   ============================================= */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 8px;
}
.cat-card {
  border-radius: var(--radius-sm);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border: 3px solid;
  text-align: center;
  cursor: default;
  transition: transform 0.2s;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.cat-num { font-family: var(--font-head); font-size: 1.2rem; font-weight: 900; }
.cat-label { font-size: 0.85rem; font-weight: 700; line-height: 1.4; }
.cat1 { background: rgb(220,240,255); border-color: rgb(0,130,200); color: rgb(0,60,120); }
.cat2 { background: rgb(255,235,235); border-color: rgb(200,60,60); color: rgb(120,10,10); }
.cat3 { background: rgb(230,255,240); border-color: rgb(0,160,110); color: rgb(0,80,50); }
.cat4 { background: rgb(255,240,220); border-color: rgb(200,100,0); color: rgb(100,40,0); }
.cat5 { background: rgb(245,230,255); border-color: rgb(130,40,180); color: rgb(70,0,120); }
.cat6 { background: rgb(220,250,255); border-color: rgb(0,160,160); color: rgb(0,80,90); }
.cat7 { background: rgb(245,250,220); border-color: rgb(100,120,0); color: rgb(50,60,0); }

/* =============================================
   DIAGRAM CARDS
   ============================================= */
.diagram-card { padding: 20px; }
.diagram-note {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-mid);
  margin-bottom: 20px;
  font-style: italic;
}
.flowchart-container, .mindmap-container, .roadmap-container {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  background: rgb(245,252,255);
  border: 3px solid var(--border-light);
  border-radius: var(--radius-sm);
}

/* =============================================
   DISCLAIMER
   ============================================= */
.disclaimer-card {
  background: rgb(255,250,230);
  border: 3px solid rgb(200,140,0);
  text-align: center;
}
.disclaimer-icon { font-size: 3rem; margin-bottom: 14px; }
.disclaimer-card h3 {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 900;
  color: rgb(100,60,0);
  margin-bottom: 14px;
}
.disclaimer-card p { color: rgb(80,50,0); font-weight: 700; font-size: 0.96rem; line-height: 1.7; }
.disclaimer-list { list-style: none; text-align: left; margin: 16px 0; padding: 0 10px; }
.disclaimer-list li {
  padding: 8px 8px 8px 28px;
  position: relative;
  font-size: 0.93rem;
  font-weight: 700;
  color: rgb(80,50,0);
  border-bottom: 1px solid rgb(220,180,80);
  line-height: 1.6;
}
.disclaimer-list li:last-child { border-bottom: none; }
.disclaimer-list li::before { content: "⚠️"; position: absolute; left: 0; }
.disclaimer-footer {
  margin-top: 16px;
  font-size: 0.82rem;
  font-weight: 900;
  color: rgb(120,80,0);
  border-top: 2px solid rgb(200,140,0);
  padding-top: 12px;
}

/* =============================================
   PRINT STYLES
   ============================================= */
@media print {
  .topnav { display: none !important; }
  body { padding-top: 0; }
  .main-content { max-width: 100%; }
  .section { padding: 20px; }
  .card { box-shadow: none; border: 2px solid #ccc; }
  .page-header, .section-title-bar, th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .flowchart-container, .mindmap-container, .roadmap-container { page-break-inside: avoid; }
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
  :root { --topnav-height: 60px; }
  .topnav-brand { font-size: 0.85rem; }
  .nav-btn { font-size: 0.74rem; padding: 7px 10px; }
  .section { padding: 20px 14px; }
  .page-header { padding: 30px 16px 24px; }
  .page-header h1 { font-size: 1.5rem; }
  .main-content { max-width: 100%; }
}

/* =============================================
   BIG NAVIGATION BUTTON PANEL
   ============================================= */
.btn-panel-section {
  background: linear-gradient(160deg, rgb(5,35,80), rgb(0,70,140), rgb(0,100,180));
  padding: 36px 28px 40px;
  border-bottom: 5px solid var(--gold);
}

.btn-panel-title {
  text-align: center;
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--gold);
  background: rgba(255,255,255,0.08);
  border: 2px dashed var(--gold);
  border-radius: 10px;
  padding: 12px 20px;
  margin-bottom: 28px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.big-btn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.big-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  padding: 20px 12px 18px;
  border-radius: 16px;
  text-decoration: none;
  cursor: pointer;
  border: 3px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.10);
  color: var(--white);
  font-family: var(--font-body);
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s, border-color 0.18s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  position: relative;
  overflow: hidden;
}
.big-nav-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0) 100%);
  border-radius: 14px;
}
.big-nav-btn:hover {
  transform: translateY(-6px) scale(1.04);
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
  border-color: var(--gold);
}
.big-nav-btn:active { transform: translateY(-2px) scale(1.01); }

.big-btn-icon {
  font-size: 2.2rem;
  line-height: 1;
  display: block;
}
.big-btn-label {
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.2;
  display: block;
}
.big-btn-sub {
  font-size: 0.75rem;
  font-weight: 700;
  opacity: 0.80;
  display: block;
}

/* Individual button colours */
.b-overview  { background: linear-gradient(135deg, rgb(0,80,160),  rgb(0,120,210)); border-color: rgb(80,170,255); }
.b-cat1      { background: linear-gradient(135deg, rgb(0,90,160),  rgb(0,140,220)); border-color: rgb(100,190,255); }
.b-cat2      { background: linear-gradient(135deg, rgb(160,20,20),  rgb(220,60,60)); border-color: rgb(255,130,130); }
.b-cat3      { background: linear-gradient(135deg, rgb(0,110,60),  rgb(0,170,100)); border-color: rgb(80,230,150); }
.b-cat4      { background: linear-gradient(135deg, rgb(140,70,0),  rgb(210,120,0)); border-color: rgb(255,180,60); }
.b-cat5      { background: linear-gradient(135deg, rgb(90,0,140),  rgb(140,40,200)); border-color: rgb(200,130,255); }
.b-cat6      { background: linear-gradient(135deg, rgb(0,110,120),  rgb(0,170,170)); border-color: rgb(80,230,230); }
.b-cat7      { background: linear-gradient(135deg, rgb(70,80,0),  rgb(120,140,0)); border-color: rgb(190,220,60); }
.b-summary   { background: linear-gradient(135deg, rgb(20,60,120),  rgb(40,100,180)); border-color: rgb(120,180,255); }
.b-flow      { background: linear-gradient(135deg, rgb(0,90,130),  rgb(0,150,190)); border-color: rgb(80,210,240); }
.b-mind      { background: linear-gradient(135deg, rgb(100,10,130),  rgb(160,50,190)); border-color: rgb(220,150,255); }
.b-road      { background: linear-gradient(135deg, rgb(20,100,20),  rgb(40,160,40)); border-color: rgb(120,240,120); }
.b-disc      { background: linear-gradient(135deg, rgb(130,90,0),  rgb(200,150,0)); border-color: rgb(255,210,80); color: rgb(40,20,0); }
.b-print     { background: linear-gradient(135deg, rgb(160,120,0),  rgb(220,180,0)); border-color: rgb(255,230,80); color: rgb(40,20,0); }
.b-disc .big-btn-sub, .b-print .big-btn-sub { opacity: 0.7; }

@media (max-width: 600px) {
  .big-btn-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .big-btn-icon { font-size: 1.8rem; }
  .big-btn-label { font-size: 0.88rem; }
  .btn-panel-title { font-size: 0.9rem; }
}