.contain {
  margin-top: 80px;
  position: relative;
  max-width: 100%;
  height: auto;
  display: flex;
  overflow: hidden;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.contain video {
  width: 100%;

  height: auto;
  object-fit: cover;
  display: block;
  margin-top: 10%;
  z-index: -1;
  margin-top: 1%;
}

.about-text {
  padding: 20px;
  text-align: left;
}

.about-text h3 {
  font-size: 24px;
  font-weight: bold;
  color: #333;
  margin-bottom: 10px;
  margin-left: 15%;
}

.about-text p {
  font-size: 20px;
  line-height: 1.6;
  color: #555;
  font-weight: normal;
  text-align: justify;
  margin-left: 15%;
  margin-right: 15%;
  font-family: "Open Sans";
}

.services-section {
  display: flex;
  justify-content: center; /* Centers the items horizontally */
  flex-wrap: wrap; /* Allows the items to wrap to the next line if necessary */
  gap: 20px; /* Adds space between the items */
  padding: 20px;
}

.services-section div {
  text-align: center; /* Centers the text below each image */
}

.services-section img {
  display: block; /* Ensures that images are treated as block-level elements */
  margin: 0 auto; /* Centers the images horizontally */
  height: 250px;
  width: 250px;
  border-radius: 10px;
  margin-top: 25px;
}
.services-section p {
  margin-top: 15px;
}
.autoplay {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  overflow: hidden;
}

.autoplay video {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}

/* Responsive styles for mobile devices */
@media (max-width: 425px) {
  .contain {
    margin-top: 20px;
  }
  .contain video {
    margin-top: 20%;
  }

  .about-text {
    padding: 10px;
  }

  .about-text h3 {
    font-size: 20px;
  }

  .about-text p {
    font-size: 16px;
    margin: 0 5%;
  }

  .services-section {
    padding: 10px;
  }

  .services-section img {
    height: 150px;
    width: 150px;
  }

  .services-section div p {
    font-size: 14px;
  }

  .autoplay {
    height: 50vh; /* Adjust the height for mobile devices */
  }
}

@media (max-width: 375px) {
  .contain video {
    margin-top: 20%;
  }
  .about-text h3 {
    font-size: 18px;
  }

  .about-text p {
    font-size: 14px;
  }

  .services-section img {
    height: 120px;
    width: 120px;
  }

  .services-section div p {
    font-size: 12px;
  }

  .autoplay {
    height: 40vh; /* Further adjust the height for smaller mobile devices */
  }
}

@media (max-width: 320px) {
  .contain video {
    object-fit: cover;
    margin-top: 30%;
    margin-left: 40px;
  }
  .about-text h3 {
    font-size: 16px;
  }

  .about-text p {
    font-size: 12px;
    margin: 0 5%;
  }

  .services-section img {
    height: 100px;
    width: 100px;
  }

  .services-section div p {
    font-size: 10px;
  }

  .autoplay {
    height: 30vh; /* Further adjust the height for the smallest screens */
  }
}

@media (max-width: 1024px) {
  .contain video {
    object-fit: cover;
    width: 100%;
    height: auto;
    margin-left: 0px;
    max-width: 100%;
  }

  .about-text {
    padding: 10px;
  }

  .about-text h3 {
    font-size: 20px;
  }

  .about-text p {
    font-size: 16px;
  }

  .services-section {
    padding: 10px;
  }

  .services-section img {
    height: 180px;
    width: 180px;
  }

  .services-section div p {
    font-size: 14px;
  }

  .autoplay {
    height: 50vh; /* Adjust height for better visibility */
    margin-left: 0; /* Reset margin */
  }
}

/* Responsive styles for devices up to 1440px */
@media (max-width: 1440px) {
  .contain video {
    object-fit: cover;
    width: 100%;
  }

  .about-text h3 {
    font-size: 22px;
  }

  .about-text p {
    font-size: 18px;
  }

  .services-section img {
    height: 200px;
    width: 200px;
  }

  .services-section div p {
    font-size: 16px;
  }

  .autoplay {
    height: 30vh;
  }
}
