.team-section {
  max-width: 1200px;
  margin: auto;
}

.team-wrapper {
  display: flex;
  gap: 60px;
  align-items: flex-start;
}

.team-right-content {
  width: 100%;
}

.team-lead-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 40px;
}

/* LEFT TABS */

.team-tabs {
  width: 320px;
  flex-shrink: 0;
  display: grid;
  gap: 10px;
}

.team-tab-btn {
  width: 100%;
  border: 0.123rem solid #00b4a7 !important;
  background: transparent;
  text-align: left;
  padding: 24px 30px;
  font-size: 20px;
  font-weight: 600;
  color: #12185f;
  cursor: pointer;
  transition: 0.35s ease;
}

.team-tab-btn:hover {
  background: #12b9b0;
  color: #fff;
}

.team-tab-btn.active {
  background: #12b9b0;
  color: #fff;
  border-radius: 12px;
  border: 1px solid #12b9b0;
  box-shadow: 0 0 10px rgba(160, 160, 160, 0.5);
}

/* DESKTOP TAB CONTENT */

.team-tab-content {
  display: none;
}

.team-tab-content.active {
  display: block;
  animation: fadeUp 0.5s ease;
}

/* HIDE MOBILE HEADER ON DESKTOP */

.team-accordion-header {
  display: none;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* TOP TEXT */

.team-top-text {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 40px;
}

.team-top-text h2 {
  font-size: 36px;
  line-height: 1.3;
  color: #12185f;
}

/* TEAM GRID */

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

/* CARD */

.team-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border-radius: 20px;
  transition: 0.4s ease;
box-shadow: rgba(0, 0, 0, 0.15) 0px 5px 15px 0px;
}

.team-card:hover {
  box-shadow: rgba(0, 0, 0, 0.2) 0px 12px 28px 0px, rgba(0, 0, 0, 0.1) 0px 2px 4px 0px, rgba(255, 255, 255, 0.05) 0px 0px 0px 1px inset;
}

.team-card img {
  width: 100%;
  aspect-ratio: 4/6;
  object-fit: cover;
  transition: 0.6s ease;
  display: block;
}

.team-card:hover img {
  transform: scale(1.08);
}

/* OVERLAY */

.team-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.82) 0%,
    rgba(0, 0, 0, 0.45) 45%,
    rgba(0, 0, 0, 0) 100%
  );
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  text-align: center;
  padding: 24px;
  transition: 0.5s ease;
  opacity: 0;
}

.team-card:hover .team-overlay {
  opacity: 1;
}

.team-info {
  width: 100%;
  opacity: 0;
  transform: translateY(20px);
  transition: 0.5s ease;
  display: grid;
  gap: 10px;
}

.team-card:hover .team-info {
  opacity: 1;
  transform: translateY(0);
}

.team-info h3 {
  color: #fff;
  font-size: 24px;
  line-height: 1.2;
}

.team-info p {
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px;
  margin-bottom: 18px;
}

.team-social {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.team-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #14c7c0;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: 0.35s ease;
}

.team-social a:hover {
  transform: translateY(-3px);
  color: #0e0e55;
}
@media (min-width: 992px) {

    .team-grid,
    .team-lead-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 30px;
        justify-items: stretch;
    }

}
/* DESKTOP STICKY */

@media (min-width: 992px) {
  .team-tabs {
    position: sticky;
    top: 120px;
    align-self: flex-start;
  }
}

/* MOBILE + TABLET */
@media (max-width: 991px) {
  .team-overlay {
    opacity: 1;
  }

  .team-info {
    opacity: 1;
    transform: translateY(0);
  }

  .team-wrapper {
    flex-direction: column;
    gap: 20px;
  }

  .team-tabs {
    display: none;
  }

  .team-tab-content {
    display: block !important;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
  }

  .team-accordion-header {
    display: block;
    padding: 18px 20px;
    background: #12b9b0;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
  }

  .team-content-inner {
    display: none;
    padding: 20px;
  }

  .team-tab-content.open .team-content-inner {
    display: block;
  }

  .team-grid,
  .team-lead-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .team-card img {
    aspect-ratio: 3/4;
  }
}

/* MOBILE */

@media (max-width: 767px) {
  .team-top-text h2 {
    font-size: 26px;
  }

  .team-grid,
  .team-lead-grid {
    grid-template-columns: 1fr;
  }

  .team-overlay {
    padding: 20px;
  }

  .team-info h3 {
    font-size: 22px;
  }
}
