/* Hintergrund der Seite */
body {
  background-color: #f8f9fc !important;
}

/* Grid-Layout für Zielgruppen-Karten */
.zielgruppen-grid {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  align-items: stretch;
}

/* Flip-Karte: Hülle mit 3D-Perspektive */
.flip-card {
  width: 300px;
  height: 340px;
  perspective: 1200px;
  border-radius: 16px;
  position: relative;
  max-width: 100%;
  flex: 1 1 300px;
  box-sizing: border-box;
}

/* Innenstruktur mit 3D-Effekt */
.flip-inner {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s ease-in-out;
  position: relative;
  text-align: center;
}

/* Flip-Auslösung */
.flip-card:hover .flip-inner {
  transform: rotateY(180deg);
}

/* Vorder- und Rückseite */
.flip-front,
.flip-back {
  position: absolute;
  width: 100%;
  height: 100%;
  padding: 1rem;
  backface-visibility: hidden;
  border: 1px solid #e2e6ea;
  border-radius: 16px;
  background-color: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  font-size: 0.95rem;
  line-height: 1.4;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: box-shadow 0.3s;
}

/* Vorderseite */
.flip-front {
  z-index: 2;
}

.flip-front h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #222;
  margin-bottom: 0.6rem;
}

.flip-front p {
  font-size: 0.95rem;
  color: #555;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Rückseite */
.flip-back {
  transform: rotateY(180deg);
}

.flip-back h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.flip-back ul {
  list-style: none;
  padding-left: 0.5rem;
  margin-top: 0.5rem;
  max-height: 140px;
  overflow-y: auto;
  font-size: 0.9rem;
  color: #444;
  text-align: left;
}

.flip-back li {
  margin-bottom: 0.3rem;
  line-height: 1.3;
}

.flip-back li::before {
  content: "➤ ";
  color: #4466aa;
  font-size: 0.9rem;
  margin-right: 0.3rem;
}

/* Link-Button auf Rückseite */
.btn-link {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background-color: #4466aa;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
}

.btn-link:hover {
  background-color: #335599;
}

/* Farbbalken links an jeder Karte */
.flip-front::before,
.flip-back::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 6px;
  height: 100%;
  background-color: #f6c89f; /* dezentes Orange */
  border-top-left-radius: 16px;
  border-bottom-left-radius: 16px;
}

.flip-front::before {
  transition: background-color 0.3s ease;
}

.flip-card:hover .flip-front::before {
  background-color: #eba76f;
}

/* Responsives Verhalten für kleine Bildschirme */
@media screen and (max-width: 480px) {
  .flip-card {
    width: 90%;
    height: auto;
    margin-bottom: 1.5rem;
    perspective: none;
  }

  .flip-inner {
    height: auto;
    transform: none !important;
    display: block;
  }

  .flip-front,
  .flip-back {
    position: static !important;
    transform: none !important;
    backface-visibility: visible !important;
    height: auto;
    min-height: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 1rem;
  }

  .flip-card:hover .flip-inner {
    transform: none !important;
  }
}
