#carList {
    text-align: center;
    padding: 20px 0;
}

.carType {
    text-align: center;
}

/*styr hur menyn ser ut*/
.menu {
    display: inline-block;
    padding-right: 5px;
}

.menu a {
    display: block;
    text-decoration: none;
    color: white;
    padding: 20px;
}

.menu a:hover {
    color: #ff9900;
}

fieldset {
    border: 1px solid black;
    margin-bottom: 40px;
    background: rgba(0, 0, 0, 0.5);
}

nav {
    background-color: #1a1a1a;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

#contact {
    background-image: url("Images/crashedCar.jpg");
    background-repeat: no-repeat;
    background-size: cover;
}

.contactForm {
    max-width: 600px;
    margin: 40px auto;
}

.contactForm fieldset {
    border: none;
    background: white;
    padding: 30px;
    border-radius: 5px;
    color: black;
}
/*specifik styling för min form*/
input[type="text"],
input[type="email"],
input[type="submit"],
textarea {
    width: 100%;
    padding: 12px;
    margin: 8px 0 20px 0;
    border: 1px solid black;
    border-radius: 2px;
    box-sizing: border-box;
}

#carSelector {
    display: block;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

.box {
    border: solid 1px black;
}

.logo {
    display: block;
    margin: 20px auto;
    height: 250px;
}

.car {
    border: 1px solid black;
    padding: 15px;
    margin: 15px;
    width: 240px;
    display: inline-block;
    vertical-align: top;
    border-radius: 10px;
    background: white;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #baaaaa;
    margin: 0;
    padding: 0;
}
/*för att ändra utseednet på bilfiltret*/
#carFiltration {
    background: #393131;
    padding: 25px;
    margin: 20px auto;
    max-width: 900px;
    border-radius: 8px;
    display: flex;
    gap: 15px;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#carFiltration select,
#carFiltration input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    flex: 1;
}

#carFiltration button {
    background-color: #e63946;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}
/*Min hero sak, bilden med text på i index*/
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
        url('Images/normal car icon.jpg');
    background-size: cover;
    background-position: center;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-bottom: 50px;
}

.main-logo {
    width: 250px;
    filter: drop-shadow(2px 4px 6px black);
    margin-bottom: 20px;
    max-width: 90%;
}

.hero h1 {
    font-size: 40px;
    margin: 10px 0;
    padding: 0 15px;
}

.carButton {
    display: inline-block;
    background: #e63946;
    color: white;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    margin-top: 20px;
    transition: 0.3s ease;
}

.carButton:hover {
    background: #c12e3a;
    transform: scale(1.05);
}

.car-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.car-card {
    flex: 1;
    min-width: 250px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    overflow: hidden;
}

.car-card:hover {
    transform: translateY(-10px);
}

.car-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-info {
    padding: 20px;
}

.card-info h3 {
    margin: 0 0 10px 0;
    color: #333;
}
/*Kod för kolumnerna på about sidan*/
.about-columns {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    max-width: 1300px;
    margin: 20px auto;
    padding: 0 10px;
}

.about-item {
    flex: 1;
    text-align: center;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

.about-item h3 {
    color: #1a1a1a;
    margin-bottom: 15px;
    font-size: 22.4px;
}

.about-item .icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.about-item p {
    font-size: 15.2px;
    line-height: 1.6;
    color: #555;
}

img {
    max-width: 100%;
    height: auto;
}

.about-item img {
    width: 100%;
    max-height: 250px;
    object-fit: cover;
    border-radius: 8px;
    margin-top: 10px;
}

h1,
.about-intro {
    text-align: center;
    max-width: 800px;
    margin: 40px auto;
    padding: 0 15px;
}
/*Mobilanpassningar*/
@media (max-width: 768px) {

    nav ul {
        flex-wrap: wrap;
    }

    .menu a {
        padding: 15px 10px;
        font-size: 14px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .about-columns {
        flex-direction: column;
        align-items: center;
        margin: 20px 10px;
    }

    .about-item {
        width: 100%;
        max-width: 100%;
    }

    #carFiltration {
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
        margin: 15px;
    }

    #carFiltration select,
    #carFiltration input,
    #carFiltration button {
        width: 100%;
        box-sizing: border-box;
    }

    #contact {
        background-image: url("Images/crashafaefedCar.jpg");
    }

    .contactForm {
        margin: 20px 15px;
    }

    .contactForm fieldset {
        padding: 15px;
    }

    iframe {
        width: 100%;
        max-width: 100%;
        height: auto;
        aspect-ratio: 16/9;
    }

    .car-grid {
        flex-direction: column;
        align-items: center;
        padding: 10px;
    }

    .car-card {
        width: 100%;
    }

    .logo {
        height: auto;
        max-width: 80%;
        margin: 15px auto;
    }

    .hero {
        height: auto;
        min-height: 50vh;
        padding: 40px 15px;
        box-sizing: border-box;
    }

    .hero-content p {
        font-size: 16px;
        margin-bottom: 20px;
    }

    .carButton {
        padding: 12px 24px;
    }
}