.solutions-gallery {
  width: 100%;
  padding: 0px 0 40px;
  overflow: hidden;

  display: flex;
  flex-direction: column;
  align-items: center;
}

.gallery-stack {
  position: relative;
  width: min(100%, 1200px);
  height: 490px;
}

.gallery-card {
  position: absolute;
  top: 50%;
  left: 50%;

  width: 400px;
  height: 430px;

  border-radius: 30px;
  overflow: hidden;

  transform: translate(-50%, -50%);
  transition:
    transform 0.52s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.52s cubic-bezier(0.22, 1, 0.36, 1);

  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Dark overlay */
.gallery-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(20, 18, 14, 0.38);
  z-index: 1;
}

.gallery-card.is-main::after {
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0.3) 35%,
    rgba(0, 0, 0, 0.1) 65%,
    rgba(0, 0, 0, 0) 100%
  );
}

/* Default hide content from non-main cards */
.main-content {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  z-index: 2;

  width: 100%;
  padding: 0 32px;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;

  text-align: center;

  opacity: 0;
  pointer-events: none;
}

.main-content h3 {
  margin: 0;
  color: #ffffff;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  font-family: "Sora", sans-serif;
}

.card-button {
  min-width: 250px;
  height: 58px;
  padding: 0 32px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: #ffffff;
  text-decoration: none;
  text-transform: uppercase;

  font-size: 18px;
  font-weight: 600;
  font-family: "Inter", sans-serif;
  letter-spacing: 0.12em;

  /* From https://css.glass */
  background: rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.25s ease;
}

.card-button:hover {
  transform: translateY(-4px);
}

/* Side vertical labels */
.side-label {
  position: absolute;
  top: 50%;
  right: 28px;
  z-index: 3;

  transform: translateY(-50%) rotate(-90deg);
  transform-origin: center;

  color: #ffffff;
  text-transform: uppercase;
  white-space: nowrap;

  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.14em;

  opacity: 1;
  pointer-events: none;

  max-width: 300px;
  white-space: wrap;
  text-align: center;
}

/* Main active card */
.gallery-card.is-main {
  z-index: 5;
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  filter: none;
}

.gallery-card.is-main .main-content {
  opacity: 1;
  pointer-events: auto;
}

.gallery-card.is-main .side-label {
  opacity: 0;
}

.gallery-card.is-left-1 {
  z-index: 4;
  transform: translate(-120%, -50%) scale(0.9);
  opacity: 0.98;
  filter: blur(1px) brightness(0.75);
}

.gallery-card.is-left-2 {
  z-index: 3;
  transform: translate(-180%, -50%) scale(0.72);
  opacity: 0.36;
  filter: blur(1.5px) brightness(0.7);
}

.gallery-card.is-right-1 {
  z-index: 4;
  transform: translate(20%, -50%) scale(0.9);
  opacity: 0.98;
  filter: blur(1px) brightness(0.75);
}

.gallery-card.is-right-2 {
  z-index: 3;
  transform: translate(80%, -50%) scale(0.72);
  opacity: 0.36;
  filter: blur(1.5px) brightness(0.7);
}

.gallery-card.is-hidden-left {
  z-index: 1;
  transform: translate(-170%, -50%) scale(0.55);
  opacity: 0;
  filter: blur(2px) brightness(0.65);
  pointer-events: none;
}

.gallery-card.is-hidden-right {
  z-index: 1;
  transform: translate(70%, -50%) scale(0.55);
  opacity: 0;
  filter: blur(2px) brightness(0.65);
  pointer-events: none;
}

/* Left side labels */
.gallery-card.is-left-1 .side-label,
.gallery-card.is-left-2 .side-label,
.gallery-card.is-hidden-left .side-label {
  right: auto;
  left: -10px;
}
/* right side labels */
.gallery-card.is-right-1 .side-label,
.gallery-card.is-right-2 .side-label,
.gallery-card.is-hidden-right .side-label {
  left: auto;
  right: -10px;
}

/* Dots */
.gallery-controls {
  margin-top: 24px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.gallery-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.gallery-dot {
  width: 11px;
  height: 11px;

  padding: 0;
  border: 0;
  border-radius: 999px;

  background: #c7c7c7;
  cursor: pointer;

  transition:
    background 0.25s ease,
    opacity 0.25s ease;
}

.gallery-dot.is-active {
  background: #7b61ff;
  transform: scale(1.2);
}

.gallery-dot:hover {
  opacity: 0.75;
}

.gallery-arrow {
  width: 32px;
  height: 32px;

  padding: 0;
  border: 0;
  background: transparent;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: #9b9b9b;
  font-size: 30px;
  line-height: 1;

  cursor: pointer;

  transition:
    color 0.25s ease,
    transform 0.25s ease,
    opacity 0.25s ease;
}

.gallery-arrow:hover {
  color: #7b61ff;
  transform: scale(1.12);
}

.gallery-arrow:active {
  transform: scale(0.95);
}

/* Responsive */
@media (max-width: 900px) {
  .gallery-stack {
    height: 400px;
  }

  .gallery-card {
    width: 320px;
    height: 360px;
    border-radius: 26px;
  }

  .gallery-card.is-left-1 {
    transform: translate(-82%, -50%) scale(0.86);
  }

  .gallery-card.is-left-2 {
    transform: translate(-112%, -50%) scale(0.68);
  }

  .gallery-card.is-right-1 {
    transform: translate(-18%, -50%) scale(0.86);
  }

  .gallery-card.is-right-2 {
    transform: translate(12%, -50%) scale(0.68);
  }
}

@media (max-width: 600px) {
  .gallery-stack {
    height: 340px;
  }

  .gallery-card {
    width: 245px;
    height: 300px;
    border-radius: 22px;
  }

  .main-content {
    bottom: 28px;
    gap: 14px;
  }

  .card-button {
    min-width: auto;
  }
}
