/*=============== GOOGLE FONTS ===============*/
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap');

/*=============== VARIABLES CSS ===============*/
:root {
  --header-height: 3.5rem;

  /*========== Colors ==========*/
  /*Color mode HSL(hue, saturation, lightness)*/
  --primary-green : #00796B;
  --darker-green : #00534a;
  --black-color: hsl(220, 24%, 12%);
  --black-color-light: hsl(220, 24%, 15%);
  --black-color-lighten: hsl(220, 20%, 18%);
  --gray: #A6A6A6;
  --white-color: #fff;
  --white-color-dark: hsl(0, 0%, 93%);
  --body-color: hsl(220, 100%, 97%);

  /*========== Font and typography ==========*/
  /*.5rem = 8px | 1rem = 16px ...*/
  --body-font: "Poppins", sans-serif;
  --normal-font-size: .938rem;

  /*========== Font weight ==========*/
  --font-regular: 200;
  --font-semi-bold: 350;

  /*========== z index ==========*/
  --z-tooltip: 10;
  --z-fixed: 100;
}

/*========== Responsive typography ==========*/
@media screen and (min-width: 1024px) {
  :root {
    --normal-font-size: 1rem;
  }
}

/*=============== BASE ===============*/
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

body {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: var(--white-color);
}

ul {
  list-style: none;
  /* Color highlighting when pressed on mobile devices */
  -webkit-tap-highlight-color: transparent;
}

a {
  text-decoration: none;
}

/*=============== REUSABLE CSS CLASSES ===============*/
.container {
  max-width: 1250px;
  margin-inline: 1.5rem;
}

/*=============== HEADER ===============*/
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--white-color);
  box-shadow: var(--white-color);
  z-index: var(--z-fixed);
}

/*=============== NAV ===============*/
.nav {
  height: var(--header-height);
}

.nav__logo, 
.nav__burger, 
.nav__close {
  color: var(--black-color);
}

.nav__data {
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  column-gap: .50rem;
  font-weight: var(--font-semi-bold);
  /* Color highlighting when pressed on mobile devices */
  -webkit-tap-highlight-color: transparent;
}

.nav__logo i {
  font-weight: initial;
  font-size: 1.25rem;
}

.nav__toggle {
  position: relative;
  width: 32px;
  height: 32px;
}

.nav__burger, 
.nav__close {
  position: absolute;
  width: max-content;
  height: max-content;
  inset: 0;
  margin: auto;
  font-size: 1.25rem;
  cursor: pointer;
  transition: opacity .1s, transform .4s;
}

.nav__close {
  opacity: 0;
}

/* Navigation for mobile devices */
@media screen and (max-width: 1118px) {
  .nav__menu {
    position: absolute;
    left: 0;
    top: 2.5rem;
    width: 100%;
    height: calc(100vh - 3.5rem);
    overflow: auto;
    pointer-events: none;
    opacity: 0;
    transition: top .4s, opacity .3s;
  }
  .nav__menu::-webkit-scrollbar {
    width: 0;
  }
  .nav__list {
    background-color: var(--white-color);
    padding-top: 1rem;
  }
}

.nav__link {
  color: var(--black-color);
  background-color: var(--white-color);
  font-weight: var(--font-semi-bold);
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color .3s;
}

.nav__link:hover {
  background-color: var(--white-color-dark);
}

/* Show menu */
.show-menu {
  opacity: 1;
  top: 3.5rem;
  pointer-events: initial;
}

/* Show icon */
.show-icon .nav__burger {
  opacity: 0;
  transform: rotate(90deg);
}
.show-icon .nav__close {
  opacity: 1;
  transform: rotate(90deg);
}

/*=============== DROPDOWN ===============*/
.dropdown__item {
  cursor: pointer;
}

.dropdown__arrow {
  font-size: 1.25rem;
  font-weight: initial;
  transition: transform .4s;
}

.dropdown__link, 
.dropdown__sublink {
  padding: 1.25rem 1.25rem 1.25rem 2.5rem;
  color: var(--black-color);
  background-color: var(--white-color);
  display: flex;
  align-items: center;
  column-gap: .5rem;
  font-weight: var(--font-semi-bold);
  transition: background-color .3s;
}

.dropdown__link i, 
.dropdown__sublink i {
  font-size: 1.25rem;
  font-weight: initial;
}

.dropdown__link:hover, 
.dropdown__sublink:hover {
  background-color: var(--white-color-dark);
}

.dropdown__menu, 
.dropdown__submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease-out;
}

/* Show dropdown menu & submenu */
.dropdown__item:hover .dropdown__menu, 
.dropdown__subitem:hover > .dropdown__submenu {
  max-height: 1000px;
  transition: max-height .4s ease-in;
}

/* Rotate dropdown icon */
.dropdown__item:hover .dropdown__arrow {
  transform: rotate(180deg);
}

/*=============== DROPDOWN SUBMENU ===============*/
.dropdown__add {
  margin-left: auto;
}

.dropdown__sublink {
  background-color: var(--white-color);
}

/*=============== BREAKPOINTS ===============*/
/* For small devices */
@media screen and (max-width: 340px) {   
  .container {
    margin-inline: 1rem;
  }

  .nav__link {
    padding-inline: 1rem;
  }
}

/* For large devices */
@media screen and (min-width: 1118px) {
  .container {
    margin-inline: auto;
  }

  .nav {
    height: calc(var(--header-height) + 2rem);
    display: flex;
    justify-content: space-between;
  }
  .nav__toggle {
    display: none;
  }
  .nav__list {
    height: 100%;
    display: flex;
    column-gap: 3rem;
  }
  .nav__link {
    height: 100%;
    padding: 0;
    justify-content: initial;
    column-gap: .25rem;
  }
  .nav__link:hover {
    background-color: transparent;
  }

  .dropdown__item, 
  .dropdown__subitem {
    position: relative;
  }

  .dropdown__menu, 
  .dropdown__submenu {
    max-height: initial;
    overflow: initial;
    position: absolute;
    left: 0;
    top: 6rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s, top .3s;
  }

  .dropdown__link, 
  .dropdown__sublink {
    padding-inline: 1rem 3.5rem;
  }

  .dropdown__subitem .dropdown__link {
    padding-inline: 1rem;
  }

  .dropdown__submenu {
    position: absolute;
    left: 100%;
    top: .5rem;
  }

  /* Show dropdown menu */
  .dropdown__item:hover .dropdown__menu {
    opacity: 1;
    top: 5.5rem;
    pointer-events: initial;
    transition: top .3s;
  }

  /* Show dropdown submenu */
  .dropdown__subitem:hover > .dropdown__submenu {
    opacity: 1;
    top: 0;
    pointer-events: initial;
    transition: top .3s;
  }
}

/*=============== HERO SECTION ===============*/
.hero-section {
  width: 100%;
  min-height: 70vh;
  padding: clamp(6rem, 3vw, 3.5rem) clamp(6rem, 5vw, 4rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}
  
.hero-content {
  display: flex;
  flex-direction: row; /* Changed to row to align items side by side */
  justify-content: flex-start;
  align-items: flex-start;
  gap: clamp(1rem, 2vw, 1rem); 
}
  
.grants-info {
  padding: 0;
  flex: 2;
  background: var(--white-color);
  padding: clamp(4rem, 1vw, 1rem);
  display: flex;
  width: 100vw;
  flex-direction: column; /* Ensure grants-details and grants-funding stack inside grants-info */
}

.grants-info h1 {
  font-size: 2.8rem;
  color: var(--primary-green);
  margin-bottom: 1rem;
  text-align: left;
}

.grants-details {
  display: flex;
  flex-direction: row; /* Align details-text and grants-funding side by side */
  justify-content: flex-start; /* Horizontal alignment */
  align-items: center;
  gap: clamp(1rem, 2vw, 2rem);
}

.details-text {
  flex: 2; /* Allow details-text to take more space */
}

.grants-details h2 {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--primary-green);
    margin-bottom: 0.5rem;
}

.grants-details p {
    font-size: 1rem;
    color: var(--black-color);
    margin-bottom: 2rem;
    margin-top: 2rem;
}

.grants-startdate{
    color: var(--primary-green);
    margin-bottom: 1rem;
}

.grants-enddate{
    color: var(--primary-green);
    margin-bottom: 1rem;
}

.grants-funding {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1rem; /* Reduced padding to fit content */
  background-color: var(--primary-green);
  color: var(--white-color);
  text-decoration: none;
  border-radius: 15px;
  transition: background-color 0.3s;
  width: clamp(300px, 20vw, 420px); /* Fixed width with a max limit */
  height: clamp(130px, 16vw, 150px); /* Fixed height with a max limit */
  flex-shrink: 0; /* Prevent shrinking */
  margin-left: clamp(1rem, 2vw, 2rem); /* Space from details-text */
}

.grants-funding h1{
    color: var(--white-color);
    font-size: 1.2rem;
    font-weight: 500;
    text-align: center;
    margin: 5px  auto;
}

.grants-funding p{
    color: var(--white-color);
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    margin: 0 auto;
}

@media screen and (max-width: 600px) {
  .hero-section {
    padding: clamp(2rem, 5vw, 3rem);
    margin-top: var(--header-height);
  }

  .hero-content {
    width: 100%;
  }

  .grants-info {
      padding: 0;
      width: 100%;
  }
  
  .grants-info h1 {
    font-size: 1.6rem;
    text-align: center;
  }

  .grants-details {
    flex-direction: column;
  }
  .details-text {
    text-align: center;
  }
  .details-text h2 {
    font-size: 1.1rem;
  }

  .grants-funding {
    margin: 0;
  } 
  .grants-funding h1 {
    font-size: 1.4rem;
  }
  .grants-funding p {
    font-size: 1.6rem;
  }
}

/*IMAGE SECTION*/
.grants-img-attached {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: clamp(1rem, 2vw, 1rem);
  flex: 2;
  background: var(--white-color);
  padding-top: clamp(7rem, 2vw, 8rem);
  padding-bottom: clamp(0.5rem, 2vw, 1rem);
}

.grants-img {
    max-width: 1200px; /* Container max width */
    max-height: 500px; /* Container max height */
    width: 100%; /* Scales down proportionally */
    height: auto; /* Maintains aspect ratio */
}

.grants_photo {
    max-width: 1200px; /* Apply max dimensions to the image */
    max-height: 500px; /* Apply max dimensions to the image */
    width: 100%; /* Scales down proportionally */
    height: auto; /* Maintains aspect ratio */
    object-fit: cover; /* Ensures the image fits while preserving aspect ratio */
    aspect-ratio: 12 / 5; /* 1200:500 ratio */
    display: block; /* Removes any inline spacing issues */
}

/*MEMBERS SECTION*/
.grants-subtitle h1{
  font-size: 2rem;
  color: var(--primary-green);
  padding-top: clamp(7rem, 2vw, 8rem);
  padding-bottom: clamp(0.3rem, 2vw, 0.7rem);
}

.member-card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
  justify-content: center;
}

.member-card {
  background-color: #FAFFFE;
  border: 2.5px solid var(--primary-green);
  border-radius: 0.75rem;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.member-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.member-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    border: 3px solid var(--primary-green);
    object-fit: cover;
}

.member-name {
    font-weight: 600;
    color: var(--primary-color);
}

.member-title {
    font-size: 0.875rem;
    color: #718096;
}

/*COLLABORATORS SECTION*/
.grants-collaborators{
  width: 100%;
  display: flex;
  flex-direction: row; /* Align details-text and grants-funding side by side */
  justify-content: space-between;
  align-items: center;
}

.grants-collaborators ul {
  list-style-type: disc;
  flex: 2; /* Allow details-text to take more space */
  font-size: 1rem;
  margin-left: 20px;
}

.grants-collaborators-img {
  position: relative;
  width: clamp(100px, 15vw, 800px);
  height: clamp(100px, 15vw, 150px);
  overflow: hidden;
  padding: 200px;
}

.grants_collaborators_photo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 2px solid #004d40;
  border-radius: 5px;
  opacity: 1;
  animation: slideLeft 6s infinite; /* Faster animation (6s cycle) */
}

.grants_collaborators_photo:nth-child(1) {
  animation-delay: 0s;
}

.grants_collaborators_photo:nth-child(2) {
  animation-delay: 2s;
}

.grants_collaborators_photo:nth-child(3) {
  animation-delay: 4s;
}

@media screen and (max-width: 600px) {
  .grants-collaborators {
    flex-direction: column;
    gap: clamp(2rem, 30vh, 3rem);
  }
  
  .grants-collaborators ul {
    text-align: justify;
  }

  .grants-collaborators-img {
    width: clamp(240px, 40vw, 400px);
    height: clamp(150px, 40vw, 300px);
    padding: 5vw;
  }
}

/* Slide Left Animation */
@keyframes slideLeft {
  0% { transform: translateX(100%); } /* Start off-screen to the right */
  20% { transform: translateX(0); } /* Slide in to position */
  33% { transform: translateX(0); } /* Stay visible (same duration) */
  53% { transform: translateX(-100%); } /* Slide out to the left */
  100% { transform: translateX(-100%); } /* Remain off-screen */
}


/*PAPERS PUBLISHED SECTION*/
.papers-published ul{
  list-style-type: disc;
  flex: 2; /* Allow details-text to take more space */
  font-size: 1rem;
  margin-left: 20px;
}

/*PATENTS PUBLISHED SECTION*/
.patents-published ul{
  list-style-type: disc;
  flex: 2; /* Allow details-text to take more space */
  font-size: 1rem;
  margin-left: 20px;
}


/*MASTER & PHD STUDENTS SECTION*/
.stats-row {
  display: flex;
  justify-content: center; /* Changed from space-between to center */
  gap: clamp(0.5rem, 2vw, 2rem);
  text-align: center; /* Ensure text alignment is centered */
  flex-wrap: wrap;
  padding: 2rem 10rem;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center; /* Changed from flex-start to center */
  text-align: center; /* Changed from left to center */
  flex: 1;
  min-width: 60px; /* Reduced from 150px for better small-screen behavior */
}

.stat .number {
  font-size: clamp(1.5rem, 6vw, 4rem);
  font-weight: 500;
  color: var(--black-color, #000);
  margin-bottom: clamp(-0.5rem, -1vw, -0.625rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat .label {
  font-size: clamp(0.875rem, 2.5vw, 1.5rem);
  color: var(--black-color, #000);
  text-transform: lowercase;
}

.stat i{
  font-size:clamp(1.5rem, 6vw, 4rem) ;
}
@media screen and (max-width: 600px) {
  .stats-row {
    flex-direction: row;
    padding: 1rem 0 2rem;
    margin-bottom: 1rem;
  }
}

/*=============== CONTACT US ===============*/
.contact_us {
  width: 100%;
  background: linear-gradient(to bottom, #00796B, #05897A);
  color: var(--white-color);
  padding: 40px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.contact_content {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

.contact_content h1 {
  font-size: 2rem;
  margin-bottom: 20px;
}

.contact_content h2 {
  font-size: 1.2rem;
  margin: 30px 50px;
  font-weight: 300;
}

.contact_content h3 {
  font-size: 1.2rem;
  margin: 10px 0;
  font-weight: 300;
}

.contact_content h3 strong {
  font-weight: 700;
}

.divider {
  width: 1000px;
  height: 1px;
  background: var(--white-color);
  border: none;
  margin: 40px auto;
}

.social_icons {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 30px;
}

.social_icons a {
  color: var(--white-color);
  font-size: 2rem;
  transition: color 0.3s ease, transform 0.3s ease;
}

@media (hover: hover) {
  .social_icons a:hover {
    color: var(--gray);
    transform: scale(1.1);
  }
}

.footer_nav {
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.footer_nav a {
  color: var(--white-color);
  text-decoration: none;
  margin: 0 5px;
  transition: color 0.3s ease;
}

@media (hover: hover) {
  .footer_nav a:hover {
    color: var(--gray);
  }
}

.copyright {
  font-size: 0.8rem;
}

/* Responsive Adjustments */
@media (max-width: 600px) {
  .partners_and_collaborators {
    padding: 20px 0;
    margin-bottom: 80px;
  }

  .partners_and_collaborators .title_header {
    margin-top: 2rem;
    padding: 1.5rem 0;
  }

  .partners_and_collaborators .highlight-header {
    width: clamp(100px, 25vw, 150px);
    margin: -1.5rem auto 1.5rem;
  }

  .logo-track img {
    height: 40px;
    margin: 0 10px;
  }

  .contact_us {
    padding: 40px 0;
    height: clamp(550px, 90vh, 600px);
  }

  .contact_content h1 {
    font-size: 1.5rem;
  }

  .contact_content h2 {
    font-size: 1rem;
    margin: 20px 30px;
  }

  .contact_content h3 {
    font-size: 1rem;
  }

  .divider {
    width: 100%;
  }

  .social_icons {
    gap: 20px;
  }

  .social_icons a {
    font-size: 1.3rem;
  }

  .footer_nav {
    font-size: 0.8rem;
  }

  .copyright {
    font-size: 0.7rem;
  }
}