/* =========================
   Career Forward Event Card
   Namespaced: .cfe-card
   No global resets. WCAG AA+ contrast. Responsive.
   ========================= */

/* Design tokens scoped to this component to avoid collisions */
.cfe-card {
  --cfe-radius: 16px;
  --cfe-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --cfe-text: #0b1f2a;           /* Very dark blue for strong contrast on white */
  --cfe-muted: #324b5a;          /* Muted dark for terms/subheads */
  --cfe-border: #e6edf1;         /* Subtle divider */
  --cfe-bg: #ffffff;             /* Card background (you said the outer blue is handled elsewhere) */
  --cfe-cta-bg: #072a49;         /* Deep navy CTA background for contrast */
  --cfe-cta-bg-hover: #0c3b69;   /* Slightly lighter on hover */
  --cfe-cta-text: #ffffff;       /* CTA text color */
  --cfe-focus: #ffbf47;          /* High-visibility focus ring color (meets contrast on navy) */
}

/* Layout wrapper */
.cfe-card {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 1.2fr;
  gap: 2rem;
  align-items: stretch;
  background: var(--cfe-bg);
  border-radius: var(--cfe-radius);
  box-shadow: var(--cfe-shadow);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  /* The outer light-blue padding/rounded container is yours; this just styles the inner card. */
}

/* Reduce motion where requested */
@media (prefers-reduced-motion: reduce) {
  .cfe-card *,
  .cfe-card *::before,
  .cfe-card *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Image block */
.cfe-card__media {
  margin: 0;
  border-radius: calc(var(--cfe-radius) - 4px);
  overflow: hidden;
  align-self: stretch;
  background: #dbe5ea;
}

.cfe-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;          /* Preserves space to prevent CLS */
  object-fit: cover;
}

/* Content area */
.cfe-card__content {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 1rem;
  color: var(--cfe-text);
  min-width: 0;                  /* Prevent overflow in tight layouts */
}

.cfe-card__title {
  margin: 0;
  font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.75rem);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--cfe-text);
}

/* Meta list (Date/Time) */
.cfe-card__meta {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 0.5rem;
}

.cfe-card__meta-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 0.75rem;
  align-items: baseline;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--cfe-border);
}

.cfe-card__meta-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.cfe-card__meta-term {
  margin: 0;
  font-weight: 700;
  color: var(--cfe-muted);
  white-space: nowrap;
}

.cfe-card__meta-def {
  margin: 0;
}

/* About section */
.cfe-card__about {
  margin-top: 0.25rem;
}

.cfe-card__about-heading {
  margin: 0 0 0.25rem 0;
  font-size: clamp(1.05rem, 0.95rem + 0.3vw, 1.25rem);
  line-height: 1.25;
  font-weight: 700;
  color: var(--cfe-muted);
}

.cfe-card__about-text {
  margin: 0;
  font-size: clamp(1rem, 0.98rem + 0.2vw, 1.15rem);
  line-height: 1.55;
}

/* CTA */
.cfe-card__cta-wrap {
  margin: 0;                     /* Prevent extra white space below the button */
}

.cfe-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0 1.25rem;
  border-radius: 12px;
  background: var(--cfe-cta-bg);
  color: var(--cfe-cta-text);
  text-decoration: none;
  font-weight: 800;
  font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.5rem);
  line-height: 1;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 0 rgba(0,0,0,0.08), inset 0 0 0 1px rgba(255,255,255,0.06);
  transition: transform 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}

/* Hover, focus, active with clear visual states and adequate contrast */
.cfe-card__cta:hover {
  background: var(--cfe-cta-bg-hover);
  text-decoration: none;
}

.cfe-card__cta:focus {
  outline: none;
  box-shadow:
    0 0 0 3px var(--cfe-bg),
    0 0 0 6px var(--cfe-focus);
}

.cfe-card__cta:active {
  transform: translateY(1px);
}

/* Keyboard users get the same focus style on :focus-visible where supported */
.cfe-card__cta:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px var(--cfe-bg),
    0 0 0 6px var(--cfe-focus);
}
a.cfe-card__cta {
    width: calc(100% - 60px);
    margin: 0 30px 0 30px;
}
.cfe-card__cta:hover, .cfe-card__cta:focus {
    color: #036;
    background: #fff;
    border: 1px #036 solid;
}

/* Responsive behavior: stack on narrow viewports */
@media (max-width: 900px) {
  .cfe-card {
    grid-template-columns: 1fr;
    padding: 1rem;
	margin-bottom: 1rem;
    gap: 1rem;
  }

  .cfe-card__media img {
    aspect-ratio: 3 / 2;
  }

  .cfe-card__content {
    grid-template-rows: auto auto auto auto;
  }
}

/* High contrast mode best-effort: let system override colors while keeping focus outline visible */
@media (forced-colors: active) {
  .cfe-card,
  .cfe-card__cta {
    forced-color-adjust: auto;
  }
  .cfe-card__cta:focus,
  .cfe-card__cta:focus-visible {
    outline: 2px solid ButtonText;
    box-shadow: none;
  }
}