/* Simple overlay + modal behavior (keeps your existing classes intact) */
.team-profiles-overlay {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9998;
  background: rgba(0,0,0,0.85);
}

.team-profiles-overlay.is-active {
  display: block;
}

.team-profiles-modal.is-active {
  display: block;
}

.team-profiles-lock {
  overflow: hidden;
}

.team-profiles-grid {
  display: flex;
  gap: 16px;
  justify-items: center;
  flex-flow: row;
  flex-wrap: wrap;

  .profile-card{
      padding: 0 !important;
      text-align: center;
      max-width: 238px;
      width: 100%;
    
      .profile-header.ekit-team-img.ekit-img-overlay.ekit-team-img-block {
          padding: 0;
          margin: 0;

          img.attachment-full.size-full {
              width: 100% !important;
              height: auto;
          }
      }

      a.ekit-team-popup.team-profiles-open {
          font-family : "kepler-std-display";
          font-size: 22px;
          font-weight: 500;
          line-height: 24px;
          color: rgb(65, 61, 56) !important;
      }

      .profile-tag-title {
          font-family: "kepler-std-display";
          font-size: 14px;
          font-weight: 400;
          font-style: normal;
          color: rgb(65, 61, 56) !important;
          margin-bottom: 0px;
    }
  }
}


/* Card: show the selected team/tag label */
.profile-tag-title {
  margin: 6px 0 0;
}

/* Modal*/
.team-profiles-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow: auto;
  padding: 40px 20px;
}

.team-profiles-modal .modal-dialog {
  max-width: 900px;
  margin: auto;
  top: 0;
  bottom: 0;
  position: fixed;
  left: 0;
  right: 0;
  height: fit-content;

  .modal-body{
    h2.ekit-team-modal-title {
      font-family: "kepler-std-display";
      font-size: 44px;
      font-weight: 500;
      line-height: 50px;
    }
    p.profile-tag-title{
      font-family: "kepler-std";
      font-size: 18px !important;
      font-weight: 400;
      font-style: italic;
      line-height: 22px;
      padding-bottom: 2rem;
    }
    .ekit-team-modal-content, ul.ekit-team-modal-list {
      box-sizing: border-box;
      color: rgb(65, 61, 56);
      cursor: auto;
      display: block;
      font-family: "kepler-std";
      font-weight: 400;
      font-size: 18px !important;
      margin-bottom: 22px;
      text-align: left;
      text-size-adjust: 100%;
      -webkit-font-smoothing: antialiased;
    }
  }
}





@media (max-width: 1100px) {

  .team-profiles-grid {
    justify-content: center;
  }
}

@media (max-width: 600px) {
  button.team-profiles-back {
      position: absolute;
      right: 20px;
      top: auto;
      bottom: 20px;
      left: 20px;
  }

}