@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&display=swap');

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 400;
  margin: 0;
  padding: 0;
  background: #fdfdfd;
  color: #333;
  line-height: 1.6;
  /* Flexbox layout for the whole page */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

header h1 {
  margin: 0;
  font-size: 2rem;
}

nav {
  background: #0055a5;
  display: flex;
  justify-content: center;
  padding: 0.5rem;
}

a:link {
  text-decoration: none;
  color: #0055a5;
}

a:visited {
  text-decoration: none;
  color: #0055a5;
}

a.navlink:link {
  text-decoration: none;
  color: #333;
}

a.navlink:visited {
  text-decoration: none;
  color: #333;
}

a:hover {
  color: red;
  text-decoration: none;
  transition: 0.3s
}

main {
  max-width: 900px;
  width: 100%; /* Ensure main content takes available width */
  margin: 0 auto; /* Center the content */
  padding: 2rem 1rem; /* Padding will be adjusted by script.js */
  flex-grow: 1; /* Allows main to grow and push footer down */
}

.session {
  margin-bottom: 2rem;
  padding: 1rem;
  border: 1px solid #ccc;
  border-radius: 10px;
  background: #f7f9fc;
}

.session h3 {
  margin-top: 0;
  color: #333;
  font-size: 1.3em;
}

.session-room {
  margin-top: -0.75em; /* REVERTED: Back to original for homepage */
  margin-bottom: 1.25em;
  font-size: 1.1em; /* REVERTED: Back to original for homepage */
  color: #333;
}

.talk {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 0.75rem;
  margin: 0.75rem 0;
}

.talk h3 {
  margin: 0.2rem 0;
  color: #0055a5;
}

/* New Talk Title Style */
.talk-title {
  font-size: 1.3em;
  color: #0055a5;
  margin: 0.5rem 0;
  font-weight: bold;
}

footer {
  background: #003366;
  color: white;
  text-align: center;
  padding: 1rem;
  margin-top: 2rem;
}

input[type="text"] {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #bbb;
  border-radius: 4px;
  margin-bottom: 1rem;
}

/* Archive collapsible navigation */
.year, .sessionTitle {
  cursor: pointer;
  padding: 0.5rem;
  margin: 0.5rem 0;
  background: #e8eef7;
  border-radius: 6px;
  font-weight: bold;
}

.year:hover, .sessionTitle:hover {
  background: #d1e0f5;
}

.sessionList, .talkList {
  margin-left: 1.5rem;
  margin-top: 0.5rem;
  display: none;
}

/* MODIFIED: Rule for archive room now contains all specific styles */
.talkList .session-room {
  padding-left: 0.75rem; /* For alignment */
  font-size: 1em; /* Override default for normal font size */
  margin-top: 0.5em; /* Override default for more space */
}

.sessionTitle {
  font-weight: normal;
  background: #f4f7fa;
}

.sessionList .talk {
  margin-left: 1rem;
}

/* Style for interactive titles (search page) */
.interactive-title {
  cursor: pointer;
  color: #0055a5;
  transition: color 0.2s;
}

.interactive-title:hover {
  color: red;
}

.search-abstract {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #eee;
}

.w3-bar a.active {
  border-bottom: 5px solid red;
  font-weight: 600;
}

/* Scroll-to-top button */
#myBtn {
  display: none; /* Hidden by default */
  position: fixed; /* Fixed/sticky position */
  bottom: 20px; /* Place the button at the bottom of the page */
  right: 30px; /* Place the button 30px from the right */
  z-index: 99; /* Make sure it does not overlap */
  border: none; /* Remove borders */
  outline: none; /* Remove outline */
  background-color: #555; /* Set a background color */
  color: white; /* Text color */
  cursor: pointer; /* Add a mouse pointer on hover */
  padding: 10px 15px; /* Some padding */
  border-radius: 4px; /* Rounded corners */
  font-size: 18px; /* Increase font size */
  transition: 0.3s;
  opacity: 0.7; /* Semi-transparent */
}

#myBtn:hover {
  background-color: red; /* Use site's accent color on hover */
  opacity: 1; /* Fully opaque on hover */
}


/* --- Mobile Responsive Styles --- */
@media (max-width: 768px) {
    /* Adjust main content area for smaller screens */
    main {
        padding: 1.5rem 0.8rem;
    }

    /* Reduce size of the main logo on the homepage */
    h1 > img {
        width: 280px;
    }

    /* Make navigation links slightly smaller to fit better */
    .w3-bar .w3-button {
        padding: 16px 12px !important;
        font-size: 0.9em;
    }

    /* Reduce the size of the logo in the navbar */
    #myNavbar img {
        height: 30px;
    }

    /* Make iframes responsive */
    iframe {
        width: 100%;
        max-width: 100%; /* Ensure it doesn't overflow */
        height: 300px; /* Adjust height for mobile */
    }

    /* Hide the larger map versions on mobile, show the smallest one */
    .w3-hide-small.w3-hide-medium, .w3-hide-small.w3-hide-large {
        display: none !important;
    }
    .w3-hide-large.w3-hide-medium {
        display: block !important;
    }
}
