body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  background-color: #0f172a;
  color: #f1f5f9;
}

.section {
  padding: 2rem;
  text-align: center;
}

.filters {
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.filters select,
.filters input {
  padding: 0.5rem;
  border-radius: 5px;
  border: 1px solid #334155;
  background-color: #1e293b;
  color: white;
  font-size: 1rem;
}

.filters select option {
  background-color: #1e293b;
  color: white;
}

.filters select:focus,
.filters input:focus {
  border-color: #38bdf8;
  outline: none;
}

svg,
#trendChart {
  background-color: #0f172a;
  border-radius: 12px;
  display: block;
  margin: 0 auto;
}

/* Title and description block with vertical divider */
.intro-split {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 4rem;
  position: relative;
  padding: 2rem;
  background-color: #0f172a; /* Dark blue background */
  color: #f1f5f9; /* Light text color */
}

.intro-left,
.intro-right {
  flex: 1 1 300px; /* Grow, shrink, and basis */
  max-width: 600px;
}

.intro-left {
  text-align: right;
  padding-right: 2rem;
}

.intro-left h1 {
  font-size: clamp(2.5rem, 5vw, 4rem); /* Fluid typography */
  font-weight: 600;
  margin: 0;
  line-height: 1.1;
}

.intro-left h2 {
  font-size: clamp(1.2rem, 3vw, 1.8rem); /* Fluid typography */
  font-weight: 300;
  margin-top: 1rem;
  opacity: 0.8;
}

.intro-right {
  text-align: left;
}

.intro-right p {
  font-size: clamp(0.85rem, 2vw, 1.1rem); /* Fluid typography */
  line-height: 1.5;
  margin: 0;
}

/* Vertical divider line */
.intro-split::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 30%;
  bottom: 30%;
  width: 1px;
  background-color: #334155;
  transform: translateX(-50%);
}


.dis{
  min-height: 100%;
  height: 100%;
  margin: 18rem auto; 
}

.legend-vertical {
  position: fixed;
  top: 50%;
  left: 1rem; /* Move the legend to the left */
  transform: translateY(-50%);
  visibility: hidden; /* Initially hidden */
  opacity: 0; /* Start hidden for transition */
  display: flex; /* Always display flex to prevent layout issues */
  flex-direction: column;
  gap: 0.8rem;
  padding: 1rem;
  z-index: 999;
  font-size: 0.7rem;
  color: #f1f5f9;
  transition: opacity 1s ease-in-out, visibility 0s 1s; /* Smooth fade-in transition */
}

.legend-vertical.show {
  display: flex; /* Show the legend */
  opacity: 1; /* Fade in */
}

.legend-vertical div {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legend-vertical span {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.label {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  fill: white;
}

.tooltip {
  position: absolute;
  padding: 8px;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 6px;
  color: #fff;
  font-size: 13px;
  pointer-events: none;
  opacity: 0;
  text-align: center;
  max-width: 200px;
  z-index: 1000;
}

.chart-button-container {
  /* take the full line so we can align it differently at each breakpoint */
  width: 70%;
  display: flex;
  justify-content: flex-end;   /* desktop: right-align */
  margin: .5rem 0;
  padding: 0 1rem;             /* small horizontal breathing room */
}

/* style the button itself */
.fixed-button {
  padding: .55rem 1.1rem;
  font-size: clamp(.8rem, 2.8vw, 1rem); /* fluid type */
  border-radius: 6px;
  border: 1px solid #334155;
  background: #1e293b;
  color: #f8fafc;
  cursor: pointer;
  transition: background .25s;
}
.fixed-button:hover,
.fixed-button:focus { background:#334155; }

#clusterChart {
  max-width: 100%;
  overflow: visible;
  padding-right: 4rem;
}


/* Add this updated CSS to your style.css file */

.footer {
  background-color: #1e293b;
  border-top: 1px solid #334155;
  padding: 2rem 0 0 0; /* Removed bottom padding */
  margin-top: 4rem;
  text-align: center;
  color: #cbd5e1;
  font-family: 'Poppins', sans-serif;
  clear: both;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  text-align: left;
}

.footer-info h3, .footer-data-source h3 {
  color: #facc15;
  margin-bottom: 1rem;
  margin-left: 0;
  font-size: 1.2rem;
  font-weight: 500;
}

.footer-info p, .footer-data-source p {
  line-height: 1.6;
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
}

.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: #facc15;
}

.footer-copyright {
  margin-top: 2rem;
  padding: 1rem 0; /* Changed to remove extra spacing */
  border-top: 1px solid #334155;
  font-size: 0.8rem;
  color: #64748b;
}


/* Responsive adjustments */
@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}







/* Media queries for responsive design */
@media (max-width: 992px) {
  .intro-split {
    gap: 3rem;
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  .intro-split {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
    padding: 3rem 1.5rem;
  }
  
  .intro-left {
    text-align: center;
    padding-right: 0;
  }
  
  .intro-right {
    text-align: center;
  }
  
  .intro-split::after {
    display: none; /* Hide the vertical divider on mobile */
  }
}

@media (max-width: 480px) {
  .intro-split {
    padding: 2rem 1rem;
  }
  
  .intro-left h1 {
    font-size: clamp(2rem, 8vw, 2.5rem);
  }
}


@media (max-width: 992px) {
  .chart-button-container { justify-content: flex-end; }  /* centre it */
}

/* ———  Mobile ——— */
@media (max-width: 576px) {
  .chart-button-container {
    position: sticky;          /* stays visible while scrolling bubbles */
    top: 0; z-index: 999;
    background: #0f172a;       /* same as body bg so it blends */
    padding: .75rem 1rem;
    border-bottom: 1px solid #334155;
    margin: 0;                 /* reset earlier margin */
  }
}


/* For very tall mobile screens */
@media (max-height: 700px) and (max-width: 768px) {
  .intro-split {
    min-height: auto;
    padding: 3rem 1rem;
  }
}

/* For landscape orientation on mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .intro-split {
    flex-direction: row;
    min-height: auto;
    padding: 2rem;
  }
  
  .intro-left {
    text-align: right;
    padding-right: 2rem;
  }
  
  .intro-right {
    text-align: left;
  }
  
  .intro-split::after {
    display: block;
    top: 20%;
    bottom: 20%;
  }
}