/* =========================================================
   KNOWLEDGE BASE
   Nuqthah Learning Center
========================================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family:
    Segoe UI,
    Arial,
    sans-serif;

  background: #f6f8fb;

  color: #2d3748;

  line-height: 1.9;

  overflow-x: hidden;
}

/* =========================================================
SCROLLBAR
========================================================= */

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #edf2f7;
}

::-webkit-scrollbar-thumb {
  background: #234b36;

  border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
  background: #183325;
}

/* =========================================================
LINK
========================================================= */

a {
  text-decoration: none;

  color: inherit;
}

img {
  max-width: 100%;

  display: block;
}

/* =========================================================
TOPBAR
========================================================= */

.topbar {
  position: sticky;

  top: 0;

  z-index: 999;

  height: 72px;

  display: flex;

  align-items: center;

  justify-content: space-between;

  padding: 0 28px;

  background: #ffffff;

  border-bottom: 1px solid rgba(0, 0, 0, 0.06);

  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
}

.topbar-left {
  display: flex;

  align-items: center;
}

.logo {
  display: flex;

  align-items: center;

  gap: 14px;
}

.logo img {
  width: 46px;

  height: 46px;

  object-fit: contain;
}

.logo h1 {
  font-size: 20px;

  color: #234b36;

  font-weight: 700;

  margin-bottom: 2px;
}

.logo span {
  font-size: 13px;

  color: #667085;
}

.topbar-right {
  display: flex;

  align-items: center;

  gap: 14px;
}

#sidebarToggle {
  width: 46px;

  height: 46px;

  border: none;

  border-radius: 12px;

  background: #234b36;

  color: #fff;

  font-size: 18px;

  cursor: pointer;

  transition: 0.3s;

  display: none;
}

#sidebarToggle:hover {
  transform: translateY(-2px);
}

/* =========================================================
LAYOUT
========================================================= */

.layout {
  display: flex;

  min-height: calc(100vh - 72px);
}

/* =========================================================
SIDEBAR
========================================================= */

.sidebar {
  width: 310px;

  background: #fff;

  border-right: 1px solid rgba(0, 0, 0, 0.06);

  padding: 24px;

  overflow-y: auto;

  position: sticky;

  top: 72px;

  height: calc(100vh - 72px);
}

/* =========================================================
SEARCH
========================================================= */

.sidebar-search {
  margin-bottom: 24px;
}

.sidebar-search input {
  width: 100%;

  padding: 14px 18px;

  border-radius: 14px;

  border: 1px solid #d0d5dd;

  font-size: 15px;

  outline: none;

  transition: 0.3s;
}

.sidebar-search input:focus {
  border-color: #234b36;

  box-shadow: 0 0 0 4px rgba(35, 75, 54, 0.08);
}

/* =========================================================
SIDEBAR MENU
========================================================= */

.sidebar-menu {
  display: flex;

  flex-direction: column;

  gap: 4px;
}

.menu-title {
  margin-top: 20px;

  margin-bottom: 8px;

  font-size: 13px;

  font-weight: 700;

  letter-spacing: 1px;

  color: #98a2b3;

  text-transform: uppercase;
}

.sidebar-menu a {
  padding: 10px 14px;

  border-radius: 12px;

  font-size: 15px;

  color: #475467;

  transition: 0.25s;

  display: flex;

  align-items: center;

  gap: 10px;
}

.sidebar-menu a:hover {
  background: #edf7f1;

  color: #234b36;

  transform: translateX(3px);
}

.sidebar-menu a.active {
  background: #234b36;

  color: #fff;
}

/* =========================================================
CONTENT
========================================================= */

.content {
  flex: 1;

  padding: 60px;

  max-width: 100%;
}

/* =========================================================
BREADCRUMB
========================================================= */

.breadcrumb {
  display: flex;

  align-items: center;

  gap: 10px;

  font-size: 14px;

  margin-bottom: 30px;

  color: #667085;
}

.breadcrumb a {
  color: #234b36;

  font-weight: 600;
}

.breadcrumb i {
  font-size: 11px;
}

/* =========================================================
HERO
========================================================= */

.hero {
  background: #fff;

  padding: 50px;

  border-radius: 24px;

  margin-bottom: 40px;

  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.05);

  border: 1px solid rgba(35, 75, 54, 0.08);
}

.hero h2 {
  font-size: 40px;

  color: #234b36;

  margin-bottom: 18px;
}

.hero p {
  max-width: 850px;

  font-size: 17px;

  color: #667085;

  line-height: 1.9;
}

/* =========================================================
INTRO
========================================================= */

.section {
  background: #fff;

  padding: 42px;

  border-radius: 24px;

  margin-bottom: 40px;

  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);

  border: 1px solid rgba(35, 75, 54, 0.08);
}

.section h2 {
  font-size: 32px;

  margin-bottom: 18px;

  color: #234b36;
}

.section p {
  font-size: 17px;

  color: #475467;
}

/* =========================================================
CHAPTER
========================================================= */

.chapter {
  margin-bottom: 60px;
}

.chapter > h2 {
  font-size: 34px;

  font-weight: 700;

  color: #234b36;

  margin-bottom: 28px;

  padding-bottom: 16px;

  border-bottom: 3px solid #234b36;

  position: relative;
}

.chapter > h2::after {
  content: "";

  position: absolute;

  left: 0;

  bottom: -3px;

  width: 90px;

  height: 3px;

  background: #16a34a;
}

/* =========================================================
SUB SECTION
========================================================= */

.chapter section {

    margin-bottom:18px;

    scroll-margin-top:110px;

}

/* =========================================================
DETAILS
========================================================= */

details {
  background: #ffffff;

  border: 1px solid rgba(35, 75, 54, 0.08);

  border-radius: 18px;

  overflow: hidden;

  transition: 0.3s;

  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
}

details + details {
  margin-top: 18px;
}

details[open] {
  box-shadow: 0 16px 40px rgba(35, 75, 54, 0.1);

  border-color: rgba(35, 75, 54, 0.2);
}

/* =========================================================
SUMMARY
========================================================= */

summary {
  cursor: pointer;

  list-style: none;

  padding: 22px 28px;

  font-size: 20px;

  font-weight: 700;

  color: #234b36;

  position: relative;

  display: flex;

  align-items: center;

  transition: 0.3s;

  background: #fff;
}

summary::-webkit-details-marker {
  display: none;
}

summary:hover {
  background: #f7fbf8;
}

/* =========================================================
ICON
========================================================= */

summary::before {
  content: "";

  width: 10px;

  height: 10px;

  border-radius: 50%;

  background: #16a34a;

  margin-right: 14px;

  flex-shrink: 0;
}

/* =========================================================
ARROW
========================================================= */

summary::after {
  content: "+";

  margin-left: auto;

  font-size: 28px;

  font-weight: 300;

  transition: 0.3s;

  color: #234b36;
}

details[open] summary::after {
  content: "−";

  transform: rotate(180deg);
}

/* =========================================================
CONTENT
========================================================= */

details p {
  padding: 0 22px 24px;

  font-size: 15px;

  line-height: 1.9;

  color: #475467;

  text-align: justify;

  white-space: normal;

  word-break: normal;

  overflow-wrap: break-word;

  hyphens: none;
}

/* =========================================================
HEADING
========================================================= */

details h3 {
  margin: 30px 28px 18px;

  font-size: 24px;

  color: #234b36;
}

details h4 {
  margin: 26px 28px 14px;

  font-size: 20px;

  color: #234b36;
}

details h5 {
  margin: 22px 28px 12px;

  font-size: 18px;

  color: #234b36;
}

/* =========================================================
LIST
========================================================= */

details ul {
  padding: 0 28px 24px 52px;
}

details ol {
  padding: 0 28px 24px 52px;
}

details li {
  margin-bottom: 10px;

  line-height: 1.9;
}

/* =========================================================
BLOCKQUOTE
========================================================= */

blockquote {
  margin: 24px 28px;

  padding: 20px 24px;

  background: #f7fbf8;

  border-left: 5px solid #234b36;

  border-radius: 14px;

  font-style: italic;

  color: #234b36;
}

/* =========================================================
TABLE
========================================================= */

table {
  width: 100%;

  border-collapse: collapse;

  margin: 28px 0;

  font-size: 15px;
}

table th {
  background: #234b36;

  color: #fff;

  padding: 16px;

  text-align: left;
}

table td {
  padding: 14px;

  border: 1px solid #e4e7ec;
}

table tr:nth-child(even) {
  background: #f9fafb;
}

/* =========================================================
IMAGE
========================================================= */

details img {
  display: block;

  margin: 30px auto;

  border-radius: 18px;

  max-width: 100%;

  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

/* =========================================================
CODE
========================================================= */

pre {
  overflow: auto;

  padding: 22px;

  border-radius: 16px;

  background: #1f2937;

  color: #fff;

  margin: 24px 0;
}

code {
  font-family: Consolas, monospace;
}

/* =========================================================
LINK
========================================================= */

details a {
  color: #16a34a;

  font-weight: 600;
}

details a:hover {
  text-decoration: underline;
}

/* =========================================================
HR
========================================================= */

hr {
  margin: 40px 0;

  border: none;

  height: 1px;

  background: #e4e7ec;
}

/* =========================================================
CALLOUT
========================================================= */

.callout {
  margin: 28px 0;

  padding: 22px;

  border-radius: 16px;

  background: #edf7f1;

  border-left: 6px solid #16a34a;
}

.callout h4 {
  margin: 0 0 10px;

  color: #234b36;
}

.callout p {
  margin: 0;
}

/* =========================================================
SELECTION
========================================================= */

::selection {
  background: #234b36;

  color: #fff;
}

/* =========================================================
FOCUS
========================================================= */

summary:focus {
  outline: none;

  background: #edf7f1;
}

/* =========================================================
FOOTER
========================================================= */

.footer {
  margin-top: 80px;

  padding: 60px 40px;

  background: #234b36;

  color: #fff;

  border-radius: 28px 28px 0 0;
}

.footer-content {
  display: grid;

  grid-template-columns: 2fr 1fr 1fr;

  gap: 40px;
}

.footer-brand {
  display: flex;

  align-items: flex-start;

  gap: 18px;
}

.footer-brand img {
  width: 64px;

  height: 64px;

  object-fit: contain;
}

.footer-brand h3 {
  font-size: 24px;

  margin-bottom: 10px;
}

.footer-brand p {
  opacity: 0.85;

  line-height: 1.8;
}

.footer-links h4 {
  margin-bottom: 18px;

  font-size: 18px;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  opacity: 0.9;

  transition: 0.25s;
}

.footer-links a:hover {
  opacity: 1;

  padding-left: 6px;
}

.footer-bottom {
  margin-top: 45px;

  padding-top: 24px;

  border-top: 1px solid rgba(255, 255, 255, 0.15);

  text-align: center;

  font-size: 14px;

  opacity: 0.75;
}

/* =========================================================
BACK TO TOP
========================================================= */

.back-to-top {
  position: fixed;

  right: 28px;

  bottom: 28px;

  width: 52px;

  height: 52px;

  border: none;

  border-radius: 50%;

  background: #234b36;

  color: #fff;

  font-size: 18px;

  cursor: pointer;

  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.18);

  opacity: 0;

  visibility: hidden;

  transform: translateY(20px);

  transition: 0.35s;

  z-index: 999;
}

.back-to-top.show {
  opacity: 1;

  visibility: visible;

  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-4px);
}

/* =========================================================
SIDEBAR OVERLAY
========================================================= */

.sidebar-overlay {
  display: none;

  position: fixed;

  inset: 0;

  background: rgba(0, 0, 0, 0.45);

  backdrop-filter: blur(2px);

  z-index: 990;

  opacity: 0;

  transition: 0.3s;
}

.sidebar-overlay.show {
  display: block;

  opacity: 1;
}

/* =========================================================
ANIMATION
========================================================= */

.hero,
.section,
.chapter {
  animation: fadeUp 0.6s ease;
}

@keyframes fadeUp {
  from {
    opacity: 0;

    transform: translateY(24px);
  }

  to {
    opacity: 1;

    transform: none;
  }
}

/* =========================================================
ACTIVE HEADING
========================================================= */

:target {
  scroll-margin-top:110px;

  animation: flash 0.6s ease;
}

@keyframes flash {
  0% {
    background: #edf7f1;
  }

  100% {
    background: transparent;
  }
}

/* =========================================================
TABLE RESPONSIVE
========================================================= */

.table-wrapper {
  overflow: auto;
}

/* =========================================================
TABLET
========================================================= */

@media (max-width: 991px) {
  .content {
    padding: 40px;
  }

  .sidebar {
    width: 280px;
  }

  .hero {
    padding: 36px;
  }

  .hero h2 {
    font-size: 34px;
  }

  .section {
    padding: 30px;
  }

  .chapter > h2 {
    font-size: 30px;
  }

  summary {
    font-size: 18px;

    padding: 20px 22px;
  }

  details p {
    padding: 0 22px 22px;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
MOBILE
========================================================= */

@media (max-width: 767px) {
  .topbar {
    padding: 0 18px;

    height: 66px;
  }

  .logo img {
    width: 40px;

    height: 40px;
  }

  .logo h1 {
    font-size: 17px;
  }

  .logo span {
    display: none;
  }

  #sidebarToggle {
    display: flex;

    align-items: center;

    justify-content: center;
  }

  .layout {
    display: block;
  }

  .sidebar {
    position: fixed;

    left: -320px;

    top: 66px;

    width: 290px;

    height: calc(100vh - 66px);

    transition: 0.35s;

    z-index: 995;
  }

  .sidebar.show {
    left: 0;
  }

  .content {
    padding: 24px;
  }

  .hero {
    padding: 28px;

    border-radius: 18px;
  }

  .hero h2 {
    font-size: 28px;
  }

  .hero p {
    font-size: 15px;
  }

  .section {
    padding: 24px;

    border-radius: 18px;
  }

  .section h2 {
    font-size: 26px;
  }

  .chapter {
    margin-bottom: 40px;
  }

  .chapter > h2 {
    font-size: 26px;
  }

  summary {
    font-size: 16px;

    padding: 18px;
  }

  details p {
    padding: 0 18px 20px;

    font-size: 15px;

    line-height: 1.9;
  }

  details h3 {
    margin: 24px 18px 12px;

    font-size: 21px;
  }

  details h4 {
    margin: 22px 18px 12px;

    font-size: 18px;
  }

  details ul,
  details ol {
    padding: 0 18px 20px 40px;
  }

  blockquote {
    margin: 18px;

    padding: 18px;
  }

  .footer {
    margin-top: 50px;

    padding: 40px 24px;

    border-radius: 20px 20px 0 0;
  }

  .footer-brand {
    flex-direction: column;

    align-items: flex-start;
  }

  .footer-brand img {
    width: 56px;

    height: 56px;
  }

  .footer-content {
    grid-template-columns: 1fr;

    gap: 28px;
  }

  .back-to-top {
    right: 18px;

    bottom: 18px;

    width: 46px;

    height: 46px;

    font-size: 16px;
  }
}

/* =========================================================
SMALL MOBILE
========================================================= */

@media (max-width: 480px) {
  .content {
    padding: 18px;
  }

  .hero {
    padding: 22px;
  }

  .hero h2 {
    font-size: 24px;
  }

  .section {
    padding: 20px;
  }

  .chapter > h2 {
    font-size: 22px;
  }

  summary {
    font-size: 15px;

    padding: 16px;
  }

  details p {
    font-size: 14px;
  }

  .sidebar {
    width: 270px;
  }
}

/* =========================================================
PRINT
========================================================= */

@media print {
  .sidebar,
  .topbar,
  .footer,
  .back-to-top,
  .sidebar-overlay {
    display: none !important;
  }

  .content {
    padding: 0;
  }

  body {
    background: #fff;
  }

  details {
    box-shadow: none;

    border: 1px solid #ddd;

    page-break-inside: avoid;
  }

  details {
    display: block;
  }

  details > * {
    display: block;
  }

  summary::after {
    display: none;
  }
}
/* ==========================================
MOBILE
========================================== */

@media (max-width: 768px) {
  .layout {
    display: block;
  }

  .sidebar {
    position: fixed;

    left: -320px;

    top: 72px;

    width: 300px;

    height: calc(100vh - 72px);

    z-index: 1000;

    transition: 0.35s;

    box-shadow: 8px 0 30px rgba(0, 0, 0, 0.15);
  }

  .sidebar.show {
    left: 0;
  }

  #sidebarToggle {
    display: flex;

    align-items: center;

    justify-content: center;
  }

  .content {
    padding: 22px;
  }
}
@media (max-width: 768px) {
  details p {
    font-size: 16px;

    line-height: 1.9;

    padding: 20px;
  }

  summary {
    font-size: 18px;

    padding: 18px 20px;
  }

  .hero {
    padding: 24px;
  }

  .hero h2 {
    font-size: 30px;
  }

  .chapter > h2 {
    font-size: 28px;
  }
}
