/* Project Grid Alignment CSS 
   Makes each row of cards have consistent height and perfect alignment */

/* Use flexbox on the row container to enable equal height columns */
.project-grid-section .row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -15px;
  margin-left: -15px;
}

/* Make each grid item take the full height of its column */
.project-grid-section .col-lg-4,
.project-grid-section .col-md-6 {
  display: flex;
  margin-bottom: 30px; /* Consistent margin */
}

/* Ensure the project box takes full height of its container */
.project-grid-box {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: #fff;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Maintain aspect ratio of the thumbnail while allowing it to flex */
.project-thumb {
  position: relative;
  overflow: hidden;
}

/* Make all images maintain the same aspect ratio */
.project-thumb img {
  width: 100%;
  height: 250px; /* Fixed height for all images */
  object-fit: cover; /* Maintain aspect ratio while covering the container */
  display: block;
}

/* Make content area grow to fill available space */
.project-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 22px 30px 30px;
  background: #1c1632;
  border-radius: 0 0 5px 5px;
}

/* Title should have consistent height */
.project-content h4 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 20px;
  line-height: 1.4;
  color: #e2e2e2;
}

/* Span text should be pushed to the bottom */
.project-content span {
  font-size: 15px;
  line-height: 1.5;
  color: #dddddd;
}

/* Hide grid items initially for the isotope animation */
.grid-item {
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

/* Show grid items once loaded */
.grid-item.is-visible {
  opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .project-thumb img {
    height: 220px; /* Slightly smaller height on tablets */
  }
}

@media (max-width: 767px) {
  .project-thumb img {
    height: 200px; /* Smaller height on mobile */
  }
  
  .project-content {
    padding: 15px 20px 20px;
  }
  
  .project-content h4 {
    font-size: 18px;
  }
}