body.index { 
  font-family: 'Georgia', serif; 
  line-height: 1.8; 
  color: #333; 
  margin: 0; 
  padding: 0; 
  background-image: url('bluesky.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

header { 
  background: #002147; 
  color: white; 
  padding: 3rem 1rem; 
  text-align: center; 
}

header h1 { 
  margin: 0; 
  font-size: 2.5rem; 
  letter-spacing: 1px; 
}

.top-bar {
  width: 100%;
  min-height: 15vh; /* Changed from height: 20vh to give elements breathing room */
  background-color: white;
  position: sticky; /* Keeps bar at the top during scroll */
  top: 0;
  z-index: 1000; /* Ensures it stays above other content */
  left: 0;
  display: flex;
  align-items: center; /* Centers items vertically */
  justify-content: space-between; /* Pushes name left, links right */
  padding: 0 4%; /* Increased horizontal padding slightly */
  box-shadow: 0 2px 5px rgba(0,0,0,0.1); 
  box-sizing: border-box;
}

.org-name {
  color: #990000;
  font-size: 2.5rem;
  margin: 0;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 15px; /* Space between logo and name */
}

/* Square Logo Styling */
.logo {
  height: 10vh; /* Adjust based on bar height */
  width: 10vh;  /* Match height to keep it square */
  object-fit: contain;
}

/* Desktop: Default Horizontal Layout for Links */
.nav-links {
  display: flex !important; 
  list-style: none !important;               
  flex-direction: row !important; /* Aligns them horizontally */
  margin: 0;
  padding: 0;
  gap: 10px; /* Space between links */
}

.nav-links li a {
  text-decoration: none;
  color: #002147;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.nav-links li a:hover { 
  color: #c33; 
}

/* Desktop: Hide Hamburger */
.hamburger {
  display: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: black;
}

.container {
  max-width: 850px;
  margin: 40px auto;
  padding: 40px;
}

.index .container {
  text-align: center;
  font-weight: bold;
  font-family: 'Georgia', serif;
  font-size: 1.6rem;
  line-height: 1.2;
  max-width: 550px;
  margin: 40px auto;
  padding: 40px;
}

footer { 
  text-align: center; 
  padding: 3rem; 
  font-size: 0.85rem; 
  color: #777; 
}

.member-card {
    border: 1px solid #ddd;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 4px;
    background: #fdfdfd;
}

.member-card h3 { 
  margin-top: 0; 
  color: #002147;
}

.external-link {
    display: inline-block;
    margin-top: 10px;
    margin-right: 15px;
    padding: 5px 12px;
    background: #002147;
    color: white !important;
    text-decoration: none;
    font-size: 0.85rem;
    border-radius: 3px;
    font-family: sans-serif;
}

.external-link:hover {
    background: #c33;
}

/* Container to limit width and centre the column on desktop */
.publications-list {
  max-width: 30vw;
  margin: 0 auto;  /* Centres the entire column horizontally */
  padding: 20px;
  box-sizing: border-box;
}

/* Individual book section styling */
.book-item {
  display: flex;
  flex-direction: column; /* Stacks elements vertically */
  align-items: flex-start;  /* Aligns all content to the left edge of the column */
  text-align: left;     /* Aligns all text sentences to the left */
  margin-bottom: 30px;
  width: 100%;
}

/* Ensure headings take up full width and align left */
.author-name, .book-title {
  font-size: 1rem;
  text-align: left;
  width: 100%;
  margin-bottom: 5px;
}

/* Cover image styling */
.book-cover {
  width: 75%;           /* Forces the image to fill the exact width of the column */
  max-width: 100%;       /* Prevents stretching past its native size */
  height: auto;          /* Maintains original aspect ratio */
  display: block;
  margin-bottom: 15px;
}

/* Description paragraph styling */
.book-description {
  font-size: 1rem;
  line-height: 1.5;
  margin-top: 0;
  text-align: left;      /* Ensures description text is left-aligned */
  width: 100%;           /* Matches the width of the cover image */
}

/* Separator line styling */
.book-separator {
  border: 0;
  border-top: 1px solid #ccc; /* Simple grey line */
  margin: 30px 0;
  width: 100%;                /* Spans the full width of the column */
}

/* Mobile Adjustments (Screens smaller than 768px) */
@media (max-width: 768px) {
  .top-bar {
    height: 10vh; /* Half the size of desktop to save space */
    padding: 0 15px;
    flex-direction: row; 
  }

  .org-name {
    font-size: 1.2rem; /* Shrink text so it fits */
  }

  .logo {
    height: 6vh;
    width: 6vh;
  }

  .hamburger {
    display: flex; /* Show hamburger on mobile */
  }

  /* Mobile Dropdown Hidden state */
  .nav-links {
    display: none !important; 
    flex-direction: column !important;
    position: absolute;
    top: 10vh; /* Sits right under the mobile top bar */
    left: 0;
    width: 100%;
    background: white;
    padding: 5px;
    gap: 5px;                      
    border-bottom: 1px solid #ddd;
    box-sizing: border-box;
  }

  /* This class will be added by JavaScript when hamburger is clicked */
  .nav-links.active {
    display: flex !important;
  }

  .nav-links li a {
    color: black;
    font-size: 1rem;
  }

/* Responsive adjustment for small screens */
  .publications-list {
    max-width: 90vw; /* Widens the column on mobile so text remains readable */
  }
}
