@font-face {
    font-family: 'CerebriSans-Bold';
    src: url('../fonts/cerebrisans-bold-webfont.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'CerebriSans-Italic';
    src: url('../fonts/cerebrisans-italic-webfont.woff2') format('woff2');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'CerebriSans-Regular';
    src: url('../fonts/cerebrisans-regular-webfont.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'CerebriSans-SemiBold';
    src: url('../fonts/cerebrisans-semibold-webfont.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}




:root {
    --color-darkblue: #3c4650;
    --color-white: #ffffff;
    --color-orange: #fd9926;
    --font-size: 18px;

    --gap: 1rem;
    --gap2x: 2rem;
    --gap3x: 3rem;
    --gap4x: 4rem;
    --gap5x: 5rem;
    --gap6x: 6rem;

    --maxwidth: 960px;

    --font-title: 'CerebriSans-Regular', Arial, sans-serif;
    --font-family: 'CerebriSans-Regular', Arial, sans-serif;
}

* {
    scrollbar-width: auto;
    scrollbar-color: var(--color-darkblue) var(--color-white);
    scrollbar-width: thin;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

*::-webkit-scrollbar {
    width: 16px;
}

*::-webkit-scrollbar-track {
}

*::-webkit-scrollbar-thumb {
    border-radius: 10px;
}

::selection {
}

*{
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body{

    font-family: var(--font-family);
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    font-size: var(--font-size);
    line-height: 1.5;
    background: linear-gradient(to bottom, #eeeeee 0%, var(--color-white) 100%);

    &.admin-bar{
        min-height: calc(100dvh - 32px);
    }
}

h1,h2,h3{
    font-weight: normal;
    line-height: 1.25;
}

h2{
    font-weight: bold;
}

a{
    color: var(--color-orange);
    text-decoration: none;
    &:hover{
    }
}

p,td,li{
    color: var(--color-darkblue)
}

blockquote{
    color: var(--color-darkblue);
    font-style: italic;
    padding-left: 1rem;
    border-left: 4px solid var(--color-orange);
    margin: 0;
    cite{
        color: var(--color-darkblue);
        font-style: normal;
        font-weight: bold;
        display: block;
        text-align: right;
    }
}

.wp-block-button{
    a{
        border-color: var(--color-orange);
        color: var(--color-darkblue);
        font-weight: bold;

        &:hover{
            background-color: var(--color-orange);
            color: var(--color-white);
        }
    }
}

header{
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 var(--gap);
    background-color: var(--color-white);

    @media screen and (max-width: 768px) {
        justify-content: space-between;
    }

    .logo{
        img{
            max-height: 80px;
            &.main{
                display: block;
            }
            &.white{
                display: none;
            }
        }
    }

    nav{
        margin-left: auto;
        ul{
            display: flex;
            li{
                list-style-type: none;
                a{
                    color: var(--color-darkblue);
                    font-size: 1rem;
                    font-weight: 600;
                    padding: 0 var(--gap);
                    transition: color 0.3s ease;
                    &:hover{
                    }
                }

                &.current-menu-item{
                    a{
                        color: var(--color-orange);
                        font-weight: 600;
                    }
                }
            }
        }

        .wpml-ls-item{
            a{
                height: 30px;
            }
        }

        @media screen and (max-width: 768px) {
            position: fixed;
            top: 0;
            left: 0;
            transform: translateX(-100%);
            width: 100%;
            height: 100%;
            z-index: -1;
            background-color: var(--color-white);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;

            &.open{
                transform: translateX(0);
            }

            ul{
                display: flex;
                flex-direction: column;
                justify-content: center;
                align-items: center;
                li{
                    list-style-type: none;
                    a{
                        display: block;
                        padding: var(--gap);
                        color: var(--color-darkblue) !important;
                    }
                }
            }
        }
    }

    .nav-trigger{
        display: none;
        hr{
            width: 20px;
            height: 2px;
            border: none;
            background-color: var(--color-darkblue);
            margin: 5px 0;
        }
        &:hover{
            hr{
                background-color: var(--color-orange);
            }
        }

        @media screen and (max-width: 768px) {
            display: block;
        }
    }
}

body{

    &.page-template-template-fondist,
    &.home{
        header{

            background-color: transparent;

            .logo{
                img{
                    max-height: 80px;
                    &.main{
                        display: none;
                    }
                    &.white{
                        display: block;
                    }
                }
            }

            nav{
                ul{
                    li{
                        a{
                            color: var(--color-white);
                        }
                    }
                }
            }

            &.scrolled{
                transition: background-color 0.4s cubic-bezier(.4,0,.2,1);
                background-color: var(--color-white);

                .logo{
                    img{
                        &.main{
                            display: block;
                        }
                        &.white{
                            display: none;
                        }
                    }
                }

                nav{
                    ul{
                        li{
                            a{
                                color: var(--color-darkblue);
                            }
                        }
                    }
                }
            }
        }
    }

    &.admin-bar{
        header{
            top: 32px;
        }
    }
}

main{
    padding-top: 100px;
    padding-bottom: var(--gap3x);

    section{
        padding: 0 var(--gap2x);
        max-width: var(--maxwidth);
        margin: 0 auto;

        &.projektid{
            padding: 0;
            width: 90dvw;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: var(--gap3x);

            div{
                display: flex;
                flex-direction: column;

                img{
                    width: 100%;
                    aspect-ratio: 1 / 1;
                    object-fit: cover;
                    height: auto;
                    display: block;
                }

                h2{
                    margin: 1rem 0;
                    font-size: clamp(1rem, 2.5vw, 1.25rem);
                    color: var(--color-darkblue);
                }
            }

        }
    }
}

body{
    &.home{
        main{
            padding-bottom: 0;
            section{
                max-width: 100%;
            }
        }
    }
}

.frontpage-content-text{
    padding-left: 30vw;
    padding-right: 10vw;
    color: var(--color-white);
    p{
        color: var(--color-white);
    }
    h1{
        font-family: 'CerebriSans-Bold';
        font-size: 4rem;
        line-height: 4rem;
        color: #EB9DAF;
        text-shadow: 0px 0px 6px rgba(0, 0, 0, 0.1);
        text-transform: uppercase;
        font-weight: bold;
    }
    h2{
        font-family: 'CerebriSans-Bold';
        font-size: 2rem;
        line-height: 2.5rem;
        color: var(--color-white);
        text-shadow: 0px 0px 6px rgba(0, 0, 0, 0.1);
        text-transform: uppercase;
        font-weight: bold;
        margin: 0;
    }
    h3{
        font-family: 'CerebriSans-Bold';
        font-size: 1.5rem;
        line-height: 2rem;
        color: #EB9DAF;
        text-shadow: 0px 0px 6px rgba(0, 0, 0, 0.1);
        font-weight: bold;
        margin: 0;
        margin-top: 2rem;
    }
    h4{
        font-family: 'CerebriSans-Bold';
        font-size: 1.25rem;
        line-height: 1.75rem;
        color: var(--color-white);
        text-shadow: 0px 0px 6px rgba(0, 0, 0, 0.1);
        text-transform: uppercase;
        font-weight: bold;
        margin: 0;
    }

}

footer{
    margin-top: auto;
    background-color: var(--color-darkblue);
    color: var(--color-white);
    padding: var(--gap3x) 0;

    p{
        color: var(--color-white);
    }
}


@media screen and (max-width: 768px) {
    .hide-in-mobile{
        display: none !important;
    }
    .mobile-center,
    .wp-block-image{
        text-align: center;
    }
}