:root {
  --secondary-color: #c50000;
  --primary-color: #2e3192;
}
.section-packages {
  padding: 50px 0;
  text-align: center;
}

.section-packages .heading {
  font-size: 24px;
  margin-bottom: 30px;
}

.carousel-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  overflow: hidden;
}

.carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% / 4)-15px);
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  transform: translateX(0);
  transition: transform 0.5s ease-out;
  cursor: grab;
  /*  to make user not select the image  */
  user-select: none;
  padding: 1rem 0;
  margin: 0 0.5rem;
  scroll-behavior: smooth;
}
.carousel::-webkit-scrollbar {
  display: none;
}
.carousel.dragging {
  scroll-snap-type: none;
  scroll-behavior: auto;
}
.carousel.dragging .carousel-item {
  user-select: none;
  cursor: grabbing;
}

.grabbing {
  cursor: grabbing;
}
.grabbing .carousel-item img {
  transform: scale(0.9);
}
.carousel-item {
  min-width: 282px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
  text-align: left;
  scroll-snap-align: start;
  transition: transform 0.5s ease-in-out;
}

.carousel-link {
  text-decoration: none;
  color: inherit;
}

.carousel-item img {
  width: 100%;
  border-radius: 10px 10px 0 0;
  transition: transform 0.5s ease-in-out;
  height: 180px;
  object-fit: cover;
}
.carousel-item-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.carousel-item-info h3 {
  font-size: 1.2rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.carousel-item-info p {
  font-size: 1rem;
  color: #666;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.carousel-item-info span {
  font-size: 1.1rem;
  color: #333;
  font-weight: medium;
  margin-top: 10px;
  display: block;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 1rem;
  cursor: pointer;
  z-index: 1;
}

.prev-btn {
  left: 0px;
}

.next-btn {
  right: 0px;
}

@media screen and (min-width: 768px) {
  .section-packages .heading {
    font-size: 36px;
  }
}
