*,
*::after,
*::before {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

main {
    margin: 30px 40px 0 40px;
    font-family: 'Krona One', sans-serif;
}


.name-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
}

h1 {
    font-size: 3rem;
    text-transform: uppercase;
    white-space: nowrap;
    color: #ECE9D8;
    letter-spacing: 0.2rem;
    margin: 0;
}

.car-price {
    font-size: 1.6rem;
    color: #ECE9D8;
    white-space: nowrap;
    margin: 0;
}

.slider-form {
    display: flex;
    justify-content: center;
    margin-bottom: 50px;
}

/* Slider styling */
.slider {
    width: 60%;
    position: relative;
    overflow: hidden;
}

.slider1 {
    border-top-left-radius: 15px;
    border-bottom-left-radius: 15px;
    overflow: hidden;
}

.slider-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slide {
    width: 100%;
    flex-shrink: 0;
}

.slide img {
    width: 100%;
    display: block;
}

.navigation-container {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.navigation {
    display: flex;
    margin: 1rem 1rem 1rem 0;
    gap: 25px;
}

.prev,
.next {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #ECE9D8;
}

.iconoir-nav-arrow-right:first-of-type.bounceBtnRight,
.next:hover .iconoir-nav-arrow-right,
.next:hover .iconoir-nav-arrow-right:first-of-type {
    animation: bounceBtnRight 1.4s infinite linear;
}

.iconoir-nav-arrow-right:first-of-type.bounceBtnRight,
.next:hover .iconoir-nav-arrow-right:first-of-type {
    animation-delay: 0.2s;
}

.iconoir-nav-arrow-left:first-of-type.bounceBtnLeft,
.prev:hover .iconoir-nav-arrow-left,
.prev:hover .iconoir-nav-arrow-left:first-of-type {
    animation: bounceBtnLeft 1.4s infinite linear;
}

.iconoir-nav-arrow-left:first-of-type.bounceBtnLeft,
.prev:hover .iconoir-nav-arrow-left:first-of-type {
    animation-delay: 0.2s;
}

.dots {
    text-align: center;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: fit-content;
}

.dot {
    cursor: pointer;
    height: 10px;
    width: 50px;
    margin: 0 5px;
    border: 1px solid #ECE9D8;
    border-radius: 15px;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.dot.active {
    background-color: #ECE9D8;
}

/* Reservation form styling */
.reservation-form{
    display: flex;
    width: 30%;
    max-width: 30%;
    /* gap: 50px; */
    flex-direction: column;
    background-color: #1E1E1E;
    color: #ECE9D8;
    border-top-right-radius: 15px;
    border-bottom-right-radius: 15px;
    margin-bottom: 77px;
}

.form-inputs {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: space-around;
    width: 100%;
}

.reservation-form .date,
.reservation-form .email{
    width: 60%;
    display: flex;
    flex-direction: column;
    gap: 5px;
    border-radius: 5px;
    height: fit-content;
}

.reservation-form input:not(input[type="submit"]){
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ECE9D8;
    border-radius: 5px;
}

.reservation-form input[type="submit"]{
    border: 2px solid #ECE9D8;
    border-radius: 0.5rem;
    cursor: pointer;
    color: #ECE9D8;
    background-color: transparent;
    padding: 1rem 2rem;
    font-family: 'Krona One', sans-serif;
    font-size: 1rem;
    transition: 0.35s ease-in-out;
    margin-top: 2rem;
}

.reservation-form input[type="submit"]:hover {
    box-shadow: -5px -5px 0px #ECE9D8;
    transform: translate(3px, 3px);
}

input {
    font-family: 'Krona One';
    font-size: 0.8rem;
}

.toggle-form-btn {
    display: none; 
    position: absolute;
    top: 50%;
    right: 50px;
    background-color: #1E1E1E;
    color: #ECE9D8;
    border: none;
    border-radius: 5px;
    padding: 1rem 1rem;
    cursor: pointer;
    z-index: 1;
    font-family: 'Krona One', sans-serif;
}

/* Specifications styling */
.description-specs {
    background-color: #1E1E1E;
    padding: 1rem 2rem;
    border-radius: 15px;
    margin-bottom: 100px;
}

.car-description {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.5;
    font-size: 1.15rem;
}

.specs {
    display: flex;
    justify-content: space-between;
    margin: 1rem 5rem;
    position: relative;
}

.spec {
    display: flex;
    flex: 1;
    gap: 5px;
    justify-content: center;
    text-align: center;
    position: relative;
}

.spec:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: #ECE9D8;
    margin-right: -2px;
}

.spec img {
    filter: invert(100%) sepia(0%) saturate(7500%) hue-rotate(67deg) brightness(112%) contrast(101%);
    width: 50px;
}

/* Car interior styling */
.interior {
    display: flex;
    flex-direction: column;
    position: relative;
    margin: 2rem 5rem 100px 5rem;
}

.interior-text-img {
    height: fit-content;
    display: flex;
    gap: 20px;
}

.interior-text {
    flex: 1;
    background-color: #1E1E1E;
    border-radius: 15px;
    padding: 1rem 2rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.15rem;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
}

.interior-text h2 {
    font-size: 2rem;
    color: #ECE9D8;
    margin-top: 0.5rem;
    margin-bottom: auto;
}

.interior-text p{
    margin-bottom: auto;
}

.interior-text-img img{
    flex: 1;
    width: 45%;
    border-radius: 15px;
}

.services {
    display: flex;
    flex-direction: column;
    text-align: center;
    width: 80%;
    margin: 0 auto 50px auto;
}

.services h2 {
    font-size: 2rem;
    color: #ECE9D8;
    margin: 1rem 0;
}

.services-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    margin: 1rem 0;
}

.service {
    width: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.service img {
    width: 120px;
    height: 120px;
}

/* Media Queries */
@media (width < 1200px){
    .name-price h1 {
        font-size: 2.5rem;
    }

    .slider1 {
        border-radius: 15px;
    }

    .reservation-form {
        max-width: 100%;
        z-index: 2;
        width: 100%;
        border-radius: 15px;
        padding: 2rem 1rem;
        position: absolute;
        right: -100%; 
        top: 20%;
        transition: right 0.5s ease-in-out;
    }

    .reservation-form .toggle-form-btn {
        position: absolute;
        top: 10px;
        right: 10px;
    }

    .form-inputs {
        gap: 25px;
    }

    .reservation-form {
        right: -100%;
    }

    .toggle-form-btn {
        display: block; 
    }

    .reservation-form.show {
        right: 50%;
        transform: translateX(50%); 
    }

    .dots {
        left: 30%;
    }

    .dot {
        width: 35px;
        height: 10px;
    }

    .specs {
        margin: 1rem 0;
    }

    .spec {
        font-size: 0.8rem;
    }

    .spec img {
        width: 40px;
    }

    .interior {
        margin: 2rem 0 100px 0;
    }

    .interior-text-img {
        flex-direction: column;
    }

    .interior-text-img img {
        width: 100%;
    }
}

@media (width < 1000px){
    .line {
        display: none;
    }

    .name-price {
        flex-direction: column;
        align-items: flex-start;
    }

    .car-price {
        align-self: flex-end    ;
    }
}