/*
Theme Name: REVECARS
Author: Jonáš Menšík
Version: 1.0
*/

:root {
    --side-margin: calc(4rem);
    font-size: 16px;
}

body {
    width: 100%;
    margin: 0;

    font-family: "Titillium Web", sans-serif;
    
    color: white;

    background: url(assets/bg.jpg);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: top center;

    position: relative;
}

* {
    scroll-behavior: smooth;
}

.red {
    color: red;
}

.italic {
    font-style: italic !important;
}

.header {
    font-family: "Titillium Web", sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: 2.5rem;
    margin: 0;
}

.subheader {
    font-family: "Titillium Web", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 1.25rem;
    margin: 0;
}

.description {
    font-family: "Titillium Web", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 1rem;
    margin: 0;
}

.section-divider {
    margin: 0 var(--side-margin);
    display: flex;
    justify-items: space-between;
    flex-direction: row;
    box-sizing: border-box;
    align-items: center;
    gap: 0.5rem;
    scroll-margin-top: 4rem;
}
.section-border {
    flex-grow: 1;
    border-top: 1px solid;
    border-image-slice: 1;

    border-image-source: linear-gradient(to left, transparent, white);

    &:first-child {
        border-image-source: linear-gradient(to right, transparent, white);
    }
    
}
.section-header {
    width: 10rem;
    padding: 0.5rem;
    border-radius: 1.25rem;
    height: 2.5rem;
    box-sizing: border-box;
    border: 1px solid white;
    
    display: flex;
    justify-content: center;
    align-items: center;

    & * {
        color: white;
        font-size: 1rem;
        font-weight: 600;
        text-align: center;
    }
}





.navbar {
    background-color: black;
    box-shadow: 0 0 1rem 1rem rgba(0, 0, 0, 0.344);
    height: 4rem;
    padding: 1rem;
    box-sizing: border-box;

    display: flex;
    justify-content: space-between;
    align-items: center;

    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-logo {
    margin: auto;
    height: 2rem;
}

.navbar-links {
    width: calc(50% - 3rem);

    text-align: left;


    display: flex;
    align-items: center;
    gap: 1rem;

    &:last-child {
        justify-content: right;
    }

    & a {
        text-decoration: none;
        color: white;
    }
}
.hamburger {
    width: 2rem;
    height: 1.375rem;
    
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;

    display: none;
    position: absolute;
    right: 1rem;

    & span {
        width: 100%;
        height: 2px;
        background-color: white;

        transition-duration: 0.25s;
    }

    

    &.active {
        & span:nth-child(1) {
            transform: translateY(calc(0.5rem + 2px)) rotate(45deg);
        }
        & span:nth-child(2) {
            opacity: 0;
        }
        & span:nth-child(3) {
            transform: translateY(calc(-0.5rem - 2px)) rotate(-45deg);
        }
    }
}
.hamburgermenu {
    height: 100%;
    width: 60vw;
    padding: 2rem;
    box-sizing: border-box;

    z-index: 10;

    background-color: rgb(0, 0, 0);

    position: fixed;
    top: 4rem;
    right: 0;

    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    
    box-shadow: rgba(0, 0, 0, 0.418) 0 0 1rem 1rem;
    
    transform: translateX(100%);
    transition: transform 0.25s ease-out;

    &.active {
        transform: translateX(0);
    }

    & a {
        display: block;
        font-size: 1.5rem;
        font-weight: 600;
        text-decoration: none;
        color: rgb(255, 255, 255);
        line-height: 1.5rem;
    }
}





.slideshow {
    width: 100%;
    background-color: black;
    margin-bottom: 1rem;
    box-shadow: black 0 2rem 2rem 2rem;
    box-sizing: border-box;
    
    

    & .slideshow-images {
        padding: 0 3rem;
        overflow: hidden;
        height: 40vw;
        width: 100%;
        box-sizing: border-box;

        

        & .slideshow-image, img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            position: relative;

            &.is-selected {
                inset: 0;
            }

            & h1 {
                position: absolute;
                color: white;
                font-size: 8rem;
                font-weight: 250;
                margin: 0;
                font-family: "Barlow", sans-serif;
                
                &:not(:last-child) {
                    text-align: left;
                    top: 5rem;
                    left: 5rem;

                    &::after {
                        content: "";
                        position: absolute;
                        width: 100%;
                        height: 0.25rem;
                        background-color: white;
                        bottom: 0.5rem;
                        left: 0;
                    }
                }

                &:last-child {
                    text-align: right;
                    bottom: 5rem;
                    right: 5rem;

                    &::after {
                        content: "";
                        position: absolute;
                        width: 100%;
                        height: 0.25rem;
                        background-color: white;
                        top: 1rem;
                        left: 0;
                    }
                }
            }
        }
    }

    & .flickity-viewport {
        height: 100% !important;
        
    }

    & .flickity-page-dots {
        width: calc(100% - 4rem);
        bottom: 4rem;
        
        & .dot {
            background-color: white;
            border-radius: 0;
            height: 0.5rem;
            width: 4rem;
            margin: 0 0.25rem;
        }
    }

    & .flickity-button {
        background: none;

        & .flickity-button-icon {
            fill: white;
            transition: 0.25s fill;
        }

        &:hover {
            background: none;

            & .flickity-button-icon {
                fill: rgb(168, 168, 168);
            }
        }
    }
}
.flickity-prev-next-button {
    height: 2rem !important;
    width: 2rem !important;
}
.flickity-prev-next-button.previous {
  left: 0.65rem !important;
}
.flickity-prev-next-button.next {
  right: 0.55rem !important;
}




.offers {
    scroll-margin-top: 4rem;
    width: calc(100% - var(--side-margin)*2);
    margin: 2rem var(--side-margin);

    text-align: center;

    & .cars {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        width: 100%;
        box-sizing: border-box;
        padding: 4rem;
        gap: 3rem;

        & .car {
            width: 100%;
            border-radius: 6px;
            display: flex;
            flex-direction: column;
            border: 1px rgba(255, 255, 255, 0.1) solid;

            & img {
                border-radius: 6px 6px 0 0;
                width: 100%;
                height: auto;
            }

            & .car-text {
                padding: 1rem;
            }

            & h3 {
                font-size: 1rem;
                font-weight: 400;
                margin: 0;
                text-align: left;
            }

            & h2 {
                font-size: 1.25rem;
                font-weight: 600;
                margin: 0;
                text-align: left;
            }
        }

        & .car .car-photo {
            position: relative;
        }

        & .car .car-info {
            opacity: 0;
            transition: 0.5s;

            background-color: rgba(0, 0, 0, 0.6);
            position: absolute;
            width: 100%;
            height: 100%;

            top: 0;
            left: 0;

            padding: 1rem;

            display: flex;
            flex-direction: column;
            justify-content: center;
            box-sizing: border-box;

            & div { 
                display: flex;
                flex-direction: row;
                justify-content: space-between;
                position: relative;

                & p {
                    font-size: 1rem;
                    font-weight: 400;
                    margin: 0;
                }

                & b {
                    font-size: 1rem;
                    font-weight: 600;
                }
            }

            & a {
                font-size: 1rem;
                font-weight: 600;
                padding: 0.5rem 2rem;
                border: 1px white solid;
                border-radius: 0.5rem;
                cursor: pointer;
                transition: 0.5s;
                width:fit-content;
                margin: 0.5rem auto 0 auto;
                color: white;
                text-decoration: none;

                &:hover {
                    background-color: white;
                    color: black;
                }
            }
        }

        & .car:hover .car-info {
            opacity: 1;
        }
    }
}





.form {
    width: calc(100% - var(--side-margin)*2);
    margin: 1rem var(--side-margin);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 5rem;

    & option {
        background-color: black;
        color: white;
    }

    & form {
        margin-top: 3rem;
        width: min(560px, 100%);
    }

    & input, label, select {
        display: block;
        text-align: left;
    }

    & input, textarea, select {
        width: 100%;
        box-sizing: border-box;
        background-color: transparent;
        border: white solid 1px;
        padding: 1rem;
        color: white;
        font-size: 1rem;
        border-radius: 5px;
        margin-bottom: 0.5rem;
        font-family: "Titillium Web", sans-serif;
    }

    & textarea {
        resize: none;
    }

    & label {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }
}

.switch {
  position: relative;
  display: inline-block !important;
  width: 46px;
  min-width: 46px;
  height: 26px;
}

/* Hide default HTML checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The slider */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
border: white solid 1px;
    box-sizing: border-box;
  -webkit-transition: .4s;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  box-sizing: border-box;
  border: 1px solid white;
  left: -1px;
  -webkit-transition: .4s;
  transition: .4s;
  top: -1px;
}

input:checked + .slider:before {
  border: #007BFF solid 1px;
}

input:checked + .slider:before {
  -webkit-transform: translateX(20px);
  -ms-transform: translateX(20px);
  transform: translateX(20px);
}

/* Rounded sliders */
.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

.form-submit {
    padding: 0.25rem 2.5rem !important;
    border: 1px solid white !important;
    border-radius: 2rem !important;
    width: fit-content !important;
    margin: 1rem auto 0 auto;
    cursor: pointer;
    transition: 0.25s;

    &:hover {
        color: #007BFF;
    }
}

.about {
    
    margin: 2rem var(--side-margin);

    & p {
        font-weight: 300;
        text-align: center;
        max-width: 750px;
        margin-left: auto;
        margin-right: auto;
    }

    & .checklist {
        margin: 0 3rem 1rem 3rem;
        display: flex;
        justify-content: center;
        gap: 3rem;
        font-family: "Inter", sans-serif;
        font-weight: 300;

        & ul {
            list-style-type: "✔ ";

            & li::marker {
                color: gray;
            }
            padding-left: 1.5rem;
        }

        & ol {
            padding-left: 1.5rem;
        }

        & li {
            margin-bottom: 1rem;
            font-style: italic;
        }
    }
}


.services {
    margin: 5rem var(--side-margin) 4rem var(--side-margin);
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 2rem 4rem;
    & .service {
        display: flex;
        gap: 2rem;
        font-size: 1rem;

        & .service-image {
            width: 18rem;
            height: 18rem;
            border: 1px white solid;
            border-radius: 1rem;
            object-fit: cover;
        }

        & .service-header {
            margin: 0;
            font-size: 1rem;
            font-weight: 600;
            padding-bottom: 0.5rem;
            margin-bottom: 1rem;

            border-bottom: 1px solid;
            border-image-slice: 1;

            border-image-source: linear-gradient(to left, transparent, white, transparent);
        }
    }

    & :nth-child(4n+1), :nth-child(4n+2) {
        justify-content: left;
        flex-direction: row;
        
        & * {
            text-align: left;
        }
    }

    & :nth-child(4n+3), :nth-child(4n) {
        justify-content: right;
        flex-direction: row-reverse;

        & * {
            text-align: right;
        }
    }
}




.reviews {
    margin: 6rem var(--side-margin);
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;

    & h1 {
        margin-bottom: 0.5rem;
    }

    & .reviews-other {
        display: flex;
        flex-direction: row;
        justify-content: end;
        align-items: center;
        gap: 2rem;
    }

    & .review {
        background-color: rgba(255, 255, 255, 0.05);
        width: 15rem;
        border-radius: 4px;
        height: 9.5rem;
        padding: 1rem;
        box-sizing: border-box;

        & .review-header {
            display: flex;
            justify-content: space-between;

            & .review-author {
                display: flex;
                justify-content: space-between;
                align-items: center;
                gap: 0.5rem;

                & .review-pfp {
                    background-color: #262626;
                    width: 2rem;
                    height: 2rem;
                    border-radius: 50%;
                }

                & .review-name {
                    margin: none;
                    font-weight: 600;
                    font-size: 0.875rem;
                }
            }
        }

        & .review-text {
            margin: 0.5rem 0 0 0;
            font-weight: 400;
            font-size: 1rem;
        }

        & .review-stars {
            display: flex;
            flex-direction: row;
            justify-content: right;
            align-items: center;
            gap: 2px;
        }
    }

    & .reviews-more-link {
        border: 1px white solid;
        border-radius: 50%;
        width: 2.5rem;
        height: 2.5rem;
        box-sizing: border-box;
        
        margin-left: 1rem;
        transition: 0.25s;
        position: relative;

        & img {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            transition: 0.25s;
        }

        &:hover {
            background-color: white;
            
            & img {
                filter: brightness(0) contrast(105%);
            }
        }
    }
}





.footer {
    padding: 1rem var(--side-margin);
    border-top: white solid 1px;
    height: 10rem;
    background-color: black;

    & .footer-top {
        border-bottom: rgba(255, 255, 255, 0.5) solid 1px;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        padding: 0 1rem;

        & .footer-social {
            display: flex;
            flex-direction: row;
            justify-content: left;
            gap: 2rem;
            align-items: center;

            & .footer-social-indiv {
                text-decoration: none;
                color: white;
                display: flex;
                flex-direction: row;
                justify-content: left;
                gap: 0.25rem;
                align-items: center;

                & p {
                    font-family: "Open Sans", sans-serif;
                    font-weight: 400;
                }
            }
        }

        & .footer-top-text {
            font-size: 1rem;
            font-weight: 300;
            font-style: italic;
        }
    }

    & .footer-bottom {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        padding: 0 1rem;

        & .footer-info {
            display: flex;
            flex-direction: row;
            justify-content: space-between;
            align-items: center;
            gap: 3rem;

            & .footer-info-text {
                font-size: 1rem;
                font-weight: 400;
                font-family: 'Times New Roman', Times, serif;
                line-height: 1.75rem;
            }

            & .footer-logo {
                height: 2rem;
            }
        }

        & .footer-sponsors {
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            align-items: end;
            padding: 1rem 0;
            gap: 0;

            & .footer-sponsors-row {
                display: flex;
                flex-direction: row;
                justify-content: space-between;
                align-items: center;
                gap: 1rem;

                & img {
                    max-height: 2rem;
                    max-width: 6rem;
                }
            }
        }
    }
}

.default-page {
    margin: 2rem var(--side-margin);
}




/* RESPONZIVITA */

/* < 1200 hodnocení, seznamy, menší car-gap */

@media (max-width:1300px) {
    .services {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 1fr 1fr 1fr;


        & :nth-child(2n) {
            justify-content: left;
            flex-direction: row;
            
            & * {
                text-align: left;
            }
        }

        & :nth-child(2n+1) {
            justify-content: right;
            flex-direction: row-reverse;

            & * {
                text-align: right;
            }
        }
    }
}

@media (max-width:1200px) {
    .slideshow-image {
        & h1 {
            font-size: 4rem !important;
            
            &:not(:last-child) {
                top: 3rem !important;
                left: 3rem !important;

                &::after {
                    height: 0.15rem !important;
                    bottom: 0rem !important;
                }
            }

            &:last-child {
                bottom: 3rem !important;
                right: 3rem !important;

                &::after {
                    height: 0.15rem !important;
                    top: 0.5rem !important;
                    left: 0 !important;
                }
            }
        }
    }

    .cars {
        gap: 1rem !important;
    }

    .reviews {
        flex-direction: column;
        gap: 2rem;
        margin: 3rem var(--side-margin);

        & .header, .description {
            text-align: center;
        }

        & .reviews-more {
            margin: 0;
        }
    }

    .checklist {
        flex-direction: column;
        margin: 2rem 0 !important;
        text-align: center;
        & h2 {
            text-align: center;
        }

        & ul, ol {
            display: inline-block;
            text-align: left;
        }
    }
}

@media (max-width:1000px) {
    .footer-top {
        flex-direction: column !important;

        & p {
            margin: 0.5rem 0;
        }
    }
    .footer {
        height: auto;
    }
    .footer-bottom {
        flex-direction: column !important;

        & br {
            display: block;
        }
    }
    .footer-social {
        justify-content: center !important;
    }
    .footer-top-text {
        text-align: center !important;
    }
    .footer-sponsors {
        flex-direction: row !important;
        justify-content: center !important;
        gap: 2rem !important;
        align-items: start !important;

        & .footer-sponsors-row {
            flex-direction: column !important;
            align-items: center;
            gap: 2rem !important;

            & img {
                max-height: 3rem !important;
                max-width: 6rem !important;
            }
        }
    }
    .footer-info {
        flex-direction: column !important;
        align-items: center;

        & .footer-info-text {
            text-align: center;
        }
        gap: 1rem !important;
        margin-bottom: 2rem !important;
    }
    :root {
        --side-margin: calc(2rem);
    }
}

/* linebreaky, navbar, auta */
@media (max-width:800px) {
    .slideshow-image {
        & h1 {
            font-size: 3rem !important;
            
            &:not(:last-child) {
                top: 1rem !important;
                left: 1rem !important;

                &::after {
                    height: 0.1rem !important;
                    bottom: 0rem !important;
                }
            }

            &:last-child {
                bottom: 1rem !important;
                right: 1rem !important;

                &::after {
                    height: 0.1rem !important;
                    top: 0rem !important;
                    left: 0 !important;
                }
            }
        }
    }


    body {
        background: #050505;
    }

    br {
        display: none;
    }

    .cars {
        grid-template-columns: 1fr !important;
        grid-template-rows: 1fr 1fr 1fr;
        padding: 4rem 2rem !important;
    }

    .reviews-other {
        flex-direction: column !important;

        & .review {
            width: 100%;
        }
    }

    .navbar-links {
        display: none;
    }

    .navbar a {
        margin: auto;
    }

    .hamburger {
        display: flex;
    }

    .slideshow-images {
        height: 60vh !important;
    }
    .flickity-page-dots {
        width: calc(100% - 6rem) !important;

        & .dot {
            width: 2rem !important;
        }
    }
}

@media (max-width:600px) {
    .service {
        flex-direction: column !important;
        gap: 1rem !important;

        & .service-image {
            width: 100% !important;
        }
    }
}

@media (max-width:500px) {
    .cars {
        padding: 4rem 0 !important;
    }
}