/* Container & Title */
.carousel-container {
  background:#111;
  color: white;
  padding: 20px 0;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  text-align:left;
  clear:both;
  overflow-x: hidden; 
}

.carousel-title {
  margin-left: 4%;
  font-size: 1.2rem;
  font-weight: 700;
}

/* Wrapper */
.carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  overflow-x: hidden; 
}

/* The Row itself */
.carousel-row {
  display: flex;
  overflow-x: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Hide scrollbar for Firefox */
  padding: 10px 4%; /* Leave room for the hover growth */
  gap: 10px;
  width: 100%;
}

/* Hide scrollbar for Chrome/Safari */
.carousel-row::-webkit-scrollbar {
  display: none;
}

/* Movie Tiles */
.movie-tile {
  min-width: 240px; /* Adjust width for desired item count */
  height: 135px;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 300ms ease-in-out;
}

.movie-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Hover Effect: Scale and shift */
.movie-tile:hover {
  transform: scale(1.2);
  z-index: 10;
  box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

/* Shrink non-hovered items for the true Netflix feel (Optional) */
.carousel-row:hover .movie-tile:not(:hover) {
  transform: scale(0.9);
  opacity: 0.7;
}

/* Navigation Handles (Buttons) */
.handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4%;
  background-color: #f00;
  border: none;
  outline: none;
  cursor: pointer;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 250ms ease;
}

.carousel-wrapper:hover .handle {
  opacity: 1;
}

.left-handle { left: 0; }
.right-handle { right: 0; }

.arrow {
  font-size: 3rem;
  color: white;
  user-select: none;
}

/* title overlay */
.movie-title {
	background-color: rgb(0, 0, 0, 0.75);
	/*positioned relative to parent div (container) */
	position: absolute;    
	/* bottom margin is 0 so that it coincides with container's bottom margin*/
	bottom: 0;            
	color: white;
	width: 100%;
	font-size: 0.65rem;
	padding: 10px 0;
	text-align: center;
	/*invisible because opacity is 0*/
	opacity: 0;            
	transition: 0.6s;
        }

.movie-tile:hover .movie-title {
/*becomes visible on hover*/
	opacity: 1;        
}