/* source/css/friends.css */
.friends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
  margin: 30px 0;
}

.friend-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.friend-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.card-img {
  height: 160px;
  overflow: hidden;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.friend-card:hover .card-img img {
  transform: scale(1.05);
}

.card-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 1.3rem;
  color: #2c3e50;
  margin-bottom: 10px;
  font-weight: 600;
  line-height: 1.3;
}

.card-desc {
  color: #5a6c7d;
  line-height: 1.5;
  margin-bottom: 15px;
  flex-grow: 1;
  font-size: 0.95rem;
}

.card-link {
  display: inline-block;
  background: #3498db;
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  text-align: center;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.card-link:hover {
  background: #2980b9;
  transform: translateY(-2px);
}

.friends-loading, .friends-error {
  text-align: center;
  padding: 40px;
  font-size: 1.1rem;
  color: #7f8c8d;
}

.friends-error {
  color: #e74c3c;
  background: #ffeaea;
  border-radius: 8px;
}

@media (max-width: 768px) {
  .friends-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .friends-grid {
    grid-template-columns: 1fr;
  }
  
  .card-img {
    height: 140px;
  }
}