:root {
  --slider-height: 28rem;
  --half-slider: 14rem;
}

@media (min-width: 640px) {
  :root {
    --slider-height: 35rem;
    --half-slider: 17.5rem;
  }
}

.gallery-section {
  width: 100%;
  position: relative;
}

.top-half {
  background: #0c0e2c;
  padding: var(--section-py) 2rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media (min-width: 768px) {
  .top-half {
    padding: var(--section-py) 4rem 0;
  }
}

.section-title {
  color: #fff;
  font-size: clamp(2.4rem, 4.5vw, 4rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

.section-desc {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.6rem;
  margin-bottom: 2rem;
}

.navy-spacer {
  height: var(--half-slider);
}

.bottom-half {
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: var(--section-py);
}

.slider-container {
  width: 100%;
  max-width: 120rem;
  height: var(--slider-height);
  margin-top: calc(-1 * var(--half-slider));
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.slider-stage {
  position: relative;
  width: 100%;
  height: 100%;
  perspective: 1000px;
  touch-action: pan-y;
}

.slide-card {
  position: absolute;
  top: 50%;
  left: 50%;
  background: #fff;
  padding: 0.6rem;
  border-radius: 1rem;
  box-shadow: 0 1.5rem 3.5rem rgba(0, 0, 0, 0.2);
  cursor: grab;
  transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.3);
  z-index: 1;
  overflow: hidden;
  user-select: none;
  -webkit-user-drag: none;
}

.slide-card:active {
  cursor: grabbing;
}

.slide-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0.6rem;
  pointer-events: none;
}

/* Mobile sizes */
.slide-card.active {
  width: 80vw;
  height: 55vw;
  opacity: 1;
  z-index: 10;
  transform: translate(-50%, -50%) scale(1);
  box-shadow: 0 2rem 5rem rgba(0, 0, 0, 0.4);
}

.slide-card.prev,
.slide-card.next {
  width: 60vw;
  height: 40vw;
  opacity: 0.8;
  z-index: 5;
}

.slide-card.prev {
  transform: translate(-105%, -50%) scale(0.85);
}

.slide-card.next {
  transform: translate(5%, -50%) scale(0.85);
}

.slide-card.prev2,
.slide-card.next2 {
  display: none;
}

/* Desktop sizes */
@media (min-width: 768px) {
  .slide-card.active {
    width: 45rem;
    height: 30rem;
  }

  .slide-card.prev,
  .slide-card.next {
    width: 35rem;
    height: 23rem;
  }

  .slide-card.prev2,
  .slide-card.next2 {
    display: block;
    width: 28rem;
    height: 18rem;
    opacity: 0.4;
    z-index: 2;
  }

  .slide-card.prev2 {
    transform: translate(-160%, -50%) scale(0.7);
  }

  .slide-card.next2 {
    transform: translate(60%, -50%) scale(0.7);
  }
}

.arrow {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(26, 29, 80, 0.9);
  color: white;
  font-size: 2rem;
  cursor: pointer;
  z-index: 20;
  transition: background 0.3s;
  position: absolute;
}

#prevBtn {
  left: 2rem;
}

#nextBtn {
  right: 2rem;
}

.dots {
  display: flex;
  gap: 1rem;
  margin-top: 3rem;
}

.dot {
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  border: none;
  background: #ddd;
  cursor: pointer;
  transition: all 0.3s;
}

.dot.active {
  background: #0c0e2c;
  width: 3rem;
  border-radius: 1rem;
}

.gallery-section .bottom-half .btn {
  margin-top: 4rem;
}
