/* Custom CSS for Grid Display with Consistent Tile Sizes and Alignment */

/* Apply grid properties to the innermost <div> within .Feed__feedContent */
[data-id="kbLanding"] .Feed__feedContent > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  align-items: start; /* Align all items to the top of their grid cell */
  grid-auto-rows: 1fr; /* This keeps row height consistent based on the tallest tile */
}

/* Style the category blocks and force them to fill the tile height */
.CategoryBlock__kbCategory {
  background-color: #ffffff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
  text-decoration: none;
  color: inherit;
  
  display: flex; /* Make the category block a flex container */
  flex-direction: column; 
  height: 100%; /* Ensure the tile fills the full height of its grid cell */
}

/* Add a hover effect for the category blocks */
.CategoryBlock__kbCategory:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* This targets the main content container inside the tile */
.MediaObject__mediaObject {
  align-items: flex-start; /* Ensure all child elements are aligned to the top */
}

/* Ensure the title and description content is properly stacked */
.CategoryBlock__kbCategoryContent {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* This pushes the description to take up remaining vertical space */
.CategoryBlock__articleCardExtract {
    flex-grow: 1;
}

.CategoryBlock__kbCategory {
    margin-top: 0 !important;
}
 

