/* ================================
   Ogólne ustawienia Swipera
================================ */
.carousel-withnumbers {
  padding-left: 15px;
  padding-right: 15px;

  /* kolor z ACF */
  --svg-color: var(--carousel-svg-color, #294030);
}

.carousel-withnumbers .swiper-wrapper {
  display: flex;
  align-items: stretch;
}

.carousel-withnumbers .swiper-slide {
  background: #ffffff;
  border-radius: 40px;
  overflow: clip;
  position: relative;
  height: 400px;

  transform: translate3d(0, 0, 0);
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.carousel-withnumbers .slide-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  padding: 50px 40px;
  height: 100%;

  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.carousel-withnumbers .slide-number-circle {
  width: 75px;
  height: 75px;
  border-radius: 50%;
  background-color: var(--carousel-number-bg, #D3F0DC);
  color: #000;
  font-size: 32px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ================================
   SVG MASKI – DESKTOP
================================ */
.carousel-withnumbers .slide-content::before {
  content: "";
  position: absolute;
  top: 0;
  left: 33%;
  width: 75px;
  height: 35px;
  z-index: 1;

  background-color: var(--svg-color);

  -webkit-mask-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 77 38'>\
<path d='M76.3027 0L76.5 0L76.4981 0.0029C76.433 0.0026 76.3679 0 76.3027 0ZM38.4961 37.9971C38.4964 37.932 38.499 37.8669 38.499 37.8018C38.499 16.9243 21.5748 0 0.697269 0L76.3027 0C55.4252 0 38.501 16.9243 38.501 37.8018C38.501 37.8669 38.5036 37.932 38.5039 37.9971L38.5 38L38.4961 37.9971Z'/>\
</svg>");

  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  -webkit-mask-position: center;

  mask-repeat: no-repeat;
  mask-size: contain;
  mask-position: center;
}

.carousel-withnumbers .slide-content::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 33%;
  width: 75px;
  height: 35px;
  z-index: 1;

  background-color: var(--svg-color);

  -webkit-mask-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 80'>\
<path d='M0 80C44 80 80 44 80 0C80 44 116 80 160 80H0Z'/>\
</svg>");

  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  -webkit-mask-position: center;

  mask-repeat: no-repeat;
  mask-size: contain;
  mask-position: center;
}

/* ================================
   RESPONSYWNOŚĆ – MOBILE
================================ */
@media (max-width: 768px) {

  .carousel-withnumbers .slide-content {
    padding: 20px 15px 40px;
  }

  .carousel-withnumbers .swiper-slide {
    height: auto;
    min-height: 300px;
    border-radius: 20px;
  }

  .carousel-withnumbers .slide-content::before {
    top: 30%;
    left: 0;
    width: 20px;
    height: 40px;

    -webkit-mask-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 35 70'>\
<path d='M0 0C0 21 17 38 38 38C17 38 0 55 0 76V0Z'/>\
</svg>");
  }

  .carousel-withnumbers .slide-content::after {
    top: 30%;
    right: 0;
    left: auto;
    width: 20px;
    height: 40px;

    -webkit-mask-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 35 70'>\
<path d='M38 0V76C38 55 21 38 0 38C21 38 38 21 38 0Z'/>\
</svg>");
  }
}

/* ================================
   CONTAINER WIDTHS
================================ */
@media (min-width: 768px) {
  .carousel-withnumbers {
    padding-left: 2%;
    padding-right: 2%;
  }
}

@media (min-width: 1200px) {
  .carousel-withnumbers {
    padding-left: calc((100% - 1110px) / 2);
  }
}

@media (min-width: 1400px) {
  .carousel-withnumbers {
    padding-left: calc((100% - 1255px) / 2);
  }
}
