.projects-section{
  padding: 60px 20px;
  background: #f3f4f6;
  text-align: center;
  font-family: 'Arial', sans-serif;
}
.projects-section h2::after {
    content: '';
    background-color: var(--secondary-color);
    position: absolute;
    left: 42.7%;
    width: 7%;
    height: 0.5vh;
    display: block;
    margin: 1.5em;
    border-radius: 30px;
    margin-top: -0.01em;

}
.projects-section h4{
  margin-top: -1.5em;
  font-weight: normal;
  margin-bottom: 2em;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 40px;
  color: #333;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.project-card {
  position: relative;
  width: 100%;
  height: 300px; /* fixed height */
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.05);
  cursor: pointer;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
}
.project-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
}
.project-card:hover img {
  transform: scale(1.05);
}

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  opacity: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  transition: opacity 0.3s ease;
  text-align: center;
}

.project-card:hover .overlay {
  opacity: 1;
}

.overlay h3 {
  margin: 0;
  font-size: 1.4rem;
}

.overlay p {
  font-size: 0.95rem;
  margin-top: 8px;
}

.view-more-btn {
  display: inline-block;
  margin-top: 40px;
  padding: 12px 28px;
  background-color: var(--secondary-color);
  color: var(  --main-color);
  text-decoration: none;
  font-weight: 600;
  border-radius: 6px;
  transition: background-color 0.3s ease;
}

.view-more-btn:hover {
  background-color: #d43c00;
}




@media (max-width: 920px) {
  
.projects-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}
.project-card {
  width: 90%;
  height: 300px; /* fixed height */
  
}
.projects-section h2::after {
    left: 22%;
    width: 25%;
    height: 0.5vh;
    border-radius: 30px;
    margin-top: 0.1em;
}
}