:root {
    --var-brand-accent: #F48140;
    --var-brand-accent-very-soft: #F4814010;
    --var-brand-accent-tinted: #e67a3c;
    --var-brand-accent-dark: #612200;
    --var-brand-accent-very-dark: #311100;
    --var-brand-accent-complement: white;
    --var-brand-gray-dark: #838383;
    --var-brand-gray-tinted: #dcdcdc;
    --var-brand-gray: #EAEAEA;
    --var-brand-gray-mid: #C0BFBF;

    font-family: "Raleway", "Helvetica", sans-serif;
}


#logo {
    width: 450px;
    height: 225px;
    position: absolute;
    background: url('../images/rent-and-drive.svg');
}

.grid {
    display: grid;
    grid-template-columns: 70px repeat(10, 1fr) 70px;
    padding: 8px;
    padding-bottom: 31px;
}
.column > * {
    float: left;
    clear: left;
    margin-bottom: 10px;
}

body {
    margin: 0;
}

.action-button {
    font-family: "Raleway", "Helvetica", sans-serif;
    font-weight: 600;
    font-size: 18px;
    padding: 12px 20px;
    border-radius: 8px;
    background-color: var(--var-brand-accent);
    color: var(--var-brand-accent-complement);
    box-shadow: 4px 4px var(--var-brand-accent-dark);
    transition: 0.1s box-shadow, background-color;
    cursor: pointer;
}

.action-button:hover {
    box-shadow: 2px 2px var(--var-brand-accent-very-dark);
}

.action-button:active {
    background-color: var(--var-brand-accent-tinted);
    box-shadow: 1px 1px black;
}

.secondary-button {
    border-radius: 100px;
    font-size: 12px;
    text-align: center;
    font-family: "Raleway", "Helvetica", sans-serif;
    font-weight: 500;
    background-color: var(--var-brand-gray);
    color: black;
    padding: 6px 15px;
    box-shadow: 2px 2px var(--var-brand-gray-dark);
    transition: 0.1s box-shadow, background-color;
    cursor: pointer;
}

.secondary-button:hover {
    box-shadow: 1px 1px var(--var-brand-accent-very-dark);
}

.secondary-button:active {
    background-color: var(--var-brand-gray-tinted);
    box-shadow: 0.5px 0.5px black;
}

.tertiary-button {
    font-size: 9pt;
    color: #FFFFFF;
    border-radius: 100px;
    text-align: center;
    font-family: "Raleway", "Helvetica", sans-serif;
    font-weight: 500;
    background-color: var(--var-brand-gray-mid);
    padding: 3px 12px;
    transition: 0.1s background-color;
    cursor: pointer;
}

.tertiary-button:hover {
    background-color: var(--var-brand-gray-dark);
}


.role-homepage .app-store-links > img {
    height: 50px;
}

.role-homepage .hero-image > img {
    width: 100%;
}


.role-homepage .hero-content {
    font-family: "Open Sans", "Helvetica", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    font-size: 16px;
}

h1 {
    font-size: 52px;
    line-height: 56px;
    font-weight: 700;
}

h2 {
    font-size: 25pt;
    line-height: 13px;
}

a {
    text-decoration: none;
    color: cornflowerblue;
}

.role-homepage {
    background-image: url("../images/GeometricPatterns.50.svg");
    background-size: 20vw;
    background-position: right top;
    background-repeat: no-repeat;
    background-color: var(--var-brand-accent-very-soft);
    min-height: 100vh;
    align-content: start;
    padding-top: 225px;
}

.role-map {
    .information {
        display: flex;
        flex-direction: column;
        gap: 10px;
        .place {
            display: flex;
            flex-direction: column;
            gap: 10px;
            position: relative;
            padding-bottom: 20px;

            .item {
                display: block;
                font-size: 12pt;
                line-height: 23px;
                padding-left: 32px;
                background-size: 22px;
                background-repeat: no-repeat;
                white-space: pre-wrap;
                &.map { background-image: url("../images/icons8-map-100.png"); }
                &.phone { background-image: url("../images/icons8-phone-100.png"); }
                &.clock { background-image: url("../images/icons8-clock-100.png"); }
            }
        }
        margin-bottom: 21px;
    }
    > .map {
        background-color: var(--var-brand-accent);
    }
}



.role-models .list-container {
    grid-column-start: 2;
    grid-column-end: 11;
    margin-bottom: 31px;
    margin-top: 21px;
}
.role-models .list-container .list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;

    .model:nth-child(n+4) {
        display: none;
    }

    &.show {
        .model:nth-child(n+4) {
            display: initial;
        }
    }
}

.secondary-button {
    .less { display: none; }
    .more { display: initial; }
}

.secondary-button.show {
    .less { display: initial; }
    .more { display: none; }
}

.role-models .list-container .list > .model {
    --radius: 8px;

    position: relative;
    width: 250px;
    flex-shrink: 0;
    background-color: var(--var-brand-gray);
    border-radius: var(--radius);
    font-family: "Raleway", "Helvetica", sans-serif;
    box-shadow: 3px 3px #838383;

    &.rollback {
        animation-duration: 0.3s;
        animation-name: flip-over;
        .front {
            animation-duration: 0.3s;
            animation-name: flip-over-in;
            opacity: 1;
        }
        .back {
            animation-duration: 0.3s;
            animation-name: flip-over-out;
            opacity: 0;
            pointer-events: none;
        }
    }
    &.showback {
        animation-duration: 0.3s;
        animation-name: flip-over;
        .front {
            animation-duration: 0.3s;
            animation-name: flip-over-out;
            opacity: 0;
        }
        .back {
            animation-duration: 0.3s;
            animation-name: flip-over-in;
            opacity: 1;
        }
    }
    .back {
        opacity: 0;
        pointer-events: none;
        position: absolute;
        top: 0;
        width: 100%;
        height: 100%;
        h3 {
            font-weight: 700;
            font-size: 20pt;
            margin: 18px 21px;
        }
        table {
            padding: 0px 21px;
            width: 100%;
            font-size: 12pt;
            color: #838383;
        }
    }
    .front {
        opacity: 1;
        display: flex;
        flex-direction: column;

        img {
            border-top-right-radius: var(--radius);
            border-top-left-radius: var(--radius);
        }
        .footer {
            display: flex;
            flex-direction: row;
            align-items: flex-start;
            justify-content: space-between;
            padding: 10px 20px;

            .data {
                display: flex;
                flex-direction: column;
                .name {
                    font-size: 12pt;
                    line-height: 13px;
                    margin-bottom: 4px;
                }
                .description {
                    font-size: 9pt;
                    color: #838383;
                }
            }
        }
    }
}


@media only screen and (min-width: 700px) {
    .role-homepage .hero-content {
        grid-column-start: 3;
        grid-column-end: 8;
    }

    .role-homepage .app-store-links {
        grid-column-start: 3;
        grid-column-end: 6;
        gap: 7px;
        flex-direction: row;
    }

    .role-homepage .hero-image {
        grid-column-start: 6;
        grid-column-end: 11;
    }

    .role-map {
        .information {
            grid-column-start: 2;
            grid-column-end: 5;
            .place {
                &:hover {
                    background-color: var(--var-brand-gray);
                    &::before {
                        content: '';
                        width: 21px;
                        border-top-left-radius: 8px;
                        border-bottom-left-radius: 8px;
                        height: 100%;
                        position: absolute;
                        top: 0;
                        left: -21px;
                        background-color: var(--var-brand-gray);
                    }
                }
            }
        }

        > .map {
            background-color: var(--var-brand-accent);
            grid-column-start: 5;
            grid-column-end: 12;
            height: 80vh;
        }
    }
}

@media only screen and (max-width: 700px) {
    #logo {
        left: 10vw;
        width: 80vw;
        height: 40vw;
    }

    .role-homepage .hero-content {
        grid-column-start: 2;
        grid-column-end: 12;
    }

    .role-homepage {
        background-image: none;
    }

    .role-homepage .app-store-links {
        grid-column-start: 2;
        grid-column-end: 6;
        gap: 7px;
        flex-direction: row;
    }

    .role-homepage .hero-image {
        display: none;
    }

    .role-map {
        margin-top: 63px;
        .information {
            grid-column-start: 2;
            grid-column-end: 12;
            .place {
                border-radius: 8px;
                padding-left: 21px;
                padding-right: 21px;
                &.selected {
                    background-color: var(--var-brand-gray);
                }
            }
        }
        > .map {
            background-color: var(--var-brand-accent);
            grid-column-start: 2;
            grid-column-end: 12;
            height: 50vh;
            position:sticky;
            bottom: 40px;
            margin-bottom: 40px;
            &::after {
                display: block;
                content: '';
                width: 100%;
                height: 40px;
                background-color: white;
            }

        }
    }

    .role-models .list-container .list {
        flex-direction: column;
        .model {
            width: 100%;
        }
    }
}


@keyframes flip-over {
    from {
        transform: rotateY(0deg);
    }
    50% {
        transform: rotateY(90deg);
    }
    to {
        transform: rotateY(0deg);
    }
}

@keyframes flip-over-in {
    0% {
        opacity: 0;
    }
    49% {
        opacity: 0;
    }
    50% {
        opacity: 100%;
    }
}

@keyframes flip-over-out {
    49% {
        opacity: 100%;
    }
    50% {
        opacity: 0%;
    }
}
