/* ============================================================
   BAR COUNCIL CODE OF ETHICS - PROFESSIONAL STYLESHEET
   Author: Educational Resource | For LLB Students
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=Source+Serif+4:wght@400;600;700&family=Nunito:wght@600;700;800&display=swap');

/* ---- ROOT VARIABLES ---- */
:root {
  --primary:        rgb(30, 90, 160);
  --primary-light:  rgb(173, 216, 230);
  --primary-mid:    rgb(100, 160, 210);
  --accent:         rgb(20, 130, 110);
  --accent-light:   rgb(180, 230, 220);
  --gold:           rgb(200, 155, 40);
  --gold-light:     rgb(255, 235, 170);
  --bg-page:        rgb(235, 247, 255);
  --bg-card:        rgb(248, 253, 255);
  --bg-header:      rgb(20, 60, 120);
  --bg-section:     rgb(230, 245, 255);
  --border-main:    rgb(80, 140, 200);
  --border-accent:  rgb(20, 130, 110);
  --border-gold:    rgb(200, 155, 40);
  --text-dark:      rgb(15, 40, 80);
  --text-mid:       rgb(30, 70, 120);
  --text-light:     rgb(255, 255, 255);
  --shadow:         0 4px 18px rgba(30, 90, 160, 0.18);
  --shadow-deep:    0 8px 32px rgba(20, 60, 120, 0.25);
  --radius:         12px;
  --radius-lg:      20px;
}

/* ---- RESET & BASE ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Source Serif 4', Georgia, serif;
  background: var(--bg-page);
  color: var(--text-dark);
  font-weight: 700;
  line-height: 1.75;
  font-size: 16px;
}

/* ---- TOP HEADER ---- */
#top-header {
  background: linear-gradient(135deg, rgb(15, 50, 110) 0%, rgb(30, 90, 160) 50%, rgb(20, 130, 110) 100%);
  color: var(--text-light);
  text-align: center;
  padding: 36px 24px 28px;
  border-bottom: 5px solid var(--gold);
  position: relative;
  overflow: hidden;
}

#top-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    rgba(255,255,255,0.03) 0px,
    rgba(255,255,255,0.03) 2px,
    transparent 2px,
    transparent 20px
  );
}

#top-header .header-badge {
  display: inline-block;
  background: var(--gold);
  color: rgb(15, 40, 80);
  font-family: 'Nunito', sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 5px 18px;
  border-radius: 50px;
  margin-bottom: 14px;
}

#top-header h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 900;
  letter-spacing: 1px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
  line-height: 1.2;
}

#top-header .subtitle {
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  opacity: 0.9;
  margin-top: 8px;
  letter-spacing: 0.5px;
}

/* ---- DISCLAIMER BANNER ---- */
#disclaimer {
  background: linear-gradient(90deg, var(--gold-light), rgb(255, 248, 220));
  border-left: 6px solid var(--gold);
  border-right: 6px solid var(--gold);
  color: rgb(100, 65, 0);
  text-align: center;
  padding: 12px 24px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.3px;
}

#disclaimer span { color: rgb(160, 40, 0); }

/* ---- TOOLBAR ---- */
#toolbar {
  background: rgb(20, 60, 120);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.tool-btn {
  background: linear-gradient(135deg, var(--primary-light), rgb(200, 235, 255));
  color: var(--text-dark);
  font-family: 'Nunito', sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  border: 2px solid var(--border-main);
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.tool-btn:hover {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-color: var(--gold);
  color: rgb(15, 40, 80);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(200,155,40,0.4);
}

.tool-btn.print-btn {
  background: linear-gradient(135deg, var(--accent), rgb(30, 160, 140));
  color: white;
  border-color: var(--accent);
}

.tool-btn.print-btn:hover {
  background: linear-gradient(135deg, rgb(15, 100, 85), var(--accent));
  color: white;
}

/* ---- QUICK NAV ---- */
#quick-nav {
  background: var(--bg-card);
  border: 2px solid var(--border-main);
  border-radius: var(--radius-lg);
  margin: 24px auto;
  max-width: 1100px;
  padding: 24px 28px;
  box-shadow: var(--shadow);
}

#quick-nav h2 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--primary);
  font-size: 1.3rem;
  margin-bottom: 16px;
  border-bottom: 3px solid var(--primary-light);
  padding-bottom: 8px;
}

.nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.nav-btn {
  display: block;
  background: linear-gradient(135deg, var(--primary), var(--primary-mid));
  color: white;
  font-family: 'Nunito', sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
  border: 2px solid var(--border-main);
  border-radius: 8px;
  padding: 9px 14px;
  text-align: center;
  transition: all 0.25s ease;
  letter-spacing: 0.3px;
  line-height: 1.3;
}

.nav-btn:hover {
  background: linear-gradient(135deg, var(--gold), rgb(220, 170, 50));
  color: rgb(15, 40, 80);
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(200,155,40,0.35);
}

/* ---- MAIN CONTAINER ---- */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

/* ---- SECTION CARDS ---- */
.section-card {
  background: var(--bg-card);
  border: 2px solid var(--border-main);
  border-left: 7px solid var(--primary);
  border-radius: var(--radius-lg);
  margin-bottom: 32px;
  padding: 30px 32px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s ease;
}

.section-card:hover {
  box-shadow: var(--shadow-deep);
}

.section-card.accent-green { border-left-color: var(--accent); }
.section-card.accent-gold  { border-left-color: var(--gold);   }
.section-card.accent-red   { border-left-color: rgb(180, 40, 40); }

.section-card h2 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--bg-header);
  font-size: 1.55rem;
  font-weight: 900;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-card h2 .sec-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.section-subtitle {
  font-family: 'Nunito', sans-serif;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 18px;
  border-bottom: 2px solid var(--primary-light);
  padding-bottom: 10px;
}

/* ---- BULLET POINTS ---- */
.bullet-list {
  list-style: none;
  padding: 0;
}

.bullet-list li {
  background: linear-gradient(90deg, rgba(173, 216, 230, 0.35), transparent);
  border-left: 4px solid var(--primary-mid);
  border-radius: 0 8px 8px 0;
  padding: 11px 16px 11px 18px;
  margin-bottom: 10px;
  font-weight: 700;
  color: var(--text-dark);
  font-size: 0.97rem;
  line-height: 1.65;
}

.bullet-list li strong {
  color: var(--primary);
  font-weight: 800;
}

.bullet-list li::before {
  content: '⚖ ';
  color: var(--primary);
  font-weight: 900;
}

.bullet-list.green li { border-left-color: var(--accent); background: linear-gradient(90deg, rgba(180,230,220,0.35), transparent); }
.bullet-list.green li::before { color: var(--accent); content: '✅ '; }
.bullet-list.gold  li { border-left-color: var(--gold); background: linear-gradient(90deg, rgba(255,235,170,0.5), transparent); }
.bullet-list.gold  li::before { color: var(--gold); content: '★ '; }
.bullet-list.red   li { border-left-color: rgb(180,40,40); background: linear-gradient(90deg, rgba(255,200,200,0.4), transparent); }
.bullet-list.red   li::before { color: rgb(180,40,40); content: '🚫 '; }

/* ---- SUB-HEADINGS ---- */
.sub-heading {
  font-family: 'Nunito', sans-serif;
  color: var(--primary);
  font-size: 1.05rem;
  font-weight: 800;
  margin: 18px 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sub-heading::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  background: var(--gold);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ---- TABLES ---- */
.table-wrap {
  overflow-x: auto;
  margin: 20px 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 2px solid var(--border-main);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  font-weight: 700;
}

thead tr {
  background: linear-gradient(90deg, var(--bg-header), var(--primary));
  color: white;
}

thead th {
  padding: 13px 16px;
  text-align: left;
  font-family: 'Nunito', sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  border-right: 1px solid rgba(255,255,255,0.2);
}

tbody tr {
  border-bottom: 1px solid var(--primary-light);
  transition: background 0.2s;
}

tbody tr:nth-child(even) { background: rgba(173, 216, 230, 0.25); }
tbody tr:hover { background: rgba(173, 216, 230, 0.5); }

tbody td {
  padding: 11px 16px;
  vertical-align: top;
  border-right: 1px solid var(--primary-light);
  color: var(--text-dark);
  font-weight: 700;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 800;
  font-family: 'Nunito', sans-serif;
}

.badge-blue   { background: var(--primary-light); color: var(--primary); border: 1px solid var(--primary); }
.badge-green  { background: var(--accent-light);  color: var(--accent);  border: 1px solid var(--accent); }
.badge-red    { background: rgb(255,200,200);      color: rgb(140,20,20); border: 1px solid rgb(180,40,40); }
.badge-gold   { background: var(--gold-light);     color: rgb(100,65,0); border: 1px solid var(--gold); }

/* ---- HIGHLIGHT BOXES ---- */
.highlight-box {
  background: linear-gradient(135deg, rgb(220, 240, 255), rgb(240, 252, 250));
  border: 2px solid var(--border-main);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 16px 0;
}

.highlight-box p {
  font-weight: 700;
  color: var(--text-dark);
  font-size: 0.95rem;
}

.highlight-box.warning {
  background: linear-gradient(135deg, var(--gold-light), rgb(255, 252, 230));
  border-color: var(--gold);
}

.highlight-box.danger {
  background: linear-gradient(135deg, rgb(255, 230, 230), rgb(255, 245, 245));
  border-color: rgb(180,40,40);
}

/* ============================================================
   FLOWCHART
   ============================================================ */
#flowchart-container {
  background: var(--bg-card);
  border: 2px solid var(--border-main);
  border-radius: var(--radius-lg);
  padding: 30px 20px;
  margin-bottom: 32px;
  box-shadow: var(--shadow);
  overflow-x: auto;
}

#flowchart-container h2 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--bg-header);
  font-size: 1.55rem;
  margin-bottom: 20px;
  text-align: center;
  border-bottom: 3px solid var(--gold);
  padding-bottom: 10px;
}

#flowchart-svg {
  display: block;
  margin: 0 auto;
  max-width: 100%;
}

/* ============================================================
   MIND MAP
   ============================================================ */
#mindmap-container {
  background: var(--bg-card);
  border: 2px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 30px 20px;
  margin-bottom: 32px;
  box-shadow: var(--shadow);
  overflow-x: auto;
}

#mindmap-container h2 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--bg-header);
  font-size: 1.55rem;
  margin-bottom: 20px;
  text-align: center;
  border-bottom: 3px solid var(--accent);
  padding-bottom: 10px;
}

#mindmap-svg {
  display: block;
  margin: 0 auto;
  max-width: 100%;
}

/* ============================================================
   ROADMAP
   ============================================================ */
#roadmap-container {
  background: var(--bg-card);
  border: 2px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 30px 20px;
  margin-bottom: 32px;
  box-shadow: var(--shadow);
  overflow-x: auto;
}

#roadmap-container h2 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--bg-header);
  font-size: 1.55rem;
  margin-bottom: 20px;
  text-align: center;
  border-bottom: 3px solid var(--gold);
  padding-bottom: 10px;
}

#roadmap-svg {
  display: block;
  margin: 0 auto;
  max-width: 100%;
}

/* ---- FOOTER ---- */
footer {
  background: linear-gradient(135deg, rgb(15, 50, 110), rgb(20, 80, 150));
  color: white;
  text-align: center;
  padding: 28px 20px;
  border-top: 4px solid var(--gold);
}

footer p {
  font-family: 'Nunito', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  opacity: 0.9;
  margin-bottom: 4px;
}

footer .footer-disclaimer {
  color: var(--gold-light);
  font-size: 0.82rem;
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  #toolbar, #quick-nav .nav-btn { display: none !important; }
  body { font-size: 12pt; background: white; color: black; }
  .section-card { border: 1px solid #999; box-shadow: none; page-break-inside: avoid; margin-bottom: 16pt; }
  #top-header { background: #1e4a80 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #flowchart-container, #mindmap-container, #roadmap-container { page-break-inside: avoid; }
  .bullet-list li { background: none; }
  table { font-size: 10pt; }
  a { color: inherit; text-decoration: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 700px) {
  .section-card { padding: 20px 16px; }
  .nav-grid { grid-template-columns: repeat(2, 1fr); }
  #top-header h1 { font-size: 1.6rem; }
  #toolbar { gap: 8px; }
  .tool-btn { font-size: 0.75rem; padding: 7px 10px; }
}

/* ---- SCROLL HIGHLIGHT ---- */
.section-card.highlighted {
  animation: highlightPulse 1.5s ease;
}

@keyframes highlightPulse {
  0%   { box-shadow: 0 0 0 0 rgba(200,155,40,0.6); }
  50%  { box-shadow: 0 0 0 10px rgba(200,155,40,0.2); }
  100% { box-shadow: var(--shadow); }
}

/* ---- INTRO STRIP ---- */
.intro-strip {
  background: linear-gradient(90deg, rgb(20, 60, 120), var(--primary-mid));
  color: white;
  border-radius: var(--radius);
  padding: 18px 24px;
  margin-bottom: 28px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.6;
  border-left: 6px solid var(--gold);
}

/* ---- KEY RULE highlight inside table ---- */
.key-rule { font-weight: 800; color: var(--primary); }