.grant-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  position: relative;
  height: 100%;
}

.grant-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  border-color: #bfdbfe;
}

.card-top {
  padding: 20px 20px 0;
}

.card-deadline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 9999px;
  margin-bottom: 14px;
}

.deadline-rolling {
  background: #eff6ff;
  color: #2563eb;
}

.deadline-date {
  background: #ffedd5;
  color: #f97316;
}

.deadline-urgent {
  background: #fee2e2;
  color: #ef4444;
}

.card-title {
  font-size: 17px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
  margin-bottom: 6px;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-funder {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 12px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 14px;
}

.card-tag {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 9999px;
  background: #f1f5f9;
  color: #475569;
  white-space: nowrap;
}

.card-tag.more {
  background: #eff6ff;
  color: #3b82f6;
}

.card-amount {
  font-size: 13px;
  font-weight: 600;
  color: #16a34a;
  margin-bottom: 14px;
}

.card-amount.unspecified {
  color: #94a3b8;
  font-weight: 400;
}

.card-desc {
  font-size: 13px;
  line-height: 1.6;
  color: #64748b;
  flex: 1;
  padding: 0 20px;
  display: -webkit-box;
  line-clamp: 4;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-bottom {
  padding: 14px 20px;
  border-top: 1px solid #f1f5f9;
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-learn {
  font-size: 13px;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s;
}

.card-learn:hover {
  color: #2563eb;
  gap: 8px;
}

.card-type {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 9999px;
  background: #ede9fe;
  color: #8b5cf6;
  text-decoration: none;
}

.card-type:hover {
  color: #7c3aed;
}

.grant-card.blurred .card-top,
.grant-card.blurred .card-desc,
.grant-card.blurred .card-bottom {
  filter: blur(5px);
  user-select: none;
  pointer-events: none;
}

.grant-card.blurred::after {
  content: '🔒';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 28px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.85);
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.empty-state {
  text-align: center;
  padding: 3.5rem 1.5rem;
}

.empty-state img {
  max-width: 180px;
  margin-bottom: 18px;
  opacity: 0.85;
}

.empty-state h4,
.empty-state h3 {
  margin-bottom: 10px;
}

.empty-state p {
  color: #64748b;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .card-bottom {
    flex-direction: row;
  }
}

.grant-modal-layout {
  padding-top: 0.25rem;
}

.grant-modal-tabs {
  border-bottom: 1px solid #e2e8f0;
}

.grant-modal-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.grant-modal-meta-card {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  padding: 14px 16px;
}

.grant-modal-meta-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  margin-bottom: 6px;
}

.grant-modal-meta-value {
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
}

.grant-modal-section {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  padding: 16px;
  margin-top: 12px;
}

.grant-modal-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 10px;
}

.grant-modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.grant-modal-tag {
  font-size: 12px;
  font-weight: 500;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
  padding: 4px 10px;
}

.grant-modal-tag.blue {
  background: #eff6ff;
  border-color: #dbeafe;
  color: #1d4ed8;
}

.grant-modal-tag.green {
  background: #f0fdf4;
  border-color: #dcfce7;
  color: #15803d;
}

.grant-modal-tag.purple {
  background: #ede9fe;
  border-color: transparent;
  color: #7c3aed;
}

.grant-description-prose {
  color: #334155;
  font-size: 14px;
  line-height: 1.75;
  white-space: normal;
}

.grant-description-prose > :first-child {
  margin-top: 0;
}

.grant-description-prose > :last-child {
  margin-bottom: 0;
}

.grant-description-prose p {
  margin-bottom: 12px;
}

.grant-description-prose p:last-child {
  margin-bottom: 0;
}

.grant-geographic-focus {
  display: grid;
  gap: 8px;
}

.grant-geo-item {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.grant-geo-label {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.grant-geo-value {
  font-size: 13px;
  color: #334155;
  line-height: 1.55;
}

.grant-modal-embed-wrap {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.grant-modal-embed-wrap iframe {
  display: block;
  width: 100%;
  min-height: 70vh;
  border: 0;
}

@media (max-width: 992px) {
  .grant-modal-meta-grid {
    grid-template-columns: 1fr;
  }
}
