/*########### Section : TEAM ################################### */

/* Container for team presentation with photo and information */
.team-presentation {
  max-width: 1290px;
  height: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  align-self: center;
  margin: 50px 120px; /* Top and bottom margin, left and right margin */
  gap: 30px;
  perspective: 1000px; /* Perspective effect */
}

/* Styles for team information */
.teamInfos {
  width: 300px;
  height: 375px;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-style: preserve-3d; /* Children elements respect 3D transformation */
  opacity: 0;
  transform: translateX(100%) rotateY(90deg); /* Initial animation */
  animation: slideInFromRight 0.8s ease forwards; /* Animation to reveal information */
  border: 1px solid var(--green-);
}

/* Transition animation */
@keyframes slideInFromRight {
  0% {
    transform: translateX(100%) rotateY(90deg);
    opacity: 0;
  }
  100% {
    transform: translateX(0) rotateY(0);
    opacity: 1;
  }
}

/* Styles for team picture */
.teamPicture {
  width: 100%;
  height: 100%;
  transition: filter 0.3s ease, opacity 0.3s ease; /* Transition for filter and opacity */
}

/* Styles for textual information */
.teamInfosTxt {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  font-size: 12px;
  color: var(--greenContrast-);
  font-weight: 700;
  padding: 10px;
  background: rgba(15, 15, 15, 0.7);
  text-align: center;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  height: auto;
  overflow-wrap: break-word;
  word-wrap: break-word;
  margin: 0; /* Ensure no margin */
  box-sizing: border-box; /* Include padding in total size */
  opacity: 0;
  transform: translateY(20px);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Background for textual information */
.teamInfos::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: auto;
  background: rgba(15, 15, 15, 0.7);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  z-index: 1;
  margin: 0; /* Ensure no margin */
  box-sizing: border-box; /* Include padding in total size */
}

/* Hover animation for textual information */
.teamInfos:hover .teamInfosTxt {
  opacity: 1;
  transform: translateY(0);
}

/* Hover animation for background */
.teamInfos:hover::after {
  opacity: 1;
  transform: translateY(0);
}

/* Desaturation effect on hover for team picture */
.teamInfos:hover .teamPicture {
  filter: grayscale(100%);
}

/* Media Queries */

/* Adjustments for screens less than 1500px */
@media screen and (max-width: 1600px) {
  .team-presentation {
    max-width: 950px;
  }
  .teamInfos {
    width: 200px;
    height: 250px;
  }
  .teamInfosTxt {
    font-size: 14px;
  }
}

/* Adjustments for screens less than 800px */
@media screen and (max-width: 800px) {
  .team-presentation {
    width: 700px;
  }
  .teamInfos {
    width: 180px;
    height: 220px;
  }
  .teamInfosTxt {
    font-size: 12px;
  }
}

/* Adjustments for screens less than 500px */
@media screen and (max-width: 500px) {
  .team-presentation {
    width: 300px;
    gap: 30px;
  }
 
  .teamInfos {
    width: 160px;
    height: 200px;
  }
  .teamInfosTxt {
    font-size: 0.8em;
  }
}
