body {
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0; 
    background-color: #f8f8f8;;
}

.contact-bar {
    background: #333;
    color: white;
    text-align: center;
    padding: 10px;
    font-size: 16px;
}

.contact-bar strong {
    color: #007bff;
}

.header-container {
    width: 100%;
    height: 400px;
    background-image: url('images/road.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 5px 200px;
    background-color: rgba(0, 0, 0, 0.5);
    position: relative;
    left: 0;
    right: 0;
    box-sizing: border-box;
}

.header-title {
    position: absolute;
    top: 140%;
    transform: translate(-140%,);
    font-size: 48px;
    color: white;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    padding: 0 200px;
    text-align: center;
}

.logo img {
    height: 100px;
    object-fit: contain;
}

nav ul {
    display: flex;
    list-style-type: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
    width: 100%;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    padding: 10px;
}

nav ul li a:hover {
    background-color: #007bff;
    border-radius: 5px;
}

.search-box {
    position: absolute;
    top: 350px;
    left: 0;
    width: 100%;
    padding: 0 200px;
    height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    z-index: 10;
}

.search-container {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    text-align: center;
    position: relative;
    box-sizing: border-box;
}

.search-header {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.search-header i {
    font-size: 24px;
}

.search-fields {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.search-fields select,
.search-fields button {
    padding: 15px 15px;
    border-radius: 2px;
    border: none;
    font-size: 16px;
}

.search-fields select {
    width: 280px;
}

.search-fields button {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

#search-btn {
    background: #007bff;
    color: white;
}

#search-btn:hover {
    background-color: #0056b3;
}

#reset-btn {
    background: #007bff;
    color: white;
}

#reset-btn:hover {
    background-color: #0056b3;
}

.recent-cars {
    text-align: center;
    padding: 50px 20px;
    background: #f8f8f8;
    margin-top: 100px;
}

.recent-cars h2 {
    font-size: 28px;
    margin-bottom: 30px;
    color: #333;
}

.car-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: auto;
}

.car-card {
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: left;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.car-card:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.car-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
}

.car-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.car-info h3 {
    font-size: 18px;
    color: #333;
    margin: 0;
}

.price {
    background: #007bff;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
}

.car-details {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}

.car-details i {
    margin-right: 5px;
    color: #007bff;
}

.features {
    background: url(images/construction\ machinery.jpg) no-repeat center center/cover;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 200px 20px;
    gap: 20px;
    position: relative;
}

.features::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.feature-box {
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    width: 300px;
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.feature-box i {
    font-size: 40px;
    margin-bottom: 10px;
}

.feature-box h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 10px;
}

.feature-box p {
    font-size: 14px;
    color: #666;
}

.contact-bar-email {
    background: url('background.jpg') no-repeat center center/cover;
    padding: 40px 0px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    position: relative;
}

.contact-bar-email::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.phone-box {
    background: white;
    color: #007bff;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    font-size: 16px;
    margin-left: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.phone-box i {
    margin-right: 10px;
    font-size: 18px;
}


.phone-box span {
    color: #007bff;
}


.email-box:hover {
    background: #007bff;
    color: white;
}

.phone-box:hover {
    
    background: white;
    color: #007bff;
}

.contact-container {
    width: 80%;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}

.contact-bar-email h2 {
    font-size: 24px;
    position: relative;
    z-index: 2;
}

.contact-bar-email h2 span {
    color: #007bff;
}

.email-box {
    background: white;
    color: #007bff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 2;
}

.email-box i {
    margin-right: 10px;
    font-size: 18px;
}

.email-box:hover {
    background: #007bff;
    color: white;
}

.testimonials {
    background: url(images/testimonials.jpg) no-repeat center center/cover;
    padding: 80px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.testimonials-overlay {
    background: rgba(0, 0, 0, 0.6);
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    color: white;
    width: 80%;
    max-width: 800px;
    position: relative;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial {
    display: none;
    text-align: left;
    background: white;
    color: #333;
    padding: 20px;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    width: 100%;
    min-height: 200px;
    box-sizing: border-box;
}

.testimonial.active {
    display: block;
    opacity: 1;
}

.testimonial h2 {
    font-size: 24px;
    margin-bottom: 5px;
    color: #007bff;
}

.testimonial .subtitle {
    font-size: 16px;
    font-weight: bold;
    color: #555;
    margin-bottom: 10px;
}

.testimonial-text {
    font-size: 16px;
    line-height: 1.5;
}

.quote-icon {
    position: absolute;
    right: 20px;
    top: 5px;
    font-size: 100px;
    color: #007bff;
    font-family: serif;
    opacity: 0.5;
}

.inventory-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 20px;
    background: #f4f4f4;
}

.inventory-filters select,
.inventory-filters input {
    padding: 8px;
    font-size: 14px;
}

.inventory-filters button {
    padding: 8px 15px;
    background: #ff9900;
    color: #fff;
    border: none;
    cursor: pointer;
}

.inventory-filters button:hover {
    background: #e68900;
}

.inventory-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 20px;
}

.inventory-item {
    background: white;
    padding: 15px;
    border: 1px solid #ddd;
    text-align: center;
    transition: 0.3s;
    cursor: pointer;
}

.inventory-item:hover {
    transform: scale(1.05);
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

.inventory-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.inventory-item h3 {
    margin: 10px 0;
}

.inventory-item .price {
    font-size: 18px;
    font-weight: bold;
    color: #ff9900;
}

.faq-container, .terms-container, .return-container, .about-container {
    width: calc(80% - 400px);
    margin: 0 auto;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    margin-bottom: 20px;
}

.faq-header, .terms-header, .return-header {
    font-size: 36px;
    font-weight: bold;
    color: #333;
    margin-top: 30px;
    margin-bottom: 10px;
}

.faq-subheader, .return-subheader {
    font-size: 24px;
    font-weight: bold;
    color: #007bff;
    margin-top: 20px;
    margin-bottom: 5px;
}

p {
    font-size: 16px;
}

ul {
    list-style-type: disc;
    margin-left: 20px;
}

ul li {
    margin-bottom: 8px;
}

.email-link {
    color: #007bff;
    text-decoration: none;
}

.email-link:hover {
    text-decoration: underline;
}

.about-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
}

.about-block reverse {
    flex-direction: row-reverse !important;
}

.about-image {
    width: 45%;
}

.about-image img {
    width: 100%;
    border-radius: 8px;
}

.about-text {
    width: 45%;
}

.about-text h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #007bff;
}

.about-text p {
    font-size: 1rem;
    color: #555;
    line-height: 1.2;
    margin-bottom: 30px;
}

.contactus-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.form-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 15px;
}

.full-width {
    flex-direction: column;
}

.form-group {
    flex: 1;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

textarea {
    height: 150px;
    resize: vertical;
}

.contact-submit {
    padding: 12px;
    font-size: 1rem;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
}

.contact-submit:hover {
    background-color: #0056b3;
}

form {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        max-width: 700px;
        margin: auto;
    }

    form label {
        display: block;
        margin-bottom: 5px;
        font-weight: bold;
    }

    form input, form textarea, form button {
        width: 100%;
        padding: 8px;
        box-sizing: border-box;
        font-size: 14px;
    }

    .full-width {
        grid-column: 1 / -1;
    }

    button {
        padding: 10px;
        background-color: #007BFF;
        color: white;
        border: none;
        cursor: pointer;
        font-size: 16px;
    }

    button:hover {
        background-color: #0056b3;
    }

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border: 1px solid #f5c6cb;
    margin-top: 10px;
    border-radius: 4px;
    font-size: 1rem;
    width: 100%;
    text-align: center;
}

footer {
    background: #222;
    color: #fff;
    text-align: center;
    padding: 30px 0;
    font-size: 16px;
}

footer p {
    margin: 0;
}

.car-card {
    position: relative;
    overflow: hidden;
}

.badge-container {
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    pointer-events: none;
}

.sold-badge,
.recent-badge {
    position: absolute;
    top: 10px;
    right: -30px;
    background-color: red;
    color: white;
    padding: 5px 0;
    width: 140px;
    text-align: center;
    font-size: 12px;
    font-weight: bold;
    transform: rotate(45deg);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    text-transform: uppercase;
    z-index: 1;
}

.sold-badge {
    background-color: #dc3545;
    top: 30px;
}

.recent-badge {
    background-color: rgba(40, 167, 69, 0.7);
    top: 30px;
}

@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  header {
    flex-direction: column;
    align-items: center;
    padding: 10px 20px;
  }

  .logo img {
    height: 100px;
    argin-bottom: 10px;
  }
  
  nav ul {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  nav ul li {
    margin: 8px 0;
  }

  nav ul li a {
    font-size: 16px;
    padding: 8px 12px;
    display: block;
    width: 100%;
    text-align: center;
  }
    
  .header-title {
    position: static;
    transform: none;
    font-size: 32px;
    padding: 0 20px;
    margin-top: 20px;
    text-align: center;
  }

  .header-container {
    height: auto !important;
  }

  .search-box {
    position: static !important;
    padding: 20px !important;
    height: auto !important;
    flex-direction: column;
  }

  .search-container {
    width: 100% !important;
  }

  .search-fields {
    flex-direction: column;
  }

  .search-fields select,
  .search-fields button {
    width: 100% !important;
  }

  .car-card img {
    height: 140px !important;
    object-fit: cover !important;
  }

  .features {
    flex-direction: column !important;
    padding: 50px 15px !important;
  }

  .feature-box {
    width: 100% !important;
    max-width: 300px;
  }

  .faq-container,
  .terms-container,
  .return-container,
  .about-container {
    width: 90% !important;
    margin: 10px auto !important;
    padding: 10px !important;
    box-sizing: border-box;
  }

  .faq-header, .terms-header, .return-header {
    font-size: 24px !important;
  }

  .faq-subheader, .return-subheader {
    font-size: 18px !important;
  }

  .about-block {
    flex-direction: column !important;
    gap: 20px;
  }

  .about-image,
  .about-text {
    width: 100% !important;
  }

  form {
    grid-template-columns: 1fr !important;
  }

  .form-row {
    flex-direction: column;
  }

  .form-group {
    width: 100% !important;
  }

  .contact-container {
    flex-direction: column;
    gap: 20px;
    width: 90% !important;
  }
}
