/* Wrapper for all cards */
.flipcard-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-bottom:2em;
}

/* Outer card container */
.flip-card {
  width: 220px;
  height: 260px;
  perspective: 1000px; /* required for 3D flip */
  cursor: pointer;
}

/* Inner rotating element */
.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s; /* smooth flip animation */
  transform-style: preserve-3d; /* keeps front/back in 3D space */
  border-radius: 10px; /* rounded corners */
}

/* Flip effect triggered by JS */
.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

/* Front and back sides */
.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden; /* prevents bleed-through */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  padding: 20px; /* spacing inside card */
  border-radius: 10px;
}

/* Front visual style */
.flip-card-front {
  background: #f7f7f7;
  color: #333;
  text-align:center;
}

/* Back visual style */
.flip-card-back {
  background: #0077b6;
  color: white;
  transform: rotateY(180deg);
}
