/* Center cards horizontally */
.centered {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;   /* allows wrapping on small screens */
  gap: 3rem;
  height: 100%;
}

/* Card container */
.card {
  position: relative;
  height: 28rem;
  width: 20rem;
  aspect-ratio: 5 / 7;
  color: #ffffff;
  perspective: 50rem;
  transform-style: preserve-3d;
  cursor: pointer;
}

/* Blurry background shadow */
.card .shadow {
  position: absolute;
  inset: 0;
  background: var(--url);
  background-size: cover;
  background-position: center;
  opacity: 0.8;
  filter: blur(2rem) saturate(0.9);
  box-shadow: 0 -1.5rem 2rem -0.5rem rgba(0, 0, 0, 0.7);
  transform: rotateX(var(--rotateX)) rotateY(var(--rotateY))
    translate3d(0, 2rem, -2rem);
  z-index: 0;
}

/* Background blur (soften backdrop for contrast) */
.card .image.background.class {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent 20%), var(--url);
  background-size: cover;
  background-position: center;
  filter: blur(3px);   
  transform: rotateX(var(--rotateX)) rotateY(var(--rotateY))
    translate3d(0, 0, 0rem);
  z-index: 1;
}

/* Background image layer */
.card .image.background {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent 40%), var(--url);
  background-size: cover;
  background-position: center;
  transform: rotateX(var(--rotateX)) rotateY(var(--rotateY))
    translate3d(0, 0, 0rem);
  z-index: 1;
}



/* Floating cutout — deeper parallax */
.card .image.cutout {
  position: absolute;
  top: 80%;
  left: 70%;
  width: 65%;
  transform: translate(-50%, -50%) 
             rotateX(calc(var(--rotateX) * 1.3)) 
             rotateY(calc(var(--rotateY) * 1.3)) 
             translate3d(0, 0, 6rem); /* more depth than background */
  z-index: 3;
}

.card .image.cutout.vr {
  position: absolute;
  top: 75%;
  left: 30%;
  width: 60%;
  transform: translate(-50%, -50%) 
             rotateX(calc(var(--rotateX) * 1.3)) 
             rotateY(calc(var(--rotateY) * 1.3)) 
             translate3d(0, 0, 6rem); /* depth stays */
  z-index: 3;
}


.card .image.cutout.outreach {
  position: absolute;
  top: 65%;
  left: 20%;
  width: 60%;
  transform: translate(-50%, -50%) 
             rotateX(calc(var(--rotateX) * 1.3)) 
             rotateY(calc(var(--rotateY) * 1.3)) 
             translate3d(0, 0, 6rem); /* depth stays */
  z-index: 3;
}



.card .image.cutout img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Golden frame */
.card::after,
.card::before {
  content: "";
  position: absolute;
  inset: 1.5rem;
  /* border: #e2c044 0.5rem solid; */
  transform: rotateX(var(--rotateX)) rotateY(var(--rotateY))
    translate3d(0, 0, 2rem);
  z-index: 4;
}

.card.border-left-behind::before { border-left: transparent; }
.card.border-right-behind::before { border-right: transparent; }
.card.border-bottom-behind::before { border-bottom: transparent; }

/* Card content (title + description) */
.card .content {
  position: absolute;
  inset: 0;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transform: rotateX(var(--rotateX)) rotateY(var(--rotateY))
    translate3d(0, 0, 8rem); /* always above */
}

/* Default: bottom-aligned */
.card .content {
  justify-content: flex-end;
}

/* Centered text option */
.card .content.centered {
  justify-content: center;
  text-align: center;
}

/* Top-aligned text option */
.card .content.top {
  justify-content: flex-start;
  text-align: center;
}

/* Headings & paragraphs */
.card h2 {
  margin-top: 3rem;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 2rem rgba(0, 0, 0, 0.7);
}

.card .content p {
  font-size: 0.8rem; /* smaller paragraph */
  font-weight: 300;
  text-shadow: 0 0 2rem rgba(0, 0, 0, 0.7);
  margin: 0;
  padding: 0.1rem 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  /* -webkit-line-clamp: 3; */
  -webkit-box-orient: vertical;
}

/* Section title */
.section-title {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 3rem;
  color: #fff;
}
