body,
header,
html {
  margin: 0;
  padding: 0;
  zoom: 1;
  font-family: 'Helvetica', 'Arial', sans-serif;

}

/* .toggle-button {
  margin-bottom: 4px;
  background-color: #e2e8f0;
  border: none;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 0.9em;
} */

/* .hidden-ref {
  display: none;
} */

/* Flexbox for tabs and content */
.main-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  justify-content: center;
  /* Center content horizontally */
  align-items: center;
  /* Center content vertically */
  /* height: 100vh; Ensure the content takes full viewport height */
  margin: 0;
}

/* Navigation Bar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0px;
  background-color: #0c2440;
  /* Blue background */
  border-bottom: 1px solid #ccc;
  top: 0;
  position: sticky;
  width: 100vw;
  z-index: 1000;
}

/* Left Section: Logo + Title */
.navbar-left {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1;
  margin-left: 2%;
}

.navbar-left img {
  height: 60px;
}

.navbar-left h1 {
  font-size: 28px;
  color: #fff;
}

/* Center Section: Navigation Tabs */
.navbar-center {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex: 1;
}

.navbar-center a {
  font-size: 22px;
  text-decoration: none;
  color: #fff;
  font-weight: bold;
  padding: 4px 2px;
  border-radius: 5px;
  transition: background-color 0.2s ease;
}

.navbar-center a:hover {
  background-color: #3f5d81;
  text-decoration: none;
}

.navbar-center .active {
  background-color: #2a3e5d;
}

/* Right Section: Search */
.navbar-right {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  position: relative;
  margin-right: 2%;
}

.navbar-right input {
  padding: 10px 40px 10px 40px;
  /* More padding on the left for the icon */
  font-size: 18px;
  border: 1px solid #ccc;
  border-radius: 25px;
  width: 50%;
  background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="%23999" viewBox="0 0 24 24"><path d="M10 2a8 8 0 015.29 13.71l4 4a1 1 0 01-1.42 1.42l-4-4A8 8 0 1110 2zm0 2a6 6 0 100 12 6 6 0 000-12z"/></svg>') no-repeat 12px center;
  background-size: 20px;
}

/* Responsive */
@media (max-width: 768px) {

  .tab,
  .tabcontent {
    width: 100%;
    /* Take full width */
    /* height: auto;
    Remove fixed height */
  }

  .navbar {
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
  }

  .navbar-left,
  .navbar-center,
  .navbar-right {
    flex: 100%;
    justify-content: center;
  }
}


.tab {
  float: right;
  border: 1px solid #ccc;
  background-color: #f1f1f1;
  width: 97%;
  height: 100%;
  justify-self: end;
  /* margin-left: 1%; */
  /* Add this line */
}

/* Style the buttons inside the tab */
.tab button {
  display: block;
  background-color: inherit;
  color: black;
  padding: 16px 16px;
  width: 100%;
  border: none;
  outline: none;
  text-align: left;
  cursor: pointer;
  transition: 0.3s;
  font-size: 17px;
}

.content-button {
  width: 80%;
  font-size: 18px;
  /* font-family: 'Times New Roman', Times, serif; */
  padding: 5px 10px;
  margin: 10px 0;
  color: #333;
  background-color: #f8f8f8;
  border: 1px solid #ccc;
  border-radius: 8px;
  cursor: pointer;
  /* box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.05);
			transition: background-color 0.3s ease, box-shadow 0.3s ease; */
}

.content-button:hover {
  background-color: #e6e6e6;
  box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.1);
}

#deactivated:hover {
  background-color: #ddd;
}

/* Change background color of buttons on hover */
#activated:hover {
  background-color: #ddd;
}

#defaultOpen:hover {
  background-color: #ddd;
}

button.active {
  background-color: #ccc;
}

#deactivated {
  color: grey;
}

/* Style the tab content */
.tabcontent {
  float: left;
  /* padding: 0px 24px; */
  /* Increased padding */
  border: 1px solid #ccc;
  width: 97%;
  border-left: none;
  height: 100%;
  font-size: 18px;
  line-height: 1.6;
  justify-self: start;
  /* Better readability */
  /* margin-left: 5%; */
  /* Right margin added */
}

.tabcontent-inner {
  margin: 2vw;
  /* Internal spacing from the border */
}

/* Style the dropdown container */
.dropdown {
  position: relative;
  display: inline-block;
}

/* Style the dropdown button */
.dropbtn {
  background-color: inherit;
  color: black;
  padding: 14px 16px;
  text-decoration: none;
  display: inline-flex;
  /* Changed from inline-block to inline-flex */
  align-items: center;
  /* Vertically aligns the text and triangle */
}

/* Dropdown content (hidden by default) */
.dropdown-content {
  display: none;
  position: absolute;
  background-color: #304763;
  min-width: 200px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

/* Triangle pointing down */
.triangle {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid white;
  margin-left: 10px;
  vertical-align: middle;
  /* This aligns the triangle vertically to the center of the text */
}

/* Dropdown content links */
.dropdown-content a {
  color: rgb(255, 255, 255);
  padding: 12px 16px;
  text-decoration: none;
  width: 300px;
  display: block;
  font-size: 18px;
  /* Set to a smaller font size */
}

.dropdown-content a:hover {
  background-color: #3f5d81;
  /* Light gray */
}

/* Show the dropdown on hover */
.dropdown:hover .dropdown-content {
  display: block;
}

/* Dropdown for search */
#searchResults {
  gap: 10px;
  position: absolute;
  top: 45px;
  /* right: 20px; */
  width: 60%;
  border: 1px solid #ddd;
  background-color: white;
  max-height: 300px;
  overflow-y: auto;
  padding: 10px;
  box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
  z-index: 1;
  border-radius: 10px;
}


#searchResults div {
  padding: 5px;
  cursor: pointer;
}

#searchResults div:hover {
  background-color: #f0f0f0;
}

#searchResults.show {
  display: block;
}

/* Optional: Style for the "No results" message */
#searchResults div.no-results {
  color: #888;
  font-style: italic;
  padding: 10px;
  text-align: center;
}

/* Style for search pages */
.page-content {
  margin-left: 1.5%;
  overflow-x: auto;
}

/* Container for the image and heading */
.image-heading-container {
  display: flex;
  align-items: center;
  /* Vertically center-align the heading with the image */
  gap: 10px;
  /* Add space between the image and heading */
}

/* Style for the image */
.image-heading-container img {
  width: 70px;
  /* Adjust the size of the image */
  height: auto;
  /* Maintain the image aspect ratio */
}

/* Container for the images and captions */
.image-container {
  display: flex;
  flex-wrap: wrap;
  /* Allows wrapping of images to the next line */
  justify-content: left;
  /* justify-content: space-around; Spread images evenly */
  align-items: center;
  width: 60%;
}

/* Style for each image and caption block */
.image-box {
  text-align: center;
  /* Center the caption under each image */
  margin: 5px;
}

.image-box:hover {
  background-color: #ddd;
}

/* Style for the images */
.image-box img {
  /* max-width: 100%; Ensure images fit within their container */
  height: 100;
  /* Maintain aspect ratio */
}

/* Style the images */
.clickable-image {
  cursor: pointer;
  /* width: 150px; Adjust the size of the images
                  height: auto;
                  margin: 10px; */
}

/* Style for construction Pitfalls */




.item-content {
  display: flex;
  flex-direction: column;
  line-height: 1.4;
}

/* Sidebar links styling */
.list-group-item {
  border: none;
  /* border-radius: 5px; */
  /* padding: 0.8rem 1.5rem; */
  background-color: transparent;
  color: #333;
  font-size: 1rem;
  transition: background-color 0.3s, color 0.3s;
  display: flex;
  align-items: left;
  text-decoration: none;
  font-family: sans-serif;
}

.list-group-item:hover {
  background-color: #ddd;
  color: #000;
  /* text-decoration: none; */
}

.list-group-item.active {
  background-color: #ffffff;
  /* font-weight: bold; */
  color: rgb(0, 0, 0);
  /* text-decoration: underline; */

}

.list-group-item h3 {
  margin: 0.2rem 0.2rem 0.2rem 1.2rem;
  font-size: 1rem;
  font-weight: 600;

}

.list-group-item small {
  margin: 0.2rem 0.2rem 0.2rem 1.2rem;
  color: #666;
}

.item-content h3,
.item-content small {
  display: block;
}

/* Collapsible section styles */
.collapsible {
  cursor: pointer;
  padding: 0.8rem 0.3rem;
  background-color: transparent;
  border: none;
  text-align: left;
  font-size: 1.06rem;
  font-weight: 600;
  color: #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

/* Using > symbol for collapsible */
.collapsible:after {
  background-color: transparent;
  content: ">";
  font-family: monospace;
  font-size: 1.2rem;
  margin-left: 10px;

}

.collapsible.active {
  background-color: #2a3e5d;
  color: white;
}

.collapsible:hover {
  background-color: #2a3e5d;
  color: white;
}

/* Collapsible symbol remains the same for both open and closed state */
.collapsible.active:after {
  transform: rotate(90deg);
}

.content-folder {
  display: none;
  /* padding-left: 1rem; */
}

.content-folder a {
  padding: 0.6rem;
  display: block;
  background-color: transparent;
  /* color: #333; */
}

.content-folder a:hover {
  background-color: #d5d5d5;
  text-decoration: underline;
}

.content-folder.active {
  background-color: #ffffff;


}

.container {
  display: flex;
  position: sticky;
  align-items: flex-start;

}

/* Sidebar styles */
.sidebar {
  width: 300px;
  min-width: 300px;
  top: 0;
  background-color: #f1f1f1;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  color: #333;
  position: sticky;
  left: 0;
  height: 100vh;
  /* fixed height to viewport */
  overflow-y: auto;
  /* scroll when overflow */
  box-sizing: border-box;
}

/* Construction Pitfalls Content area styles */
.content {
  flex: 1;
  padding: 2rem;
  background-color: #ffffff;

}

@media (max-width: 768px) {

  .container {
    display: flex;
    flex-direction: column;
    overflow-x: auto;
    /* Stack sidebar on top of content */
  }

  .sidebar {
    width: 100vw;
    height: auto;
    position: relative;
    box-shadow: none;
    overflow-x: auto;
    order: 0;
    /* Optional: explicitly put sidebar on top */
  }

  .content {
    margin-left: 0;
    width: 100%;
    overflow-x: auto;
    order: 1;
  }
}