:root {
  --tc-left-position: 55%;
  --tc-transition-time: 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.timed-carousel {
  width: 100%;
  height: 600px;
  overflow: hidden;
  position: relative;
  background-color: var(--dark-bg, #111111);
  border-radius: 30px;
  margin-top: 40px;
}

.timed-carousel .list {
  position: relative;
  width: 100%;
  height: 100%;
}

.timed-carousel .list .item {
  width: 180px;
  height: 250px;
  position: absolute;
  bottom: 120px;
  left: calc(var(--tc-left-position) + 3%);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7);
  background-position: center;
  background-size: cover;
  z-index: 100;
  transform: translate(0, 0px);
  transition: all var(--tc-transition-time);
}

.timed-carousel .list .item::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  background-color: rgba(33, 33, 33, 0.5);
  z-index: 1;
}

.timed-carousel .list .item:nth-child(1),
.timed-carousel .list .item:nth-child(2) {
  bottom: 0px;
  left: 0;
  border-radius: 0;
  transform: translate(0, 0px);
  width: 100%;
  height: 100%;
}

.timed-carousel .list .item:nth-child(3) {
  left: var(--tc-left-position);
}

.timed-carousel .list .item:nth-child(4) {
  transition-delay: 0.1s;
  left: calc(var(--tc-left-position) + 200px);
}

.timed-carousel .list .item:nth-child(5) {
  transition-delay: 0.2s;
  left: calc(var(--tc-left-position) + 400px);
}

.timed-carousel .list .item:nth-child(6) {
  transition-delay: 0.3s;
  left: calc(var(--tc-left-position) + 600px);
}

.timed-carousel .list .item:nth-child(n + 7) {
  transition-delay: 0.4s;
  left: calc(var(--tc-left-position) + 800px);
}

.timed-carousel .list .item .content {
  position: absolute;
  text-align: left;
  color: #fff;
  z-index: 3;
  left: 0;
  top: 100%;
  transform: translateY(-100%);
  width: 100%;
  padding: 10px;
  transition: all var(--tc-transition-time);
}

.timed-carousel .content .title::before {
  content: "";
  display: block;
  height: 1px;
  width: 20px;
  background-color: #fff;
  margin-bottom: 10px;
}

.timed-carousel .content .title {
  font-size: 12px;
  text-transform: uppercase;
  color: #ffffff;
  font-weight: bold;
  line-height: 1;
  margin-bottom: 10px;
  transition: all var(--tc-transition-time);
  position: relative;
  font-family: 'Quicksand', sans-serif;
}

.timed-carousel .content .title::after {
  content: attr(data-item);
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  position: absolute;
  top: -20px;
  left: 0px;
  z-index: 2;
  font-weight: 400;
}

.timed-carousel .content .name {
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 500;
  line-height: 1;
  transition: all var(--tc-transition-time);
  margin-bottom: 10px;
  color: var(--primary, #cda776);
  /* Adapted to Odonto Graves palette */
  font-family: 'Quicksand', sans-serif;
}

.timed-carousel .content .des {
  font-size: 16px;
  font-weight: 400;
  transition: all var(--tc-transition-time);
  opacity: 0;
  display: none;
  font-family: 'Quicksand', sans-serif;
}

.timed-carousel .list .item:nth-child(1) .content,
.timed-carousel .list .item:nth-child(2) .content {
  transform: translateY(-50%);
  left: 100px;
  width: 600px;
  top: 50%;
  padding: 0;
}

.timed-carousel .list .item:nth-child(1) .content .title::before,
.timed-carousel .list .item:nth-child(2) .content .title::before {
  width: 50px;
  height: 3px;
  margin-bottom: 20px;
}

.timed-carousel .list .item:nth-child(1) .content .title::after,
.timed-carousel .list .item:nth-child(2) .content .title::after {
  font-size: 25px;
  top: -40px;
  left: 15px;
}

.timed-carousel .list .item:nth-child(1) .content .title,
.timed-carousel .list .item:nth-child(2) .content .title {
  font-size: 50px;
  margin-bottom: 20px;
}

.timed-carousel .list .item:nth-child(1) .content .name,
.timed-carousel .list .item:nth-child(2) .content .name {
  font-size: 20px;
  margin-bottom: 20px;
}

.timed-carousel .list .item:nth-child(1) .content .des,
.timed-carousel .list .item:nth-child(2) .content .des {
  font-size: 16px;
  opacity: 1;
  display: block;
  width: 400px;
}

@keyframes animate-tc {
  from {
    opacity: 0;
    transform: translate(0, 100px);
    filter: blur(33px);
  }

  to {
    opacity: 1;
    transform: translate(0);
    filter: blur(0);
  }
}

.timed-carousel .arrows {
  position: absolute;
  bottom: 30px;
  left: var(--tc-left-position);
  width: calc(100% - var(--tc-left-position) - 2%);
  z-index: 100;
  display: flex;
  gap: 5%;
  align-items: center;
}

.timed-carousel .arrows button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgb(255, 255, 255);
  color: rgb(255, 255, 255);
  background-color: transparent;
  outline: none;
  font-size: 25px;
  font-weight: bold;
  transition: all var(--tc-transition-time);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timed-carousel .arrows button:hover {
  border: 2px solid #ffffff;
  color: #ffffff;
  background-color: transparent;
}

.timed-carousel .slide-number {
  font-size: 25px;
  color: #ffffff;
  font-weight: 400;
  margin-left: auto;
  letter-spacing: 5px;
  opacity: 0;
  animation: animate-tc 0.5s ease-in-out 0.3s 1 forwards;
  font-family: 'Quicksand', sans-serif;
}

.timed-carousel .progress-bar-container {
  width: 60%;
  height: 3px;
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  overflow: hidden;
}

.timed-carousel .progress-bar {
  height: 100%;
  width: 0%;
  background-color: var(--primary, #cda776);
  transition: all var(--tc-transition-time);
}

.timed-carousel .timeRunning {
  position: absolute;
  z-index: 1000;
  width: 0%;
  height: 4px;
  background-color: #ffffff;
  left: 0;
  top: 0;
  animation: runningTime-tc 7s linear 1 forwards;
}

@keyframes runningTime-tc {
  from {
    width: 0%;
  }

  to {
    width: 100%;
  }
}

/* Carousel Action Button */
.timed-carousel .carousel-action-btn {
  position: absolute;
  bottom: 30px;
  left: 100px;
  z-index: 200;
}

/* Responsive tweaks */
@media screen and (max-width: 991px) {
  :root {
    --tc-left-position: 50%;
  }

  .timed-carousel .list .item:nth-child(1) .content,
  .timed-carousel .list .item:nth-child(2) .content {
    left: 40px;
    width: 400px;
  }

  .timed-carousel .carousel-action-btn {
    left: 40px;
  }
}

@media screen and (max-width: 767px), screen and (max-device-width: 767px) {
  :root {
    --tc-left-position: 5%;
  }

  .timed-carousel {
    height: 560px;
  }

  .timed-carousel .list .item {
    width: calc(50% - 28px);
    max-width: 138px;
    height: 182px;
    bottom: 118px;
    border-radius: 22px;
  }

  .timed-carousel .list .item:nth-child(1),
  .timed-carousel .list .item:nth-child(2) {
    left: 0;
    bottom: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    border-radius: 0;
  }

  .timed-carousel .list .item::after {
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.08) 0%, rgba(10, 10, 10, 0.22) 40%, rgba(10, 10, 10, 0.72) 100%);
  }

  .timed-carousel .list .item:nth-child(1)::after,
  .timed-carousel .list .item:nth-child(2)::after {
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.58) 0%, rgba(10, 10, 10, 0.16) 24%, rgba(10, 10, 10, 0.18) 50%, rgba(10, 10, 10, 0.84) 100%);
  }

  .timed-carousel .list .item:nth-child(3) {
    left: 16px;
  }

  .timed-carousel .list .item:nth-child(4) {
    left: calc(50% + 10px);
  }

  .timed-carousel .list .item:nth-child(n + 5) {
    left: calc(100% + 28px);
    opacity: 0;
    pointer-events: none;
  }

  .timed-carousel .list .item:nth-child(1) .content,
  .timed-carousel .list .item:nth-child(2) .content {
    left: 20px;
    top: 30px;
    transform: none;
    width: min(220px, calc(100% - 40px));
    padding-right: 0;
  }

  .timed-carousel .list .item:nth-child(1) .content .title,
  .timed-carousel .list .item:nth-child(2) .content .title {
    font-size: 27px;
    line-height: 1.02;
    margin-bottom: 14px;
  }

  .timed-carousel .list .item:nth-child(1) .content .title::before,
  .timed-carousel .list .item:nth-child(2) .content .title::before {
    width: 34px;
    height: 2px;
    margin-bottom: 14px;
  }

  .timed-carousel .list .item:nth-child(1) .content .title::after,
  .timed-carousel .list .item:nth-child(2) .content .title::after {
    font-size: 18px;
    top: -28px;
    left: 8px;
  }

  .timed-carousel .list .item:nth-child(1) .content .name,
  .timed-carousel .list .item:nth-child(2) .content .name {
    font-size: 15px;
    margin-bottom: 12px;
  }

  .timed-carousel .list .item:nth-child(1) .content .des,
  .timed-carousel .list .item:nth-child(2) .content .des {
    width: 100%;
    max-width: 180px;
    font-size: 13px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
    text-wrap: pretty;
  }

  .timed-carousel .arrows {
    bottom: 18px;
    left: 20px;
    width: calc(100% - 40px);
    gap: 12px;
  }

  .timed-carousel .arrows button {
    width: 44px;
    height: 44px;
  }

  .timed-carousel .slide-number {
    font-size: 20px;
    letter-spacing: 2px;
  }

  .timed-carousel .progress-bar-container {
    width: min(36vw, 140px);
  }

  .timed-carousel .carousel-action-btn {
    left: 20px;
    right: 20px;
    bottom: 78px;
    transform: none;
  }

  .timed-carousel .carousel-action-btn .btn-treatments-link {
    width: 100%;
    justify-content: center;
    padding-inline: 1rem;
  }
}
