/* ==========================================================================
   POLAROID ARC CAROUSEL
   ========================================================================== */

.polaroidTrip {
  position: relative;
  top: 280px;
  width: 1px;
  height: 1px;
}

.polaroidTripVenue {
  position: relative;
  top: 300px;
}

.features-wrapper {
  position: fixed;
  bottom: -400px;
  left: 0;
  width: 100vw;
  height: 540px;
  overflow: hidden;
  cursor: grab;

  /* Visibility handling */
  opacity: 1;
  visibility: visible;
  transform: translateY(150px);
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 1s ease,
    visibility 1s;
  pointer-events: none;

  z-index: 5;

}

.features-wrapper.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(-360px);
  pointer-events: auto;
}

.features-wrapper:active {
  cursor: grabbing;
}

.features {
  position: absolute;
  top: 48px;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  list-style: none;
  will-change: transform;
}

.feature-item {
  position: absolute;
  /* Required for math-based positioning */
  flex: 0 0 30px;
  width: 340px;
  height: 400px;
  will-change: transform;
  transition: opacity 0.3s ease;
  user-select: none;
  -webkit-user-drag: none;

  background: linear-gradient(120deg, #EEEEEE, #CCCCCC 60%);
  box-shadow: 2px 2px 10px 0px rgba(0, 0, 0, 0.5),
    inset 5px 5px 30px 0 rgba(0, 0, 0, 0.15);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  text-align: center;
  overflow: hidden;
  padding-top: 28px;
  padding-bottom: 5rem;
  padding-right: 18px;
  padding-left: 18px;
  border-radius: 6px;

  z-index: 4;
}

.feature-item img {
  min-height: 300px;
  max-height: 300px;
  min-width: 300px;
  max-width: 300px;
  width: 100%;
  object-fit: cover;
  background-size: cover;
  border: 1px solid rgba(124, 124, 124, 0.5);
  border-radius: 5px;
  z-index: -1;
}

.feature-item::after {
  content: "";
  position: absolute;
  top: 28px;
  left: 18px;
  right: 18px;
  bottom: 5rem;
  min-height: 302px;
  max-height: 302px;
  min-width: 302px;
  max-width: 302px;
  background: linear-gradient(125deg, rgba(250, 250, 250, 0.5) 13%, transparent 50%, rgba(0, 0, 0, 0.4) 100%),
    radial-gradient(circle at 50% 0%, rgba(238, 230, 210, 0.1), transparent 80%);
  filter: blur(1px);

  z-index: 11;
  box-shadow: inset 1px 1px 15px 0px rgba(2, 2, 2, 0.3);
  border-radius: 6px;
}


/* Mobile Adjustments */
@media screen and (max-width: 768px) {
  .features-wrapper {
    height: 480px;
  }

  .features {
    top: 20px;
  }

  .feature-item {
    position: absolute;
    /* Define a clear layout width/height instead of scaling down a large box */
    width: 270px !important;
    height: 330px !important;
    padding-top: 18px;
    padding-bottom: 4rem;
    padding-right: 18px;
    padding-left: 18px;
  }

  /* Scale the inside photo to match new mobile dimensions */
  .feature-item img {
    min-height: 230px;
    max-height: 230px;
    min-width: 230px;
    max-width: 230px;
  }

  /* Scale the visual overlay gloss */
  .feature-item::after {
    top: 18px;
    left: 20px;
    right: 18px;
    bottom: 4rem;
    min-height: 230px;
    max-height: 230px;
    min-width: 230px;
    max-width: 230px;
  }

  .polaroidTrip {
    position: relative;
    top: 400px;
  }

  .polaroidTripVenue {
    position: relative;
    top: 240px;
  }
}