/* --- General & Body --- */
body {
  background-color: #e5e9f4;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  color: #333;
  margin: 0;
}

main {
  padding: 2rem;
}

/* --- Header --- */
header {
  background-color: #ffffff;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid #d1d9e6;
  margin-bottom: 2rem;
}

header h1 {
  font-weight: 500;
  color: #2c3e50;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  font-size: 1.5rem;
}

/* --- Cards Grid --- */
ol.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem; /* Increased gap for more breathing room */
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: cardCount; /* Ensure counter starts at 0 */
}

/* --- BOLD Card Styling --- */
li {
  display: flex; /* Required for the <a> to fill the space */
}

.card {
  background-color: #ffffff;
  /* A thick top border using the accent color */
  border-top: 6px solid var(--accent-color);
  /* A subtle border on all other sides for definition */
  border-left: 1px solid #d1d9e6;
  border-right: 1px solid #d1d9e6;
  border-bottom: 1px solid #d1d9e6;
  
  border-radius: 8px; /* Slightly larger radius */
  /* A stronger, more defined shadow */
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.07), 0 3px 6px rgba(0, 0, 0, 0.05);
  
  padding: 2rem;
  position: relative;
  
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: #444; /* Default text color for the card */
  
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover,
.card:focus-visible {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.12), 0 5px 10px rgba(0, 0, 0, 0.08);
}

/* Card Numbering - Placed INSIDE the card */
.card::before {
  counter-increment: cardCount;
  content: "0" counter(cardCount); /* Pad with a zero */
  font-weight: 700;
  font-size: 2rem;
  
  color: #e0e0e0; /* Make number subtle, part of the background */
  
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  line-height: 1;
  z-index: 0;
}

/* --- Card Content --- */
.card > h2,
.card > p,
.card > i {
  position: relative; /* Ensure content sits on top of the number */
  z-index: 1;
}

.card > h2 {
  color: var(--accent-color);
  font-weight: 700; /* Bold title */
  font-size: 1.5rem;
  margin: 0 0 0.5rem 0;
}

.card > p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1; /* Pushes the icon to the bottom */
}

.card > i {
  color: var(--accent-color);
  font-size: 2.5rem;
  align-self: flex-end; /* Pushes icon to the right */
  margin-top: 1rem;
}