body {
  margin: 0;
  font-family: "Segoe UI", Roboto, sans-serif;
  overflow: auto;
}


/* Directory */

  #search_directory {
    position: static;
    margin: 0;
    padding: 0;
    background: #fefefe;
    color: #222;
    text-align: center;
    scale: 1;
  }


  #directory-body {
    font-family: 'Segoe UI', sans-serif;
    background: #ffffff00;
    color: #222;
    padding: 2rem;
    padding-top: 0px;
    max-width: 1024px;
    margin: auto;
    position: relative;
      
  }

  #directory{
    height: 450px;
    overflow:scroll;
    overflow-x: hidden;
  }
  h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 1rem;
    margin-top: 0.2rem;
  }
  .search-bar {
    margin: 1rem 0;
    text-align: center;
  }
  .search-bar input {
    width: 80%;
    padding: 0.5rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
  }
  .group {
    margin: 2rem 0;

  }
  .group h2 {
    border-bottom: 1px solid #ccc;
    padding-bottom: 0.25rem;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    
  }
  .room {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  }
  .room-title {
    font-weight: bold;
    font-size: 1rem;
    color: #0077cc;
    text-decoration: none;
  }
  .room-title:hover {
    text-decoration: underline;
  }
  .room-details {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #444;
  }
  .room-details img {
    vertical-align: top;
  }

  .room-details img {
    height: 120px;
    width: auto;
    cursor: pointer;
  }
  .eagle-thumb {
    margin-left: 10px;
  }
  #lightbox-modal {
    display: none;
    position: fixed;
    z-index: 999;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    align-items: center;
    justify-content: center;
  }
  #lightbox-modal img {
    max-width: 90%;
    max-height: 90%;
    box-shadow: 0 0 20px #000;
  }
  #lightbox-modal:target {
    display: flex;
  }
  #lightbox-modal span {
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: white;
    font-size: 2rem;
    cursor: pointer;
  }

  .room-details img {
    height: 120px;
    width: auto;
    cursor: pointer;
    transition: transform 0.2s ease;
  }
  .room-details img:hover {
    transform: scale(1.02);
  }
  .eagle-thumb {
    margin-left: 10px;
  }
  #lightbox-modal {
    display: none;
    position: fixed;
    z-index: 999;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    align-items: center;
    justify-content: center;
    padding: 1rem;
  }
  #lightbox-modal img {
    max-width: 90vw;
    max-height: 90vh;
    box-shadow: 0 0 20px #000;
  }
  #lightbox-modal span {
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: white;
    font-size: 2rem;
    cursor: pointer;
  }



/* Top navigation bar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #222;
  color: white;
  padding: 0.5rem;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1rem;
  z-index: 10;
  padding-right: 10px;
}


.sublogo{
  font-size: 0.75rem;
  padding-left: 15px;
}

.nav-links a {
  color: rgb(255, 255, 255);
  text-decoration: none;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: #87d3a6;
  cursor: pointer;
  transition: color 0.1s;
}

#contact:active {
  color: #222;
}

.menu-toggle {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: rgb(255, 255, 255);
}


/* Instruction Section */
#instruct{
  position:static;
  display: block;
  color: rgb(0, 0, 0);
  text-align: center;
  padding: 3px;
  z-index: 5;
}



/* Map holding box */
#map-container{
  width: 100%;
  height: calc(100vh - 130px); /* Adjust for navbar + toolbar */
  overflow:hidden; /* enables scrollbars */
  background: rgb(255, 255, 255);
  scale: .9;
}

#map-wrapper {
  position: relative;
  width: auto;
  height: auto;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  padding-top: 40px;
  padding-bottom: 40px;
  color: #333;
  
}

#map-image {
                                                                                                                       
  width: 1000px;
  height: auto;
  display: block;
}

.map-title-box{
    font-size: 0px;
    z-index: 5;
    position: absolute;
    left: calc(50% - 820px);
    bottom: 50%;
    transform: rotate(-90deg);
}


/* buttons on map */
.map-button{
  background-color: #C17AD1; /*Button Colour*/
  color: wheat; /*Text Colour for Mobile (Disabled for desktop sizes)*/

  position: absolute;
  display: inline-block;
  
  z-index: 8;
  transition: background-color 0.25s ease, border 0.5s ease;
  text-align: center;
  vertical-align: middle;
  line-height: 80px;

  font-weight: 500; 
  font-size: 0px;
  cursor: pointer;
  transition: all .2s;


  /* Button Pre-Transition (Highlight) */
  scale: 0.55;
  border-radius: 20px;
}

.map-button:hover {
    background-color:#808080c7;
    scale: 0.98;
    border-radius: 0px;

}


/* Specific Buttons */

/* ARCH Building */

/* Floor 1 */

#Arch2_F1_B1 {
    height: 94px;
    width: 144px;
    left: calc(50% - 293px);
    top: 458px;

}

#Arch2_F1_B2 {
    height: 229px;
    width: 128px;
    top: 185px;
    left: calc(50% - 349px);
}

#Arch2_F1_B3 {
    height: 94px;
    width: 114px;
    top: 458px;
    left: calc(50% - 409px);
  
}

/* Floor 2 */

#Arch2_F2_B1 {
    height: 75px;
    width: 95px;
    top: 461px;
    left: calc(50% - 313px);
}

#Arch2_F2_B2 {
    height: 159px;
    width: 343px;
    top: 211px;
    left: calc(50% - 408px);
}

#Arch2_F2_B3 {
    height: 159px;
    width: 124px;
    top: 211px;
    left: calc(50% - 62px);

}

/* Floor 3 */

#Arch2_F3_B1 {
  height: 75px;
  width: 50px;
  top: 461px;
  left: calc(50% + 358px);
}

#Arch2_F3_B2 {
  height: 51px;
  width: 80px;
  top: 375px;
  left: calc(50% - 70px);
}

#Arch2_F3_B3 {
  height: 128px;
  width: 158px;
  top: 212px;
  left: calc(50% - 408px);
}

/* Floor 4 */

#Arch2_F4_B1 {
    height: 131px;
    width: 160px;
    top: 210px;
    left: calc(50% + 248px);
}

#Arch2_F4_B2 {
    height: 56px;
    width: 143px;
    top: 369px;
    left: calc(50% + 75px);
}

#Arch2_F4_B3 {
  height: 56px;
  width: 142px;
  top: 369px;
  left: calc(50% - 70px);
}

#Arch2_F4_B4 {
    height: 56px;
    width: 85px;
    top: 369px;
    left: calc(50% - 333px);
}


/* JAR Building */

/* JAR F1 */

#JAR_F1_B1 {
    height: 92px;
    width: 185px;
    top: 123px;
    left: calc(50% + 106px);
}

#JAR_F1_B2 {
    height: 140px;
    width: 197px;
    top: 274px;
    left: calc(50% + 93px);
}

#JAR_F1_B3 {
    height: 155px;
    width: 381px;
    top: 482px;
    left: calc(50% - 429px);
}

#JAR_F1_B4 {
    height: 124px;
    width: 296px;
    top: 513px;
    left: calc(50% + 94px);
}

#JAR_F1_B5 {
    height: 99px;
    width: 30px;
    top: 293px;
    left: calc(50% - 426px);
}



/* JAR F2 */

#JAR_F2_B1 {
    height: 155px;
    width: 231px;
    top: 489px;
    left: calc(50% - 469px);
}

#JAR_F2_B2 {
    height: 130px;
    width: 96px;
    top: 321px;
    left: calc(50% + 370px);
}

#JAR_F2_B3 {
    height: 132px;
    width: 90px;
    top: 511px;
    left: calc(50% + 94px)
}

#JAR_F2_B4 {
    height: 132px;
    width: 137px;
    top: 511px;
    left: calc(50% + 188px);
}

#JAR_F2_B5 {
    height: 132px;
    width: 139px;
    top: 511px;
    left: calc(50% + 327px);
}

#JAR_F2_B6 {
    height: 133px;
    width: 233px;
    top: 128px;
    left: calc(50% + 234px);
}

#JAR_F2_B7 {
    height: 58px;
    width: 38px;
    top: 207px;
    left: calc(50% - 401px);
}

/* JAR F3 */

#JAR_F3_B1 {
    height: 89px;
    width: 92px;
    top: 387px;
    left: calc(50% + 191px);
}

#JAR_F3_B2 {
    height: 48px;
    width: 30px;
    top: 287px;
    left: calc(50% - 419px);
}


/* Map Floor Selection Bar */

#toolbar {
  background: #3a3a3a;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: sans-serif;
}

#toolbar label {
  font-size: 0.95rem;
  color: #ffffff;
}

#toolbar select {
  padding: 0.35rem 1rem;
  font-size: 0.95rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fafafa;
  color: #222;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

#toolbar select:focus {
  outline: none;
  border-color: #555;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}



/* Side Bar */


#sidebar {
  display: flex;
  flex-direction: column;
  justify-content: start;
  position: absolute;
  top: 0px;
  width: 300px;
  height: auto;
  max-height: 95%;
  overflow-y: auto;
  border: 1px solid #ccc;
  left: -400px; /* hidden initially */
  background: rgb(255, 255, 255);
  border-right: 2px solid #ccc;
  padding: 1rem;
  box-shadow: -2px 0 5px rgba(0,0,0,0.1);
  transition: left 0.3s ease;
  z-index: 11;
}

#sidebar.open {
  position: fixed;
  left: 0px;
  bottom: 0px;
}

#close-sidebar {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #ccc;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
}

#sidebar img {
  padding: 6px;
}

#sidebar h2 {
  display: block;
  white-space: normal;
  overflow: visible;
}

/* Hyperlink button */

.link-button:link, .link-button:visited  {
  font-size: 20px;
  position: sticky;
  bottom: 0px;
  margin-top: auto;
  padding: 14px 25px;
  text-align: center;
  text-decoration: none;
  display: block;
  color: rgb(255, 255, 255);
  background-color: rgb(12, 37, 255);
}



.link-button:hover, .link-button:active{
  background-color: rgb(14, 27, 56);
  color: wheat;
}



/* Description */

main2 {
  font-family: "Segoe UI", Roboto, sans-serif;
  margin: 0;
  padding: 0;
  background: #fefefe;
  color: #222;
  text-align: center;
  scale: 1;
}



.description {
  max-width: 800px;
  margin: 2rem auto;
  font-size: 1.1rem;
  line-height: 1.6;
}
.credits {
  background: #f3f3f3;
  padding: 1.5rem;
  margin: 2rem auto;
  max-width: 800px;
  font-size: 0.95rem;
  color: #555;
  
}
.credits h3 {
  margin-top: 0;
  color: #222;
}
footer p {
  font-size: 0.85rem;
  color: #777;
}

/* Media Adaptions */

@media (min-width: 1600px) {
  #map-wrapper{
    scale: 1.25;
  }
}



@media (min-width: 1700px) {
  #map-wrapper{
    scale: 1.5;
  }
}


/* Responsive Nav (kinda sorta works) */
@media (max-width: 768px) {

  main4{
    display: none;
  }

  .description{
    font-size: 50%;
  }

  .navbar {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    position: relative;
  }

  .menu-toggle {
    display: block;
    z-index: 1001;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    background: #333;
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    padding: 1rem;
  }

  .nav-links.show {
    display: flex;
  }

  #toolbar {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.5rem;
  }

  #map-container {
    width: 100%;
    height: auto;
    overflow: auto;
    transform: none;
  }

  #map-wrapper {
    flex-direction: column;
    height: auto;
    padding: 20px;
  }

  #map-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: auto;
    position: relative;
    top: 0;
  }


  .map-button {
    position: absolute;
    background-color: rgb(48, 128, 65);
    color: wheat;
    z-index: 20;
    cursor: pointer;
    transition: background-color 0.25s ease;
    font-size: 0;
    scale: 1;
    width: 80% !important;
    height: 80px !important;
    position: static;
    text-align: center;
    font-size: 1.7rem;
    transform: scale(0.8);

    justify-content: center; 
    align-items: center; 
    border-radius: 0.75rem; 
    font-weight: 500; 
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);

    cursor: pointer; 

    /* Optional: You can hide them completely if mobile isn't meant for clicking these */
  }

  .map-button:hover {
    background-color:#87d3a6;
    color: darkslategray;
    scale: 1.0;
    transform: scale(0.98);
    border-radius: 15px;
    font-size: 25px;

  }



  .map-title-box {
    display: block;
    font-size: 24px;
    position: static;
    transform: none;
    text-align: center;
    margin-bottom: 1rem;
  }

  
  #sidebar {
    top: 10px;
    width: 0%;
    z-index: 9000;
    align-items: center;

  }

  .link-button{
    width: 90%;
  }

  #sidebar.open {
    
    width: 95%;
    left: 0;
  }

  #close-sidebar{
    right: 30px
  }

  #close-sidebar {
    position: absolute;
    top: 10px;
    right: 10px;
  }

  #sidebar img {
    padding: 6px;
    max-width: 300px;
    height: auto;
  }

}
