body {
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
  margin: 0;
  padding: 0;
    
}


/*    Centering the carousel*/
.box {
  display: flex;
  align-items: center;
  justify-content: center;
}



.carousel-wrapper {
  position: relative;
  padding: 2rem 1rem;
  overflow-x: hidden;
  width: 70vw;
}

.carousel-container {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  gap: 1rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  width: max-content;
}

.carousel-wrapper:hover .carousel-container {
  animation-play-state: paused;
}

.carousel-container::-webkit-scrollbar {
  display: none;
}
/* adjusting the carousel, flex = carousel width*/
.card {
  flex: 0 0 200px;
flex-shrink: 0;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  height: 440px;
  transition: transform 0.3s;
}

.card:hover {
  transform: translateY(-5px);
}

.card-image {
  height: 50%;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.4s ease, filter 0.4s ease; /*smooth transition*/
}

.card-image:hover img {
  transform: scale(1.1); /* slight zoom-in */
  filter: brightness(70%); /*image darker*/
}

.card-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem;
  background-color: #b36fc0;
}

.card-title {
  font-size: 1.1rem;
  font-weight: bold;
  margin: 0 0 0.5rem;
  color: white;
}

.card-description {
  flex-grow: 1;
  color: #555;
  font-size: 0.95rem;
  margin-bottom: 1rem;
color: white;
}

.card-footer {
  display: flex;
  justify-content: flex-end;
  background-color:#b36fc0;
}

.read-more-btn {
  background-color:#b36fc0;
  color: white;
  padding: 0.1rem 0.9rem;
border-style: solid;
border-color: white;
border-width: 1px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.read-more-btn:hover {
  background-color: #eac8c9;
}

.nav-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  z-index: 1;
}

.nav-button:hover {
  background-color: rgba(0, 0, 0, 0.7);
}

.prev {
  left: 10px;
}

.next {
  right: 10px;
}


  /* Fade masks */
.fade-left,
.fade-right {
  position: absolute;
  width: 22vw; /* Width of the 2 white space on both side */
  height: 30rem;
  pointer-events: none; 
  z-index: 2;
}
.fade-left {
  left: 0;
  background: linear-gradient(to right, #f0f0f0 0%, rgba(240, 240, 240, 0) 100%);
}
.fade-right {
  right: 0;
  background: linear-gradient(to left, #f0f0f0 0%, rgba(240, 240, 240, 0) 100%);
}
/* orginal size = 768 and flex size = 80vw *****Tuy's corrections ********/
@media (max-width: 400px) {
  .card {
    flex: 0 0 40vw;
    height: auto;
  }

  .card-description {
    margin-bottom: 0.5rem;
  }

  .read-more-btn {
    padding: 0.2rem 0.4rem;
  } 
}

@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@-webkit-keyframes scroll-left {
  0% {
    -webkit-transform: translateX(0);
  }
  100% {
    -webkit-transform: translateX(-50%);
  }
}



