/* team-Modul — alle Farben aus globalen CSS-Variablen */
.team-page { padding: 3rem 0 4rem; }
.team-page__head { text-align: center; margin-bottom: 2.5rem; }
.team-page__head h1 { margin: 0 0 .5rem; color: var(--color-primary); }
.team-page__lead { color: var(--color-text); opacity: .8; }
.team-page__empty { text-align:center; padding:2rem; color: var(--color-text); opacity: .6; }

.team-block { padding: 2.5rem 0; }
.team-block.is-compact { background: var(--color-secondary); padding: 1.5rem 0; }
.team-block__title {
  text-align: center;
  margin: 0 0 2rem;
  color: var(--color-primary);
}

.team-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(var(--team-cols, 3), 1fr);
}
@media (max-width: 800px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .team-grid { grid-template-columns: 1fr; } }

.team-card {
  background: var(--color-background);
  border: 1px solid color-mix(in srgb, var(--color-text) 10%, transparent);
  border-radius: .6rem;
  padding: 1.5rem 1.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .65rem;
  transition: transform .2s ease, box-shadow .2s ease;
}
.team-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
}

.team-card__photo {
  width: 130px; height: 130px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--color-secondary);
  flex-shrink: 0;
}
.team-card__photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.team-card__placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; font-weight: 600;
  color: var(--color-on-secondary, var(--color-text));
  opacity: .5;
}

.team-card__body {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.team-card__name {
  margin: .35rem 0 0;
  font-size: 1.1rem;
  color: var(--color-text);
}
.team-card__role {
  margin: 0;
  color: var(--color-primary);
  font-weight: 600;
  font-size: .92rem;
}
.team-card__resp {
  margin: .35rem 0 0;
  color: var(--color-text);
  opacity: .8;
  font-size: .9rem;
  line-height: 1.4;
}
.team-card__contact {
  list-style: none; padding: 0; margin: .75rem 0 0;
  display: flex; flex-direction: column; gap: .2rem;
  font-size: .88rem;
}
.team-card__contact a {
  color: var(--color-primary);
  text-decoration: none;
}
.team-card__contact a:hover { text-decoration: underline; }

/* Compact-Variante (kleinere Karten) */
.team-card.is-compact {
  padding: 1rem .75rem;
  gap: .4rem;
}
.team-card.is-compact .team-card__photo {
  width: 80px; height: 80px;
}
.team-card.is-compact .team-card__placeholder { font-size: 2rem; }
.team-card.is-compact .team-card__name { font-size: .95rem; }
.team-card.is-compact .team-card__role { font-size: .82rem; }

/* Klickbare Karte */
.team-card.is-clickable { cursor: pointer; }
.team-card.is-clickable:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 35%, transparent);
}
.team-card.is-clickable:hover .team-card__photo {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary) 18%, transparent);
}
.team-card__photo {
  transition: box-shadow .2s ease;
}
.team-card__more-hint {
  display: inline-block;
  margin-top: .25rem;
  color: var(--color-primary);
  font-size: .8rem;
  font-weight: 600;
  opacity: .85;
}
/* Kontakt-Links: nicht der ganze li klickt das Modal auf, wenn auf den Link geklickt wird */
.team-card__contact a { position: relative; z-index: 2; }

/* ==========================================================
   Modal: großes Foto + alle Details + Bio
   ========================================================== */
.team-modal {
  position: fixed; inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.team-modal.is-open {
  display: flex;
  animation: team-modal-fade .18s ease both;
}
@keyframes team-modal-fade { from { opacity: 0; } to { opacity: 1; } }

.team-modal__overlay {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, .65);
  backdrop-filter: blur(3px);
  cursor: zoom-out;
}
.team-modal__panel {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
  background: var(--color-background);
  color: var(--color-text);
  border-radius: .75rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, .35);
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0;
  animation: team-modal-pop .22s cubic-bezier(.2, .8, .3, 1.1) both;
}
@keyframes team-modal-pop {
  from { opacity: 0; transform: translateY(20px) scale(.96); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}
@media (max-width: 640px) {
  .team-modal { padding: 0; }
  .team-modal__panel {
    grid-template-columns: 1fr;
    border-radius: 0;
    max-width: none;
    height: 100vh;
    max-height: none;
  }
}

.team-modal__close {
  position: absolute;
  top: .5rem; right: .5rem;
  width: 36px; height: 36px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  z-index: 3;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s ease, transform .15s ease;
}
.team-modal__close:hover { background: rgba(0, 0, 0, .8); transform: rotate(90deg); }
.team-modal__close:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 50%, transparent);
}

.team-modal__photo {
  width: 100%;
  background: var(--color-secondary);
  overflow: hidden;
  position: relative;
  text-align: center;
}
/* Ticket #112: Foto in der Großansicht unbeschnitten / in Originalproportion
   zeigen („1:1") — nicht mehr auf ein Quadrat zuschneiden (object-fit:cover). */
.team-modal__photo img {
  display: block;
  width: auto; height: auto;
  max-width: 100%; max-height: 70vh;
  margin: 0 auto;
}
.team-modal__photo.is-placeholder {
  aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 6rem; font-weight: 700;
  color: var(--color-on-secondary, var(--color-text));
  opacity: .35;
}
@media (max-width: 640px) {
  .team-modal__photo img { max-height: 55vh; }
  .team-modal__photo.is-placeholder { aspect-ratio: 4 / 3; }
}

.team-modal__body {
  padding: 1.75rem 1.75rem 2rem;
  display: flex;
  flex-direction: column;
  gap: .85rem;
}
.team-modal__name {
  margin: 0;
  font-size: 1.6rem;
  color: var(--color-primary);
  line-height: 1.2;
}
.team-modal__role {
  margin: 0;
  color: var(--color-text);
  opacity: .8;
  font-size: 1rem;
}
.team-modal__resp-block,
.team-modal__bio-block {
  margin-top: .25rem;
}
.team-modal__resp-block h3,
.team-modal__bio-block h3 {
  margin: 0 0 .35rem;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-primary);
  opacity: .9;
}
.team-modal__resp-block p,
.team-modal__bio-block p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.55;
  color: var(--color-text);
}
.team-modal__bio-block p {
  font-size: .96rem;
}
.team-modal__contact {
  list-style: none;
  margin: .5rem 0 0;
  padding: .85rem 0 0;
  border-top: 1px solid color-mix(in srgb, var(--color-text) 12%, transparent);
  display: flex;
  flex-direction: column;
  gap: .3rem;
  font-size: .92rem;
}
.team-modal__contact a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
}
.team-modal__contact a:hover { text-decoration: underline; }
