/* Colors */
:root {
  --footer-nav: rgb(28,68,68);
  --blue: rgb(109,188,189);
  --header: rgb(140,244,236);
  --background: rgb(228, 255, 253);
  --blue-hover: rgba(140, 244, 235, 0.4);
  --red: rgb(255, 0, 0);
  --white : rgb(255, 255, 255);
  --team-leader: rgb(175, 175, 175);
  --wetlab-leader: rgb(153,45,34);
  --drylab-leader: rgb(113,54,139);
  --outreach-leader: rgb(69,140,78);
  --wetlab: rgb(231,76,60);
  --drylab: rgb(155,89,183);
  --outreach: rgb(92,189,158);
}

/* general */
html {
  scroll-behavior: smooth;
  height: 100%;
  display: flex;
  flex-direction: column;
  margin-top: 76px;
}
body {
  font-family: arial;
}
p {
  margin: 0;
}
.content{
  display: grid;
  grid-template-columns: 300px 1fr;
  flex: 1;
}
.toc-scroll{
  display: flex;
  justify-content: center;
  position: relative;
  overflow: hidden;
  margin-right: 5px;
}
.paragraphs {
  border-left: 2px var(--footer-nav) solid;
  padding-left: 25px;
}
.indent {
  margin-top: 10px;
}
.paragraphs section {
  margin-bottom: 20px;
}
.desc {
  margin: 10px 0px 20px 0px;
}
table {
  width: 100%;
  border-collapse: collapse;
}
table, th, td {
  border: 1px solid black;
}
th, td {
  padding: 10px;
  text-align: left;
}
th {
  background-color: #f2f2f2;
}

/* Front Page */
.text-images {
  display: grid;
  grid-template-columns: 3fr 2fr; /* Text takes 3 parts, Image takes 2 parts */
  gap: 20px; /* Optional: Adds space between text and image */
  align-items: center;
  margin: 60px 0px;
}
.text {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0px 50px;
  font-size: 20px;
}
.image {
  display: flex;
  justify-content: center;
  width: 100%;
  height: 400px;
  object-fit: cover;
  object-position: center;
}
.rows {
  display: grid;
  gap: 20px;
}

/* Reverse layout for alternating rows */
.text-images.reverse {
  grid-template-columns: 2fr 3fr;
}
.promo-vid {
  display: flex;
  justify-content: center;
  align-items: center;
}
.abstract {
  color: var(--wetlab);
  font-size: 37px;
  padding: 40px 0px;
  text-align: center;
  margin: 50px 0px;
}
.renalzyme-logo {
  width: 100%;
  border-bottom: 1px solid black;
  margin-top: 40px;
  padding-bottom: 40px;
}
.promo {
  font-weight: bold;
  font-size: 35px;
  margin: 20px 0px;
}

/* Table of content */
#toc {
  position: fixed;
  padding: 8px 0;
  border: 2px solid var(--footer-nav);
  border-radius: 5px;
  background-color: var(--background);
  width: 250px;
}
#toc a {
  display: block;
  margin: 5px 0px;
  padding: 2px 10px;
  text-decoration: none;
  color: var(--footer-nav);
}
#toc a.active {
  font-weight: bold;
  color: var(--footer-nav);
  background-color: var(--header);
}
#toc a:hover:not(a.active){
  background-color: var(--blue-hover);
}
#toc a.subsection {
  margin-left: 20px; /* Indent subsections */
  font-size: 90%;    /* Make them slightly smaller */
}
.toc-wrapper {
  flex-direction: column;
  display: flex;

}
.dot {
  margin: 0px 15px 0px 0px;
}

/* footer */
.footer-container {
  background-color: var(--footer-nav);
  color: #fff;
  bottom: 0;
  width: 100%;
  text-align: center;
}
.footer {
  display: grid;
  grid-template-columns: 350px 1fr 300px;
  margin: 20px 0px;
}
.footer-header {
  font-size: 24px;
  font-weight: 300;
  margin: 10px 0px;
}
.logo-container {
  border-right: 1px var(--white) solid;
}
.contact-container {
  border-left: 1px var(--white) solid;
}
.logo {
  width: 90%;
  margin-bottom: 20px;
}
.novo {
  height: 100px;
  margin: 0px 0px 10px 0px;
}
.ku, .bk {
  height: 75px;
}
.copyright {
  border-top: 1px var(--white) solid;
  padding-bottom: 20px;
}
.copyright a {
  color: var(--white);
}
.renalzyme {
  margin: 20px 0px;
  width: 150px;
  height: 150px;
  object-fit: cover;
  object-position: center;
}


/* header */
.header {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--header);
  color: var(--footer-nav);
  height: 250px;
  margin: 0px 0px 45px 0px;
  font-weight: bold;
  font-size: 50px;
}

/* navigation bar */
.navbar li {
  list-style: none;
}
.navbar a {
  text-decoration: none;
  color: var(--blue);
}
.nav-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
}
.navbar {
  width: 100%;
  background-color: var(--footer-nav);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}
.navbar .small-logo {
  height: 60px;
  margin: 0px 20px;
  padding: 0;
}
.navbar .small-logo:hover {
  cursor: pointer;
}

.navbar .links {
  display: flex;
  font-size: 18px;
  padding: 15px 20px 0px 20px;
  gap: 15px;
  align-items: center;
  position: relative;
}

.navbar .toggle_btn {
  display: none;
  margin: 0px 20px;
}
.dropdown {
  position: relative;
}
.dropdown_menu {
  display: none;
  position: absolute;
  padding: 0;
  top: 40px;
  background-color: var(--background);
  border-radius: 5px;
  border: 1px var(--footer-nav) solid;
  z-index: 100;
  white-space: nowrap;
}
.dropdown_menu.open {
  display: block;
}
.dropdown_menu li {
  padding: 5px;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: left;
}
.dropdown_menu li:hover {
  background-color: var(--blue-hover);
}
.dropdown_menu a {
  color: var(--footer-nav);
}
.dropdown_toggle {
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.15s;
}
.dropdown_toggle:hover, .no_dropdown:hover {
  opacity: 0.7;
  transition: opacity 0.15s;
}

/* TEAM PAGE */
.team-content {
  display: flex;
  justify-content: center;
}
.member-grid {
  display: grid;
  grid-template-columns: repeat(4, 200px);
  gap: 75px;
}
.team-div {
  height: auto;
  width: 200px;
  text-align: center;
  border-radius: 10px;
  box-shadow: 0px 5px 10px #888888;
}
.team-div img {
  display: block;
  background-color: red;
  object-fit: cover;
  object-position: top;
  height: 225px;
  width: 100%;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}
.image-container {
  position: relative;
}
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  text-align: center;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  pointer-events: none; /* Disable interaction when hidden */
}
.image-container:hover .overlay {
  opacity: 1;
  pointer-events: auto; /* Enable interaction when visible */
}
.member-name {
  font-size: 18px;
}
.member-info {
  margin: 5px 0px;
}
.team-leader, .wetlab-leader, .drylab-leader, .outreach-leader, .wetlab, .drylab, .outreach {
  display: inline;
  color: black;
  background-color: var(--team-leader);
  padding: 3px 12px;
  border-radius: 15px;
}
.wetlab-leader {
  background-color: var(--wetlab-leader);
}
.drylab-leader {
  background-color: var(--drylab-leader);
}
.outreach-leader {
  background-color: var(--outreach-leader);
}
.wetlab {
  background-color: var(--wetlab);
}
.drylab {
  background-color: var(--drylab);
}
.outreach {
  background-color: var(--outreach);
}

/* Scaling */
@media (min-width: 1200px) {
  .content, .front-page {
    margin: 0px 200px;
  }
}
@media (max-width: 1199px) {
  .content, .front-page {
    margin: 0px 100px;
  }
}
@media (max-width: 1100px) {
  .member-grid {
    grid-template-columns: repeat(3, 200px);
  }
}
@media (max-width: 1000px) {
  .content, .front-page {
    margin: 0px;
  }
  .footer {
    grid-template-columns: 1fr 300px;
  }
  .logo-container {
    display: none;
  }
}
@media(max-width:800px) {
  .navbar .links {
      display: none;
      flex-direction: column;
      width: 100%;
      top: 65px;
      position: absolute;
      background-color:var(--footer-nav);
  }
  .navbar .toggle_btn {
      display: block;
  }
  .navbar .links.open {
      display: flex;
      padding: 0;
  }
  .navbar .links .dropdown_menu {
      position: static; 
      width: 100%;
  }
  .member-grid {
    grid-template-columns: repeat(2, 200px);
  }
}
@media (max-width: 650px) {
  .content {
    grid-template-columns: 1fr;
    margin: 0px;
  }
  .toc-scroll {
    display: none;
  }
  .paragraphs {
    padding: 0px;
    border: none;
  }
  .footer {
    grid-template-columns: 1fr;
  }
  .contact-container {
    margin-top: 30px;
    border-left: none;
  }
  .member-grid {
    grid-template-columns: repeat(1, 200px);
  }
  #subsection2_2 div {
    flex-direction: column; /* Stack vertically on smaller screens */
    align-items: center; /* Center align the items */
  }
  .text-images {
    display: flex; /* Change to flex for more control */
    flex-direction: column; /* Stack children vertically */
  }
  .text-images.reverse {
    flex-direction: column; /* Stack children vertically even in reverse */
  }
  .text {
    order: 1; /* Ensure text is on top */
  }
  .image {
    order: 2; /* Ensure image is below the text */
  }
}
