/* Styling for the active navbar link */
.navbar .navbar-nav .nav-link.active {
  font-weight: 800; /* Makes the active text extra bold */
  color: #000000 !important; /* Ensures the active link is stark black */
  border-bottom: 3px solid #000000; /* Adds a clean underline */
}

/* Slight hover effect for the other non-active links */
.navbar .navbar-nav .nav-link:hover {
  color: #555555;
  transition: color 0.2s ease-in-out;
}

/* Center the main container and control the width */
.home-panel-container {
  display: flex;
  flex-direction: column;
  gap: 20px; /* Space between the stacked panels */
  max-width: 1000px; /* Adjust this number to make them wider or narrower */
  margin: 0 auto; /* Centers the whole stack on the page */
}

/* Style the clickable panel wrapper */
.home-panel {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 4px; /* Gives a modern, softer edge */
  text-decoration: none !important; /* Removes default link underlining */
}

/* Style the image */
.home-panel img {
  width: 100%;
  height: 250px; /* Forces a consistent banner height */
  object-fit: cover; /* Ensures images crop nicely instead of stretching weirdly */
  opacity: 0.5; /* Dims the image so the black text pops */
  transition: opacity 0.3s ease; /* Smooth fade effect for the hover */
}

/* Style the text overlay */
h2.panel-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: black;
  font-size: 3rem; 
  font-weight: 700;
  margin: 0;
  letter-spacing: 2px;
  text-transform: lowercase; 
  pointer-events: none; 
  white-space: nowrap; 
  text-align: center; 
  transition: all 0.3s ease;
  
  /* Kill the default Quarto header lines completely */
  border-bottom: none !important; 
  padding-bottom: 0 !important; 
}

/* Make the image light up slightly when hovered */
.home-panel:hover img {
  opacity: 0.8;
}

/* Match the h2.panel-text specificity here too! */
.home-panel:hover h2.panel-text {
  transform: translate(-50%, -50%) scale(1.08); 
  text-shadow: 0px 4px 15px rgba(255, 255, 255, 0.8); 
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
  
  /* Match the h2.panel-text specificity so it successfully overrides desktop! */
  h2.panel-text {
    font-size: 1.75rem; 
    white-space: normal; /* Allows wrapping again */
    width: 90%; /* Gives it a bounding box so centering works */
    line-height: 1.2; 
  }

  .home-panel img {
    height: 180px; 
  }
}