/* Wheel container = positioning context */
.wheel{
  position: relative;
  width: min(90vw, 900px);
  height: clamp(420px, 50vh, 720px);
  margin-inline: auto;
  overflow: visible;
}

/* Base card — truly centered via the individual 'translate' property */
.wheel__card{
  position: absolute;
  top: 50%;
  left: 50%;
  /* ↙ this stays even if JS sets transform */
  translate: -50% -50%;             

  transform-origin: center center;
  transform: scale(.5);              /* JS will bump this */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: clamp(340px, 72vw, 780px);
  max-width: calc(100% - 1.25rem);

  padding: 1.1rem .9rem 2rem;
  background: #111d;
  border: 1px solid #ffffff22;
  border-radius: 18px;
  box-shadow: 0 6px 20px #0008;
  color: #fff;
  opacity: 0;
  transition: transform .55s cubic-bezier(.6,.2,.3,1), opacity .35s ease;
}

/* Active/front card — IMPORTANT: do not drop the translate */
.wheel__card.is-front{
  opacity: 1;
  transform: scale(1.05);     /* translate is separate, so it remains */
  /* remove any height forcing here */
  /* height: 50vh;  ← delete */
}

/* Image should not force height downward */
.wheel__card img{
  display: block;
  width: 100%;
  height: auto;               /* intrinsic height from width */
  aspect-ratio: 16 / 9;       /* optional, keeps a stable frame */
  object-fit: cover;
  border-radius: 10px;
  max-height: 30vh;
}

.wheel__card img.project-pic--icpc {
  background: #000;
  object-fit: contain;
  padding: 0.5rem;
}

/* (Optional) remove duplicate img rule blocks elsewhere to avoid conflicts */
.wheel-btn {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  width: 3rem;
  aspect-ratio: 1;
  background: #fff3;
  border: none;
  color: #fff;
  font-size: 2rem;          /* slightly smaller arrow */
  line-height: 1;           /* reset */
  border-radius: 50%;
  backdrop-filter: blur(4px);
  cursor: pointer;
  transition: background .25s;
  z-index: 3;

  /* ✅ center the arrow inside */
  display: flex;
  align-items: center;
  justify-content: center;
}
.wheel-btn:hover { background: #fff6; } 
.wheel-btn:active { scale: .92; } /* Positioning the navigation buttons */ 
.wheel-btn--prev{ left: 1rem; }
 .wheel-btn--next{ right: 1rem; }

@media (max-width: 780px){
  .wheel__card{
    width: clamp(260px, 80vw, 340px);
    max-width: calc(100% - 1rem);
    padding: 0.85rem 0.7rem 1.35rem;
  }

  .wheel__card img{
    max-height: 22vh;
  }
}

@media (min-width: 2000px){
  .wheel{
    width: min(92vw, 1240px);
    height: clamp(620px, 66vh, 980px);
  }

  .wheel__card{
    width: clamp(760px, 66vw, 1140px);
    max-width: calc(100% - 2rem);
    padding: 1.5rem 1.4rem 2.6rem;
  }

  .wheel__card img{
    max-height: 42vh;
  }
}
