/* Outfit font weights */
@font-face {
  font-display: swap;
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 400;
  src: url('https://static.igem.wiki/teams/5540/fonts/outfit-v15-latin-regular.woff2') format('woff2'); 
}
@font-face {
  font-display: swap;
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 500;
  src: url('https://static.igem.wiki/teams/5540/fonts/outfit-v15-latin-500.woff2') format('woff2'); 
}
@font-face {
  font-display: swap;
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 600;
  src: url('https://static.igem.wiki/teams/5540/fonts/outfit-v15-latin-600.woff2') format('woff2'); 
}
@font-face {
  font-display: swap;
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 700;
  src: url('https://static.igem.wiki/teams/5540/fonts/outfit-v15-latin-700.woff2') format('woff2'); 
}
@font-face {
  font-display: swap;
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 800;
  src: url('https://static.igem.wiki/teams/5540/fonts/outfit-v15-latin-800.woff2') format('woff2'); 
}


/* Base global font */
html, body {
  font-family: 'Outfit', sans-serif;
  font-weight: 400; /* default */
  color: white;
}

b {
  font-family: 'Outfit', sans-serif;
  font-weight: 800; /* adjust as needed */
}

body { 
  background: #800a18;
  background: linear-gradient(180deg,rgba(128, 10, 24, 1) 0%, rgba(255, 240, 190, 1) 100%);

}

a {
  text-decoration: none;
}


/* PROGRESS BUTTON IN CORNER */
#progress {
  z-index: 10000;
  background-color: #800a18;
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  height: 4rem;
  width: 4rem;

  display: grid;
  place-items: center;
  border-radius: 50%;
  cursor: pointer;
  /* box-shadow: 2px 2px 0px 0px rgba(255, 255, 255);  */

  opacity: 0;              /* hidden by default */
  visibility: hidden;      /* ensures it doesn't block clicks */
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#progress.show {
  opacity: 1;
  visibility: visible;
}


#progress-value {
  display: block;
  height: calc(100% - 15px);
  width: calc(100% - 15px);
  background-color: #ec8490;
  border-radius: 50%;
  display: grid;
  place-items: center;
}



.header{
  /* background-color: #c91026; */
  /* background-color: #9c0d1d; */
  background-color: #800a18;
  width: 100%;
  height:100vh;
  display: flex; 
  justify-content: center; 
  align-items: center;
  font-family: "Outfit", sans-serif;
  font-weight: 900; 
  margin-top: 5rem;
}


/* NAVIGATION BAR */
nav {
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  justify-content: space-between;
  width: 100%;
  height: 6rem;
  padding: 0 3rem;
  margin: 0 auto;
  z-index: 999;
  background-color: #800a18;
  align-items: center; 
}

.toggle_menu, 
.close_menu {
  display: none;
}

.logo {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  /* top: 50%;             
  left: 2rem;          
  transform: translateY(-50%); 
  z-index: 1000;         */
}

.logo img {
  /* margin-top: 0.5rem;
  margin-left: 2rem;
  height: 7rem; 
  width: auto;
  object-fit: contain; */

  margin-left: 1rem;
  margin-top: 0.5rem;
  height: 7rem;
  width: auto;
  object-fit: contain;
}


.nav_list {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  height: 100%;
  list-style: none;
  margin-left: auto; 
}

.nav_item {
  /* margin: 0 1rem; */
  padding: 0 1rem; 
  /* If you want space between nav links, do margin - want continuous use padding */
  height: 100%;
  display: flex;
  align-items: center;
}

.nav_link {
  font-weight: 500;
  color: white;
  height: 100%;
  padding: 0 1rem;
  align-items: center;
  display: flex;
  /* font-size: large; */
  margin-left: auto;
}





/* MEGAMENU */
.content {
  display: flex;
  flex-direction: column;
  padding: 1rem 1rem;
  margin: 0 1rem;
}

.megamenu_item {
  display: flex;
  align-items: center;
  padding: 0 2rem 0 1rem;
  border-radius: 50px;
  transition: background-color 0.2s ease;
}

.megamenu_item:hover {
  background-color: rgb(225, 67, 83)
}

.menu_icon {
  border-radius: 50%;
  text-align: center;
  margin: 1rem;
}

.megamenu_link {
  margin-top: 1rem;
}

.megamenu_link a {
  font-weight: 500;
  color: white;
}


.dropdown_icon{
  display: inline-block;
  transform: rotate(0deg);
  transition: transform 0.3s ease;
}

.nav_item:hover .dropdown_icon {
  transform: rotate(180deg);
}



@media screen and (min-width: 959px){
  .dropdown:hover .megamenu{
    visibility: visible;
    transition: all 0.3 ease;
    opacity: 1;
  }

  .megamenu {
    position:fixed;
    width: 100vw;
    top: 5rem;
    left: 0;
    /* background-color: rgb(201, 16, 38); */
    /* background-color: #9c0d1d; */
    background-color: #800a18;
    display: flex;
    justify-content: center;
    border-radius: 0 0 20px 20px;
    z-index: -99;
    visibility: hidden;
    opacity: 0;
  }
}

@media screen and (max-width: 991px){
  .nav_link {
    color:rgb(255, 255, 255);
    width: 100%;
    padding: 1rem;
  }

  .nav_item {
    flex-direction: column;   /* stack children (link + submenu) */
    align-items: flex-start;  /* left-align text & submenu */
    width: 100%;
  }

  .megamenu {
    display: none;
    flex-direction: column;
    width: 100%;
    /* background: white */
  }

  .content {
    padding: 0rem 1rem;
    margin: 0 0rem;
  }

  .megamenu.open {
    display: flex;
    top: 5%;
  }


  .megamenu.open{
    display: flex;
  }

  .nav_list{
    position: fixed;
    height: 100vh;
    width: 100%;
    left: -100%;
    max-width: 350px;
    top: 0;
    background-color: #ec8490;
    flex-direction: column;
    overflow-x: hidden;
    display: flex;
    transition: left 0.3s ease;
  }

  .nav_list.open{
    left: 0;
  }

  .toggle_menu, 
  .close_menu {
    margin-left: auto;
    display: block;
    background-color: #ec8490;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    display: grid;
    place-items: center;
    transition: all 0.3s ease-in-out;
  }

  .toggle_menu i {
    font-size: 1.6rem;
    color: white;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  /* Animation states */
  .toggle_menu.open i.bi-list {
    transform: rotate(90deg);
    opacity: 0;
  }

  .toggle_menu.open i.bi-x {
    transform: rotate(0deg);
    opacity: 1;
  }

  /* Hidden X by default */
  .toggle_menu i.bi-x {
    position: absolute;
    opacity: 0;
    transform: rotate(-90deg);
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

}



/* HOME SCREEN */
.landing {
  width: 100%;
  margin-top: 5rem;
}
.floating-cells-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column; /* stack top row, text, bottom row */
  align-items: center;
  overflow: hidden;
  padding: 4rem 0;
  position: relative;
}

.floating-cells-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  width: 100%;
}

.floating-cells-grid img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.problem-statement {
  text-align: center;
  font-size: 2.4vw;
  line-height: 1.4;
  margin: 2rem 0; /* space between image rows */
  color: black;
  z-index: 2;
}

.hiv-map-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 3rem;
  gap: 2rem;
  padding-left: 8%;
  justify-content: flex-end;
}

.hiv-map-text {
  font-size: 2.4vw;
  line-height: 1.35;
  margin-right: auto;
}

.hiv-map-box {
  background-color: rgb(248, 226, 198);
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 1rem 4rem 1rem 0.3rem; 
  margin-right: 3%;
}

.hiv-map {
  width: 110%;
  height: auto;
  flex-shrink: 0;
  display: block;
  border-radius: 8px;
}

.pill-man-wrapper {
  margin-left: 5rem;
  margin-top: 8rem;

  display: flex;
  flex-direction: row-reverse;
  width: 100%;
  max-width: 100vw;

}

.pill-man {
  width: 100%;
  max-width: 300px;
  height: auto;
  object-fit: contain;
  display: block;
}


.pill-man-text {
  text-align: center;
  font-size: 2.2vw;
  margin-top: 5rem;
  margin-left: 2rem;
  margin-right: 8rem;
}

.pill-man-text-2 {
  text-align: center;
  margin-top: 5rem;
}

.grid-container {
  margin-top: 8rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* allow natural scaling */
  gap: 4vw;
  justify-content: center;
  align-content: center;
}

.box {
  position: relative;
  background-color: rgb(248, 226, 198);
  border-radius: 10%;
  width: 100%;
  aspect-ratio: 1 / 1;
  text-align: center;

  /* Responsive font size tied to box size */
  font-size: clamp(0.9rem, 2.5vw, 2rem);
}

.stat {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: bold;
  font-size: 1.8em; /* Scales with .box font-size */
  color: rgb(232, 73, 73);
}

.top-text {
  position: absolute;
  bottom: 60%;
  width: 100%;
  color: rgb(106, 4, 4);
  font-size: 1em;
}

.bottom-text {
  position: absolute;
  top: 60%;
  width: 100%;
  color: rgb(106, 4, 4);
  font-size: 1em;
}




.final-statement-wrapper {
  padding: 5rem;
  display: flex;
  width: 100%;
  justify-content: center;
  text-align: center;
}

.final-text p{
  font-size: 2.9vw;
}

.money-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.money-pill {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}




.breakline-text {
  text-align: center;
  width: 100%;
  margin: 4rem 0;
}

.breakline-text h1 {
  font-size: 9.4vw;
  font-weight: 600;
}

.fusion-protein-wrapper {
  display: flex;
  margin: 5rem 4rem;
  flex-direction: column;
}

.fusion-protein {
  width: 100;
  height: auto;
  margin: 0 4rem;
  background-color: antiquewhite;
  border-radius: 10px;
  padding: 2rem 0;
}

.fusion-protein-text {

  text-align: center;
  font-size: 2.4vw;
  margin: 4rem 4rem;
}

.needle-wrapper {
  display: flex;
  width: 100%;
  align-items: center;
}

.needle {
  margin-right: 3rem;
  width: 30%;
}

.needle-text {
  padding-left: 20px;
  padding-right: 20px;
  text-align: left;
  width: 100%;
  color:#7c0000;
  font-size: 2.7vw;
}

@media (max-width: 768px) {
  .needle-text {
    text-align: center;
    padding-left: 10px;
    padding-right: 10px;
  }
}


.final-promo-video {
  position: relative;
  width: 80%;              
  max-width: 1000px;       
  margin: 3rem auto;       
  aspect-ratio: 16 / 9;    
  border: 15px solid rgb(214, 47, 47); 
  border-radius: 12px;     
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  overflow: hidden;        
}

.final-promo-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;             
  height: 100%;
  border: none;            
}



/* STICKY SIDEBAR */
#sticky-menu {
  position: sticky;
  top: 10rem;               /* distance from top */
  align-self: flex-start;
  max-height: calc(100vh - 12rem); /* limit height relative to viewport */
  overflow-y: auto;         /* enable vertical scrolling if content exceeds height */
  z-index: 20;
  margin: 4rem 0;
  padding-right: 0.5rem;    /* optional: avoid scrollbar overlapping content */
}

#sticky-menu a {
  text-decoration: none;
  color: white;
  font-size: large;
  display: block;
}

#sticky-menu-contents li {
  padding: 0.25rem 0;
  transition: background-color ease 0.2s;
  list-style: none;
}

#sticky-menu-contents a:hover {
  background-color: rgb(209, 76, 76);
  transition: all 0.3s ease;
}

/* Override for smaller screens */
@media (max-width: 991px) {
  #sticky-menu {
    position: static;    /* remove stickiness */
    top: auto;           /* reset top offset */
    margin: 2rem 0;      /* optional: reduce spacing */
    max-height: none;
    overflow-y: visible;
  }
}








/* PROJECT TAB */

[id] {
  scroll-margin-top: 7rem;
}

.header-wrapper {
  width: 100%;
  height: auto;
  display: block;
  margin-top: 5rem;
}

.right-column-content {
  overflow-x: hidden;
  padding-right: 1rem;
  box-sizing: border-box;

  position: relative;
  background-color: rgba(255, 255, 255, 0.85); /* dark red w/ opacity */
  color: white; /* optional for readability */
  padding: 2rem; /* adds spacing inside */
  border-radius: 10px; /* optional: softer edges */
  color:black;
}

/* .right-column-content li{ */
  /* list-style-type: disc; */
/* } */




/* ENGINEERING */
.cards-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.card {
  background-color: #790b0b;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.card-label {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0.8rem 0;
  color: #ffffff;
}

.card-text {
  padding: 1rem;
  font-size: 0.95rem;
  color: #ffffff;
}

/* Hidden iteration cards initially */
.iteration-cards {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, opacity 0.5s ease;
  opacity: 0;
}

/* Shown state */
.iteration-cards.show {
  max-height: 2000px; /* large enough to fit all cards */
  opacity: 1;
}


.card-design, .card-test {
  background-color: #c33a3a;
}

.card-build, .card-learn {
  background-color: rgb(94, 23, 17);
}

.card-toggle {
  margin-bottom: 0rem;
}

.iteration-cards {
  margin-top: 0rem;
}


/* WETLAB TAB */

/* CARD STYLING */
.pdf-card {
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-bottom: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.card-header {
  background-color: #b1001a;
  color: white;
  padding: 1rem;
  cursor: pointer;
}

.card-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.card-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
}

.pdf-card.expanded .card-body {
  max-height: 600px; /* adjust based on iframe height */
}


/* DRYLAB TAB */

/* gRNA */
.goals-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  margin-top: 1rem;
  background-color: antiquewhite;
}

/* avoid using the universal star inside the table */
.goals-table { color: black; }      /* good */

.goals-table thead th,
.goals-table thead th * { color: #fff !important; }

.goals-table sub,
.goals-table sup {
  color: black !important;
}



.goals-table th, .goals-table td {
  border: 1px solid #7c0000;
  padding: 0.6rem 1rem;
  color:black;
}

.goals-table th {
  background-color: #7c0000;
  color: white;
  font-weight: bold;
}

.goals-table tr:nth-child(even) {
  background-color: rgba(124, 0, 0, 0.05);
}

.goals-table tfoot td {
  font-size: 0.9rem;
  color: #333;
  background-color: antiquewhite;
  padding: 0.5rem 1rem;
}

.goals-table tr.light-red {
  background-color: #fe7b7b; /* light red */
}

.goals-table tr.dark-red {
  background-color: #d42626; /* dark red */
  color: white; /* for better contrast */
}


.image-panel-wrapper {
  display: flex;
  flex-direction: column; /* stack vertically */
  align-items: flex-start; /* align to left */
  gap: 1rem;
}

.image-card {
  position: relative;
  overflow: visible; 
  width: 18rem;
  height: 18rem;
  border-radius: 12px;
  background-color: #f5db99;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.image-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  border-radius: 12px;
  transition: transform 0.3s ease;
}

/* hidden text panel on the right */
.slide-text {
  position: absolute;
  top: 0;
  left: 100%; /* start off to the right */
  width: 35rem;
  height: 100%;
  background-color: rgba(128, 10, 24, 0.95);
  color: white;
  padding: 1rem;
  text-align: left;
  opacity: 0;
  transform: translateX(-1rem);
  transition: all 0.3s ease;
  border-radius: 12px;
  z-index: 5;
}

/* when hovered, slide out smoothly */
.image-card:hover .slide-text {
  opacity: 1;
  transform: translateX(0);
}

.image-card:hover img {
  transform: scale(1.05);
}

.slide-text h4 {
  margin: 0.4rem 0;
  font-size: 1.1rem;
}

.slide-text p {
  font-size: 0.9rem;
  margin: 0;
}

.image-row {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin: 2rem 0;
}

.image-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.step-number {
  font-size: 2rem;
  font-weight: 700;
  color: rgb(140, 8, 8);
}

.vertical-line {
  width: 3px;
  height: 6rem;
  background-color: rgb(140, 8, 8);
  border-radius: 2px;
}

.step-images {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.step-images img {
  /* width: 12rem; */
  height: auto;
  border-radius: 10px;
  transition: transform 0.3s ease;
}

.step-image-cRNA {
  width: 18rem;
}

.step-image-target {
  width: 28rem;
}

/* Optional subtle hover zoom */
.step-images img:hover {
  transform: scale(1.05);
}





/* Computational Modeling */
.outlined-box {
  /* border: 3px solid #c91026; outline color and thickness */
  padding: 1rem;           /* space inside the box */
  border-radius: 10px;     /* rounded corners (optional) */
  width: fit-content;      /* shrink to fit content */
  background-color: rgba(255, 255, 255, 0.899); /* or any background */
  box-shadow: 6px 6px 0 rgb(170, 7, 26); /* dark red, sharp shadow */
}

.figure-image {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 3rem 0;
}

.figure-image img {
  width: 40rem;                 /* adjust size as you like */
  height: auto;
  border-radius: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* subtle hover effect */
.figure-image img:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

.figure-caption {
  margin-top: 1rem;
  font-size: 1rem;
  color: rgb(0, 0, 0);
  text-align: center;
  font-style: italic;
  line-height: 1.4;
}

.equation-images {
  margin-top: 1rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: center; /* centers image horizontally */
  align-items: center;     /* centers vertically if there's height */
}

.equation-images img {
  display: block;
  max-width: none;
  height: auto;
  width: 50%;             /* adjust as needed */
  border-radius: 12px;    /* rounds corners */
}






/* MESSING WITH IMAGE SIZES - FIGURE THING */

.lipofect-learn-img {
  display: flex;
  justify-content: center;
}

.lipofect-learn-img img {
  width: 30rem; /* smaller version */
  height: auto;
}



/* drylab overview model */
.goal-list {
  list-style: none;
  padding-left: 1.2rem;
  margin: 1.5rem 0;
  max-width: 100%;
  word-wrap: break-word;
}

.goal-list li {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 1.2rem;
  border-left: 4px solid #c91026;
  border-radius: 8px;
  margin-bottom: 1rem;
  color: rgb(0, 0, 0);
  line-height: 1.6;
  transition: background 0.3s ease, transform 0.2s ease;
  position: relative;
  overflow: hidden;
}

/* Optional: number styling */
.goal-list li::before {
  counter-increment: goal;
  content: counter(goal) ".";
  counter-reset: goal;
  position: absolute;
  left: -1.8rem;
  top: 1rem;
  font-weight: 700;
  color: #c91026;
}

/* More noticeable button style */
.goal-btn {
  display: inline-block;
  margin-top: 0.8rem;
  padding: 0.7rem 1.6rem; /* slightly bigger padding */
  font-size: 1rem;        /* slightly bigger font */
  font-weight: 700;       /* bolder */
  border: 2.5px solid #c91026;
  background: #c91026;    /* solid red background for more pop */
  color: white;           /* white text on red */
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  max-width: 100%;
  white-space: nowrap;
  box-shadow: 0 4px 8px rgba(201, 16, 38, 0.4); /* subtle shadow */
}

.goal-btn:hover {
  background-color: #f44357;  /* lighter red on hover */
  color: white;
  transform: scale(1.1);      /* bigger scale on hover */
  box-shadow: 0 6px 12px rgba(201, 16, 38, 0.6); /* stronger shadow */
}


.drylab-right-column-content {
  position: relative;
  background-color: rgba(255, 255, 255, 0.85); /* dark red w/ opacity */
  color: white; /* optional for readability */
  padding: 2rem; /* adds spacing inside */
  border-radius: 10px; /* optional: softer edges */
  color:black;
}

.model-image img{
  width: 100%;
}





/* TEAM */
/* attributions */
.unique-right-column-content {
  position: relative;
  background-color: rgba(255, 226, 159, 0.85); /* dark red w/ opacity */
  color: white; /* optional for readability */
  padding: 2rem; /* adds spacing inside */
  border-radius: 10px; /* optional: softer edges */
}


/*  meet the team */
.team-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem 0;
}

.member-card {
  position: relative;
  width: 15rem;       
  height: 15rem;      
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.3);
  background-color: #000;
}

.member-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
}

.member-card:hover img {
  transform: scale(1.05);
}

.member-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(201, 16, 38, 0.95);
  color: white;
  text-align: center;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

.member-card:hover .member-overlay {
  transform: translateY(0);
}

.member-overlay h4 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.member-overlay p {
  font-size: 0.95rem;
}

.member-card-special {
  width: 24rem;       
  height: 15rem;     
}


.mafiagame {
  width: 20rem;       
  height: 20rem;    
}





.underline-spaced {
  display: inline-block;      /* keeps it inline with other elements if needed */
  border-bottom: 3px solid #9b0e0e; /* underline color & thickness */
  padding-bottom: 6px;        /* space between text and line */
}


/* Event Cards */
.event-card {
  background-color: #ebc963; /* Dark red background, adjust to match theme */
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.5);
}

.event-card h3 {
  color: #fff;
  margin-bottom: 0.8rem;
}

.event-card p {
  color: #ddd;
  margin-bottom: 0;
}

.greencard p {
  color: #1a1d1b;
  margin-bottom: 0;
}

.yellowcard p {
  color: #1b1b18;
  margin-bottom: 0;
}

.pinkcard p {
  color: #201e1f;
  margin-bottom: 0;
}

.bluecard p {
  color: #27262b;
  margin-bottom: 0;
}

.caption-highlight {
  background-color: rgb(255, 115, 115);
  height: 4rem;
  line-height: auto;      /* vertically centers single-line text */
  text-align: center;
  border-radius: 5px;
}


/* OUTREACH - ENGAGEMENT */

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.outreach-card {
  padding: 1rem;
  border-radius: 10px;
  color: white;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.red-card {
  background-color: #fa5366; /* dark red */
}

.pink-card {
  background-color: #ff7f9f; /* soft pink */
}

.pink-card {
  background-color: #ff7f9f; /* soft pink */
  color: white;
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}



/* REFERENCES  */
.reference-section {
  position: relative;
  max-height: 300px; /* collapsed height */
  overflow: hidden;
  transition: max-height 0.6s ease;
  z-index: 0;
}

/* Blurred fade overlay */
.reference-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 6rem;
  background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 80%);
  backdrop-filter: blur(15px);
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 1;
}

/* Hide overlay when expanded */
.reference-section.expanded .reference-overlay {
  opacity: 0;
}

/* Button */
.toggle-btn {
  position: relative;
  z-index: 2;
  display: block;
  margin: 1rem auto 0;
  background-color: #b1001a;
  color: white;
  border: none;
  border-radius: 20px;
  padding: 0.5rem 1.2rem;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.3s ease;
}
.toggle-btn:hover {
  background-color: #8a0014;
}

/* Reference list styling */
.reference-list {
  margin: 1.5rem 2rem;
  padding-left: 2.5rem;
  line-height: 1.6;
  counter-reset: ref-counter;
  list-style: none;
}
.reference-list li {
  counter-increment: ref-counter;
  position: relative;
  margin-bottom: 1rem;
  padding-left: 2.5rem;
}
.reference-list li::before {
  content: counter(ref-counter);
  position: absolute;
  left: 0;
  top: 0.1rem;
  background-color: #b1001a;
  color: white;
  font-weight: bold;
  width: 1.6rem;
  height: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.9rem;
}
.reference-list a {
  color: #b1001a;
  text-decoration: none;
}
.reference-list a:hover {
  text-decoration: underline;
}



/* ENGINEERING MORE */
.figure-row {
  display: flex;
  justify-content: center; /* centers both images horizontally */
  align-items: center;      /* aligns them vertically */
  gap: 20px;                /* space between the two images */
}

.figure-image img {
  display: block;
  border-radius: 8px;       /* optional: smooth corners */
}


.back-to-model-button {
  display: inline-block;
  padding: 10px 20px;
  background-color: #790b0b;
  color: white;
  font-weight: bold;
  border: 2px solid #ffcccc;
  border-radius: 30px; /* pill shape */
  text-decoration: none;
  box-shadow: 0 0 10px rgba(121, 11, 11, 0.6);
  transition: all 0.2s ease;
  text-align: center;
  cursor: pointer;
  margin-right: 4rem;
}

.back-to-model-button:hover {
  background-color: #a00f0f;
  box-shadow: 0 0 15px rgba(255, 100, 100, 0.8);
  transform: scale(1.05);
}








/* footer */
.footer-wrapper {
  position: relative;
  width: 100%;
  display: inline-block;
}

.footer-logo {
  width: 100%;
  height: auto;
  display: block;
}

/* --- ICON CONTAINER --- */
.social-icons {
  position: absolute;
  top: 67%;
  right: 39%;
  display: flex;
  gap: clamp(0.3rem, 1vw, 0.8rem);
}

/* --- ICON LINKS --- */
.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

/* --- ICONS THEMSELVES --- */
.social-icons a i {
  color: #c91026; /* color must be on the <i> tag */
  font-size: clamp(25px, 4vw, 80px); /* increase scaling range */
  line-height: 1;
}

/* Hover effect */
.social-icons a:hover i {
  transform: scale(1.15);
}



footer { 
  background-color: #222222;
}

footer a { 
  color: white; font-weight: bold; text-decoration: none; 
}

footer a:hover { 
  color: rgb(255, 80, 80); text-decoration: underline; 
}








@media screen and (max-width: 768px) {
  /* pill-man styles */
  .pill-man-wrapper {
    flex-direction: column;
    align-items: center;
    margin-left: 0;
    margin-top: 4rem;
  }

  .pill-man-text {
    font-size: 4.2vw;
    margin: 2rem 1rem;
    text-align: center;
  }

  .pill-man {
    width: 60vw;
  }

  /* grid container */
  .grid-container {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-left: 20px;
    margin-right: 20px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  /* hiv map */
  .hiv-map-wrapper {
    flex-direction: column;
    padding-left: 0;
    align-items: center;
    margin-left: 20px;
    margin-right: 20px;
  }

  .hiv-map-box {
    margin-right: 0;
    padding: 1rem;
  }

  .hiv-map {
    width: 90%;
  }

  /* fusion protein */
  .fusion-protein {
    margin: 0;
    padding: 1rem;
  }

  .fusion-protein-text {
    margin: 2rem 1rem;
  }

  /* needle */
  .needle-wrapper {
    flex-direction: column;
  }

  .needle {
    width: 80%;
    margin-right: 0;
  }

  .needle-text {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  .figure-image img {
    width: 100%;
  }

  .slide-text {
    position: static;
    transform: none;
    width: 100%;
    opacity: 1;
    margin-top: 1rem;
  }

  /* images */
  .image-card {
    width: 100%;
    height: auto;
  }

  .image-card img {
    height: auto;
  }
}

.hiv-map-wrapper,
.grid-container,
.needle-text {
  margin-left: 5vw;
  margin-right: 5vw;
}

.pill-man-text,
.problem-statement,
.hiv-map-text,
.top-text,
.bottom-text,
.pill-man-text,
.fusion-protein-text,
.needle-text p,
.final-text p,
.top-text {
  font-size: clamp(14px, 4.2vw, 35px);
}

@media screen and (max-width: 600px) {
  nav {
    padding: 0 1rem;
    height: 5rem;
  }

  .logo img {
    height: 4rem;
  }

  .toggle_menu,
  .close_menu {
    width: 2.5rem;
    height: 2.5rem;
  }

  .nav_link {
    font-size: 16px;
  }
}


/*iPhone SE */
@media screen and (max-width: 400px) {
  .nav_list {
    max-width: 280px; /* even narrower on tiny phones */
    width: 85vw;
  }
  
  .megamenu {
    width: 100%;
    font-size: 14px; /* optionally smaller text */
  }
}

/* Base size for stat numbers */
.stat {
  font-size: clamp(30px, 10vw, 60px); /* Start bigger and scale */
  font-weight: 700;
  color: rgb(232, 73, 73);
  line-height: 1.1;
}

/* Smaller devices */
@media screen and (max-width: 768px) {
  .stat {
    font-size: clamp(24px, 8vw, 40px);
  }
}

@media screen and (max-width: 400px) {
  .stat {
    font-size: clamp(18px, 10vw, 28px);
  }
}


/* Top and bottom text smaller but proportional */
.top-text, .bottom-text {
  color: rgb(106, 4, 4);
  font-size: clamp(16px, 4vw, 30px);  /* smaller */
  line-height: 1.2;
}

/* Scale down even more on smaller devices */
@media screen and (max-width: 768px) {
  .top-text, .bottom-text {
    font-size: clamp(14px, 4vw, 20px);
  }
}

@media screen and (max-width: 400px) {
  .top-text, .bottom-text {
    font-size: clamp(12px, 5vw, 16px);
  }
}
