/* Team Section */
.team {
  background: var(--color-dark);
  padding: clamp(60px, 8vw, 100px) 0;
}

/* Top: large hero photo + text */
.team__top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-lg);
  align-items: center;
  margin-bottom: 32px;
}

.team__hero {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 3px solid var(--color-accent);
}

.team__hero:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.team__hero img {
  width: 100%;
  height: auto;
  display: block;
}

.team__content {
  padding: 20px 0;
}

.team__title {
  font-family: var(--font-heading);
  font-size: var(--fs-h2);
  color: var(--color-white);
  margin-bottom: 24px;
}

.team__text {
  font-size: var(--fs-body);
  color: var(--color-text-light);
  line-height: 1.8;
  margin-bottom: 32px;
}

.team__stats {
  display: flex;
  gap: 40px;
}

.team__stat {
  text-align: center;
}

.team__stat-number {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
}

.team__stat-label {
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  margin-top: 8px;
}

/* Bottom: team photo cards in one row */
.team__thumbs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.team__card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.team__card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-accent);
}

.team__card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Team Lightbox */
.team-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.team-lightbox.active {
  opacity: 1;
  visibility: visible;
}

.team-lightbox__content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-lightbox__img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-lg);
  user-select: none;
  -webkit-user-drag: none;
}

.team-lightbox__close {
  position: absolute;
  top: -44px;
  right: 0;
  width: 36px;
  height: 36px;
  color: var(--color-white);
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s;
  z-index: 2;
}

.team-lightbox__close:hover {
  opacity: 0.7;
}

.team-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  color: var(--color-white);
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  transition: all 0.3s;
  z-index: 1;
}

.team-lightbox__nav:hover {
  background: rgba(0, 0, 0, 0.8);
}

.team-lightbox__prev { left: -60px; }
.team-lightbox__next { right: -60px; }

.team-lightbox__counter {
  position: absolute;
  bottom: -36px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--fs-small);
}

/* Responsive */
@media (max-width: 968px) {
  .team__top {
    grid-template-columns: 1fr;
    gap: var(--gap-md);
  }

  .team__hero {
    max-width: 400px;
    margin: 0 auto;
  }

  .team__content {
    text-align: center;
  }

  .team__stats {
    justify-content: center;
  }

  .team__thumbs {
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
  }
}

@media (max-width: 768px) {
  .team__thumbs {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .team__card {
    border-radius: var(--radius);
  }

  .team__stats {
    gap: 24px;
  }

  .team-lightbox__img {
    max-width: 90vw;
    border-radius: var(--radius);
  }

  .team-lightbox__close {
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    width: 40px;
    height: 40px;
  }

  .team-lightbox__nav {
    width: 36px;
    height: 36px;
    font-size: 1.5rem;
  }

  .team-lightbox__prev { left: 8px; }
  .team-lightbox__next { right: 8px; }
}

@media (max-width: 480px) {
  .team__hero {
    max-width: 100%;
  }

  .team__stats {
    flex-direction: column;
    gap: 24px;
  }
}
