/* Reset some default styles for better consistency */
body,
h1,
h2,
p,
ul,
ol,
li,
img,
table,
th,
td {
    margin: 0;
    padding: 0;
}

/* Apply CSS Grid to structure the page */
body {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    /* 1 column for header, 2 columns for main content, 1 column for sidebar */
    grid-template-rows: auto auto 1fr auto;
    /* Header, main content, and footer */
    grid-template-areas:
        "header header header"
        "aheader aheader aheader"
        "toc main aside"
        "toc main aside"
        "footer footer footer";
    gap: 10px;
    /* height: 100vh; */
    margin: 0;
    background-color: #1e1e1e;
    /* Dark background color for the website */
    color: #fff;
    /* Text color for the entire website */
    font-family: Arial, sans-serif;
    /* Text color for the entire page */
}

h3,
h4,
h5,
h6 {
    background-color: #444;
    /* Background color for headings */
    color: #fff;
    /* Text color for headings */
    padding: 0.5rem 1rem;
    /* Add padding to headings */
    margin-top: 0;
    /* Remove default margin from headings */
}

article a {
    color: #ffcc66;
    /* Custom color for links in the article */
}

.current {
    background-color: #3498db;
    /* Background color for the current item */
    color: #fff;
    /* Text color for the current item */
    /* border-bottom: 2px solid white; */
}

a {
    text-decoration: none;
    color: #3498db;
    /* Blue color for links in dark mode */
}
/* Header Container */
.site-header {
  background-color: #1e1e1e;
  padding: 10px 20px;
  border-bottom: 1px solid #333;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

/* Logo and Brand */
.brand {
  display: flex;
  align-items: center;
}

.logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 10px;
}

/* Nav Toggle (Mobile) */
.nav-toggle {
  font-size: 24px;
  background: none;
  color: #fff;
  border: none;
  cursor: pointer;
  display: none;
}
.nav-toggle .icon {
  font-size: 24px;
  line-height: 1;
  display: inline-block;
  transition: transform 0.3s ease;
}

.nav-toggle.open .icon {
  transform: rotate(180deg); /* Optional animation */
}

/* Nav Links */
.navbar {
  flex-basis: 100%;
  display: none;
}

.navbar ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: right;
}

.navbar li {
  display: inline-block;
}

.navbar a {
  display: block;
  padding: 10px 15px;
  color: #fff;
  text-decoration: none;
}

.navbar a:hover {
  background-color: #555;
}

.current {
  background-color: #3498db;
  color: #fff;
}

/* Responsive Styles */
@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }

  .navbar {
    display: block !important;
    flex-basis: auto;
  }

  .navbar ul {
    display: flex;
    gap: 10px;
  }
}

@media (max-width: 767px) {
  .nav-toggle {
    display: block;
  }

  .navbar.open {
    display: block;
  }

  .navbar ul {
    text-align: left;
  }

  .navbar li {
    display: block;
  }
}

/* Navigation Bar Styles */
.navbar {
    background-color: #333;
    /* Darker gray background for the navbar */
    border-radius: 10px;
    /* Slightly reduced border radius for a modern look */
    overflow: hidden;
}

/* Header Styles */
header {
    grid-area: header;
}

.aheader {
    grid-area: aheader;
    text-align: center;
    background-color: #4169E1;
    /* Royal blue background color */
    color: #fff;
    /* Text color for the header content */
    padding: 1rem;
}

nav .toc {
    grid-area: toc;
}

.table-of-contents {
    background-color: #292929;
    padding: 1rem;
    color: #fff;
    border-radius: 10px;
    /* border-bottom: 2px solid white; */
    height: 70vh;
    /* Specific height for the table of contents */
    overflow-y: auto;
    /* Enable vertical scrolling if content exceeds the specified height */
}

.table-of-contents::-webkit-scrollbar {
    width: 10px;
    /* Set the width of the scrollbar */
}

.table-of-contents::-webkit-scrollbar-thumb {
    background-color: #888;
    /* Color of the scrollbar thumb */
    border-radius: 5px;
    /* Round the corners of the scrollbar thumb */
}

.table-of-contents::-webkit-scrollbar-track {
    background-color: #333;
    /* Color of the scrollbar track */
}

.table-of-contents::-webkit-scrollbar-thumb:hover {
    background-color: #666;
    /* Color of the scrollbar thumb on hover */
}

.table-of-contents::-webkit-scrollbar-track:hover {
    background-color: #555;
    /* Color of the scrollbar track on hover */
}

.table-of-contents::-webkit-scrollbar-thumb:active {
    background-color: #555;
    /* Color of the scrollbar thumb when being dragged */
}

.table-of-contents::-webkit-scrollbar-track:active {
    background-color: #444;
    /* Color of the scrollbar track when being clicked */
}

.table-of-contents li {
    padding: 10px;
    font-size: 15px;
    list-style-type: disc;
    text-align: justify;
}

/* Main Content Styles */
main {
    grid-area: main;
    text-align: left;
    padding: 2rem;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    margin: 10px 0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

article {
    height: 100vh;
    overflow-y: auto;
}

/* Sidebar Styles */
aside {
    max-height: 100vh;
    overflow-y: auto;
    grid-area: aside;
    background-color: #292929;
    /* Darker gray background for sidebar */
    padding: 1rem;
    color: #fff;
    /* Text color for sidebar */
}

article::-webkit-scrollbar,
aside::-webkit-scrollbar {
    display: none;
}

.sidebar {
    /* Add styles for the sidebar content here */
}

aside[role="complementary"] {
    display: flex;
    flex-direction: column;
    align-items: center;
}

aside[role="complementary"]>div {
    margin: 10px 0;
    width: 100%;
    max-width: 300px;
    /* You can adjust the max-width as needed */
    box-sizing: border-box;
}

.adsbygoogle {
    width: 100% !important;
    height: auto !important;
}

/* Footer Styles */
footer {
    grid-area: footer;
    background-color: #333;
    text-align: center;
    padding: 1rem;
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    border: 1px solid #444;
}

th,
td {
    border: 1px solid #444;
    padding: 12px;
    text-align: left;
}

th {
    background-color: #333;
    color: #eee;
}

tr:nth-child(even) {
    background-color: #222;
}

/* Base styles for paragraphs */
p {
    margin-bottom: 1rem;
    /* Add some space below paragraphs */
    line-height: 1.6;
    /* Set line height for better readability */
}

/* Dark mode styles */
/* Example of a different text color for links within paragraphs */
p a {
    color: #5fa8d3;
    /* Custom color for links */
}

/* Example of a different background color for paragraphs on hover */
p:hover {
    background-color: #333;
    /* Darker background color on hover */
}

/* Base styles for lists */
ul,
ol {
    padding-left: 1.5rem;
    /* Add some padding to the left */
    list-style-position: inside;
    /* Place the bullets/numbers inside the list items */
    color: #fff;
    /* Text color for list items */
}

/* Style for list items */
li {
    margin-bottom: 0.5rem;
    /* Add some space between list items */
    line-height: 1.5;
    /* Set line height for better readability */
}

li:hover {
    background-color: #333;
    /* Darker background color on hover */
}

/* Styles for unordered list */
ul {
    list-style-type: disc;
    /* Use filled circles for bullets */
}

/* Styles for ordered list */
ol {
    list-style-type: decimal;
    /* Use numbers for ordered lists */
}

/* Image Styles */
img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px 0;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    body {
        grid-template-columns: 1fr;
        grid-template-areas:
            "header"
            "aheader"
            "main"
            "aside"
            "footer";
    }

    .table-of-contents {
        display: none;
        /* Hide the table of contents and sidebar on small screens */
    }

    article,
    aside {
        overflow-y: hidden;
        height: auto;
    }
}