/* General styles */
body {
background-color: #c1edff; /* Light blue background */
background: linear-gradient(to bottom, #e2f4fc, #72accf);
font-family: 'Montserrat', sans-serif; /* Use Montserrat font */
color: #164076;
margin: 0;
padding: 0;
}
.content{
  max-width: 80%;
  margin: 0 auto;
  padding: 1%;
  background: #eaf7ff;
  background-image: url(images/wave_background.png);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat; 
}
.footer {
  text-align: center;
  padding: 10px;
  background-color: #002366; /* Dark blue footer */
  color: white;
  position: relative;
  bottom: 0;
  width: 100%;
  margin-top: 20px;
}
.footer, .footer p, .footer a {
    color: white;
}
.footer-flex {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    max-width: 95%;
}
.footer-col {
    flex: 1 1 0;
    padding: 0 10px;
    min-width: 0;
    text-align: left;
    word-break: break-word;
}
.footer-col:nth-child(1) {
    flex: 0 0 10%;   /* First column: about 10% width */
    max-width: 10%;
}
.footer-col:nth-child(2) {
    flex: 0 0 30%;  
    max-width: 30%;
}
.footer-col:nth-child(3) {
    flex: 0 0 60%;   
    max-width: 60%;
}
hr {
  border: 0;
  border-top: 2px solid #002366; /* Dark blue horizontal rule */
  margin: 20px 0;
}
h1 {
  color: #002366; /* Dark blue for the heading */
  margin-top: 20px;
  font-family: 'Montserrat black', sans-serif;
  margin-left: 20px;
}
p {
  margin: 0 20px;
  font-size: 20px;
}
li{
  margin: 0 20px;
  font-size: 20px;
}
/* SVG container styles */
#spiderweb-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  height: 60vh;
  padding: 10px;
  margin: 0 auto;
  max-width: 100vh;
  box-sizing: border-box;
}
svg {
  display: block;
  margin: 0 auto;
  background-color: #eaf6ff; /* Optional: subtle background for the SVG */
  border: 1px solid #002366;
  border-radius: 10px;
  box-sizing: border-box;
}
#spiderweb {
  flex: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 80%;
  height: 100%;
  margin: 0;
}

#info-panel {
  flex: 1;
  padding: 20px;
  background: rgb(255, 255, 255);
  border: 3px solid #002366; 
  display: none; /* Initially hidden */
  overflow-y: auto;
  height: 60%;
  max-height: 90vh;
  width: 40vw;
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
  position: absolute;
  right: 0;  
}
#close-info-panel {
  display: block;
  margin-top: 10px;
  padding: 5px 10px;
  background-color: #191660; 
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

#close-info-panel:hover {
  background-color: #ff3333; /* Darker red on hover */
}

#tooltip {
  position: absolute;
  background: white;
  color: rgb(19, 34, 116);
  padding: 5px;
  border-radius: 3px;
  font-size: 0.9rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  display: none;
  z-index: 1000;
  max-width: 210px;
}

/* Node styles */
.node {
  fill: steelblue; /* Default color for nodes */
  stroke: #002366; /* Dark blue stroke for nodes */
  stroke-width: 1.75px;
  cursor: pointer;
}
.node.selected {
  fill: #ff9900; /* Change to a different color when selected */
  stroke: #a16305;
  stroke-width: 1.75px;
}
.node:hover {
  fill: #ffb700; /* Change to a different color when selected */
  stroke: #bd9406;
  stroke-width: 1.75px;
}
/* Blank node: rectangle with dotted outline */
.node.blank {
  fill: white;
  stroke: #002366;
  stroke-dasharray: 5, 5;
  stroke-width: 2px;
  rx: 4px;
  ry: 4px;
}
.node.blank:hover {
  fill: rgba(255, 183, 0, 0.15);
  stroke: #bd9406;
  stroke-dasharray: 5, 5;
}
.node.blank.selected {
  fill: rgba(255, 153, 0, 0.2);
  stroke: #a16305;
  stroke-dasharray: 5, 5;
}

.link.blank {
  stroke: #cccccc;
  stroke-dasharray: 5, 5;
  stroke-width: 2px;
}
.link.blank:hover {
  stroke: #002366;
  stroke-dasharray: 5, 5;
  stroke-width: 3px;
}
.link.blank.selected {
  stroke: #ff9900;
  stroke-dasharray: 5, 5;
  stroke-width: 4px;
}
/* Text labels for nodes */
.node-label {
  font-size: 20px; /* Adjust the font size */
  fill: #002366; /* Dark blue for text */
  font-family: 'Montserrat', sans-serif; /* Same font as the rest of the page */
  pointer-events: none; /* Prevent text from capturing mouse events */
  font-weight: bold;
  white-space: pre-wrap;
  word-wrap: break-word;
  text-align: center;
  width: 100px;
}

/* Link styles */
.link {
  stroke: #cccccc;
  stroke-width: 4px;
  transition: stroke 0.2s, stroke-width 0.2s; 
}
.link:hover {
  stroke: #002366;  /* Dark blue on hover */
  stroke-width: 5px;  /* Increase thickness on hover */
  cursor: pointer;
}

.link.selected {
  stroke: #ff9900;
  stroke-width: 6px;
}
.link.selected:hover {
  stroke: #fccd86fb;
  stroke-width: 6px;
}
/* Default link label style */
.link-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  fill: #333;  /* Dark grey text color */
  pointer-events: none;  /* Prevent interaction with the text */
  opacity: 0;  /* Initially hide the link text */
  transition: opacity 0.2s;  /* Smooth fade-in transition */
}

/* Show the link label when hovering over the link */
.link:hover + .link-label {
  opacity: 1;  /* Make text visible on hover */
}
#controls {
  margin: 20px;
  text-align: center;
}

#controls button {
  margin: 5px;
  padding: 10px 10px;
  background-color: #646a6c;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}
#controls button:hover {
  background-color: #ff3333; /* Darker red on hover */
}

/* Slider toggle switch */
.switch {
  position: relative;
  display: inline-block;
  width: 80px;
  height: 34px;
  vertical-align: middle;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #191660;
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #763eab;
}

input:checked + .slider:before {
  transform: translateX(45px);
}

#toggle-label {
  margin-left: 10px;
  vertical-align: middle;
  font-weight: bold;
  font-size: larger;
}

nav {
  background-color: #002366;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky; /* Make the navbar sticky at the top */
  top: 0;
  left: 0;
  z-index: 1000;
  width: 100%;
  margin: 0 auto; 
}
nav .navbar {
  font-size: 1.8rem;
  font-weight: bold;
  margin: 10px;
  padding: 10px;
}
.navbar-menu {
    display: flex;
    flex-grow: 1;
    justify-content: flex-end;
    gap: 20px;
    margin: 10px;
}
.navbar-menu ul {
    list-style-type: none;
    display: flex;
    margin: 0;
    padding: 0;
    gap: 10px;
}
.navbar-menu ul li {
    margin: 0; /* Add spacing between items */
}
.navbar-menu ul li a {
    color: white !important;
    text-decoration: none !important;
    font-size: 1.3rem;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
}
.navbar-menu ul li a:hover { 
    background-color: #0056b3;
    color: #eaf6ff; 
}
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    margin: 15px;
}

.hamburger div {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
}
.logo-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;  /* Adjusts spacing between logos */
    align-items: center;  /* Vertically aligns logos */
    gap: 10px; /* Spacing between logos */
    padding: 10px; /* Add padding around the container */
    background: #fcfeff;
}
.logo-container img {
    max-width: 20%; /* Scale images within their container */
    height: auto; /* Maintain aspect ratio */
    max-height: 80px; /* Set a maximum height for larger screens */
    flex: 1 1 auto; /* Make logos take up equal space and wrap */
    object-fit: contain; /* Ensure logos scale without distortion */
}
@media (max-width: 768px) {
    .logo-container img {
        max-width: 20%; /* Shrink further on smaller screens */
        max-height: 80px; /* Adjust max height */
    }
}

@media (max-width: 480px) {
    .logo-container img {
        max-width: 15%; /* Shrink further on very small screens */
        max-height: 60px; /* Adjust max height */
    }
}
em{
  font-style: italic;
  font-size: larger;
  color: #b80000 !important; 
  font-weight: bold;
}
.tag {
  background: #72a1cd;
  color: #ffffff;
  border-radius: 4px;
  padding: 2px 6px;
  margin-right: 4px;
  font-size: 0.7em;
  display: inline-block;
}
.tag-filter {
      display: inline-block;
      margin: 5px;
}
.tag-filter {
      display: inline-block;
      margin: 5px;
}
.tag-filter input[type="checkbox"]:checked + label::before {
    background-color: #4CAF50; /* Change to green when checked */
    border-color: #4CAF50; /* Match the border color */
}
.tag-filter label::after {
  content: "✔"; /* Checkmark symbol */
  position: absolute;
  left: 4px;
  top: 0px;
  width: 20px;
  height: 20px;
  color: white;
  font-size: 16px;
  font-weight: bold;
  line-height: 18px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.2s;
}
#resources-list ul {
      list-style: none;
      padding: 0;
}
#filter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px; /* Space between checkboxes */
}

#filter-controls div {
  display: flex;
  align-items: center;
}

.switch-small {
  position: relative;
  display: inline-block;
  width: 70px;
  height: 22px;
  vertical-align: middle;
  margin: 5px;
}
.switch-small input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider-small {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #191660;
  transition: .4s;
  border-radius: 15px;
}
.slider-small:before {
  position: absolute;
  content: "";
  height: 15px;
  width: 15px;
  left: 5px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}
input:checked + .slider-small {
  background-color: #763eab;
}
input:checked + .slider-small:before {
  transform: translateX(45px);
}
#toggle-label-small {
  margin-left: 5px;
  vertical-align: middle;
  font-weight: bold;
  font-size: regular;
}
@media (max-width: 768px) {
    nav {
        flex-wrap: wrap;
    }
    nav .navbar { /* Navbar Title */
        font-size: 1.2rem;
        font-weight: bold;
    }
    .hamburger {
        display: flex;
    }

    .navbar-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: #003d99;
    }

    .navbar-menu.show {
        display: flex;
    }

    .navbar-menu ul {
        flex-direction: column;
    }

    .navbar-menu ul li {
        text-align: center;
        padding: 10px 0;
    }
}
