* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Nunito", sans-serif;
  word-break: break-word;
  overflow-wrap: anywhere;
}

img {
  max-width: 100%;
  height: auto;
}

/* Black Header */
.sticky-container {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #000;
  padding: 10px 0;
}


.sticky-container::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 80%;
  transform: translateX(-50%);
  border-bottom: 1px solid #74767b;
}

.header-inner {
  width: 80%;
  margin: 0 auto;

  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
}



/* Logo hugs the divider line */
.inverted-logo {
  height: 50px;
  filter: invert(100%);
}

/* Title truly centered */
.Main-Title {
  text-align: center;
  justify-self: center;
  transform: translateX(-60px);
  /* optical centring */
}

.Main-Title h1 {
  margin: 0;
  color: #fff;
  font-weight: 200;
  font-size: 16px;
}

.Main-Title h2 {
  margin: 0;
  color: #fff;
  font-size: 24px;
  text-transform: uppercase;
}

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
}

/* Navigation Bar */
.Nav-Bar {
  position: relative;
  top: 0;
  background: #000;
  z-index: 9;
}


.Nav-Bar ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0;
  padding: 10px 10px;
}

.Nav-Bar li {
  margin: 8px 12px;
}

.Nav-Bar a {
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 15px;
}

.Nav-Bar a:hover {
  text-decoration: underline;
}

/* Banner */

.banner-image {
  position: relative;
  width: 100%;
  height: clamp(220px, 40vh, 420px);
  background-image: url("images/historybanner.jpg");
  background-size: cover;
  background-position: center;
}

.banner-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
}

.banner-text {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: #fff;
  z-index: 1;
}

/* content wrapper */
.content-wrapper {
  padding: 60px 40px;
  max-width: 1200px;
  margin: auto;
}


/* Sections */
.sections {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 20px;
}

.section-item,
.section-last {
  background: #f4f4f3;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.section-banner {
  width: 100%;
  margin-bottom: 10px;
}

.Page-title {
  font-size: 20px;
  text-transform: uppercase;
}

.section-item a,
.section-last a {
  color: #000;
  text-decoration: none;
}

.section-last {
  grid-column: 2 / span 1;
}

.section-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.section-last img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}






.map-container {
  position: relative;
  max-width: 50%;
  margin: auto;
}

.map-base {
  width: 100%;
  height: auto;
  display: block;
}

.map-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
}

#clocktower,
#l16,
#merl,
#palmer,
#greenow,
#carrington,
#jjthompson,
#studentunion,
#library,
#hopkins,
#harrynurnsten,
#harrypitt,
#mackinder {
  fill: black;
  cursor: pointer;
  transition: fill 0.2s ease, transform 0.2s ease;
  transform-box: fill-box;
  transform-origin: center;
}

#clocktower:hover,
#l16:hover,
#merl:hover,
#palmer:hover,
#greenow:hover,
#carrington:hover,
#jjthompson:hover,
#studentunion:hover,
#hopkins:hover,
#harrynurnsten:hover,
#harrypitt:hover,
#mackinder:hover,
#library:hover {
  fill: red;
  transform: scale(1.1);
}

/* Tooltip container */
#tooltip {
  position: absolute;
  display: none;
  background: white;
  border: 3px solid red;
  width: 600px;
  font-family: 'Nunito', sans-serif;
  z-index: 10;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Red header with arrow */
.tooltip-header {
  background: red;
  color: white;
  font-weight: bold;
  padding: 10px 14px;
  position: relative;
  font-size: 16px;
}

/* Main content layout */
.tooltip-content {
  display: flex;
  gap: 10px;
  padding: 14px;
}

/* Left text */
.tooltip-text {
  flex: 1;
  font-size: 14px;
}

/* Right image + caption */
.tooltip-image-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tooltip-image {
  width: 100%;
  height: auto;
  object-fit: contain;
  border: 1px solid #ddd;
  margin-bottom: 6px;
}

.tooltip-image-ref {
  font-size: 11px;
  color: #666;
  text-align: center;
}

.tooltip-close {
  display: none;
}

.fade-in {
  animation: fadeIn 0.15s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==== Comment Section Styling ==== */
#comments {
  background: #f6f6f5;
  padding: 40px;
  max-width: 1000px;
  margin: auto;
}

#comments h2 {
  font-size: 1.8em;
  margin-bottom: 20px;
}

/* Form styling */
#commentForm input[type="text"],
#commentForm textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 12px;
  border: 1px solid #ccc;
  font-family: inherit;
  font-size: 1em;
  box-sizing: border-box;
}

#commentForm textarea {
  height: 120px;
  resize: vertical;
}

#charCount {
  display: block;
  margin-bottom: 10px;
  font-size: 0.9em;
  color: #555;
}

#commentForm button[type="submit"] {
  padding: 10px 20px;
  font-size: 1em;
  background: #fff;
  border: 1px solid #ccc;
  cursor: pointer;
}

#commentForm button[type="submit"]:hover {
  background: #f0f0f0;
}

/* ==== Comments List ==== */
.comment {
  background: #fff;
  border: 1px solid #333;
  padding: 20px;
  margin-top: 30px;
  position: relative;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.comment strong {
  display: block;
  font-size: 1em;
  margin-bottom: 5px;
}

.comment span {
  font-size: 0.9em;
  color: #777;
}

.comment p {
  margin-top: 10px;
  font-size: 1em;
}

/* Delete button in corner */
.comment .delete-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  color: #c00;
  font-weight: bold;
  cursor: pointer;
}

.comment .delete-btn:hover {
  text-decoration: underline;
}


/* Student Experience */

.intro p {
  font-family: 'Nunito', sans-serif;
  font-weight: 300;
  font-size: 1.2rem;

}

.student-section {
  list-style-type: none;
}

.student-subheader {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 2em;
}

.campus-subheader {
  display: block;
  padding-left: 300px;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 2em;
}

.student-subsubheader {
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  font-size: 1.6em;
}

.student-description {
  font-family: 'Nunito', sans-serif;
  font-weight: 300;
  font-size: 1.2rem;
}

.student-description b {
  font-weight: 500;
}

.references {
  font-family: 'Nunito', sans-serif;
  font-weight: 200;
  font-size: 0.8rem;
}

.tabletMobileView {
  display: none;
}

.CM-subheader {
  display: none;
}

.CM-subsubheader {
  display: none;
}

.CM-description {
  display: none;
}

.CM-description b {
  display: none;
}

.CMReferences {
  display: none;
}

.cm-images {
  display: none;
}
.map-section:nth-of-type(2) .map-container {
  transform: scale(1);
  transform-origin: top left;
}

/* Tablet Viewing */
@media (max-width: 1024px) {
  .sections {
    grid-template-columns: repeat(2, 1fr);
  }

  .section-last {
    grid-column: auto;
  }
}

@media (max-width: 768px) {
  .map-container {
    display: none;
  }

  .tabletMobileView {
    display: block;
    padding: 60px 40px;
    max-width: 1200px;
    margin: auto;
  }

  .CM-subheader {
    display: block;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 2em;
  }

  .CM-subsubheader {
    display: block;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: 1.6em;
  }

  .CM-description {
    display: block;
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    font-size: 1.2rem;
  }

  .CM-description b {
    display: block;
    font-weight: 500;
  }

  .CMReferences {
    display: block;
    font-family: 'Nunito', sans-serif;
    font-weight: 200;
    font-size: 0.8rem;
  }

  .cm-images {
    display: block;
  }
}


/* Mobile Viewing */
@media (max-width: 600px) {

  /* Header layout */
  .sticky-container {
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 8px 12px;
  }

  /* Hide title text */
  .Main-Title {
    display: none;
  }

  /* Center logo */
  .sticky-container a {
    justify-self: center;
    transform: translateX(14px);
  }

  /* Center logo */
  .logo-link {
    grid-column: 2;
    justify-self: center;
  }

  /* Larger logo for mobile */
  .inverted-logo {
    height: 44px;
  }

  /* Hamburger on the right */
  .hamburger {
    display: block;
    grid-column: 3;
    justify-self: end;
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
  }

  .sticky-container::after {
    width: 90%;
  }

  /* NAV becomes full-screen overlay */
  .Nav-Bar {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 5;
    display: none;
  }

  .Nav-Bar ul {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
  }

  .Nav-Bar li {
    margin: 18px 0;
  }

  .Nav-Bar a {
    font-size: 11px;
    /* slightly smaller */
    line-height: 1.3;
    text-align: center;
    white-space: normal;
    word-break: break-word;
    padding: 5px 5px;
  }


  /* Show menu when active */
  .Nav-Bar.open {
    display: block;
  }

  /* HERO text scaling */
  .banner-text h1 {
    font-size: clamp(22px, 7vw, 32px);
  }

  .banner-text p {
    font-size: clamp(14px, 4vw, 18px);
  }

  /* Sections: one per row */
  .sections {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .section-item,
  .section-last {
    grid-column: auto;
  }

  .map-container {
    max-width: 100%;
    width: 100%;
    padding: 0 10px;
  }

  .map-base {
    width: 100%;
  }
  .campus-subheader{
    display: none;
  }
}

/* Smaller mobile viewing */
@media (max-width: 360px) {
  .banner-image {
    height: 220px;
    min-height: 220px;
    max-height: 220px;
  }

  .banner-text h1 {
    font-size: 18px;
  }

  .banner-text p {
    font-size: 12px;
  }
}