.right{
  display:flex;
  margin-left: auto; /* added */
}
html {
  position: relative;
  min-height: 100%;
}
body {
  margin-bottom: 60px; /* Margin bottom by footer height */
}
.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 60px; /* Set the fixed height of the footer here */
  line-height: 60px; /* Vertically center the text there */
  background-color: #f5f5f5;
}

@media (min-width: 40em) {
  /* Bump up size of carousel content */
  .carousel-caption p {
    margin-bottom: 1.25rem;
    font-size: 1.25rem;
    line-height: 1.0;
  }

/* Carousel base class */
.carousel {
  margin-bottom: 4rem;
  margin-left: 15%;
  margin-right: 15%;
}
/* Since positioning the image, we need to help out the caption */
.carousel-caption {
  bottom: 3rem;
  z-index: 10;
}

/* Declare heights because of positioning of img element */
.carousel-item {
  height: 25rem;
}
}

@media (max-width: 768px) {
  .carousel {
    margin-left: 5%;
    margin-right: 5%;
  }
  .carousel-item {
    height: 15rem; /* Reduce height for smaller screens */
  }
  .carousel img {
    width: 100%;
    height: auto; /* Maintain aspect ratio */
  }
}
