/* LINK GRID TEST*/
/* General body styling */
body {
  font-family: sans-serif;
  background-color: #f4f4f4;
  margin: 20px;
}

/* CSS Grid container */
.preview-grid {
  display: grid;
  /* Creates a responsive grid: minmax(250px, 1fr) ensures cards are at least 250px wide, and autofill creates as many columns as fit */
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px; /* Space between the cards */
  padding: 0 4px;
}

/* Individual link preview card styling */
.preview-card {
  display: flex;
  flex-direction: column;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Adds a subtle shadow */
  overflow: hidden; /* Ensures image corners are rounded with the card */
  text-decoration: none; /* Removes default link underline */
  color: inherit; /* Inherits text color */
  transition: transform 0.3s, box-shadow 0.3s;
}

/* Hover effect for interactivity */
.preview-card:hover {
  transform: translateY(-5px); /* Lifts the card slightly on hover */
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); /* Deeper shadow on hover */
}

.card-image {
  width: 100%;
  height: auto;
  /* Ensures images fill their container and maintain aspect ratio */
  object-fit: cover;
}

.card-content {
  padding: 15px;
}

.card-title {
  font-size: 1.2em;
  margin: 0 0 10px 0;
  color: #333;
}

.card-description {
  font-size: 0.9em;
  color: #666;
  margin: 0;
}
