/* Algemeen container */
.matrix-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-family: Arial, sans-serif;
  margin: 20px 0;
  position: relative;
}

/* Kaarten styling */
.matrix-card {
  flex: 1 1 45%;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  background-color: #f9f9f9;
  margin-bottom: 40px;
  box-sizing: border-box;
  transition: transform 0.4s ease, box-shadow 0.4s ease, opacity 0.4s ease;
  cursor: default;
  opacity: 0;
  transform: translateY(20px);
}

/* Kaarten in view scroll-animatie */
.matrix-card.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Hover effecten kaarten */
.matrix-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* Kaart header en iconen */
.card-header {
  font-size: 1.3em;
  font-weight: bold;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.card-header .icon {
  display: inline-block;
  margin-right: 8px;
  transition: transform 0.3s ease;
}

.matrix-card:hover .card-header {
  transform: scale(1.05);
}

.matrix-card:hover .icon {
  transform: scale(1.2);
  animation: pulse 1s infinite alternate;
}

@keyframes pulse {
  0% { transform: scale(1.2); }
  100% { transform: scale(1.25); }
}

/* Flow-pijltjes binnen kaart */
.card-flow {
  font-size: 1em;
  margin: 6px 0 10px 0;
  color: rgba(0,0,0,0.4);
  text-align: center;
}

/* Evenwaardigheid accent */
.matrix-card.evenwaardigheid {
  border-left: 5px solid #00a6a0;
  background-color: #a8dadc;
}

/* Kleuren per begrip */
.matrix-card.vrijheid { background-color: #d0ebff; }
.matrix-card.liefde { background-color: #ffd6d6; }
.matrix-card.kwaliteit { background-color: #d6ffd6; }

/* Card secties */
.card-section {
  margin: 10px 0;
  line-height: 1.5;
}

/* Toggle lange tekst */
.full-text {
  display: none;
}
.toggle-text {
  background: none;
  border: none;
  color: #0077cc;
  cursor: pointer;
  padding-left: 5px;
  font-size: 0.9em;
}

/* Doorlopende cyclus lijn */
.cycle-line {
  position: absolute;
  top: 50%;
  left: 0;
  pointer-events: none;
}

/* Hover effect voor lijn */
.matrix-cards.cycle .matrix-card:hover ~ .cycle-line line {
  stroke: #00a6a0; 
  stroke-width: 3;
  transition: stroke 0.3s, stroke-width 0.3s;
}

/* Responsive: kaarten stapelen en lijn verbergen op mobiel */
@media (max-width: 768px) {
  .matrix-card {
    flex: 1 1 100%;
  }
  .cycle-line {
    display: none;
  }
}
