/* ============================================================
   Gemeinsam fuer Team-Mosaic und Team-Raster: Profil-Lightbox
   (nativer <dialog>, Inhalt aus dem <template> des Mitarbeiters,
   siehe php/team-profile.php und blocks/team-mosaic/view.js).

   Elemente: jp-team-dialog (__close __body)
             jp-team-profile (__photo __text __name __role __bio
                              __details __ctas __btn)
   ============================================================ */
.jp-team-dialog {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  margin: auto;
  padding: 0;
  overflow-y: auto;
  border: 0;
  background: var(--wp--preset--color--ivory);
  color: var(--wp--preset--color--graphite);
}
.jp-team-dialog::backdrop {
  background: rgba(3, 24, 42, 0.88);
  backdrop-filter: blur(8px);
}
@media (max-width: 640px) {
  .jp-team-dialog {
    max-width: calc(100% - 2rem);
  }
}
.jp-team-dialog__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(250, 248, 244, 0.9);
  color: var(--wp--preset--color--primary);
  font-size: 1.3rem;
  cursor: pointer;
}
.jp-team-dialog__close:hover {
  background: var(--wp--preset--color--accent);
}

.jp-team-profile__photo {
  aspect-ratio: 4/3;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--wp--preset--color--primary) 0%, var(--wp--preset--color--primary-deep) 100%);
  color: var(--wp--preset--color--accent);
  font-family: var(--wp--preset--font-family--source-serif);
  font-size: 4rem;
  font-weight: 300;
}
.jp-team-profile__photo img {
  aspect-ratio: 1/1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}
.jp-team-profile__text {
  padding: 2rem 2.25rem 2.25rem;
}
.jp-team-profile__name {
  margin: 0 0 0.25rem;
  color: var(--wp--preset--color--primary);
  font-family: var(--wp--preset--font-family--source-serif);
  font-size: 1.9rem;
  font-weight: 400;
}
.jp-team-profile__role {
  margin-bottom: 1.5rem;
  color: var(--wp--preset--color--accent);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.jp-team-profile__bio {
  margin-bottom: 1.75rem;
  font-size: 0.95rem;
  line-height: 1.65;
}
.jp-team-profile__bio > :first-child {
  margin-top: 0;
}
.jp-team-profile__bio > :last-child {
  margin-bottom: 0;
}
.jp-team-profile__details {
  display: grid;
  gap: 0.7rem;
  margin: 0 0 1.75rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--wp--preset--color--mist);
  border-bottom: 1px solid var(--wp--preset--color--mist);
}
.jp-team-profile__details > div {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.92rem;
}
.jp-team-profile__details dt {
  min-width: 5rem;
  color: var(--wp--preset--color--stone);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.jp-team-profile__details dd {
  margin: 0;
}
.jp-team-profile__details a {
  color: var(--wp--preset--color--primary);
  font-weight: 500;
  text-decoration: none;
}
.jp-team-profile__details a:hover {
  color: var(--wp--preset--color--accent);
}
.jp-team-profile__ctas {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.jp-team-profile__btn {
  flex: 1 1 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--wp--preset--color--primary);
  color: var(--wp--preset--color--primary);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}
.jp-team-profile__btn.is-primary {
  background: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--ivory);
}
.jp-team-profile__btn:hover {
  border-color: var(--wp--preset--color--accent);
  background: var(--wp--preset--color--accent);
  color: var(--wp--preset--color--primary-deep);
}

body.jp-modal-open {
  overflow: hidden;
}