/* Section Title */
.section-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 2rem;
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: #f1c40f;
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

/* Projects Grid */
.projects-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1100px;
  margin: auto;
  padding: 1rem;
}

/* Project Card */
.project-card {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  transform: scale(1);
  transition: transform 0.3s ease;

  /* 🔥 Add these */
  background-size: cover;       /* Crop and fill */
  background-position: center;  /* Always center */
  background-repeat: no-repeat;
  height: 250px; /* make all cards same height */
}

.project-card img {
  width: 100%;
  display: block;
  border-radius: 10px;
}

.project-card:hover {
  transform: scale(1.05);
}

/* Overlay on hover */
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(44, 62, 80, 0.85);
  color: #fff;
  opacity: 0;
  transition: opacity 0.4s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 1.5rem;
}

.project-card:hover .overlay {
  opacity: 1;
}

.overlay h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.overlay p {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.read-more {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #f1c40f;
  color: #2c3e50;
  font-weight: bold;
  border-radius: 5px;
  text-decoration: none;
  transition: background 0.3s;
}

.read-more:hover {
  background: #d4ac0d;
}

/* Scroll Animation */
.project-card.hidden {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.project-card.show {
  opacity: 1;
  transform: translateY(0);
}

@media(max-width: 1000px){
    .projects-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(79px, 1fr));
  gap: 2rem;
  max-width: 1100px;
  margin: auto;
  padding: 1rem;
}
}
