.project-card {
  text-align: center;
  position: relative;
  overflow: visible;
  transition: transform 0.3s ease;
  transform-origin: center center;
  will-change: transform;
  padding: 0.5rem;
  margin: 0;
  height: 430px;
}

.project-card .swiper {
  position: absolute;
  top: 130px;
  left: 0;
  width: 100%;
  height: 300px;
  opacity: 1;
  transition: opacity 0.3s ease;
  z-index: 1;
}

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

/* Blur effect for the entire page when any project card is hovered */

body:has(.project-card:hover) > *:not(:has(.project-card:hover)) {
  filter: blur(3px);
  transition: filter 0.3s ease;
}

/* Ensure the projects section and hovered card are not blurred */
body:has(.project-card:hover) .projects {
  filter: none;
}

body:has(.project-card:hover) .project-card:not(:hover) {
  filter: blur(2px);
  transition: filter 0.3s ease;
}

.project-card h3,
.project-card p {
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
}

.project-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.project-card p {
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 0.8rem;
  padding: 0 1rem;
}

.swiper-slide {
  text-align: center;
  font-size: 18px;
  background: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  opacity: 1;
  height: 100%;
}

.swiper-slide img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  border-radius: 8px;
  margin: auto;
}

/* Ensure proper fade effect */
.swiper-slide-active {
  opacity: 1 !important;
}

.swiper-slide:not(.swiper-slide-active) {
  opacity: 0 !important;
}

@media (min-width: 809px) and (max-width: 954px) {
  .project-card .swiper {
    padding-top: 0.5rem;
  }
}

@media (max-width: 505px) {
  .project-card .swiper {
    padding-top: 0.5rem;
  }
}
