.mentors-section {
  color: #ffffff;
  background: url('../images/Rectangle 5.png') no-repeat top right #000;
  padding: 100px 0 0 0;
}

.mentors-section .container {
  position: relative;
  padding-bottom: 40px;
}

.mentors-heading {
  font-family: 'Forma DJR Display Medium', sans-serif;
  font-size: 72px;
  font-weight: 500;
  color: #0044E9;
  margin-bottom: 40px;
}

.mentors-content {
  display: flex;
  gap: 60px;
  flex-wrap: wrap;
  position: relative;
}

.mentor-categories {
  padding-right: 20px;
  border-right: 2px solid #919191;
}

.mentor-categories li.active::after {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  background: #024AD8;
  border-radius: 50%;
  margin-left: 10px;
  /* optional spacing from text */
  vertical-align: middle;
  position: absolute;
  left: 101%;
}

.mentor-categories ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mentor-categories li {
  font-size: 16px;
  color: #8E8E8E;
  margin-bottom: 80px;
  cursor: pointer;
  transition: color 0.3s;
  font-family: 'Forma DJR Micro Regular', sans-serif;
}

.mentor-categories li:last-child {
  margin-bottom: 20px;
}
/*.mentor-categories li.active:last-child {
  margin-bottom: 80px;
}*/

.mentor-categories li.active {
  color: #0044E9;
  position: relative;
}

.mentors-profile {
  max-width: 410px;
}

.mentor-profile {
  max-width: 600px;
  min-height: 100px;
}

.mentor-profile .mentor-name {
  font-family: "Forma DJR Display";
  font-weight: 500;
  font-style: Medium;
  font-size: 24px;
  line-height: 100%;
  letter-spacing: 0%;
  vertical-align: middle;
  color: #8E8E8E;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mentorProfile {
  margin-bottom: 60px;
}

/* Initial state for all mentorProfile boxes */
/* Initial state */
.mentorProfile .mentor-desc {
  opacity: 0;
  transform: translateX(50px);
  /* Start from right */
  transition: none;
  font-family: 'Forma DJR Micro Regular', 'Forma DJR Micro', Arial, sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 16px;
  line-height: 21px;
  letter-spacing: 0;
  padding-top: 6px;
  display: none;
}

/* Active state with animation */
.mentorProfile.active .mentor-desc {
  animation: fadeInRightElastic 0.8s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
  display: block;
}

/* Right-to-left elastic fade-in */
@keyframes fadeInRightElastic {
  0% {
    opacity: 0;
    transform: translateX(50px) scale(0.98);
  }

  60% {
    opacity: 1;
    transform: translateX(-10px) scale(1.03);
  }

  80% {
    transform: translateX(5px) scale(0.98);
  }

  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.mentor-img {
  width: 100%;
  /*max-width: 315px;*/
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  position: absolute;
  top: -140px;
  right: -140%;
  opacity: 0;
  transform: translateX(-50px);
  /* initial from left */
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: none;
}

.mentorProfile.active .mentor-img {
  animation: imgFadeInLeft 0.5s ease-out forwards;
  display: block;
}

/* Simple fade-in left-to-right */
@keyframes imgFadeInLeft {
  0% {
    opacity: 0;
    transform: translateX(-50px);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}



/* .mentor-profile.active .mentor-desc, .mentor-profile.active .mentor-img {
    display: block;
} */

.mentorProfile.active .mentor-name,
.mentorProfile .mentor-name:hover {
  font-family: 'Forma DJR Display Medium', sans-serif;
  font-size: 40px;
  font-weight: 500;
  color: #FF5050;
}



.mentors-buttons {
  margin-top: 40px;
  display: flex;
  gap: 20px;
  font-family: 'Forma DJR Micro Regular', sans-serif;
  font-weight: 400;
}

.btn-outline {
  padding: 15px 40px;
  font-size: 24px;
  color: #ffffff;
  border: 1px solid #ffffff;
  border-radius: 8px;
  text-decoration: none;
}

.btn-primary {
  padding: 15px 40px;
  font-size: 22px;
  color: #fff;
  background-color: #024AD8;
  border-radius: 8px;
  text-decoration: none;
}

.mentor-profile {
  opacity: 0;
  transform: translateY(120%);
  transition: opacity 0.4s ease-out;
  animation: none;
  pointer-events: none;
  display: none;
}

/* When .active is added */
.mentor-profile.active {
  opacity: 1;
  animation: elasticIn 0.9s ease-out forwards;
  pointer-events: auto;
  display: block;
}

/* Keyframes for elastic bounce-up */
@keyframes elasticIn {
  0% {
    transform: translateY(120%);
  }

  60% {
    transform: translateY(-10%);
  }

  80% {
    transform: translateY(5%);
  }

  100% {
    transform: translateY(0%);
  }
}

@media (max-width: 1024px) {
  .mentors-content {
    flex-direction: column;
    gap: 10px;
  }

  .mentor-categories {
    border-right: none;
    border-bottom: 2px solid #919191;
    padding-right: 0;
    padding-bottom: 0px;
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 0;
    display: none;
  }

  .mentor-categories li {
    margin-bottom: 0;
    margin-right: 24px;
  }

  .mentor-categories li.active::after {
    position: relative;
    left: auto;
    top: 2px;
    margin-left: 6px;
  }

  .mentors-profile {
    max-width: 100%;
  }

  .mentor-profile {
    max-width: 100%;
    position: relative;
    padding-bottom: 180px;
    /* reserve space for image */
  }

  .mentor-img {
    position: absolute;
    right: 0;
    bottom: 0;
    max-width: 200px;
  }

  .mentors-heading {
    font-size: 56px;
    text-align: left;
  }

  .btn-outline,
  .btn-primary {
    font-size: 25px;
    padding: 12px 28px;
  }

  .mentors-buttons {
    justify-content: center;
    flex-wrap: wrap;
  }
}

@media (max-width: 600px) {
  .mentors-section { background-image: none;}

  .mentorProfile.active .mentor-img,
  .mentorProfile .mentor-img {
    display: none;
  }

  .mentorProfile.active .mentor-desc {
    display: none;
  }

  .mentors-section .container {
    width: 100%;
    margin: 0;
  }

  .mentors-section {
    padding: 20px 16px;
    background-position: top center;
  }

  .mentors-heading {
    font-size: 50px;
    margin-bottom: 10px;
  }

  .mentor-categories {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .mentor-categories li {
    font-size: 14px;
  }

  .mentor-categories li.active::after {
    width: 14px;
    height: 14px;
  }

  .mentor-profile {
    display: block;
    pointer-events: all;
  }

  .mentor-profile.active .mentor-name {
    font-size: 28px;
  }

  .mentor-desc {
    font-size: 18px;
    line-height: 20px;
  }

  .mentor-img {
    max-width: 140px;
  }

  .btn-outline,
  .btn-primary {
    font-size: 25px;
    width: 65%;
    text-align: center;
    padding: 18px 0;
  }

  .mentors-buttons {
    gap: 12px;
  }

  .mentor-categories-mobile {
    display: block;
    font-size: 20px;
    color: #8E8E8E;
    margin-bottom: 5px;
    font-family: 'Forma DJR Micro Regular', sans-serif;
    color: #fff;
  }
  .mentorProfile.active .mentor-name, .mentor-profile .mentor-name {
    color: #fff;
    font-size: 24px !important;
    font-family: 'Forma DJR Micro Regular', sans-serif !important;
  }

  .mentorProfile{
    border-bottom: 1px solid #777777; padding: 10px 0 15px; margin-bottom: 0;
    }
}

@media (max-width: 1024px) {
  .mentor-categories {
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 16px;
    border-bottom: 2px solid #919191;
    margin-bottom: 24px;
    scrollbar-width: none;
    /* Hide scrollbar for Firefox */
    display: none;
  }

  .mentor-categories::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar for Chrome/Safari */
  }

  .mentor-categories ul {
    display: flex;
    gap: 24px;
  }

  .mentor-categories li {
    display: inline-block;
    white-space: nowrap;
    margin: 0;
    padding: 0 8px;
    font-size: 16px;
    flex-shrink: 0;
  }

  .mentors-profile {
    position: relative;
  }

  .mentor-profile {
    display: block;
    padding-bottom: 0 !important;
    opacity: 1;
    transform: translateY(0);
  }

  .mentor-profile.active {
    display: block;
  }

  .mentor-img {
    position: relative;
    width: 100%;
    max-width: none;
    margin: 10px 0;
    display: block;
  }
}

@media (max-width: 1024px) {
  .mentor-categories {
    padding-right: 0;
    padding-bottom: 0px;
    border-right: none;
    border-bottom: 2px solid #919191;
    overflow-x: auto;
    white-space: nowrap;
    display: block;
    max-width: 100%;
    scrollbar-width: none;
    /* Firefox */
    margin-bottom: 0;
    display: none;
  }

  .mentor-categories::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
  }

  .mentor-categories ul {
    display: flex;
    flex-wrap: nowrap;
    gap: 24px;
    padding: 0;
    margin: 0;
  }

  .mentor-categories li {
    margin-bottom: 0;
    margin-right: 0;
    flex-shrink: 0;
    font-size: 20px;
  }

  .mentor-categories li.active::after {
    display: none !important;
  }
}

.profilePopUp .mentorProfile,
.profilePopUp .mentorProfile .mentor-desc,
.profilePopUp .mentorProfile .mentor-img {
  display: block !important;
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
  position: static !important;
  color: #fff !important;
}

.profilePopUp .mentorProfile {
  display: flex !important;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 32px;
  width: 100%;
  background: transparent;
  box-sizing: border-box;
}

.profilePopUp .mentorProfile .mentor-info {
  flex: 1 1 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.profilePopUp .mentorProfile .mentor-categories-mobile {
  font-family: 'Forma DJR Micro Regular', sans-serif !important;
  font-weight: 400 !important;
  font-size: 14px !important;
  line-height: 100% !important;
  color: #FF5050 !important;
  margin-bottom: 8px;
}

.profilePopUp .mentorProfile .mentor-name {
  font-family: 'Forma DJR Display Medium', sans-serif !important;
  font-weight: 500 !important;
  font-size: 28px !important;
  line-height: 100% !important;
  color: #FF5050 !important;
  margin-bottom: 10px;
}

.profilePopUp .mentorProfile .mentor-desc {
  font-family: 'Forma DJR Micro Regular', sans-serif !important;
  font-weight: 400 !important;
  font-size: 16px !important;
  line-height: 20px !important;
  letter-spacing: 0.08em !important;
  color: #FFFFFF !important;
  margin-bottom: 0px;
  padding: 0;
}

.profilePopUp .mentorProfile .mentor-img {
  flex: 1 1 50%;
  max-width: 180px;
  margin-bottom: 0;
  border-radius: 8px;
  width: 100%;
  height: auto;
  display: block !important;
  object-fit: cover;
}

@media (max-width: 700px) {
  .profilePopUp .mentorProfile {
    flex-direction: row;
    gap: 12px;
    align-items: flex-start;
    border: none;
  }
  .profilePopUp .mentorProfile .mentor-img {
    max-width: 120px;
    width: 100%;
    margin: 0 auto 10px auto;
  }
  .profilePopUp .mentorProfile .mentor-info {
    width: 100%;
    margin-bottom: 0px;
    padding-top: 10px;
    border: none;
  }
}