@keyframes wiggle {
  0% {
    transform: rotate(5deg);
  }
  50% {
    transform: rotate(-5deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

 /* Header */
#sb_instagram {
    max-width: 850px;
    max-height: 460px;
    position: relative;
    scrollbar-width: none;
    padding-bottom: 0 !important;
}

.sb_instagram_header{
    margin-bottom: 5rem;
}
/* pic and text */
#sb_instagram .sb_instagram_header .sbi_header_text, .sb_instagram_header .sbi_header_text {
  justify-content: center;
  gap: 20;
  width: 100%;
}

.sbi_feedtheme_header_text{
  flex: 0 0 auto;
}

#sb_instagram .sb_instagram_header .sbi_header_img, .sb_instagram_header .sbi_header_img {
    width: 50px;
    height: 50px;
}

.sb_instagram_header > a > div > div  > img {
    width: 50px;
    height: 50px;
}

#sb_instagram .sb_instagram_header h3, .sb_instagram_header h3{
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.sbi_follow_btn{
    position: absolute;
    right: 50%;
    transform: translateX(50%);
    top: 75px;
    overflow: hidden;
}

#sb_instagram .sbi_follow_btn > a {
    border-radius: 100px;
    width: 150px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: clamp(0.87rem, 2vw, 1.25rem);
    font-weight: 500;
    letter-spacing: 0.5px;
    padding: 0;
    margin: 0;
    color: #cccccc;
}

#sb_instagram .sbi_follow_btn > a:hover{
    background-position: 200% 0, 0 0;
}

#sb_instagram .sbi_follow_btn a:hover{
    box-shadow: none;
}

.sbi_feedtheme_header_text > h3 {
    color: #f5f5f5;
    font-weight: bold;
    font-size: clamp(0.875, 2vw, 1.25rem);
}

#sb_instagram svg:not(:root).svg-inline--fa {
    display: none;
}


/* Images */
.sbi-carousel{
  position: relative;
  max-width: 300px;
  /* max-width: calc(2.5 * 350px + 2 * 50px); */
  margin: 0 auto;
}


#sbi_images{
  display: flex !important;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  gap: 50px !important;        
  scrollbar-width: none;
  padding: 0 !important;
  border-radius: 20px;
  -webkit-overflow-scrolling: touch;
}
#sbi_images::-webkit-scrollbar{ display: none; }

/* Single kort */

#sbi_images > .sbi_item{
  flex: 0 0 100%;
  max-width: 300px;
  height: auto;
  scroll-snap-align: start;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
  background:#111;
}
#sbi_images > .sbi_item img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sbi-nav{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 35px; height: 35px;
  border-radius: 999px;
  border: 0;
  background: #1c97c3;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 6px 16px rgba(0,0,0,.3);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
  pointer-events: auto;
  transition: opacity, transform 0.2s ease;
}

.sbi-nav:hover{
  transform: translateY(-50%) scale(1.2);
}

.sbi-prev{ left: 8px;}
.sbi-next{ right: 8px;}

.sbi-nav.is-disabled {
  opacity: 0;
  pointer-events: none;
}

.cardThumbnail{
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}

.sbi_type_carousel .fa-clone {
  display: none !important;
}

.cardThumbnail > div {
  position: absolute;
  width: 29px;
  height: 29px;
  right: 25px;
  top: 16px;
  color: #cccccc;
}

.cardThumbnail > img {
  position: absolute;
  width: 35px !important;
  height: 35px !important;
  left: 16px;
  bottom: 16px;
  border-radius: 50%;
}

.cardTitle{
  position: absolute;
  bottom: 25px;
  left: 65px;
  z-index: 2;
}

.cardTitle > h3 {
  font-weight: 600;
  font-size: 14px;
}

#sb_instagram.sbi_small .sbi_type_carousel .sbi_photo_wrap .fa-clone {
  display: none !important;
}

.cardThumbnail:hover ~ .captionContainer{
  opacity: 1;
}

.captionContainer{
  background-color: rgba(8, 8, 8, 0.6);
  opacity: 0;
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  transition: opacity 0.35s ease;
}

.captionContainer > p {
  font-size: 1rem;
  width: 60%;
  max-height: 60%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  z-index: 1;
  overflow: hidden;
  text-overflow: ellipsis;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}
  
@media (min-width:640px) {
  #sb_instagram{
    max-width: calc(1.5 * 300px + 50px);
    margin: 0;
    max-height: 428px;
  }

  .sbi_follow_btn{
    right: 75px;
    top: 14px;
}

  .sbi-carousel{
    max-width: calc(1.5 * 300px + 50px);
  }

  #sb_instagram .sb_instagram_header .sbi_header_text, .sb_instagram_header .sbi_header_text {
    justify-content: start;
    align-items: center;
    gap: 20;
    width: 100%;
  }

  .sb_instagram_header{
    margin-bottom: 3rem;
  }
}

@media (min-width:1024px) {
  .sbi-carousel{
    max-width: calc(2.5 * 300px + 2 * 50px);
  }
  #sb_instagram{
    max-width: calc(2.5 * 300px + 50px);
    margin: 0;
  }

  .sbi_follow_btn{
    top: 20px;
    right: 100px;
  }

  #sb_instagram .sbi_follow_btn > a{
    width: 200px;
    height: 55px;
  }

  #sb_instagram .sb_instagram_header .sbi_header_img, .sb_instagram_header .sbi_header_img {
    width: 62px;
    height: 62px;
  }

  .sb_instagram_header > a > div > div  > img {
    width: 62px;
    height: 62px;
  }

  #sb_instagram{
    max-height: 435px;
  }
}

    