/* Container sizing and 3D perspective */
.level-card-wrap {
  display: flex;
  gap: 15px;
  width: 100%;
  /*max-width: 350px;*/ /* Adjust maximum width as needed */
  height: 450px;    /* Adjust height to fit your text perfectly */
  perspective: 1000px;
  margin: 15px auto;
  font-family: system-ui, -apple-system, sans-serif;
}

/* The card wrapper that executes the 3D rotation */
.level-card {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

/* JavaScript will toggle this class to flip the card */
.level-card.is-flipped {
  transform: rotateY(180deg);
}

/* Shared structural styles for both Front and Back faces */
.level-card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden; /* Safari support */
  backface-visibility: hidden;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  padding: 28px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Front Face Layout */
.level-card-front {
  justify-content: space-between;
}

/* Back Face Layout (Pre-rotated 180 degrees) */
.level-card-back {
  transform: rotateY(180deg);
  justify-content: space-between;
  background-color: #f8fafc; /* Subtle grey background for the back */
}

/* Content Typography & Component Styling */
.level-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #64748b;
  text-transform: uppercase;
}

.level-card h3 {
  font-size: 2rem;
  margin: 12px 0;
  color: #0f172a;
  font-weight: 800;
}

.level-card p {
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: auto; /* Pushes content up, keeping button at bottom */
}

/* Financial data container on back side */
.financial-placeholder {
  margin: 15px 0 auto;
  text-align: left;
}

.financial-placeholder strong {
  display: block;
  margin-bottom: 8px;
  color: #1e293b;
  font-size: 0.9rem;
}

.financial-placeholder ul {
  padding-left: 20px;
  margin: 0;
  color: #475569;
  font-size: 0.85rem;
}

.financial-placeholder li {
  margin-bottom: 6px;
}

/* Button UI skeleton (matches your bootstrap-style classes) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.btn-outline {
  background: transparent;
  border: 1px solid #3b82f6;
  color: #3b82f6;
}

.btn-outline:hover {
  background-color: #3b82f6;
  color: #ffffff;
}
