/* General Body Styling */
body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f8fbff; /* Light Blueish Background */
  color: #333;
}

/* Header Buffer */
#header-buffer {
  height: 20px;
  background-color: #f8fbff; /* Same as background for seamless buffer */
}

/* Navigation Bar */
#nav-bar {
  background-color: #34495e; /* Dark Grayish Blue */
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#nav-logo {
  height: 60px;
}

#nav-links {
  display: flex;
  gap: 30px;
}

#nav-links a {
  text-decoration: none;
  color: white;
  font-size: 16px;
  font-weight: bold;
  padding: 10px 15px;
  border-radius: 5px;
  transition: background-color 0.2s ease;
}

#nav-links a:hover {
  background-color: #1abc9c; /* Light Green */
}

/* Banner Image Styling */
#banner-image {
  width: 100%;
  height: auto;
  display: block;
}

/* Title Container Styling */
#title-container {
  width: 95%; /* Slight margin on either side for better aesthetics */
  margin: 0 auto 20px auto; /* No top margin, bottom margin for spacing */
  padding: 20px;
  background-color: #ffffff; /* White */
  border: 2px solid #bdc3c7; /* Light Gray Border */
  border-radius: 10px; /* Rounded corners */
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#title-container h2 {
  font-size: 24px;
  font-weight: bold;
  color: #2c3e50; /* Dark Blue */
  margin: 0;
}

.page-description {
  font-size: 16px;
  color: #7f8c8d; /* Subtle gray color */
  margin-top: 10px;
  text-align: center;
}

/* Filter Container Styling */
#filter-container {
  width: 95%; /* Matches title-container width */
  margin: 0 auto 20px auto; /* Center alignment with spacing below */
  padding: 20px;
  background-color: #ffffff; /* White */
  border: 2px solid #bdc3c7; /* Light Gray Border */
  border-radius: 10px; /* Rounded corners */
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#filter-container h2 {
  font-size: 24px; /* Increased to match request */
  font-weight: bold;
  color: #2c3e50; /* Dark Blue */
  margin: 0;
}

/* Responsive Image Styling */
.image-container {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}

.responsive-image {
  width: 100%;
  max-width: 1100px; /* Slightly increased maximum width */
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Chart Container Styling */
#chart-container {
  width: 95%;
  max-width: 1000px;
  margin: 20px auto;
  padding: 20px;
  background-color: #ffffff; /* White background */
  border: 2px solid #bdc3c7; /* Light Gray Border */
  border-radius: 10px; /* Rounded corners */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow */
  text-align: center;
}

#chart-container canvas {
  width: 100%;
  height: 400px; /* Set a normalized height */
  max-height: 500px; /* Prevent overflow */
}

/* Filter Controls Styling */
#filter-controls {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 20px;
  margin-bottom: 20px;
  background-color: #ffffff; /* White */
  border: 2px solid #bdc3c7; /* Light Gray */
  border-radius: 10px; /* Rounded corners */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow */
}

#source-filters, #year-range {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 45%; /* Equal width for both sections */
}

#source-filters h3, #year-range h3 {
  margin: 0;
  font-size: 18px;
  font-weight: bold;
  color: #2c3e50; /* Dark Blue */
  text-align: center;
}

#source-filters label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  cursor: pointer;
}

#source-filters input[type="checkbox"] {
  accent-color: #3498db; /* Blue color for checkboxes */
  transform: scale(1.2); /* Slightly larger checkboxes */
}

input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  background: #ecf0f1; /* Light Gray */
  border-radius: 5px;
  height: 8px;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: #3498db; /* Blue thumb */
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Add a shadow */
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #3498db;
  border-radius: 50%;
  cursor: pointer;
}

input[type="range"]::-ms-thumb {
  width: 20px;
  height: 20px;
  background: #3498db;
  border-radius: 50%;
  cursor: pointer;
}

#year-min-value, #year-max-value {
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  margin-top: 5px;
  color: #34495e;
}
/* General Styling for Full-Width Elements */
body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f8fbff; /* Light Blueish Background */
  color: #333;
}

/* Navigation Bar */
#nav-bar {
  background-color: #34495e; /* Dark Grayish Blue */
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  width: 100%; /* Full width */
  box-sizing: border-box; /* Include padding in width calculation */
  margin: 0 auto;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#nav-links {
  display: flex;
  gap: 30px;
}

#nav-links a {
  text-decoration: none;
  color: white;
  font-size: 16px;
  font-weight: bold;
  padding: 10px 15px;
  border-radius: 5px;
  transition: background-color 0.2s ease;
}

#nav-links a:hover {
  background-color: #1abc9c; /* Light Green */
}

/* Title Container */
#title-container {
  width: 100%; /* Full width */
  padding: 20px;
  background-color: #ffffff; /* White */
  border: 2px solid #bdc3c7; /* Light Gray Border */
  border-radius: 10px; /* Rounded corners */
  text-align: center;
  box-sizing: border-box; /* Include padding in width calculation */
  margin: 0 auto 20px auto; /* Center with spacing below */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#title-container h2 {
  font-size: 24px;
  font-weight: bold;
  color: #2c3e50; /* Dark Blue */
  margin: 0;
}

/* Footer Styling */
#footer {
  background-color: #2c3e50; /* Midnight Blue */
  height: 50px;
  width: 100%; /* Full width */
  margin: 0 auto; /* Center alignment */
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 14px;
}

/* Chart Container Styling */
#chart-container {
  width: 95%;
  max-width: 1200px; /* Optional: Set a max width */
  margin: 20px auto;
  padding: 20px;
  background-color: #ffffff; /* White background */
  border: 2px solid #bdc3c7; /* Light Gray Border */
  border-radius: 10px; /* Rounded corners */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow */
  text-align: center;
}

#chart-container canvas {
  width: 100% !important; /* Ensure the canvas fills the container */
  height: auto !important; /* Maintain aspect ratio */
  max-height: 500px; /* Optional: Set a maximum height */
}

/* General styles for mobile devices */
@media (max-width: 768px) {
  /* Adjust the navigation bar */
  #nav-bar {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px;
  }

  #nav-links {
    flex-direction: column;
    gap: 15px;
  }

  #nav-links a {
    font-size: 14px;
    padding: 8px;
    width: 100%;
    text-align: left;
  }

  /* Page titles and descriptions */
  #title-container {
    padding: 15px;
    font-size: 18px;
  }

  /* Chart container adjustments */
  #chart-container {
    width: 100%;
    max-width: 100%; /* Remove width constraint for smaller devices */
    padding: 10px;
  }

  #chart-container canvas {
    height: 300px; /* Adjust height for smaller screens */
  }

  /* Filter controls adjustments */
  #filter-controls {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }

  #source-filters, #year-range {
    width: 100%;
  }

  #dropdownButton {
    width: 100%; /* Make dropdown button stretch */
    text-align: center;
  }

  /* Dropdown content */
  .dropdown-content {
    width: 100%;
    left: 0; /* Align dropdown to the parent button */
  }

  /* Slider adjustments */
  input[type="range"] {
    width: 100%; /* Ensure sliders fill the screen width */
  }

  /* Banner image */
  #banner-image {
    height: auto; /* Scale proportionally */
    width: 100%;
  }
}

/* Dropdown Container Styling */
.dropdown {
  position: relative;
  display: inline-block;
}

/* Dropdown menu adjustments */
.dropdown-content {
  max-height: 300px; /* Limit height for long lists */
  overflow-y: auto; /* Enable scrolling */
  padding: 10px;
}

.dropdown-content button, .dropdown-content label {
  font-size: 16px; /* Larger, touch-friendly buttons */
  padding: 10px;
}

@media (max-width: 768px) {
  #filter-controls {
    flex-direction: column; /* Stack items vertically */
    align-items: stretch; /* Stretch to fit container */
  }

  #filter-controls h3 {
    text-align: center; /* Center headings */
  }
}

#dropdownButton {
  background-color: #ecf0f1; /* Light Gray */
  color: #333; /* Dark Text */
  font-size: 14px;
  font-weight: bold;
  padding: 10px 20px;
  border: 1px solid #bdc3c7; /* Light Gray Border */
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#dropdownButton:hover {
  background-color: #dcdde1; /* Slightly darker gray on hover */
}

.dropdown-content {
  position: absolute;
  left: 0; /* Align with the left of the button */
  z-index: 1000; /* Ensure it appears above other elements */
  background-color: #ffffff; /* White background for contrast */
  border: 1px solid #bdc3c7; /* Light Gray Border */
  border-radius: 5px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
  min-width: 200px; /* Minimum width to match button size */
  padding: 10px 0; /* Vertical padding inside the dropdown */
  display: none; /* Initially hidden */
}

.dropdown-content label {
  display: block;
  padding: 10px 20px; /* Add padding for a larger click area */
  font-size: 14px;
  color: #333; /* Dark Text */
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.dropdown-content label:hover {
  background-color: #f1f2f6; /* Light hover effect */
}

.dropdown-content button {
  display: block;
  padding: 10px 20px;
  font-size: 14px;
  color: #333;
  background-color: #ffffff;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.dropdown-content button:hover {
  background-color: #f1f2f6; /* Light hover effect */
}

.dropdown:hover .dropdown-content {
  display: block; /* Show the dropdown when hovering */
}

/* Footer Styling */
#footer {
  background-color: #2c3e50; /* Midnight Blue */
  height: 100px;
  margin-top: 20px;
}
