.projects-section {
  background-color: #eaebea;
  width: calc(100% - 60px);
  min-height: 700px;
  padding: 140px 0;
  border-radius: 30px;
  margin: 0 auto 30px auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.projects-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.projects-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.projects-header-inner h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 32px;
  font-weight: 600;
  color: #1C1C1E;
}

.projects-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Card wrapper */
.project-card {
  background: #f7f8f9;
  border-radius: 30px;
  width: 288px;
  min-height: 300px;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.02);
  transform: scale(1);
  transition: transform 0.2s ease;
}

.project-card:hover .card-image img {
  transform: scale(1.04);
  transition: transform 0.3s ease, filter 0.3s ease;
}

.project-card:hover .card-image-text {
  opacity: 1;
  filter: blur(0px);
}

.project-card:active .card-image img{
  transform: scale(1);
}


/* Image on top */
.card-image {
  position: relative;
  width: 100%;
  height: 155px;
  border-radius: 20px 20px 0 0;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.card-image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(180deg, rgba(234, 235, 234, 0.25) 0%, rgba(44, 44, 48, 0.60) 100%);
  pointer-events: none;
}

.card-image-text {
  position: absolute;
  bottom: 10px;
  font-family: Geologica;
  z-index: 2;
  color: #f7f8f9;
  font-size: 16px;
  font-weight: 400;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease, filter 0.3s ease;
  background: rgb(247, 248, 249, 0.2);
  backdrop-filter: blur(5px);
  padding: 5px 10px;
  border-radius: 30px;
  filter: blur(2px);
}

.card-image img {
  width: 100%;
  height: auto;
  object-fit: contain; /* show the entire image */
  display: block;
  transition: transform 0.3s ease, filter 0.3s ease;
  filter: blur(0px);
}

/* White body section */
.project-card .card-body {
  background: #f7f8f9;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 145px;
}

/* Title */
.project-card .card-title {
  color: #1c1c1e;
  font-family: Montserrat;
  font-size: 20px;
  font-style: normal;
  font-variation-settings: "wght" 650;
}

.card-text {
  color: #6e6e73;
  font-family: Montserrat;
  font-size: 14px;
  font-style: normal;
  font-variation-settings: "wght" 550;
  letter-spacing: 0.04em;
}

/* CTA button */
.project-card-btn {
  display: inline-block;
  padding: 12px 17px;
  color: #1C1C1E;
  font-family: Montserrat;
  font-size: 18px;
  font-style: normal;
  font-weight: 600;
  border-radius: 30px;
  background: #eaebea;
  text-decoration: none;
  transition: all 0.2s ease;
}

.project-card-btn:hover {
  background-color: #6EC7AE;
  color: #1C1C1E;
  box-shadow: 0 0 10px rgba(110, 199, 174, 0.3);
  transform: scale(1.02);
  border-radius: 20px;
}

@media (max-width: 1430px) {
  .projects-container{
    max-width: 591px;
  }
}

@media (max-width: 800px) {
  .projects-section {
    margin-bottom: 15px;
    padding: 40px 20px;
    width: calc(100% - 30px);
  }

  .projects-container {
    max-width: 288px;
  }

  .projects-header-inner {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .projects-header-inner h2 {
    font-size: 28px;
    text-align: center;
  }
}


.project-card, .projects-header-inner{
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 1s ease, transform 1s ease;
}
.project-card.lazyloaded, .projects-header-inner.lazyloaded {
  opacity: 1;
  transform: translateY(0);
}
