/* =========================================================
   river-cards-enhanced.css (v4.0 - Clean & Horizontal)
   ========================================================= */

:root {
  --card-bg: #ffffff;
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  --card-radius: 8px;
  --card-padding: 1.5rem;
}

.river-card {
  background: var(--card-bg);
  border: none;
  border-radius: var(--card-radius);
  padding: var(--card-padding);
  box-shadow: var(--card-shadow);
  transition: transform 0.2s ease;
  display: flex; flex-direction: column; gap: 0.5rem;
  height: 100%; position: relative;
}
.river-card:hover { transform: translateY(-3px); }

/* HEADER */
.card-header { display: flex; justify-content: space-between; margin-bottom: 0.5rem; }
.card-meta { font-size: 0.75rem; color: #999; font-weight: 500; }
.card-badge { padding: 2px 8px; border-radius: 4px; font-size: 0.7rem; background: #f4f4f4; color: #666; }
.card-badge.primary { background: var(--accent-river); color: white; }

/* CONTENT */
.card-title {
  font-family: var(--serif); font-size: 1.1rem; font-weight: 700;
  margin: 0; line-height: 1.4; color: var(--ink);
}
.card-title a { color: inherit; text-decoration: none; }
.card-title a:hover { color: var(--accent-river); }

.card-excerpt {
  font-size: 0.9rem; line-height: 1.7; color: #666; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-content { flex-grow: 1; }

/* FOOTER */
.card-footer {
  margin-top: auto; padding-top: 1rem; border-top: 1px solid #f0f0f0;
  display: flex; justify-content: flex-end;
}
.card-link { font-size: 0.8rem; font-weight: 600; color: var(--accent-river); text-decoration: none; }

/* === HORIZONTAL VARIANT (For Search) === */
.river-card.horizontal {
    flex-direction: row; align-items: flex-start; gap: 1.2rem;
}
.river-card.horizontal .card-image-wrapper {
    flex-shrink: 0; width: 100px; height: 100px; margin: 0;
    border-radius: 6px; overflow: hidden;
}
.river-card.horizontal .card-image { width: 100%; height: 100%; object-fit: cover; }
.river-card.horizontal .card-content { padding-top: 0; }

/* UTILS */
.card-image-wrapper { position: relative; margin-bottom: 0.75rem; }
.card-image { width: 100%; height: auto; display: block; }

/* GRID */
.card-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card-grid.two-col { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 768px) {
    .card-grid.two-col { grid-template-columns: 1fr; }
    .river-card.horizontal { flex-direction: column; }
    .river-card.horizontal .card-image-wrapper { width: 100%; height: 150px; margin-bottom: 1rem; }
}