/* ============================================
   Team Block
   ============================================ */

.team {
  inline-size: 100%;
  padding-block: 4rem;
  padding-inline: 2rem;
}

.team__container {
  inline-size: 100%;
  margin-inline: auto;
  max-inline-size: 81.25rem;
}

/* Header */
.team__header {
}

.team__pretitle {
  color: var(--body-color, #212529);
  display: block;
  font-family: inherit;
  font-size: var(--p-font-size, 1rem);
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-block: 0;
  text-align: center;
}

.team__title {
  color: var(--body-color, #212529);
  font-family: var(--primary-font, "Inter", sans-serif);
  font-size: var(--h2-font-size, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  padding-block-start: 0.75rem;
  text-align: center;
}

.team__title:first-child {
  padding-block-start: 0;
}

.team__description {
  color: var(--body-color, #212529);
  font-size: calc(var(--p-font-size, 1rem) + 0.2rem);
  line-height: 1.6;
  margin-inline: auto;
  max-inline-size: 56.25rem;
  padding-block-start: 1.5rem;
  text-align: center;
}

.team__description:first-child {
  padding-block-start: 0;
}

.team__description p {
  color: var(--body-color, #212529);
  font-size: inherit;
  margin-block-end: 1rem;
}

.team__description p:last-child {
  margin-block-end: 0;
}

/* ============================================
   Grid
   ============================================ */

.team__grid {
  display: grid;
  gap: 3rem;
  padding-block-start: 3rem;
}

.team__grid:first-child {
  padding-block-start: 0;
}

/* ============================================
   Team Item (card)
   ============================================ */

.team__item {
  display: flex;
  flex-direction: column;
  text-align: center;
}

.team__content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* ============================================
   Image
   ============================================ */

.team__image-wrapper {
  margin-block-end: 1.5rem;
  overflow: hidden;
}

.team__image {
  block-size: auto;
  display: block;
  inline-size: 100%;
  max-inline-size: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.team__item:hover .team__image {
  transform: scale(1.05);
}

/* Image Style Modifiers */
.team--img-circled .team__image-wrapper {
  border-radius: 50%;
}

.team--img-circled .team__image {
  aspect-ratio: 1 / 1;
  block-size: 100%;
  inline-size: 100%;
  object-fit: cover;
}

.team--img-rounded .team__image-wrapper {
  border-radius: 0.5rem;
}

.team--img-rounded .team__image {
  block-size: 100%;
  inline-size: 100%;
  object-fit: cover;
}

.team--img-square .team__image-wrapper {
  border-radius: 0;
}

/* ============================================
   Text Content
   ============================================ */

.team__name {
  color: var(--body-color, #212529);
  font-size: var(--h3-font-size, 1.5rem);
  font-weight: 700;
  line-height: 1.3;
  margin-block-end: 0.5rem;
}

.team__position {
  color: var(--body-color, #212529);
  font-size: var(--p-font-size, 1rem);
  font-weight: 500;
  line-height: 1.6;
  margin-block-end: 1rem;
}

.team__excerpt {
  color: var(--body-color, #212529);
  font-size: var(--p-font-size, 0.875rem);
  line-height: 1.6;
  margin-block-end: 1.5rem;
}

.team__excerpt p {
  margin-block-end: 0;
}

/* ============================================
   Read More Button
   ============================================ */

.team__read-more {
  background: none;
  border: none;
  color: var(--link-color, #4285F4);
  cursor: pointer;
  font-family: inherit;
  font-size: var(--p-font-size, 1rem);
  font-weight: 700;
  padding-block: 1rem;
  padding-inline: 0;
  text-align: inherit;
}

.team__read-more:hover {
  color: var(--link-hover-color, #357ae8);
  opacity: 0.8;
}

/* ============================================
   Social Links (LinkedIn / Email icons)
   ============================================ */

.team__social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-block-start: 1.5rem;
  padding-block-start: 0.5rem;
}

.team__social-link {
  align-items: center;
  color: var(--body-color, #212529);
  display: inline-flex;
  justify-content: center;
  text-decoration: none;
  transition: color 0.3s ease, opacity 0.3s ease;
}

.team__social-link svg {
  block-size: 2rem;
  inline-size: 2rem;
}

.team__social-link:hover {
  color: var(--primary-color, #4285F4);
  opacity: 0.8;
}

/* ============================================
   CTA Wrapper
   ============================================ */

.team__cta-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  padding-block-start: 3rem;
}

.team__cta-wrapper--visible {
  opacity: 1;
}

/* ============================================
   Alignment Modifiers
   ============================================ */

.team--align-left .team__pretitle,
.team--align-left .team__title,
.team--align-left .team__description {
  text-align: start;
}

.team--align-left .team__description {
  margin-inline: 0;
}

.team--align-left .team__item {
  text-align: start;
}

.team--align-left .team__social {
  justify-content: flex-start;
}

.team--align-centered .team__item {
  text-align: center;
}

.team--align-centered .team__social {
  justify-content: center;
}

/* ============================================
   Presentation 1 — Standard (grid cards)
   ============================================ */

.team.presentation1 .team__grid {
  grid-template-columns: repeat(3, 1fr);
}

/* ============================================
   Presentation 2 — Boxed (cards with border)
   ============================================ */

.team.presentation2 .team__grid {
  grid-template-columns: repeat(3, 1fr);
}

.team.presentation2 .team__item {
  border: 0.0625rem solid rgba(128, 128, 128, 0.3);
  border-radius: 0.75rem;
  box-shadow: 0 0.125rem 0.5rem rgba(128, 128, 128, 0.15);
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.team.presentation2 .team__item:hover {
  box-shadow: 0 0.5rem 1.5rem rgba(128, 128, 128, 0.25);
  transform: translateY(-4px);
}

.team.presentation2 .team__image-wrapper {
  border-radius: 0;
  margin-block-end: 0;
}

.team.presentation2 .team__content {
  padding: 1.5rem;
}

.team.presentation2.team--img-rounded .team__image-wrapper {
  border-radius: 0.5rem;
}

.team.presentation2.team--img-square .team__item {
  border-radius: 0;
}

.team.presentation2.team--img-square .team__image-wrapper {
  border-radius: 0;
}

/* Circled images inside boxed cards need spacing */
.team.presentation2.team--img-circled .team__image-wrapper {
  border-radius: 50%;
  margin: 1.5rem 1.5rem 0;
}

/* Dark schema: solid white cards (like testimonials) */
.team.presentation2.dark .team__item {
  --body-color: var(--light-body-color, #212529);
  background-color: var(--light-background, #fff);
}

/* ============================================
   Presentation 3 — Horizontal (image left, content right)
   ============================================ */

.team.presentation3 .team__grid {
  gap: 3rem;
  grid-template-columns: 1fr;
}

.team.presentation3 .team__item {
  align-items: center;
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr 2fr;
  text-align: start;
}

.team.presentation3 .team__image-wrapper {
  margin-block-end: 0;
}

.team.presentation3 .team__social {
  justify-content: flex-start;
}

/* Override alignment for P3 — always left-aligned */
.team.presentation3.team--align-centered .team__item {
  text-align: start;
}

.team.presentation3.team--align-centered .team__social {
  justify-content: flex-start;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 64rem) {
  .team.presentation1 .team__grid,
  .team.presentation2 .team__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .team.presentation3 .team__item {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .team.presentation3 .team__social {
    justify-content: center;
  }

  .team.presentation3.team--align-left .team__item {
    text-align: start;
  }

  .team.presentation3.team--align-left .team__social {
    justify-content: flex-start;
  }

  .team.presentation3 .team__image-wrapper {
    margin-inline: auto;
    max-inline-size: 24rem;
  }
}

@media (max-width: 48rem) {
  .team {
    padding-block: 3rem;
    padding-inline: 1.5rem;
  }

  .team__title {
    font-size: var(--h2-font-size, 2rem);
  }

  .team__grid {
    gap: 2rem;
  }

  .team.presentation1 .team__grid,
  .team.presentation2 .team__grid {
    grid-template-columns: 1fr;
  }

  .team.presentation3 .team__item {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .team.presentation3 .team__social {
    justify-content: center;
  }

  .team.presentation3.team--align-left .team__item {
    text-align: start;
  }

  .team.presentation3.team--align-left .team__social {
    justify-content: flex-start;
  }

}

/* ============================================
   Team Member Overlay
   ============================================ */

.team__item--has-bio {
  cursor: pointer;
}

.team__bio-data {
  display: none;
}

.team-overlay {
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  visibility: hidden;
  z-index: 1100;
}

.team-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.team-overlay__backdrop {
  background-color: rgba(0, 0, 0, 0.6);
  inset: 0;
  opacity: 0;
  position: absolute;
  transition: opacity 0.3s ease;
}

.team-overlay.is-active .team-overlay__backdrop {
  opacity: 1;
}

.team-overlay__panel {
  --body-color: #374151;
  --link-color: #4285F4;
  --link-hover-color: #3367D6;
  background-color: #fff;
  block-size: 100%;
  display: flex;
  flex-direction: column;
  inline-size: 100%;
  inset-block-start: 0;
  inset-inline-end: 0;
  max-inline-size: 32rem;
  overflow: hidden;
  position: fixed;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.team-overlay.is-active .team-overlay__panel {
  transform: translateX(0);
}

.team-overlay__close {
  align-items: center;
  background-color: #fff;
  block-size: 2.5rem;
  border: 0.0625rem solid rgba(128, 128, 128, 0.2);
  border-radius: 50%;
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.1);
  color: #374151;
  cursor: pointer;
  display: flex;
  flex-shrink: 0;
  font-size: 1.5rem;
  inline-size: 2.5rem;
  inset-block-start: 1rem;
  justify-content: center;
  line-height: 1;
  margin-block-start: 1rem;
  margin-inline-end: 1rem;
  margin-inline-start: auto;
  position: sticky;
  z-index: 1;
}

.team-overlay__close:hover {
  background-color: #F3F4F6;
}

.team-overlay__content {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-block-size: 0;
  overflow: hidden;
  padding: 0 2rem 2rem;
}

.team-overlay__image {
  margin-block-end: 1.5rem;
}

.team-overlay__photo {
  aspect-ratio: 1 / 1;
  block-size: auto;
  border-radius: 50%;
  display: block;
  inline-size: 10rem;
  object-fit: cover;
}

.team-overlay__name {
  color: #0F172A;
  font-family: var(--primary-font, "Inter", sans-serif);
  font-size: var(--h3-font-size, 1.5rem);
  font-weight: 700;
  line-height: 1.3;
  margin-block-end: 0.25rem;
}

.team-overlay__position {
  color: #6B7280;
  font-size: var(--p-font-size, 1rem);
  font-weight: 500;
  margin-block-end: 1rem;
}

.team-overlay__social {
  display: flex;
  gap: 0.75rem;
  margin-block-end: 1.5rem;
}

.team-overlay__bio {
  color: #374151;
  flex: 1;
  font-size: var(--p-font-size, 1rem);
  line-height: 1.7;
  min-block-size: 0;
  overflow-y: auto;
}

.team-overlay__bio p {
  margin-block-end: 1rem;
}

.team-overlay__bio p:last-child {
  margin-block-end: 0;
}

/* Overlay — Mobile centered panel */
@media (max-width: 48rem) {
  .team-overlay {
    align-items: center;
    display: flex;
    justify-content: center;
  }

  .team-overlay__panel {
    block-size: auto;
    border-radius: 1rem;
    inset: auto;
    max-block-size: 85vh;
    max-inline-size: 90%;
    overflow: hidden;
    position: relative;
    transform: translateY(100vh);
  }

  .team-overlay.is-active .team-overlay__panel {
    transform: translateY(0);
  }
}
