/* Grid Section Styles */
.frontpage-grid {
  padding: 40px 20px;
  background-color: #f9f9f9;
  text-align: center;
}

.frontpage-grid h3 {
  font-size: 1.5em;
  font-weight: 400;
  margin-bottom: 20px;
  color: #333;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(250px, 1fr)
  ); /* Responsive grid */
  gap: 50px;
  margin: 0 auto;
  max-width: 1200px;
  padding: 0 20px;
}
.grid-card {
  overflow: hidden;
  display: flex; /* Flexbox for consistent alignment */
  flex-direction: column;
  justify-content: space-between; /* Ensures consistent vertical spacing */
  height: 300px; /* Fixed height for uniformity */
  transition: transform 0.3s, box-shadow 0.3s;
}
.grid-card a {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%; /* Ensure link covers the entire card */
}
.grid-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2);
}

.card-content {
  flex-grow: 1; /* Ensures content fills remaining space */
  padding: 10px 10px;
}

.card-content h3 {
  font-size: 1.2em;
  margin: 0 0 10px;
  color: #0073aa; /* WordPress blue */
  line-height: 1.4;
}

.card-content p {
  font-size: 1.05em;
  color: #444;
  line-height: 1.5;
  margin: 0;
}

.card-image {
  flex-shrink: 0; /* Prevent the image from resizing */
  width: 100%;
  height: 150px; /* Fixed height for image */
  position: relative;
}
.card-image img {
  position: absolute;
  max-width: 80%;
  max-height: 70%;
  right: 0;
  left: 0;
  bottom: 10px;
  margin-left: auto;
  margin-right: auto;
}
