/* Additional styles for responsive navigation */

/* Mobile menu toggle button */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
}

.mobile-menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px 0;
  background-color: white;
  transition: all 0.3s;
}

/* Breadcrumbs */
.breadcrumbs {
  background-color: #f8f9fa;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e1e4e8;
}

.breadcrumbs ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

.breadcrumbs li {
  margin: 0;
}

.breadcrumbs li:not(:last-child)::after {
  content: "›";
  margin: 0 0.5rem;
  color: #95a5a6;
}

.breadcrumbs a {
  color: #3498db;
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

/* Table of contents */
.toc {
  background-color: #f8f9fa;
  border: 1px solid #e1e4e8;
  border-radius: 4px;
  padding: 1rem;
  margin-bottom: 2rem;
}

.toc h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.toc ul {
  list-style: none;
  padding-left: 0;
}

.toc li {
  margin-bottom: 0.25rem;
}

.toc li.h3 {
  padding-left: 1.5rem;
}

.toc a {
  color: #3498db;
  text-decoration: none;
}

.toc a:hover {
  text-decoration: underline;
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: #3498db;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.3s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

.back-to-top.visible {
  opacity: 1;
}

.back-to-top:hover {
  background-color: #2980b9;
  color: white;
  text-decoration: none;
}

/* Responsive styles */
@media (max-width: 768px) {
  /* Mobile navigation */
  .mobile-menu-toggle {
    display: block;
  }
  
  header .container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  
  #main-nav {
    position: fixed;
    top: 0;
    right: -250px;
    width: 250px;
    height: 100vh;
    background-color: #2c3e50;
    padding: 80px 20px 20px;
    transition: right 0.3s;
    z-index: 1000;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
  }
  
  #main-nav.active {
    right: 0;
  }
  
  #main-nav ul {
    flex-direction: column;
  }
  
  #main-nav li {
    margin: 0.5rem 0;
  }
  
  /* Mobile menu toggle animation */
  .mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }
  
  /* Adjust breadcrumbs for mobile */
  .breadcrumbs {
    padding: 0.5rem 15px;
  }
  
  /* Adjust TOC for mobile */
  .toc {
    margin-left: 15px;
    margin-right: 15px;
  }
}
