/* Enhanced Card Styles - More compact and elegant */
.article-card, .review-card {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-color: white;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  max-width: 100%;
  /* Reduced overall size */
  font-size: 0.95rem;
}

.article-card:hover, .review-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

/* Reduce image height */
.article-image, .review-image {
  height: 180px; /* Reduced from 220px */
  overflow: hidden;
  position: relative;
}

.article-image img, .review-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.article-card:hover .article-image img,
.review-card:hover .review-image img {
  transform: scale(1.05);
}

/* More compact content area */
.article-content, .review-content {
  padding: 16px; /* Reduced from 24px */
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

/* Smaller title */
.article-title, .review-title, .review-card h3 {
  font-size: 1.15rem; /* Reduced from 1.35rem */
  font-weight: 600;
  margin-bottom: 8px; /* Reduced from 12px */
  color: #222;
  line-height: 1.3;
  transition: color 0.2s ease;
  /* Add text truncation for long titles */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 2.6em;
}

.article-card:hover .article-title,
.review-card:hover .review-title,
.review-card:hover h3 {
  color: #007bff;
}

/* Smaller excerpt with better truncation */
.article-excerpt, .review-excerpt, .review-card p {
  color: #555;
  margin-bottom: 12px; /* Reduced from 18px */
  flex-grow: 1;
  line-height: 1.5;
  font-size: 0.9rem;
  /* Add text truncation for long excerpts */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 4.5em;
}

/* More compact meta section */
.article-meta, .review-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem; /* Reduced from 0.85rem */
  color: #777;
  margin-top: auto;
  padding-top: 10px; /* Reduced from 15px */
  border-top: 1px solid #f0f0f0;
}

.article-date, .review-date {
  display: flex;
  align-items: center;
  font-weight: 500;
}

.article-date i, .review-date i {
  margin-right: 5px;
  color: #007bff;
  font-size: 0.9rem;
}

/* Grid adjustments for more cards per row */
@media (min-width: 1200px) {
  .article-grid, .featured-articles, .latest-articles-grid, .reviews-grid {
    grid-template-columns: repeat(4, 1fr); /* 4 cards per row instead of 3 */
    gap: 20px; /* Reduced gap between cards */
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .article-grid, .featured-articles, .latest-articles-grid, .reviews-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

@media (min-width: 576px) and (max-width: 767px) {
  .article-grid, .featured-articles, .latest-articles-grid, .reviews-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
}

/* Make category pills more compact if used */
.article-categories {
  margin-bottom: 8px;
}

.article-category {
  display: inline-block;
  padding: 2px 8px;
  background-color: #f0f7ff;
  color: #0056b3;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-right: 5px;
  margin-bottom: 5px;
}

/* Elegant hover effect */
.article-card::after, .review-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.article-card:hover::after, .review-card:hover::after {
  transform: scaleX(1);
  transform-origin: left;
} 