.projects-section {
  padding: 140px 8% 80px;
  background: transparent !important;
  font-family: 'Jost', sans-serif;
}

.projects-title {
  text-align: center;
  font-size: 44px;
  margin-bottom: 70px;
  letter-spacing: 3px;
  font-weight: 600;
  font-family: "Prosto One";
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
}

.project-card {
  position: relative;
  padding: 10px; 
  overflow: hidden;
  border-radius: 0px;
  cursor: pointer;
  transition: 0.4s ease;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}
.project-overlay h3 {
  text-transform: uppercase;
}
.project-card img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: 0.6s ease;
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75), rgba(0,0,0,0.2));
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 30px;
  opacity: 0;
  transition: 0.4s ease;
}

.project-overlay h3 {
  color: #fff;
  font-size: 22px;
  letter-spacing: 1px;
  transform: translateY(20px);
  transition: 0.4s ease;
}

/* Hover Effects */
.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.18);
}

.project-card:hover img {
  transform: scale(1.1);
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-card:hover .project-overlay h3 {
  transform: translateY(0);
}


/* ===== CENTER EXPAND CARD ===== */

.project-card{
  position: relative;
  transition: 0.4s ease;
  cursor: pointer;
}

/* overlay background */
.page-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  opacity: 0;
  visibility: hidden;
  transition: 0.3s ease;
  z-index: 999;
}

/* active overlay */
.page-overlay.active{
  opacity: 1;
  visibility: visible;
}

/* expanded card */
.project-card.expanded{
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  width: 70%;
  max-width: 900px;
  height: auto;
  z-index: 1000;
  box-shadow: 0 30px 80px rgba(0,0,0,0.4);
}

.project-card.expanded img{
  height: 500px;
  object-fit: cover;
}

/* ===== RESPONSIVE ===== */
@media(max-width:992px){
  .projects-section{
    padding:120px 5% 60px;
  }

  .projects-title{
    font-size:32px;
    margin-bottom:40px;
  }

  .projects-grid{
    grid-template-columns:repeat(2,1fr);
    gap:25px;
  }

  .project-card.expanded{
    width:85%;
  }
}

@media(max-width:768px){
  .projects-section{
    padding:90px 4% 50px;
  }

  .projects-title{
    font-size:28px;
    margin-bottom:30px;
  }

  .projects-grid{
    grid-template-columns:1fr;
    gap:20px;
  }

  .project-card img{
    height:250px;
  }

  .project-card.expanded{
    width:90%;
  }

  .project-card.expanded img{
    height:350px;
  }
}

@media(max-width:480px){
  .projects-section{
    padding:70px 3% 40px;
  }

  .projects-title{
    font-size:24px;
    margin-bottom:25px;
  }

  .project-card img{
    height:200px;
  }

  .project-card.expanded img{
    height:280px;
  }
}