/* ========================================   ABOUT PAGE — TEAM SECTION======================================== */

.team-section {
  width: 100%;
}

.team-heading {
  margin-bottom: 2rem;
}

/* ========================================   TEAM ROW======================================== */

/* Five cards across on regular desktop screens */

/* Horizontal scroll immediately below desktop.   This removes the unwanted two-card grid stage. */

/* Wider cards on phones */

/* ========================================   TEAM CARD======================================== */

.team-card {
  position: relative;
  height: 100%;
  overflow: hidden;
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 22px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.team-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.09);
}

/* ========================================   TEAM PHOTO======================================== */

.team-photo-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.05);
}

.team-photo-wrap .team-photo {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.35s ease;
}

.team-card:hover .team-photo {
  transform: scale(1.025);
}

/* ========================================   CARD INFORMATION======================================== */

.team-card-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  grid-template-areas: "position icon" "name icon";
  column-gap: 0.75rem;
  row-gap: 0.35rem;
  align-items: end;
  padding: 0.85rem 1rem 1rem;
  background-color: #ffffff;
}

/* Position */

.team-position {
  grid-area: position;
  align-self: end;
  margin: 0 !important;
  padding: 0;
  color: var(--bs-primary);
  font-size: 0.70rem;
  font-weight: 600;
  line-height: 1.15;
}

/* Name */

.team-card-content .team-name {
  grid-area: name;
  align-self: start;
  margin: 0 !important;
  padding: 0;
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.08;
  transform: none;
}

/* ========================================   EMAIL ICON======================================== */

.team-email-icon {
  position: static;
  grid-area: icon;
  align-self: end;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin: 0;
  color: var(--bs-warning);
  background-color: var(--bs-light);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.team-email-icon:hover {
  color: var(--bs-light);
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
  transform: scale(1.08);
}

.team-email-icon svg, .team-email-icon i {
  display: block;
  width: 0.9rem;
  height: 0.9rem;
  margin: 0;
  font-size: 0.9rem;
}

/* ========================================   TEAM CARD RESPONSIVE LAYOUT======================================== */

.team-row {
  --bs-gutter-x: 1rem;
  --bs-gutter-y: 1rem;
}

/* XXL: five cards */

@media (min-width: 1400px) {
  .team-row > [class*="col-"] {
    flex: 0 0 20%;
    width: 20%;
    max-width: 20%;
  }
}

/* Large and XL: four cards */

@media (min-width: 992px) and (max-width: 1399.98px) {
  .team-row > [class*="col-"] {
    flex: 0 0 25%;
    width: 25%;
    max-width: 25%;
  }
}

/* Medium: three cards */

@media (min-width: 768px) and (max-width: 991.98px) {
  .team-row > [class*="col-"] {
    flex: 0 0 33.333333%;
    width: 33.333333%;
    max-width: 33.333333%;
  }
}

/* Small: horizontal scroll */

@media (max-width: 767.98px) {
  .team-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    margin-right: 0;
    margin-left: 0;
    padding-bottom: 1rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
}

@media (max-width: 767.98px) {
  .team-row::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 767.98px) {
  .team-row > [class*="col-"] {
    flex: 0 0 76%;
    width: 76%;
    max-width: 76%;
    padding-left: 0;
    padding-right: 0.85rem;
    scroll-snap-align: start;
  }
}

