/* General page styling */
body {
  font-family: 'Lora', serif;
  margin: 0;
  padding: 0;
  background-color: #eef2f3;
  color: #2b2b2b;
  line-height: 1.8;
}

/* Header styling */
.header {
  text-align: center;
  padding: 30px 20px;
  background: linear-gradient(90deg, #3a6186, #89253e);
  color: white;
  box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.3);
}

.header h1 {
  margin: 0;
  font-size: 36px;
  font-weight: 700;
  font-family: 'Merriweather', serif;
}

.header p {
  font-size: 20px;
  font-style: italic;
  margin-top: 10px;
}

/* Main container for cards */
.main-container {
  display: flex;
  flex-direction: column;
  max-width: 1280px;
  margin: 40px auto;
  gap: 40px;
  padding: 0 20px;
}

/* Top section layout */
.top-section {
  display: grid;
  grid-template-columns: 1fr 2fr; 
  gap: 30px;
}

/* Left card styling for descriptions */
.left-card, .bottom-left-card {
  background: #ffffff;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  text-align: left;
}

.left-card h2, .bottom-left-card h2 {
  font-size: 26px;
  font-family: 'Merriweather', serif;
  color: #3a6186;
  margin-bottom: 15px;
}

.left-card p, .bottom-left-card p {
  font-size: 17px;
  line-height: 1.7;
  color: #4a4a4a;
  margin-bottom: 15px;
}

/* Dropdown styling */
#filter-container select, #respondent-filter {
  padding: 12px 18px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 16px;
  background-color: #fafafa;
  margin: 5px;
  color: #333;
  cursor: pointer;
  box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.15);
}

#filter-container label, #respondent-filter-container label {
  font-weight: bold;
  margin-right: 12px;
  font-size: 16px;
  color: #333;
}

/* Dropdown hover and focus effects */
#filter-container select:hover, #respondent-filter:hover {
  background-color: #f2f2f2;
}

#filter-container select:focus, #respondent-filter:focus {
  outline: none;
  border-color: #3a6186;
}

/* Tooltip styling */
.tooltip {
  font-family: 'Lora', serif;
  font-size: 15px;
  color: white;
  position: absolute;
  background: rgba(0, 0, 0, 0.85);
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  visibility: hidden;
  z-index: 1000;
}

.tooltip strong {
  display: block;
  font-size: 17px;
  margin-bottom: 8px;
}

/* Chart container styling for Circular Packing */
#chart-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 750px;
  position: relative;
}

#chart {
  max-width: 100%;
  max-height: 100%;
  display: block;
  margin: auto;
}

#chart > svg {
  display: block;
  margin: auto;
}

/* Right card styling for Circular Packing */
.right-card {
  background: #ffffff;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.15);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Chart container styling for Chord Diagram */
#second-chart-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 750px;
  position: relative;
}

#second-chart {
  max-width: 100%;
  max-height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

#second-chart > svg {
  display: block;
  margin: auto;
}

/* Bottom section layout */
.bottom-section {
  display: grid;
  grid-template-columns: 1fr 2fr; 
  gap: 30px;
}

/* Bottom section right card */
.bottom-right-card {
  background: #ffffff;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.15);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Add hover effects to cards */
.left-card:hover, .right-card:hover, .bottom-left-card:hover, .bottom-right-card:hover {
  box-shadow: 0px 8px 18px rgba(0, 0, 0, 0.25);
  transform: translateY(-3px);
  transition: all 0.3s ease-in-out;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .top-section, .bottom-section {
    grid-template-columns: 1fr;
  }

  .left-card, .right-card, .bottom-left-card, .bottom-right-card {
    max-width: 100%;
  }

  #filter-container {
    position: static;
    margin-bottom: 20px;
  }
}
