/* card.css — version 1.2.3 (head-aware, verified for cards_block.html v1.2.3) */

/* Base card variables */
.card {
  --card-bg: #fff;
  --card-text: #333;
  --card-title: #111;
  --card-border: #e5e7eb;
  --card-radius: 8px;
  --card-shadow: 0 4px 6px rgba(0,0,0,0.1);

  max-width: 300px;
  background: var(--card-bg);
  color: var(--card-text);
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Hover lift */
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 12px rgba(0,0,0,0.15);
}

/* Card image */
.card__img {
  width: 100%;
  height: auto;
  display: block;
}

/* Content wrapper */
.card__content {
  padding: 16px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

/* Title text */
.card__title {
  margin: 0 0 20px 0;
  font-size: 1.5rem;
  color: var(--card-title);
  display: flex;
  align-items: center;
  justify-content: center;   /* centers icon + text as a group */
  text-align: center;        /* ensures text itself is centered */
  gap: 12px;
}

.program-icon {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* Price display */
.card__price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 4px 0 8px 0;
}
.card__price-value {
  font-size: 1.125rem;
  font-weight: 700;
}
.card__price-suffix {
  font-size: 0.875rem;
  opacity: 0.85;
}

/* Card body text */
.card__text {
  margin: 0 0 16px 0;
  color: inherit;
  flex-grow: 1;
  line-height: 1.5;
}

/* CTA buttons */
.card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.card__button {
  align-self: flex-start;
  padding: 10px 16px;
  background: #007BFF;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  border: 1px solid transparent;
}
.card__button:hover {
  background: #0056b3;
}
.card__button.secondary {
  background: transparent;
  color: #007BFF;
  border-color: #007BFF;
}
.card__button.secondary:hover {
  color: #0056b3;
  border-color: #0056b3;
}

/* Badge */
.card__badge {
  position: absolute;
  top: 10px;
  right: 10px;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 9999px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Section wrapper (applied via CMS Cards Head) */
.cards-section {
  position: relative;
  padding-top: 2rem;
  padding-bottom: 2rem;
  background-color: var(--cards-section-bg, transparent);
  background-size: cover;
  background-position: center;
}

/* Section heading block */
.cards-section h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 2rem;
  text-align: center;
}
.cards-section p {
  font-size: 1rem;
  color: #374151;
  text-align: center;
  margin-bottom: 2.5rem;
  line-height: 1.6;       /* optional: improves readability for multi-line text */

}

/* ------------------ SIZE PRESETS ------------------ */
.card--sm { max-width: 260px; }
.card--md { max-width: 300px; } /* default */
.card--lg { max-width: 360px; height: 420px; }
.card--xl { max-width: 420px; height: 480px; }

/* Equal height helper */
.cards--equal .card { height: 420px; }

/* ------------------ Responsive ------------------ */
@media (max-width: 640px) {
  .card,
  .card--sm,
  .card--md,
  .card--lg,
  .card--xl {
    max-width: 100%;
    height: auto;
  }
}

/* ------------------ Background-image overlay safety ------------------ */
.card__content[data-has-bg="1"] {
  background-color: rgba(255, 255, 255, 0.9);
}
.card__content[data-has-bg="1"] .card__title { color: #111; }
.card__content[data-has-bg="1"] .card__text  { color: #333; }

/* Optional accent hover based on accent_class */
.card.accent-blue:hover { box-shadow: 0 6px 14px rgba(0, 123, 255, 0.25); }
.card.accent-green:hover { box-shadow: 0 6px 14px rgba(34, 197, 94, 0.25); }
.card.accent-yellow:hover { box-shadow: 0 6px 14px rgba(251, 191, 36, 0.25); }
.card.accent-red:hover { box-shadow: 0 6px 14px rgba(239, 68, 68, 0.25); }
