/* General Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
}

header, footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 1em 0;
}

nav ul {
    list-style: none;
    padding: 0;
}

nav li {
    display: inline;
    margin: 0 1em;
}

nav a {
    color: #fff;
    text-decoration: none;
}

main {
    padding: 20px;
}

/* Slider Styles */
.slider {
    width: 100%;
    overflow: hidden;
}

.slide {
    width: 100%; /* Adjust based on number of slides */
    float: left;
    display: none; /* Hide initially */
}

.slide img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Featured Cars */
.featured-cars, .motor-oil {
    margin-top: 20px;
}

.car-grid, .oil-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.car, .oil {
    border: 1px solid #ddd;
    padding: 15px;
    text-align: center;
    background-color: #fff;
}

.car img, .oil img {
    width: 100%;
    height: auto;
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.contact-form label {
    display: block;
    margin-bottom: 5px;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
}

.contact-form button {
    background-color: #333;
    color: #fff;
    padding: 10px 15px;
    border: none;
    cursor: pointer;
}

.about-us {
    margin-top: 20px;
}
.testimonials {
    margin-top: 30px;
    padding: 20px;
    background-color: #fff;
    border: 1px solid #ddd;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.testimonial {
    padding: 15px;
    border: 1px solid #eee;
    background-color: #f9f9f9;
}

.testimonial .author {
    font-style: italic;
    text-align: right;
}

/* Contact Form Glitch Effect */
.glitch-effect {
    position: relative; /* Required for absolute positioning of glitch elements */
    width: 50%;       /* Adjust as needed to position on the left side */
    float: left;      /* Float to the left */
    margin-right: 20px; /* Add margin to separate from other content */
    overflow: hidden; /* Hide overflow for the glitch effect */
}

/* Keyframes for the Glitch Animation */
@keyframes glitch-animation {
    0% {
        transform: translate(0);
    }
    20% {
        transform: translate(-5px, 3px);
    }
    40% {
        transform: translate(3px, -2px);
    }
    60% {
        transform: translate(-2px, -1px);
    }
    80% {
        transform: translate(1px, 2px);
    }
    100% {
        transform: translate(0);
    }
}

/* Apply the glitch animation to the pseudo-elements */
.glitch-effect::before,
.glitch-effect::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: inherit;
    text-shadow: -1px 0 red, 1px 0 blue;
    clip: rect(0, auto, auto, 0);
}

.glitch-effect::before {
    left: -2px;
    text-shadow: 2px 0 red, -2px 0 blue;
    animation: glitch-animation 2s infinite linear alternate-reverse;
}

.glitch-effect::after {
    left: 2px;
    text-shadow: -2px 0 red, 2px 0 blue;
    animation: glitch-animation 2s infinite linear alternate-reverse;
}
/* Existing Styles (keep these) */

/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto; /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
    max-width: 600px;
    position: relative; /* For close button positioning */
}

.close-btn {
    position: absolute;
    top: 0;
    right: 0;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    padding: 5px;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.modal-image {
    width: 100%;
    max-height: 300px;
    object-fit: contain; /* Show the whole image */
    margin-bottom: 10px;
}

/* Prevent scrolling when modal is open */
body.modal-open {
    overflow: hidden;
}
/* Existing Styles (keep these) */

/* View Details Button */
.view-details-btn {
    background-color: #4CAF50; /* Green */
    border: none;
    color: white;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 5px;  /* Rounded corners */
    transition: background-color 0.3s ease; /* Smooth transition */
}

.view-details-btn:hover {
    background-color: #3e8e41; /* Darker green on hover */
}