/* static/css/card.css */

/* === Flipcard Link Style === */
.flipcard-link {
  text-decoration: none;
}

/* === Flipcard Container === */
.flipcard-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 150px;
  perspective: 1000px;
  border: 1px solid #ccc;
  box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.2);
  padding: 5px;
  margin: 0;
  background: white;
  border-radius: 20px;
  overflow: hidden;
}

/* === Flip Animation Wrapper === */
.flipcard-inner {
  position: relative;
  width: 100%;
  height: 154px;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.flipcard-container:hover .flipcard-inner {
  transform: rotateY(180deg);
}

/* === Front and Back Images === */
.flipcard-front,
.flipcard-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
}

.flipcard-back {
  transform: rotateY(180deg);
}

/* === Title Under the Card === */
.flipcard-title {
  text-align: center;
  margin-top: 10px;
  font-weight: bold;
  color: #333;
}

/* === Flipcard Grid (Flexbox Layout) === */
.flipcard-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 10rem;
  padding: 2rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* === Space between multiple grid rows === */
.flipcard-grid + .flipcard-grid {
  margin-top: 2rem;
}
