/* ================================================================
   Grid Layout Styles
   ================================================================ */

/* Grid container with square items */
.grid-container {
  display: grid;
  grid-template-columns: repeat(
    auto-fill,
    minmax(300px, 1fr)
  ); /* Auto-adjust grid items */
  gap: 60px; /* Space between grid items */
  justify-items: center; /* Center grid items horizontally */
  width: 100%;
  padding: 20px 50px 20px 50px; /* Ensure there's padding inside the container */
  box-sizing: border-box; /* Include padding in width/height calculation */
  margin-top: 400px; /* Add some space from the top logo */
  overflow-y: auto; /* Allow vertical scrolling within the grid */
}

/* Style for each grid item */
.grid-item {
  position: relative;
  width: 100%; /* Ensure grid item fills its cell */
  height: 200px; /* Set a fixed height */
  background-color: #fff;
  border-radius: 2px;
  overflow: hidden; /* Hide any overflow */
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.3);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: transform 0.3s ease; /* Smooth transition for hover effect */
  cursor: pointer;
}

.grid-item:hover {
  transform: scale(1.05); /* Slightly scale up the item on hover */
}

/* Add image styling inside the grid item */
.grid-item img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%; /* Make the image cover the full width */
  object-fit: contain;

  opacity: 0.8; /* Optional: Make image slightly transparent */
}

/* Title text styling inside the grid item */
.grid-item .title {
  position: absolute;
  color: #fff;

  font-size: 1.2rem;
  font-weight: bold;
  z-index: 1;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
}

/* Fallback styles for grid items without images */
.grid-item.no-image {
  background-color: #f0f0f0; /* Light gray background for no image */
}

.grid-item.no-image .title {
  color: #333; /* Dark text color for items with no image */
  font-size: 1.2rem;
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
  .grid-container {
    padding: 20px; /* Ensure there's padding inside the container */
    grid-template-columns: 1fr; /* Stack the items vertically on mobile */
    gap: 20px; /* Smaller gap between items */
  }

  .grid-item {
    height: 150px; /* Adjust height for mobile view */
  }
}
