/* ── Team Popup ─────────────────────────────────────────────────────────────── */

.team-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(20, 18, 14, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.team-popup-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.team-popup {
  position: relative;
  background: var(--bg-primary, #F5F2ED);
  border: 1px solid rgba(176, 141, 87, 0.2);
  border-radius: 16px;
  display: flex;
  gap: 0;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 32px 80px rgba(0,0,0,0.25);
}

.team-popup-overlay.is-open .team-popup {
  transform: translateY(0) scale(1);
}

/* ── Photo panel ── */
.team-popup-photo {
  width: 360px;
  flex-shrink: 0;
  background: #2C3E50 center top / cover no-repeat;
  position: relative;
}

.team-popup-photo-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-popup-photo-placeholder svg {
  width: 80px;
  height: 80px;
  opacity: 0.25;
}

/* ── Content panel ── */
.team-popup-content {
  flex: 1;
  padding: 40px 36px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.team-popup-role {
  font-family: var(--font-body, sans-serif);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #B08D57;
}

.team-popup-name {
  font-family: var(--font-heading, serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary, #1a1814);
  line-height: 1.15;
  margin: 0;
}

.team-popup-divider {
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, #B08D57, #d4b07a);
  border: none;
  margin: 0;
}

.team-popup-bio {
  font-family: var(--font-body, sans-serif);
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-secondary, #5a5550);
  flex: 1;
}

/* ── Close button ── */
.team-popup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(176,141,87,0.3);
  background: var(--bg-primary, #F5F2ED);
  color: var(--text-primary, #1a1814);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
  z-index: 1;
}

.team-popup-close:hover {
  background: #B08D57;
  border-color: #B08D57;
  color: #fff;
}

/* ── Dark mode ── */
html[data-theme="dim"] .team-popup {
  background: #1e1c18;
  border-color: rgba(176,141,87,0.25);
}

html[data-theme="dim"] .team-popup-name  { color: #e8e2d8; }
html[data-theme="dim"] .team-popup-bio   { color: rgba(232,226,216,0.7); }
html[data-theme="dim"] .team-popup-close { background: #1e1c18; color: #e8e2d8; }

/* ── Clickable card ── */
.about-team-card { cursor: pointer; }

.about-team-card:focus-visible {
  outline: 2px solid #B08D57;
  outline-offset: 3px;
}

/* ── Tablet: schmaleres Foto-Panel ── */
@media (max-width: 720px) {
  .team-popup { max-width: 100%; }

  .team-popup-photo { width: 260px; }
}

/* ── Mobile ── */
@media (max-width: 560px) {
  .team-popup {
    flex-direction: column;
    max-height: 88vh;
  }

  .team-popup-photo {
    width: 100%;
    height: 260px;
  }

  .team-popup-content {
    padding: 28px 24px;
  }

  .team-popup-name { font-size: 1.6rem; }
}
