﻿.HomeCards .row {
  margin-left: 0;
  margin-right: 0;
}

.timeline,
.timeline * {
  float: none !important;
}

.above-992 {
  display: block;
}

.below-992 {
  display: none;
}

@media (max-width: 992px) {
  .above-992 {
    display: none;
  }

  .below-992 {
    display: block;
  }
}

.timeline-wrap {
  position: relative;
  z-index: 10;
  width: 100%;
  overflow: visible;
}

.timeline {
  white-space: nowrap;
  overflow: visible;
  width: 100%;
  margin-top: 120px;
}

:root {
  --cards: 7;
  --overlap: 130px;
}

.timeline-card {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  width: calc((100% + (var(--overlap) * (var(--cards) - 1))) / var(--cards));
  height: 350px;
  padding: 22px;
  background: #fff;
  border: 2px solid #b8885f;
  border-radius: 16px;
  text-align: center;
  font-size: 34px;
  color: #b8885f;
  margin-left: calc(var(--overlap) * -1);
  transform-style: preserve-3d;
  transform-origin: center center;
  transition:
    transform 700ms cubic-bezier(.25, .8, .25, 1),
    box-shadow 700ms cubic-bezier(.25, .8, .25, 1),
    background 700ms cubic-bezier(.25, .8, .25, 1),
    color 700ms cubic-bezier(.25, .8, .25, 1);
}

.timeline-card:first-child {
  margin-left: 0;
}

.timeline-card h3.card-title,
.mobile-card h3.card-title {
  color: #b8885f;
}

.timeline-card.active h3.card-title,
.mobile-card.active h3.card-title {
  color: #ffffff;
}

.timeline-card .card-content {
  display: block;
  margin-top: 12px;
  font-size: 14px;
  color: #555;
}

.timeline-card.active,
.mobile-card.active {
  background: #b8885f;
  color: #fff;
}

.timeline-card.active .card-content,
.mobile-card.active .card-content {
  color: #fff;
}

.card-description,
.card-title {
  white-space: normal !important;
}

.timeline-card .number-circle,
.mobile-card .number-circle {
  position: absolute;
  top: -110px;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: 56px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #b8885f;
  border-radius: 50%;
  color: #b8885f;
  font-size: 18px;
}

.timeline-card .number-circle::after,
.mobile-card .number-circle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);

  width: 3px;
  height: 56px;

  background: linear-gradient(to bottom,
      rgba(194, 138, 92, 0.8),
      rgba(194, 138, 92, 0.5),
      rgba(194, 138, 92, 0.1));

  pointer-events: none;
}

.button-wrapper {
  margin-top: 80px;
}

.timeline-card span.card-icon,
.mobile-card span.card-icon {
  margin: auto;
  background: #ffffff;
}

@media (max-width: 768px) {
  .timeline {
    white-space: normal;
  }

  .timeline-card {
    display: block;
    width: 100%;
    margin: 0 auto 20px;
    transform: none !important;
  }
}


@media (min-width: 1367px) and (max-width: 1480px) {
  .timeline-card {
    height: 360px;
    padding: 10px;
  }
}

@media (min-width: 1200px) and (max-width: 1367px) {
  .timeline-card {
    height: 370px;
    padding: 10px;
  }
}

@media (min-width: 992px) and (max-width: 1199px) {
  .timeline-card {
    height: 370px;
    padding: 10px;
  }
}

@media (min-width: 767px) and (max-width: 992px) {
  .button-wrapper {
    margin-top: 0px !important;
  }
}

@media (max-width: 991px) {

  .mobile-carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 465px;
  }

  .mobile-carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
    perspective: 1200px;
  }

  .mobile-card {
    position: absolute;
    top: 50%;
    left: 50%;

    transform: translate(-50%, -50%);

    width: 260px;
    height: 300px;

    background: #fff;
    border: 2px solid #c28a5c;
    border-radius: 16px;

    transform-style: preserve-3d;
    transform-origin: center center;

    transition:
      transform 600ms cubic-bezier(.25, .8, .25, 1),
      opacity 600ms ease;

    opacity: 0;

    padding: 18px;
    text-align: center;
  }

  .carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #c28a5c;
    background: #fff;
    color: #c28a5c;
    font-size: 22px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s ease, color 0.3s ease;
  }

  .carousel-arrow:hover {
    background: #c28a5c;
    color: #fff;
  }

  .carousel-arrow.prev {
    left: 0px;
  }

  .carousel-arrow.next {
    right: 0px;
  }


  .mobile-carousel-track {
    margin-top: 40px;
  }

  .card-description {
    font-size: 15px;
    line-height: 1.4;
  }
}

@media (max-width: 767px) {

  .mobile-carousel {
    padding-bottom: 80px;
    height: 485px;
  }

  .carousel-arrow {
    top: auto;
    bottom: 0;
    transform: none;

    width: 44px;
    height: 44px;
  }

  .carousel-arrow.prev {
    left: 50%;
    transform: translateX(-120%);
  }

  .carousel-arrow.next {
    right: 50%;
    transform: translateX(120%);
  }

  .button-wrapper {
    margin-top: 10px;
  }

  .mobile-carousel-track {
    margin-top: 65px;
  }
}