.before-after-widget {
  position: relative;
  width: 100%;
  margin: 0 auto;
}

/* Tab contents */
.baf-tab-contents {
  position: relative;
  width: 100%;
  /*height: 465px; optional, can adjust */
  box-shadow: 0 0 8.038px 3.215px rgba(0, 0, 0, 0.10);
  margin-bottom: 10px;
}

.baf-tab-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.6s ease, visibility 0.6s ease;
  box-shadow: 0 5.158px 5.158px 0 rgba(0, 0, 0, 0.25);
}

.baf-tab-content.active {
  position: relative;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 2;
}

.baf-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
  justify-content: center;
  z-index: 9;
  position: relative;
}

.baf-tab {
  display: flex;
  width: 169.797px;
  max-width: calc(25% - 16px);
  height: 106.823px;
  padding: 10px 13px;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 7.563px;
  color: var(--Global-Colors-Black, #212427);
  font-family: "Open Sans";
  font-size: 23px;
  font-style: normal;
  font-weight: 600;
  line-height: 110.021%;
  /* 25.305px */
  letter-spacing: 0.69px;
  text-transform: capitalize;
  text-align: left;
  box-shadow: 0 5.158px 5.158px 0 rgba(0, 0, 0, 0.25);
  background: #FFF !important;
  position: relative;
  color: #000 !important;
}

.baf-tab.active {
  background: #FFF !important;
}

.baf-tab.active::before {
  content: '';
  position: absolute;
  display: block;
  left: 50%;
  margin-left: -14px;
  width: 28px;
  height: 26px;
  top: -20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='26' viewBox='0 0 28 26' fill='none'%3E%3Cpath d='M13.5615 0L27.1231 25.5027L-3.91006e-05 25.5027L13.5615 0Z' fill='white'/%3E%3C/svg%3E");
}

.baf-tab:hover:not(.active) {
  background: #FFF !important;
}

.baf-tab::after {
  background: #6F262F;
  height: 3px;
  width: 54px;
  content: '';
  position: absolute;
  left: 13px;
  bottom: 24px;
}

.baf-tab span {
  margin-bottom: 7px;
}

@media only screen and (max-width: 1260px) {
  .baf-tab {
    font-size: 12.158px;
    letter-spacing: 0.365px;
    height: 74px;
  }

  .baf-tab::after {
    width: 34px;
    bottom: 15px;
  }
}

@media only screen and (max-width: 420px) {
  .baf-tabs {
    gap: 5px;
  }

  .baf-tab {
    max-width: calc(25% - 4px);
  }
}
