:root {
  --sos-gruen: #61A36F;
  --sos-lila:  #8D4BA4;
  --sos-text:  #283239;
}

/* ============================================================
   GRID – 3/2/1 Layout
============================================================ */
.sos-team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin: 60px 0 40px;
  justify-items: center;

  /* Fullwidth-Fix für Desktop */
  width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
}

/* Tablet: 2 Spalten */
@media (max-width: 1100px) {
  .sos-team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile: 1 Spalte + Zentrierung fixen */
@media (max-width: 650px) {
  .sos-team-grid {
    grid-template-columns: 1fr;
    width: 100% !important;
    margin-left: 0 !important;
    justify-items: center;
  }
}

/* ============================================================
   KARTEN BASIS
============================================================ */
.sos-team-card {
  width: 100%;
  max-width: 320px;
  height: 420px;
  perspective: 1200px;
}

/* Innenbereich mit Flip */
.sos-team-card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform .8s ease;
  border-radius: 26px;
}

/* Flip aktiv */
.sos-team-card.sos-team-card--flipped .sos-team-card-inner {
  transform: rotateY(180deg);
}

/* Vorder- & Rückseite */
.sos-team-card-front,
.sos-team-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 22px;
  text-align: center;
  border-radius: 26px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.18);
}

/* Vorderseite */
.sos-team-card-front {
  cursor: pointer;
}

/* Rückseite */
.sos-team-card-back {
  transform: rotateY(180deg);
  padding-top: 40px;
}

/* ============================================================
   FARBEN
============================================================ */
.sos-team-card--green .sos-team-card-front,
.sos-team-card--green .sos-team-card-back {
  background: var(--sos-gruen);
  color: #fff;
}

.sos-team-card--purple .sos-team-card-front,
.sos-team-card--purple .sos-team-card-back {
  background: var(--sos-lila);
  color: #fff;
}

/* ============================================================
   INHALTSELEMENTE
============================================================ */

/* Icon */
.sos-team-card-icon {
  width: 140px;
  height: 140px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin-bottom: 20px;
}

/* Name */
.sos-team-card-name {
  font-size: 1.4rem;
  font-weight: 600;
  color: #fff;
}

/* Foto Rückseite */
.sos-team-back-photo {
  width: 150px;
  height: 150px;
  background-size: cover !important;
  background-position: center !important;
  border-radius: 16px;
  margin-bottom: 18px;
  box-shadow: 0 6px 20px rgba(0,0,0,.18);
}

/* Text */
.sos-team-back-text {
  font-size: 1rem;
  line-height: 1.6;
  max-height: 160px;
  overflow-y: auto;
  padding: 0 10px;
}

/* Button */
.sos-team-back-button {
  margin-top: 16px;
  padding: 10px 22px;
  border-radius: 999px;
  background: #fff;
  color: var(--sos-lila) !important;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  display: inline-block;
  border: 2px solid var(--sos-lila);
}

.sos-team-back-button:hover {
  opacity:.9;
}

/* Mobile Höhe */
@media (max-width: 600px) {
  .sos-team-card {
    height: 400px;
  }
  .sos-team-back-photo {
    width: 130px;
    height: 130px;
  }
}
/* ============================================================
   ZWANGSZENTRIERUNG MOBILE – FIXT ALLES
============================================================ */
@media (max-width: 650px) {

  /* Grid darf NICHT breiter als der Bildschirm werden */
  .sos-team-grid {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    grid-template-columns: 1fr !important;
    justify-items: center !important;
  }

  /* Jede Karte wird mittig ausgerichtet */
  .sos-team-card {
    margin-left: auto !important;
    margin-right: auto !important;
  }
}
