/* ===================================================
   AIBE 2026 — Muslim Law Important Acts
   Bare Act Study Guide — styles.css
   =================================================== */

/* ---------- Root Variables (color palette) ---------- */
:root {
  --c-bg: #f4f7fb;
  --c-bg-grad-1: #eef4ff;
  --c-bg-grad-2: #f0fff5;
  --c-card: #ffffff;
  --c-text: #1c2540;
  --c-muted: #5a6680;

  --c-blue: rgb(56, 116, 203);
  --c-blue-light: rgb(225, 236, 252);
  --c-green: rgb(46, 142, 90);
  --c-green-light: rgb(220, 244, 230);
  --c-saffron: rgb(229, 142, 38);
  --c-saffron-light: rgb(253, 235, 213);
  --c-violet: rgb(123, 81, 187);
  --c-violet-light: rgb(234, 224, 248);
  --c-red: rgb(204, 64, 71);
  --c-red-light: rgb(252, 224, 226);

  --c-border: rgb(210, 220, 235);
  --c-border-strong: rgb(170, 190, 220);
  --shadow-sm: 0 1px 3px rgba(28, 37, 64, 0.06);
  --shadow-md: 0 4px 14px rgba(28, 37, 64, 0.08);
  --shadow-lg: 0 8px 28px rgba(28, 37, 64, 0.12);

  --radius: 12px;
  --radius-sm: 8px;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--c-text);
  background:
    linear-gradient(135deg, var(--c-bg-grad-1), var(--c-bg-grad-2)) fixed;
  font-weight: 500;
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3, h4 { color: var(--c-text); font-weight: 700; }
h2 { font-size: 1.6rem; margin: 0 0 14px 0; }
h3 { font-size: 1.25rem; margin: 20px 0 10px 0; color: #2c3e69; }
h4 { font-size: 1.05rem; margin: 16px 0 8px 0; color: #344266; }
p { margin: 8px 0; }
ul, ol { padding-left: 22px; }
li { margin: 4px 0; }
.muted { color: var(--c-muted); font-size: 0.95rem; }

/* ---------- Header ---------- */
.site-header {
  background:
    linear-gradient(135deg, rgb(40, 96, 180) 0%, rgb(78, 56, 158) 60%, rgb(180, 100, 40) 100%);
  color: #fff;
  padding: 38px 0 30px;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.site-header h1 {
  color: #fff;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin: 0 0 6px;
  font-weight: 800;
  letter-spacing: 0.3px;
}
.subtitle {
  font-size: 1.05rem;
  margin: 4px 0;
  opacity: 0.95;
  font-weight: 600;
}
.tagline {
  font-size: 0.92rem;
  opacity: 0.88;
  margin-top: 8px;
}

/* ---------- Quick Nav ---------- */
.quick-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--c-border);
  box-shadow: var(--shadow-sm);
}
.nav-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 20px;
  justify-content: center;
}
.nav-btn {
  border: 1.5px solid var(--c-border-strong);
  background: #fff;
  color: var(--c-text);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}
.nav-btn:hover {
  background: var(--c-blue-light);
  border-color: var(--c-blue);
  color: var(--c-blue);
  transform: translateY(-1px);
}
.print-btn {
  background: var(--c-violet);
  color: #fff;
  border-color: var(--c-violet);
}
.print-btn:hover {
  background: #5e3b9a;
  border-color: #5e3b9a;
  color: #fff;
}

/* ---------- Cards ---------- */
.card {
  background: var(--c-card);
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin: 24px 0;
  box-shadow: var(--shadow-md);
}
.intro-card {
  border-left: 6px solid var(--c-blue);
}
.disclaimer {
  border-left: 6px solid var(--c-red);
  background: var(--c-red-light);
}

/* ---------- Jump Buttons ---------- */
.jump-row {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.jump-label {
  font-weight: 700;
  color: var(--c-violet);
}
.jump-btn {
  border: 1.5px solid var(--c-violet);
  background: var(--c-violet-light);
  color: var(--c-violet);
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.88rem;
  transition: all 0.2s;
}
.jump-btn:hover {
  background: var(--c-violet);
  color: #fff;
}

/* ---------- Tabs ---------- */
.tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0 18px;
  border-bottom: 2px solid var(--c-border);
  padding-bottom: 4px;
}
.tab-btn {
  background: #eef2f9;
  color: var(--c-text);
  border: 1.5px solid transparent;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 9px 14px;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  transition: all 0.2s;
}
.tab-btn:hover {
  background: var(--c-blue-light);
  color: var(--c-blue);
}
.tab-btn.active {
  background: var(--c-blue);
  color: #fff;
  border-color: var(--c-blue);
  box-shadow: 0 -2px 6px rgba(56, 116, 203, 0.25);
}

.tab-panel {
  display: none;
  padding: 8px 4px;
  animation: fadeIn 0.25s ease;
}
.tab-panel.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Tables ---------- */
.info-table {
  width: 100%;
  margin: 12px 0 18px;
  border-collapse: collapse;
  background: var(--c-blue-light);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.info-table th, .info-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--c-border);
  font-size: 0.95rem;
}
.info-table th {
  background: var(--c-blue);
  color: #fff;
  font-weight: 700;
  width: 28%;
}

.table-wrap {
  overflow-x: auto;
  margin: 14px 0;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  background: #fff;
}
.data-table th, .data-table td {
  padding: 10px 12px;
  border: 1px solid var(--c-border);
  text-align: left;
  font-size: 0.92rem;
}
.data-table thead th {
  background: linear-gradient(135deg, var(--c-blue), var(--c-violet));
  color: #fff;
  font-weight: 700;
}
.data-table tbody tr:nth-child(even) { background: #f7fafd; }
.data-table tbody tr:hover { background: var(--c-blue-light); }

/* ---------- MCQ Styling ---------- */
.mcq-list { counter-reset: mcq; padding-left: 0; list-style: none; }
.mcq-list > li {
  counter-increment: mcq;
  background: #fafbfd;
  border: 1px solid var(--c-border);
  border-left: 4px solid var(--c-saffron);
  padding: 12px 16px;
  margin: 10px 0;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.mcq-list > li::before {
  content: "Q" counter(mcq) ". ";
  color: var(--c-saffron);
  font-weight: 800;
}
.opts {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 16px;
}
.opts li {
  font-weight: 500;
  font-size: 0.94rem;
  color: #2c3a5e;
}

/* ---------- Takeaway ---------- */
.takeaway {
  background: linear-gradient(135deg, var(--c-green-light), var(--c-blue-light));
  border-left: 5px solid var(--c-green);
  padding: 12px 16px;
  margin: 18px 0 6px;
  border-radius: var(--radius-sm);
  font-size: 0.96rem;
}

/* ---------- Flowchart ---------- */
.flowchart-wrap {
  overflow-x: auto;
  background: linear-gradient(180deg, #fbfdff, #f6f9fd);
  padding: 14px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
}
.flow-svg { width: 100%; height: auto; min-width: 720px; }
.fc-box { stroke: var(--c-border-strong); stroke-width: 1.5; }
.fc-center { fill: #fff7e6; stroke: var(--c-saffron); stroke-width: 2.5; }
.fc-blue { fill: var(--c-blue-light); stroke: var(--c-blue); }
.fc-green { fill: var(--c-green-light); stroke: var(--c-green); }
.fc-saffron { fill: var(--c-saffron-light); stroke: var(--c-saffron); }
.fc-violet { fill: var(--c-violet-light); stroke: var(--c-violet); }
.fc-red { fill: var(--c-red-light); stroke: var(--c-red); }
.fc-text {
  font-family: 'Segoe UI', sans-serif;
  font-weight: 700;
  font-size: 14px;
  fill: #1c2540;
}
.fc-text-bold {
  font-family: 'Segoe UI', sans-serif;
  font-weight: 800;
  font-size: 16px;
  fill: #1c2540;
}
.fc-text-sm {
  font-family: 'Segoe UI', sans-serif;
  font-weight: 500;
  font-size: 11.5px;
  fill: #4c5878;
}
.fc-line {
  stroke: #3a4a7a;
  stroke-width: 1.6;
  fill: none;
}

/* ---------- Mind Map ---------- */
.mindmap-wrap {
  overflow-x: auto;
  background: linear-gradient(180deg, #fff, #f7fbf8);
  padding: 14px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
}
.mind-svg { width: 100%; height: auto; min-width: 720px; }
.mm-center { fill: #fff5e6; stroke: var(--c-saffron); stroke-width: 3; }
.mm-box { stroke-width: 2; }
.mm-blue { fill: var(--c-blue-light); stroke: var(--c-blue); }
.mm-green { fill: var(--c-green-light); stroke: var(--c-green); }
.mm-saffron { fill: var(--c-saffron-light); stroke: var(--c-saffron); }
.mm-violet { fill: var(--c-violet-light); stroke: var(--c-violet); }
.mm-red { fill: var(--c-red-light); stroke: var(--c-red); }
.mm-line { stroke: #6b7799; stroke-width: 1.6; stroke-dasharray: 4 3; }
.mm-text {
  font-family: 'Segoe UI', sans-serif;
  font-weight: 700;
  font-size: 13px;
  fill: #1c2540;
}
.mm-text-bold {
  font-family: 'Segoe UI', sans-serif;
  font-weight: 800;
  font-size: 17px;
  fill: #1c2540;
}
.mm-text-sm {
  font-family: 'Segoe UI', sans-serif;
  font-weight: 500;
  font-size: 11px;
  fill: #4c5878;
}

/* ---------- Roadmap ---------- */
.roadmap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 18px 0 6px;
  position: relative;
}
.road-step {
  display: flex;
  gap: 16px;
  background: #fff;
  padding: 14px 18px;
  border: 1.5px solid var(--c-border);
  border-left: 6px solid var(--c-blue);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s;
}
.road-step:nth-child(1) { border-left-color: var(--c-blue); }
.road-step:nth-child(2) { border-left-color: var(--c-green); }
.road-step:nth-child(3) { border-left-color: var(--c-saffron); }
.road-step:nth-child(4) { border-left-color: var(--c-violet); }
.road-step:nth-child(5) { border-left-color: var(--c-red); }
.road-step:nth-child(6) { border-left-color: var(--c-blue); }
.road-step:nth-child(7) { border-left-color: var(--c-green); }
.road-step:hover { transform: translateX(4px); box-shadow: var(--shadow-md); }
.road-num {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-blue), var(--c-violet));
  color: #fff;
  font-weight: 800;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(56, 116, 203, 0.3);
}
.road-body h4 { margin: 0 0 4px; color: #2c3e69; }
.road-body p { margin: 0; font-size: 0.95rem; }

/* ---------- Quick Revision Grid ---------- */
.rev-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 12px;
}
.rev-card {
  border: 1.5px solid var(--c-border);
  border-top: 5px solid var(--c-blue);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.rev-card h4 { margin: 0 0 8px; }
.rev-card ul { margin: 0; padding-left: 18px; font-size: 0.92rem; }
.rev-card li { margin: 3px 0; font-weight: 500; }
.rev-blue { border-top-color: var(--c-blue); background: linear-gradient(180deg, var(--c-blue-light), #fff); }
.rev-green { border-top-color: var(--c-green); background: linear-gradient(180deg, var(--c-green-light), #fff); }
.rev-saffron { border-top-color: var(--c-saffron); background: linear-gradient(180deg, var(--c-saffron-light), #fff); }
.rev-violet { border-top-color: var(--c-violet); background: linear-gradient(180deg, var(--c-violet-light), #fff); }

/* ---------- Toggle / Answers ---------- */
.toggle-btn {
  background: linear-gradient(135deg, var(--c-green), var(--c-blue));
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
  font-size: 0.95rem;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.toggle-btn:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.answers {
  background: #fafbfd;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
}
.answers h3 {
  border-bottom: 2px solid var(--c-blue);
  padding-bottom: 4px;
  margin-top: 18px;
}
.answers h3:first-child { margin-top: 0; }
.answers ol { padding-left: 22px; }
.answers li { margin: 6px 0; font-size: 0.95rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: linear-gradient(135deg, #1c2540, #2c3e69);
  color: #d5deef;
  padding: 18px 0;
  margin-top: 30px;
  text-align: center;
  font-size: 0.9rem;
}
.site-footer p { margin: 0; }

/* ---------- Back-to-top button ---------- */
#topBtn {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--c-blue);
  color: #fff;
  border: none;
  font-size: 1.2rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 60;
  transition: background 0.2s;
}
#topBtn:hover { background: var(--c-violet); }

/* ---------- Responsive ---------- */
@media (max-width: 780px) {
  .opts { grid-template-columns: 1fr; }
  .info-table th { width: 38%; }
  h2 { font-size: 1.35rem; }
  h3 { font-size: 1.1rem; }
  .card { padding: 20px 18px; }
  .tab-btn { font-size: 0.82rem; padding: 8px 10px; }
  .nav-btn { font-size: 0.85rem; padding: 6px 10px; }
  .road-step { padding: 12px 14px; }
}

@media (max-width: 480px) {
  body { font-size: 15px; }
  .site-header { padding: 28px 0 22px; }
  .container { padding: 0 14px; }
  .card { padding: 16px 14px; }
  .tab-bar { gap: 4px; }
  .tab-btn { font-size: 0.78rem; padding: 7px 8px; }
}

/* ---------- Print Styles ---------- */
@media print {
  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }
  .no-print, .quick-nav, #topBtn { display: none !important; }
  .site-header {
    background: #fff;
    color: #000;
    box-shadow: none;
    padding: 14px 0;
    border-bottom: 2px solid #000;
  }
  .site-header h1 { color: #000; }
  .card {
    page-break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
    margin: 12px 0;
    padding: 14px;
  }
  .tab-panel { display: block !important; page-break-before: auto; }
  .tab-bar { display: none; }
  .tab-panel { border-top: 1px dashed #aaa; padding-top: 14px; margin-top: 14px; }
  .tab-panel:first-of-type { border-top: none; }
  .answers { display: block !important; }
  .answers[hidden] { display: block !important; }
  .toggle-btn { display: none; }
  .jump-row { display: none; }
  a { color: #000; text-decoration: none; }
  .data-table { font-size: 10pt; }
  .flow-svg, .mind-svg { max-width: 100%; height: auto; }
}