/* --------------------
   Grid layout
-------------------- */
.flip-card-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr; /* stacked by default */
}

@media (min-width: 768px) {
  .flip-card-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columns on medium and up */
  }
}

/* --------------------
   Card container
-------------------- */
.flip-card {
  background: #003962; /* card background */
  color: white;         /* text color */
  border-radius: 12px;
  padding: 0 20px;
  box-sizing: border-box;
  width: 100%;
  box-shadow: 0 4px 2px rgba(0, 0, 0, 0.15);
  height: 100%;
}

.flip-card.light {
	background: #0472B7; /* card background light blue */
}

/* --------------------
   Card front content
-------------------- */
.flip-card-front {
  display: flex;
  flex-direction: row; 
  align-items: end;
  justify-content: flex-start;
  align-items: stretch;
  height: 100%;
}

/* --------------------
   Text section
-------------------- */
.card-text {
   padding: 15px 0;
}

.card-text h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 0.5em;
  color: white;
  line-height: 24px;
}

.card-text p {
  color: white;
  font-size: 16px;
  line-height: 20px;
  margin-bottom: 8px;
}

.card-text p.login-info {
  font-size: 15px;
  line-height: 17px;
}


.card-text p.bottom-link {
  font-size: 12px;
  line-height: 20px;
  font-weight: 400;
}


/* --------------------
   Image section
-------------------- */
.card-image {
	display: flex; 
  align-items: flex-end;
}
.card-image img {
  max-width: 140px;
  height: auto;
  margin-top: 15px; /* spacing for stacked layout */
  object-fit: contain;
  max-height: 140px;
}

/* --------------------
   Large screens: side-by-side layout
-------------------- */

@media (min-width: 992px) and (max-width: 1400px) {
  body.path-frontpage .col-lg-8 {
    flex: 0 0 auto;
    width: 82.666667%;
  }
}

@media (min-width: 1200px) {
  .flip-card-front {
    flex-direction: row; /* text left, image right */
    justify-content: space-between;
  }

  .card-text {
    flex: 1; /* take remaining width */
  }

  .card-image {
    flex: 0 0 auto; /* image stays fixed width */
    margin-top: 0;
    margin-left: 20px; /* spacing between text and image */
  }
}

/* -----------------------------
   Small screens: centered look
-------------------------------- */

@media (max-width: 450px) {
  body.path-frontpage .flip-card-front {
    display:block;
    text-align: center;
  }
}
