/* ==========================================================================
   Grants Card Grid Layout
   ========================================================================== */
.grants-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin: 40px auto;
  max-width: var(--max-width);
}

.grant-card {
  padding: 28px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition-smooth);
}

.grant-card:hover {
  transform: translateY(-5px);
  border-color: var(--color-blue-accent);
  box-shadow: 0 12px 30px var(--color-shadow);
}

.grant-year {
  font-family: var(--font-headings);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-orange-accent);
  margin-bottom: 12px;
}

.grant-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-white);
  line-height: 1.4;
  margin-bottom: 12px;
}

.grant-agency {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-blue-glow);
  margin-bottom: 16px;
}

.grant-details {
  border-top: 1px solid var(--color-border);
  padding-top: 16px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto; /* Push details to the bottom of the card */
}

.grant-detail-row {
  display: flex;
  justify-content: space-between;
}

.grant-detail-row span:first-child {
  font-weight: 600;
  color: var(--color-text-white);
}

/* Single Grant Card layout & Mockup style */
.grants-grid.single-grant {
  display: flex;
  justify-content: center;
}

.grants-grid.single-grant .grant-card {
  max-width: 480px;
  width: 100%;
  padding: 36px;
  border-radius: 16px;
}

.grant-amount {
  font-family: var(--font-headings);
  font-size: 2.2rem;
  font-weight: 700;
  color: #10b981; /* Bright emerald green as shown in the user's mockup */
  margin: 8px 0 16px 0;
  letter-spacing: -0.02em;
}

.grant-duration {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-top: 14px;
  font-weight: 500;
}


/* ==========================================================================
   Responsive Grants Page Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .grants-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (max-width: 640px) {
  .grants-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}
