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

.projects-container-page h2{
    font-family: 'Montserrat', sans-serif;
    font-size: 36px;
    font-weight: 600;
    color: #1C1C1E;
    margin-bottom: 60px;
    margin-top: 60px;
    text-align: left;
}

.projects-grid-page {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 25px;
  max-width: 1200px;
  margin: 0 auto;
  margin-bottom: 60px;
  align-items: stretch;
}

.project-card-page {
  background: #ffffff;
  border-radius: 30px;
  width: 383px;
  overflow: hidden;
  text-decoration: none;
  display: flex;            /* column layout inside card */
  flex-direction: column;
  height: 100%; /* fill wrapper height so inner body can flex */
}

.project-card-wrapper {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity 1s ease, transform 1s ease;
  border-radius: 30px;
  width: 383px;
  overflow: hidden;
  box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.04);
}
.projects-container-page h2{
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 1s ease, transform 1s ease;
}
.project-card-wrapper.lazyloaded, .projects-container-page h2.lazyloaded {
  opacity: 1;
  transform: translateY(0);
}

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

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

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

.card-image-overlay-page {
  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-page {
  position: absolute;
  bottom: 10px;
  font-family: Geologica;
  z-index: 2;
  color: white;
  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-page 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);
  will-change: transform;
}

/* White body section */
.card-body-page {
  background: #ffffff;
  padding: 25px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 165px;
  flex: 1 1 auto; /* grow to take remaining space in the card */
}

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

.card-body-page{ flex: 1; }

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

.card-text-page {
  color: #6e6e73;
  font-family: Montserrat;
  font-size: 15px;
  font-style: normal;
  font-variation-settings: "wght" 580;
  margin-top: 15px;
  letter-spacing: 0.04em;
}

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

@media (max-width: 950px) {
  .project-card-page, .project-card-wrapper {
    width: 100%;
  }
  .projects-container-page {
    max-width: 320px;
  }
  .projects-container-page h2 {
    font-size: 28px;
    text-align: center;
    max-width: 100%;
    margin-bottom: 40px;
    margin-top: 40px;
  }
  
}

@media (max-width: 450px) {
  .project-card-page, .project-card-wrapper {
    width: 100%;
  }
  .projects-container-page {
    max-width: 100%;
    padding-inline: 30px;
  }
}