/* ============================================================
   CONTEMPT OF COURT – LAW & PRACTICE
   Professional Stylesheet | Green + Saffron Theme
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@700;900&family=Lato:wght@700;900&display=swap');

:root {
  --green-dark:    rgb(10, 75, 35);
  --green-mid:     rgb(18, 110, 55);
  --green-light:   rgb(34, 150, 75);
  --green-pale:    rgb(210, 240, 220);
  --saffron:       rgb(255, 140, 0);
  --saffron-dark:  rgb(210, 100, 0);
  --saffron-light: rgb(255, 190, 80);
  --saffron-pale:  rgb(255, 240, 200);
  --white:         #ffffff;
  --cream:         #fffdf5;
  --border-color:  rgb(255, 140, 0);
  --border-thick:  4px solid rgb(255, 140, 0);
  --border-thin:   2px solid rgb(255, 140, 0);
  --shadow:        0 4px 20px rgba(10, 75, 35, 0.35);
  --radius:        10px;
  --font-head:     'Merriweather', Georgia, serif;
  --font-body:     'Lato', Arial, sans-serif;
}

/* ---- RESET & BASE ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: linear-gradient(145deg, rgb(8, 60, 28) 0%, rgb(15, 90, 42) 40%, rgb(25, 70, 10) 70%, rgb(60, 40, 0) 100%);
  background-attachment: fixed;
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.75;
  min-height: 100vh;
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--green-dark); }
::-webkit-scrollbar-thumb { background: var(--saffron); border-radius: 5px; }

/* ---- PRINT BUTTON (Fixed) ---- */
#print-btn {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 9999;
  background: var(--saffron);
  color: var(--green-dark);
  border: 3px solid var(--green-dark);
  border-radius: 50px;
  padding: 10px 24px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  letter-spacing: 1px;
  transition: background 0.25s, color 0.25s, transform 0.15s;
}
#print-btn:hover {
  background: var(--green-dark);
  color: var(--saffron);
  border-color: var(--saffron);
  transform: scale(1.07);
}

/* ---- HEADER ---- */
header {
  background: linear-gradient(90deg, var(--green-dark) 0%, var(--green-mid) 50%, var(--saffron-dark) 100%);
  border-bottom: 5px solid var(--saffron);
  padding: 40px 30px 30px;
  text-align: center;
  box-shadow: var(--shadow);
}
header h1 {
  font-family: var(--font-head);
  font-size: clamp(24px, 4vw, 42px);
  font-weight: 900;
  color: var(--saffron-light);
  text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
header p.subtitle {
  font-size: 17px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 1px;
}
header .act-badge {
  display: inline-block;
  margin-top: 12px;
  background: var(--saffron);
  color: var(--green-dark);
  padding: 5px 22px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 900;
  border: 2px solid var(--green-dark);
  letter-spacing: 1px;
}

/* ---- DISCLAIMER ---- */
.disclaimer {
  background: rgba(255, 140, 0, 0.15);
  border: 3px solid var(--saffron);
  border-radius: var(--radius);
  padding: 14px 22px;
  margin: 22px auto;
  max-width: 1100px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--saffron-light);
  letter-spacing: 0.5px;
}
.disclaimer strong { color: var(--saffron); }

/* ---- NAV ---- */
nav {
  background: rgba(10, 75, 35, 0.9);
  border-top: var(--border-thick);
  border-bottom: var(--border-thick);
  padding: 16px 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(8px);
}
.nav-label {
  text-align: center;
  font-size: 12px;
  font-weight: 900;
  color: var(--saffron-light);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.nav-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 1100px;
  margin: 0 auto;
}
.nav-btn {
  background: var(--saffron);
  color: var(--green-dark);
  border: 2px solid var(--green-dark);
  border-radius: 6px;
  padding: 7px 14px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  letter-spacing: 0.5px;
  text-decoration: none;
  white-space: nowrap;
}
.nav-btn:hover {
  background: var(--green-dark);
  color: var(--saffron);
  border-color: var(--saffron);
  transform: translateY(-2px);
}

/* ---- MAIN CONTAINER ---- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 20px 60px;
}

/* ---- SECTION CARD ---- */
.section-card {
  background: rgba(10, 75, 35, 0.82);
  border: var(--border-thick);
  border-radius: var(--radius);
  padding: 30px 32px;
  margin-bottom: 34px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}

/* ---- HEADINGS ---- */
.section-card h2 {
  font-family: var(--font-head);
  font-size: clamp(18px, 2.5vw, 26px);
  font-weight: 900;
  color: var(--saffron);
  border-bottom: 3px solid var(--saffron);
  padding-bottom: 10px;
  margin-bottom: 20px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.section-card h3 {
  font-family: var(--font-head);
  font-size: clamp(15px, 2vw, 20px);
  font-weight: 900;
  color: var(--saffron-light);
  margin: 20px 0 10px;
  letter-spacing: 0.5px;
  padding-left: 10px;
  border-left: 4px solid var(--saffron);
}
.section-card h4 {
  font-size: 16px;
  font-weight: 900;
  color: var(--green-pale);
  margin: 14px 0 8px;
  letter-spacing: 0.3px;
}

/* ---- PARAGRAPHS ---- */
.section-card p {
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
  line-height: 1.8;
}

/* ---- BULLET LISTS ---- */
.section-card ul {
  padding-left: 0;
  margin-bottom: 14px;
  list-style: none;
}
.section-card ul li {
  background: rgba(255, 140, 0, 0.08);
  border-left: 4px solid var(--saffron);
  padding: 9px 14px 9px 16px;
  margin-bottom: 8px;
  border-radius: 0 6px 6px 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.7;
}
.section-card ul li::before {
  content: "▶ ";
  color: var(--saffron);
  font-size: 11px;
  margin-right: 4px;
}
.section-card ul li strong, .section-card p strong {
  color: var(--saffron-light);
}

/* ---- TABLES ---- */
.table-wrap {
  overflow-x: auto;
  margin: 16px 0;
  border-radius: var(--radius);
  border: var(--border-thick);
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 550px;
}
thead tr {
  background: var(--saffron);
}
thead th {
  padding: 13px 16px;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 900;
  color: var(--green-dark);
  text-align: left;
  border: 2px solid var(--green-mid);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
tbody tr:nth-child(odd) {
  background: rgba(34, 150, 75, 0.22);
}
tbody tr:nth-child(even) {
  background: rgba(10, 75, 35, 0.45);
}
tbody td {
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  border: 1px solid rgba(255, 140, 0, 0.35);
  line-height: 1.65;
}
tbody tr:hover {
  background: rgba(255, 140, 0, 0.18);
  transition: background 0.2s;
}

/* ---- HIGHLIGHT BOX ---- */
.highlight-box {
  background: rgba(255, 140, 0, 0.12);
  border: 2px solid var(--saffron);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 14px 0;
}
.highlight-box p { margin: 0; font-size: 14px; }

/* ---- DIAGRAM SECTIONS ---- */
.diagram-section {
  background: rgba(5, 50, 20, 0.92);
  border: var(--border-thick);
  border-radius: var(--radius);
  padding: 28px 20px;
  margin-bottom: 34px;
  box-shadow: var(--shadow);
  overflow-x: auto;
}
.diagram-section h2 {
  font-family: var(--font-head);
  font-size: clamp(18px, 2.5vw, 26px);
  font-weight: 900;
  color: var(--saffron);
  text-align: center;
  border-bottom: 3px solid var(--saffron);
  padding-bottom: 10px;
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.diagram-section svg {
  display: block;
  margin: 0 auto;
  max-width: 100%;
}

/* ---- SECTION NUMBER BADGE ---- */
.sec-badge {
  display: inline-block;
  background: var(--saffron);
  color: var(--green-dark);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  font-size: 14px;
  font-weight: 900;
  margin-right: 10px;
  flex-shrink: 0;
}

/* ---- FOOTER ---- */
footer {
  background: var(--green-dark);
  border-top: 5px solid var(--saffron);
  text-align: center;
  padding: 24px 20px;
  font-size: 13px;
  font-weight: 700;
  color: var(--saffron-light);
  letter-spacing: 0.5px;
}
footer span { color: var(--white); }

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  #print-btn { display: none !important; }
  nav { display: none !important; }
  body {
    background: white !important;
    color: black !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .section-card {
    border: 2px solid #228B22 !important;
    background: white !important;
    box-shadow: none !important;
    page-break-inside: avoid;
  }
  .section-card h2 { color: #228B22 !important; border-bottom-color: #FF8C00 !important; }
  .section-card h3 { color: #8B4500 !important; }
  .section-card p, .section-card ul li { color: black !important; }
  .diagram-section {
    border: 2px solid #228B22 !important;
    background: white !important;
    page-break-inside: avoid;
  }
  thead tr { background: #FF8C00 !important; }
  thead th { color: black !important; }
  .diagram-section h2 { color: #228B22 !important; }
  header { background: #0a4b23 !important; }
  footer { background: #0a4b23 !important; }
}

/* ---- RESPONSIVE ---- */
@media (max-width: 600px) {
  .section-card { padding: 18px 14px; }
  header h1 { font-size: 20px; }
  #print-btn { top: 10px; right: 10px; padding: 8px 14px; font-size: 13px; }
}