/* Card Container Layout */
.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Accessible Card Wrapper */
.accessible-card {
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  border-radius: 8px;
  text-decoration: none; /* Removes default underline from the entire card */
  color: #222222; /* High contrast body text */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Card Content Padding */
.card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Headings */
.card-title {
  font-size: 1.5rem;
  margin: 0 0 12px 0;
  color: #111111;
  line-height: 1.3;
}

/* FIX 1: Enhanced Colour Contrast for the Date (WCAG AA Compliant) */
.card-date {
  font-size: 0.9rem;
  color: #595959; /* Darker grey to meet the minimum 4.5:1 contrast ratio against white */
  margin-bottom: 16px;
  display: block;
}

/* Body Excerpt Text */
.card-excerpt {
  font-size: 1rem;
  line-height: 1.6;
  color: #333333;
  margin: 0 0 20px 0;
}

/* FIX 2 & 3: Single, Descriptive Call to Action */
.card-link-text {
  margin-top: auto; /* Pushes the link text to the bottom of the card */
  font-weight: bold;
  color: #0056b3; /* Clearly identifiable link colour */
  display: inline-flex;
  align-items: center;
}

/* Underline the link text on hover to signal interactivity */
.accessible-card:hover .card-link-text {
  text-decoration: underline;
}

/* Subtle hover effect for the whole card */
.accessible-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* FIX 4: Highly visible focus indicator for keyboard users (Tabbing) */
.accessible-card:focus-visible {
  outline: 3px solid #0056b3;
  outline-offset: 4px;
  border-radius: 8px;
}

/* Decorative arrow animation */
.arrow {
  margin-left: 6px;
  transition: transform 0.2s ease;
}
.accessible-card:hover .arrow {
  transform: translateX(4px);
}