/* =====================================================
   MAMBA GALLERY SLIDER
   ===================================================== */

.mamba-gallery-carousel {
  width: 100vw !important;
  max-width: 100vw !important;

  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;

  overflow: hidden !important;

  position: relative;

  padding: 25px 0 120px;

  background: #fff;
}

/* =====================================================
   TRACK
   ===================================================== */

.mamba-gallery-track {
  width: 100%;
  min-width: 100vw;

  display: grid;

  grid-template-columns:
    minmax(55px, 0.65fr)
    minmax(70px, 0.8fr)
    minmax(85px, 0.95fr)
    minmax(105px, 1.1fr)
    minmax(360px, 2.8fr)
    minmax(105px, 1.1fr)
    minmax(85px, 0.95fr)
    minmax(70px, 0.8fr)
    minmax(55px, 0.65fr);

  gap: clamp(10px, 1.2vw, 20px);

  align-items: center;
  justify-content: center;

  padding: 0 clamp(18px, 2.5vw, 45px);

  box-sizing: border-box;
}

/* =====================================================
   ITEM
   ===================================================== */

.mamba-gallery-item {
  width: 100%;

  border-radius: 10px;

  overflow: hidden;

  position: relative;

  filter: grayscale(100%);

  transform: scale(0.96);

  opacity: 1;

  transition: height 1.35s cubic-bezier(0.19, 1, 0.22, 1),
    transform 1.35s cubic-bezier(0.19, 1, 0.22, 1),
    filter 1.35s cubic-bezier(0.19, 1, 0.22, 1),
    opacity 1.35s cubic-bezier(0.19, 1, 0.22, 1);

  will-change: height, transform, filter;
}

/* =====================================================
   DESKTOP HEIGHTS
   ===================================================== */

.mamba-gallery-item:nth-child(1),
.mamba-gallery-item:nth-child(9) {
  height: 42vh;
  min-height: 360px;
  max-height: 560px;
}

.mamba-gallery-item:nth-child(2),
.mamba-gallery-item:nth-child(8) {
  height: 46vh;
  min-height: 390px;
  max-height: 610px;
}

.mamba-gallery-item:nth-child(3),
.mamba-gallery-item:nth-child(7) {
  height: 50vh;
  min-height: 430px;
  max-height: 660px;
}

.mamba-gallery-item:nth-child(4),
.mamba-gallery-item:nth-child(6) {
  height: 54vh;
  min-height: 460px;
  max-height: 710px;
}

.mamba-gallery-item.active {
  height: 60vh;

  min-height: 520px;
  max-height: 780px;

  filter: grayscale(0%);

  transform: scale(1);
}

/* =====================================================
   IMAGE
   ===================================================== */

.mamba-gallery-item img {
  width: 100%;
  height: 100%;

  object-fit: cover;

  display: block;
}

.mamba-gallery-item:not(.active) img {
  filter: grayscale(100%) brightness(1.18) contrast(0.82);

  opacity: 0.72;
}

.mamba-gallery-item.active img {
  filter: none;
  opacity: 1;
}

/* =====================================================
   EDGE IMAGE FADE
   ===================================================== */

.mamba-gallery-item:first-child::after,
.mamba-gallery-item:last-child::after {
  content: "";

  position: absolute;

  inset: 0;

  z-index: 2;

  pointer-events: none;
}

.mamba-gallery-item:first-child::after {
  background: linear-gradient(
    90deg,
    #fff 0%,
    rgba(255, 255, 255, 0.92) 25%,
    rgba(255, 255, 255, 0.55) 55%,
    rgba(255, 255, 255, 0) 100%
  );
}

.mamba-gallery-item:last-child::after {
  background: linear-gradient(
    270deg,
    #fff 0%,
    rgba(255, 255, 255, 0.92) 25%,
    rgba(255, 255, 255, 0.55) 55%,
    rgba(255, 255, 255, 0) 100%
  );
}

/* =====================================================
   OUTER FADE
   ===================================================== */

.mamba-gallery-carousel::before,
.mamba-gallery-carousel::after {
  content: "";

  position: absolute;

  top: 0;
  bottom: 0;

  width: 22vw;

  z-index: 4;

  pointer-events: none;
}

.mamba-gallery-carousel::before {
  left: 0;

  background: linear-gradient(
    90deg,
    #fff 0%,
    rgba(255, 255, 255, 0.95) 10%,
    rgba(255, 255, 255, 0.65) 22%,
    rgba(255, 255, 255, 0.25) 35%,
    rgba(255, 255, 255, 0) 55%,
    rgba(255, 255, 255, 0) 100%
  );
}

.mamba-gallery-carousel::after {
  right: 0;

  background: linear-gradient(
    270deg,
    #fff 0%,
    rgba(255, 255, 255, 0.95) 10%,
    rgba(255, 255, 255, 0.65) 22%,
    rgba(255, 255, 255, 0.25) 35%,
    rgba(255, 255, 255, 0) 55%,
    rgba(255, 255, 255, 0) 100%
  );
}

/* =====================================================
   CONTROLS
   ===================================================== */

.mamba-gallery-controls {
  position: absolute;

  bottom: 18px;

  left: 50%;

  transform: translateX(-50%);

  display: flex;

  gap: 12px;

  z-index: 5;
}

.mamba-gallery-controls button {
  width: 48px;

  min-width: 48px;

  height: 48px;

  padding: 0;

  border: none !important;

  outline: none !important;

  box-shadow: none !important;

  border-radius: 50%;

  cursor: pointer;

  display: flex;

  align-items: center;

  justify-content: center;

  font-size: 28px;

  font-weight: 300;

  line-height: 1;

  transition: background 0.3s ease, color 0.3s ease, transform 0.25s ease;
}

.mamba-gallery-prev,
.mamba-gallery-prev:focus,
.mamba-gallery-prev:active {
  background: #fafafa !important;

  color: #000 !important;
}

.mamba-gallery-next,
.mamba-gallery-next:focus,
.mamba-gallery-next:active {
  background: linear-gradient(90deg, #ff5a2f, #f5a300) !important;

  color: #fff !important;
}

.mamba-gallery-controls button:hover {
  background: #20b2aa !important;

  color: #fff !important;

  transform: translateY(-2px);
}

/* =====================================================
   GLASSMORPHISM CONTENT
   ===================================================== */

.mamba-gallery-content {
  position: absolute;

  left: 18px;
  right: 18px;
  bottom: 18px;

  z-index: 3;

  padding: 18px 20px;

  border-radius: 14px;

  background: rgba(18, 18, 18, 0.34);

  -webkit-backdrop-filter: blur(14px);

  backdrop-filter: blur(14px);

  border: 1px solid rgba(255, 255, 255, 0.2);

  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.16);

  color: #fff;

  pointer-events: none;
}

/* =====================================================
   TITLE
   ===================================================== */

.mamba-gallery-title {
  margin: 0 0 6px;

  color: #fff;

  font-size: 20px !important;

  font-weight: 600;

  line-height: 1.2;
}

/* =====================================================
   DESCRIPTION
   ===================================================== */

.mamba-gallery-description {
  margin: 0;

  color: rgba(255, 255, 255, 0.92);

  font-size: 14px;

  line-height: 1.55;
}

/* =====================================================
   GOOD CAUSE
   ===================================================== */

.mamba-gallery-good-cause {
  display: flex;

  align-items: center;

  gap: 7px;

  margin-top: 12px;

  color: #fff;

  font-size: 14px;

  font-weight: 600;
}

/* Outlined heart */

.mamba-gallery-heart {
  display: inline-flex;

  align-items: center;

  justify-content: center;

  color: #ff6731;

  font-size: 21px;

  font-weight: 400;

  line-height: 1;
}

/* =====================================================
   TABLET
   ===================================================== */

@media (min-width: 768px) and (max-width: 1024px) {
  .mamba-gallery-track {
    grid-template-columns:
      minmax(40px, 0.6fr)
      minmax(55px, 0.75fr)
      minmax(70px, 0.9fr)
      minmax(340px, 3.4fr)
      minmax(70px, 0.9fr)
      minmax(55px, 0.75fr)
      minmax(40px, 0.6fr) !important;

    gap: 12px !important;

    padding: 0 12px !important;
  }

  .mamba-gallery-carousel::before,
  .mamba-gallery-carousel::after {
    width: 130px !important;
  }

  .mamba-gallery-item:nth-child(1),
  .mamba-gallery-item:nth-child(7) {
    height: 34vh !important;

    min-height: 260px !important;
    max-height: 360px !important;
  }

  .mamba-gallery-item:nth-child(2),
  .mamba-gallery-item:nth-child(6) {
    height: 38vh !important;

    min-height: 290px !important;
    max-height: 400px !important;
  }

  .mamba-gallery-item:nth-child(3),
  .mamba-gallery-item:nth-child(5) {
    height: 42vh !important;

    min-height: 320px !important;
    max-height: 440px !important;
  }

  .mamba-gallery-item.active {
    height: 47vh !important;

    min-height: 350px !important;
    max-height: 500px !important;

    transform: scale(1.02) !important;
  }
}

/* =====================================================
   MOBILE
   ===================================================== */

@media (max-width: 767px) {
  .mamba-gallery-carousel {
    padding: 18px 0 100px !important;
  }

  .mamba-gallery-track {
    grid-template-columns:
      minmax(32px, 0.7fr)
      minmax(44px, 0.85fr)
      minmax(220px, 2.8fr)
      minmax(44px, 0.85fr)
      minmax(32px, 0.7fr) !important;

    gap: 6px !important;

    padding: 0 8px !important;
  }

  .mamba-gallery-carousel::before,
  .mamba-gallery-carousel::after {
    width: 70px !important;
  }

  .mamba-gallery-item:nth-child(1),
  .mamba-gallery-item:nth-child(5) {
    height: 34vh !important;

    min-height: 230px !important;
    max-height: 300px !important;
  }

  .mamba-gallery-item:nth-child(2),
  .mamba-gallery-item:nth-child(4) {
    height: 38vh !important;

    min-height: 260px !important;
    max-height: 330px !important;
  }

  .mamba-gallery-item.active {
    height: 43vh !important;

    min-height: 300px !important;
    max-height: 370px !important;
  }

  .mamba-gallery-controls {
    bottom: 16px !important;

    gap: 8px !important;
  }

  .mamba-gallery-controls button {
    width: 36px !important;

    min-width: 36px !important;

    height: 36px !important;

    font-size: 22px !important;
  }

  .mamba-gallery-content {
    left: 10px;
    right: 10px;
    bottom: 10px;

    padding: 13px 14px;

    border-radius: 11px;
  }

  .mamba-gallery-title {
    font-size: 14px !important;

    margin-bottom: 4px;
  }

  .mamba-gallery-description {
    font-size: 12px;

    line-height: 1.4;
  }

  .mamba-gallery-good-cause {
    margin-top: 8px;

    font-size: 12px;
  }

  .mamba-gallery-heart {
    font-size: 18px;
  }
}
