/* Custom CSS fixes for Murtaza Autos */

/* Fix for carousel images */
.carousel {
  max-height: 500px; /* Limit the maximum height */
  overflow: hidden;
}

.carousel .item {
  max-height: 500px; /* Match the carousel container */
}

.carousel .item img {
  width: 100%;
  height: auto;
  object-fit: cover; /* This ensures the image covers the area without distortion */
  object-position: center; /* Center the image */
}

/* Styling for carousel caption and button */
.carousel-caption {
  padding-bottom: 20px; /* Add some padding at the bottom */
  bottom: 0; /* Align at bottom of carousel */
}

.carousel-caption h1 {
  font-size: 32px; /* Adjust font size for responsive design */
  margin: 10px 0;
}

.carousel-caption h4 {
  font-size: 16px;
  margin-bottom: 5px;
}

.carousel-caption a.button {
  background: #ea1c26;
  color: white;
  padding: 10px 20px;
  display: inline-block;
  margin-top: 5px;
  font-weight: bold;
  text-transform: none;
  font-size: 16px;
  transition: all 0.3s ease;
}

.carousel-caption a.button:hover {
  background: #333;
  color: white;
}

/* Offer section styling */
#offer {
  padding: 30px 0;
  background-color: #f8f8f8;
}

#offer .offer_1i {
  text-align: center;
  padding: 15px 0;
}

#offer .offer_1i span {
  font-size: 40px;
  color: #ea1c26;
  margin-bottom: 15px;
  display: inline-block;
}

#offer .offer_1i h4 {
  margin: 10px 0;
  font-weight: bold;
}

#offer .offer_1i p {
  color: #777;
}

/* Add background to the center section */
#center {
  background-color: #f8f8f8;
}

/* Ensure carousel controls are visible */
.carousel-control {
  opacity: 0.8;
}

.carousel-control:hover {
  opacity: 1;
}

/* Media Queries for responsive design */
@media (max-width: 1200px) {
  .carousel, .carousel .item {
    max-height: 450px;
  }
}

@media (max-width: 992px) {
  .carousel, .carousel .item {
    max-height: 400px;
  }
  
  .carousel-caption h1 {
    font-size: 28px;
  }
}

@media (max-width: 768px) {
  .carousel, .carousel .item {
    max-height: 350px;
  }
  
  .carousel-caption h1 {
    font-size: 24px;
  }
  
  .carousel-caption h4 {
    font-size: 14px;
  }
  
  .carousel-caption a.button {
    padding: 8px 16px;
    font-size: 14px;
  }
}
