/* 1) Basic reset for margin + font */
body {
    margin: 0;
    font-family: Arial, sans-serif;
}

/* Make all images responsive (no desktop change, just scales for smaller screens) */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 2) Light Grey Header */
.top-banner {
    background: #f5f5f5;
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

.top-banner h1 {
    font-size: 3rem;  /* Desktop: remains large */
    font-weight: bold;
    margin: 0;
}

/* 3) Navigation */
nav {
    text-align: center;
    padding: 1rem 0;
    background: white;
}

nav a {
    margin: 0 1rem;
    text-decoration: none;
    color: #333;
}

/* Fix the header to the top of the page */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999; /* so it stays on top of everything */
    background: #f5f5f5; /* same color as your top-banner */
    border-bottom: 1px solid #ddd;
}

/* Push main content below the fixed header */
.content {
    margin-top: 150px; /* Desktop: stays the same */
}

/* 4) Footer styles */
.footer {
    background: #f5f5f5;
    padding: 2rem;
    border-top: 1px solid #ddd;
}

.affiliations {
    text-align: center;
    margin-bottom: 2rem;
}

.funders {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.funders img {
    height: 50px;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.funders img:hover {
    opacity: 1;
}

/* Social icons in footer */
.social-icons {
    margin-top: 1rem;
}

.social-icons a {
    margin: 0 0.5rem;
    display: inline-block;
}

.social-icons img {
    width: 40px;
    height: 40px;
    transition: opacity 0.3s;
    vertical-align: middle;
}

.social-icons img:hover {
    opacity: 0.7;
}

/* Dropdown container */
.dropdown {
  position: relative;
  display: inline-block;
}

/* Dropdown button */
.dropbtn {
  text-decoration: none;
  color: #333;
  padding: 1rem;
  display: inline-block;
}

/* Dropdown content (hidden by default) */
.dropdown-content {
  display: none;
  position: absolute;
  background-color: white;
  min-width: 160px;
  box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

/* Links inside the dropdown */
.dropdown-content a {
  color: #333;
  padding: 10px 16px;
  display: block;
  text-decoration: none;
}

/* Change color on hover */
.dropdown-content a:hover {
  background-color: #f5f5f5;
}

/* Show dropdown content when hovering */
.dropdown:hover .dropdown-content {
  display: block;
}
/* Mobile dropdown functionality */
@media (max-width: 768px) {

  /* Show dropdown when the button is clicked */
  .dropdown.active .dropdown-content {
    display: block;
  }
}

/* NEWS / PUBLICATIONS / PEOPLE sections */
.news-section,
.publications-section,
.research-section {
    margin-left: 4rem;
    margin-right: 2rem;
    padding: 5rem;
}

.news-section a,
.publications-section a,
.people-section a,
.contact-details a,
.research-row a {
    color: goldenrod;
    text-decoration: none;
}

.news-section a:hover,
.publications-section a:hover,
.people-section a:hover,
.contact-details a:hover,
.research-row a:hover {
    text-decoration: underline;
}

.news-section h2,
.publications-section h2,
.research-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.news-section article,
.publications-section article {
    margin-bottom: 2rem;
}

.news-section h3,
.publications-section article h3 {
    margin-bottom: 0.25rem;
}

.news-section article p,
.publications-section article p {
    margin: 0.25rem 0;
    line-height: 1.4;
}

/* PEOPLE PAGE */
.people-section {
  margin-left: 4rem;
  margin-right: 2rem;
  padding: 5rem;
}

.people-section h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: #333;
}

.person {
  display: flex;
  align-items: flex-start;
  margin-bottom: 3rem;
}

.person-image img {
  max-width: 250px;
  height: auto;
  object-fit: cover;
  border-radius: 4px;
  margin-right: 2rem;
}

.person-info {
  flex: 1;
}

.person-info h3 {
  font-size: 1.5rem;
  margin: 0 0 0.25rem;
}

.person-info .role {
  font-style: italic;
  margin-bottom: 1rem;
  font-weight: 400;
}

.people-section h2 + p {
  line-height: 1.5;
}

/* CONTACT PAGE */
.contact-section {
  margin: 4rem 2rem;
  padding: 5rem;
}

.contact-section h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.contact-subheader {
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.contact-details {
  display: flex;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.contact-logo img {
  max-width: 200px;
  height: auto;
  margin-right: 2rem;
}

.contact-info-text {
  flex: 1;
}

.funder-logos-big {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin: 2rem 0;
  justify-content: center;
}

.funder-logos-big img {
  max-height: 90px;
  height: auto;
}

.map-container {
  margin-top: 2rem;
}

/* ===== SLIDER STYLES ===== */
.slider {
    position: relative;
    width: 100%;
    height: 100vh; /* Full viewport height on desktop */
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background-position: center center;
    background-size: cover;
    opacity: 0;
    transition: opacity 1s;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

.slide h2 {
    font-size: 4rem;
    color: white;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.5);
}

.slide.active {
    opacity: 1;
}

.slider button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 8rem;
  color: white;
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
  user-select: none;
}

.slider button:hover {
  color: goldenrod;
}

.prev {
    left: 1rem;
}

.next {
    right: 1rem;
}

/* ====== RESEARCH PAGE STYLES ====== */
.research-section p,
.research-row p {
  line-height: 1.5;
  margin-bottom: 1rem;
}

.research-section {
    text-align: center;
    max-width: 1000px;
    margin: 1rem auto;
    padding: 5rem 0 0 0;
}

.research-row {
  display: flex;
  align-items: center;     /* vertical center */
  justify-content: center; /* horizontal center if needed */
  margin-bottom: 2rem;
  margin-left: 2rem;
  margin-right: 2rem;
  padding: 2rem;
}

.research-row .image-container,
.research-row .text-container {
  width: 50%;
  margin: 0 1rem;
}

.research-row img {
  width: 100%;
  height: auto;
  display: block;
}

.research-row h3 {
  font-size: 1.5rem;
}

.image-left {
  float: left;
  margin-right: 2rem;
}

.image-right {
  float: right;
  margin-left: 2rem;
}

/* ======= LAB FUN GALLERY STYLES ======= */

.lab-fun-section {
    text-align: center;
    max-width: 1000px;  /* Limits width */
    margin: 0 auto;      /* Centers the section */
    padding: 5rem 2rem;  /* Adds padding for spacing */
}

.lab-fun-section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.activity {
margin-top: 3rem;
    margin-bottom: 3rem;
    text-align: center;
}

.activity h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Allows 5 images per row */
    gap: 10px; /* Less space between images */
    max-width: 1200px; /* Prevents gallery from being too wide */
    margin: 0 auto; /* Centers gallery */
    padding: 1rem; /* Adds some spacing */
    justify-content: center; /* Ensures images are centered */
}

.gallery img {
    width: 100%; /* Make sure images are responsive */
    height: auto;
    cursor: pointer;
    border-radius: 5px;
    transition: transform 0.2s ease-in-out;
}

.gallery img:hover {
    transform: scale(1.10);
}



/* Fullscreen Image Viewer */
.image-viewer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding-top: 5rem; /* Adds space on top */
}

.full-img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain; /* Ensures image scales properly */
}


.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    font-size: 40px;
    color: white;
    transform: translateY(-50%);
}

.prev {
    left: 10px;
}

.next {
    right: 10px;
}

/* Caption Styling for Fullscreen Images */
.image-caption {
    color: white;
    font-size: 1.2rem;
    text-align: center;
    margin-top: 10px;
    max-width: 80%;
    background: rgba(0, 0, 0, 0.6);
    padding: 10px;
    border-radius: 5px;
}

/* ===================== MOBILE OVERRIDES ===================== */
/* --- No changes to desktop; these only apply on screens <=768px --- */
@media (max-width: 768px) {

    /* 1) Header + Nav */
    .top-banner {
        padding: 1rem; /* reduce top banner padding on mobile */
    }
    .top-banner h1 {
        font-size: 2rem; 
    }
    nav {
        padding: 0.5rem 0; 
    }
    nav a {
        margin: 0 0.5rem;
        font-size: 1rem;
    }
    .content {
        margin-top: 80px; /* slightly less for mobile so content appears sooner */
    }
    

    /* 2) Slider */
.slider {
        width: 100%;
        height: 100vh; /* Keeps it full screen */
        position: relative;
        overflow: hidden; /* Ensures images don't stack below */
        display: flex;
        align-items: center;
    }

    .slide {
        width: 100%;
        height: 100vh; /* Ensure each image stays in view */
        position: absolute; /* Keeps images on top of each other */
        top: 0;
        left: 0;
        background-size: cover; /* change to contain to make it all fit */
    background-repeat: no-repeat;
    background-position: center center;
        transition: opacity 1s;
        opacity: 0; /* Hide inactive slides */
    }

    .slide.active {
        opacity: 1; /* Only show the active slide */
    }

    /* Fix navigation arrows for mobile */
    .slider button {
        font-size: 2rem; /* Make smaller for mobile */
        background: rgba(0, 0, 0, 0.5);
        padding: 0.5rem;
        border-radius: 5px;
    }
    
    /* 1) Adjust text size and center it */
.slide h2 {
    font-size: 2rem; /* Reduce text size */
    text-align: center; /* Center text */
    width: 50%; /* Keep text within bounds */
    margin: 0 auto; /* Ensure centering */
}


    /* Prevent white space below */
    .content {
        margin-top: 100px; /* Adjusted to match header */
    }

    /* 3) Generic Sections (news, publications, research, etc.) */
  .news-section,
  .publications-section,
  .research-section,
  .people-section,
  .contact-section {
      margin-left: 1rem;
      margin-right: 1rem;
      padding: 2rem; /* More breathing room */
  }

    /* 4) Footer logos already wrap, so no big changes needed; optional smaller size: */
   .funders img {
    max-width: 80px;
    height: 40px; /* Match mobile scale */
  }
 /* 5) People Page Mobile Fixes */
    .person {
    display: flex;
    flex-direction: column; /* Stack image above text */
    align-items: center; /* Center image and text */
    text-align: center; /* Ensure text is centered */
    justify-content: center; /* Align everything properly */
}

.person-image {
max-width: 180px !important; /* Make images smaller */
    width: 100%; /* Ensures it scales properly */
    margin: 0 auto 1rem auto; /* Centers the image horizontally */
    display: flex; /* Ensures proper alignment */
    justify-content: center;
}

.person-info {
    text-align: center; /* Center text */
    width: 100%; /* Ensure full width for centering */
    max-width: 600px; /* Prevent overly wide text */
}

    .person-info h3 {
        font-size: 1.3rem; /* Slightly smaller names */
    }

    .person-info p {
        font-size: 0.9rem; /* Better readability */
        line-height: 1.5; /* More breathing room */
    }

    .role {
        font-size: 0.95rem; /* Smaller role text */
    }



  .alumni-list {
    margin-left: 0;
    padding-left: 0;
  }

  .alumni-item {
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
  }

  /* Social icons smaller */
  .social-icons img {
    width: 35px;
    height: 35px;
  }
  
 /* Research Page: Stack images above text, center everything, and make images bigger */
.research-row {
    display: flex;
    flex-direction: column; /* Stack image above text */
    align-items: center; /* Center everything */
    text-align: center;
    padding: 2rem 1rem; /* Add spacing */
}

/* Adjust Image Size on Mobile */
.research-row .image-container {
    order: -1; /* Moves image above text */
    max-width: 100%; /* Allow image to be wider */
    margin-bottom: 1rem; /* Space below image */
    display: flex;
    justify-content: center;
}



.research-row .image-container img {
    width: 100%; /* Take full width of container */
    max-width: 600px; /* Allow larger images */
    height: auto;
}

/* Adjust Text Width for Better Readability */
.research-row .text-container {
    width: 90%;
    max-width: 700px; /* Allow more space for text */
    text-align: center;
}

/* Adjust Headings */
.research-row h3 {
    font-size: 1.5rem; /* Ensure headings are readable */
    margin-bottom: 1rem;
}
contact-details {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    /* Hide the University logo in its original place */
    .contact-logo {
        display: none;
    }

    /* Add University logo to funders */
    .funder-logos-big::before {
        content: "";
        display: block;
        background: url('pics/GU.png') no-repeat center;
        background-size: contain;
        width: 100px; /* Match funder logos */
        height: 50px;
    }
    
    /* Ensure uniform logo size on mobile */
.funder-logos-big {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Center logos */
    align-items: center;
    gap: 1rem; /* Add spacing */
}

.funder-logos-big img {
    max-width: 120px; /* Set uniform width */
    height: 60px; /* Set uniform height */
    object-fit: contain; /* Maintain aspect ratio */
    padding: 5px; /* Add small padding to prevent crowding */
}

}
