.team-7 {

  .team-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    position: relative;
    background-color: var(--surface-color);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    height: 100%;

    &:hover {
      transform: translateY(-10px);

      .team-overlay {
        opacity: 1;
        visibility: visible;
      }

      .team-social a {
        transform: translateY(0);
        opacity: 1;
      }
    }
  }

  .team-image {
    position: relative;
    overflow: hidden;

    img {
      transition: transform 0.6s;
      width: 100%;
      aspect-ratio: 1/1;
      object-fit: cover;
    }
  }

  .team-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: color-mix(in srgb, var(--accent-color), transparent 20%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;

    p {
      color: var(--contrast-color);
      text-align: center;
      margin-bottom: 1.5rem;
      font-size: 0.95rem;
      line-height: 1.5;
    }
  }

  .team-social {
    display: flex;
    justify-content: center;
    gap: 15px;

    a {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 40px;
      height: 40px;
      border-radius: 50%;
      background: var(--contrast-color);
      color: var(--accent-color);
      font-size: 1rem;
      transform: translateY(20px);
      opacity: 0;
      transition: all 0.3s ease;
      border: 1px solid color-mix(in srgb, var(--contrast-color), transparent 80%);

      &:hover {
        background: var(--accent-color);
        color: var(--contrast-color);
      }
    }
  }

  .team-content {
    padding: 1.5rem;
    text-align: center;

    h4 {
      margin-bottom: 0.5rem;
      font-size: 1.25rem;
      font-weight: 700;
    }

    .position {
      display: inline-block;
      padding: 0.35rem 1rem;
      background-color: color-mix(in srgb, var(--accent-color), transparent 85%);
      border-radius: 30px;
      font-size: 0.875rem;
      color: var(--accent-color);
      font-weight: 500;
    }
  }

  @media (max-width: 767.98px) {
    .team-card {
      margin-bottom: 1.5rem;
    }

    .team-content {
      padding: 1.25rem;

      h4 {
        font-size: 1.125rem;
      }
    }
  }
}

/* ============================================================
   Active Members List
   ============================================================ */
.members-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.member-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  background: var(--surface-color);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  border-left: 3px solid color-mix(in srgb, var(--accent-color), transparent 70%);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;

  &:hover {
    border-left-color: var(--accent-color);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  }
}

.member-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--heading-color);
  flex: 1 1 auto;
  min-width: 140px;
}

.member-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  flex-shrink: 0;
}

.member-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.22rem 0.6rem;
  border-radius: 20px;
  letter-spacing: 0.01em;
  white-space: nowrap;
  line-height: 1.4;

  i {
    font-size: 0.7rem;
  }
}

/* Green — years of service */
.tag-years {
  background: #d1fae5;
  color: #065f46;
}

/* Green — months of service (junior members) */
.tag-months {
  background: #d1fae5;
  color: #065f46;
}

/* Orange — certification (EMR / EMT / MEDIC) */
.tag-cert {
  background: #ffedd5;
  color: #9a3412;
}

/* Gold — life member */
.tag-life {
  background: #fef3c7;
  color: #92400e;
}

/* Blue — 50-year life member */
.tag-fifty-year {
  background: #dbeafe;
  color: #1e40af;
}

/* Red — ex-chief */
.tag-ex-chief {
  background: #fee2e2;
  color: #991b1b;
}

/* Slate — military leave */
.tag-military {
  background: #e0e7ff;
  color: #3730a3;
}

@media (max-width: 575.98px) {
  .member-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .member-name {
    min-width: unset;
  }
}