/* General */

@keyframes fadeInAnimation {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@font-face {
    font-family: 'Roboto';
    src: url('/assets/fonts/Roboto-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    src: url('/assets/fonts/Roboto-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    src: url('/assets/fonts/Roboto-Italic.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

.logo img {
    max-width: 220px;
    max-height: 72px;
    margin-left: 15px; 
}

.mainMenu a, nav.mainMenu a {
    background-color: #015582; 
    color: white; 
    padding: 10px 20px; 
    text-decoration: none; 
    border-radius: 5px; 
    transition: background-color 0.3s;
    font-family: 'Roboto', sans-serif;
}

.mainMenu a:hover, nav.mainMenu a:hover, nav.mainMenu a.active {
    background-color: #0371ad;
}

.envelope-icon {
    max-width: 2em;
}

body {
    margin: 0;
    background-image: url('/assets/images/background.webp');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
}

.content {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: 'Roboto', sans-serif;
}

.topmenu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 60px;
    background-color: rgb(203, 207, 206);
    padding: 10px;
    color: rgb(0, 0, 0);
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

.topmenu nav, .languagemenu {
    text-align: center;
    padding: 10px 0;
}

.text-box {
    width: 65%;
    margin: 0 auto;
    margin-bottom: 50px;
    border-radius: 10px;
    text-align: left;
    padding: 20px 100px;
    background-color: rgb(203, 207, 206);
    color: rgb(0, 0, 0);
    box-sizing: border-box;
    animation: fadeInAnimation ease 0.5s;
    animation-iteration-count: 1;
    animation-fill-mode: forwards;
}

.articles-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.articles-container article {
    flex: 1 1 calc(50% - 20px);
    position: relative;
    padding-left: 30px;
    box-sizing: border-box;
}

.articles-container article::before {
    content: "✔";
    position: absolute;
    left: 0;
    top: 0;
    transform: translateY(50%);
    font-size: 1.5em;
    color: green;
}

.articles-container .centered {
    flex: 1 1 100%;
    text-align: center;
    padding-left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    position: relative;
}

ul.horizontal-list {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
}

ul.horizontal-list li {
    margin-right: 20px;
    position: relative;
    padding-left: 20px;
}

ul.horizontal-list li::before {
    content: "✔";
    position: absolute;
    left: 0;
    color: green;
}

.topmenu nav a {
    padding: 10px 20px;
    margin: 0 10px;
}

.languagemenu {
    width: 220px;
    margin-right: 0px;
    padding: 10px;
}

.languagemenu img {
    height: 26px;
    width: 45px;
}

.text-box a, .text-box a:visited, .text-box a:hover, .text-box a:focus, .text-box a:active {
    color: #0068a0;
    text-decoration: none;
}

.text-box a:hover {
    text-decoration: underline;
}

footer {
    text-align: center;
    font-size: x-small;
    font-family: 'Roboto', sans-serif;
}

/* Hide the mobile menu by default */
.mobile-menu, .mobile-menu-label, .topnav {
    display: none;
}

/* Media queries */
@media (max-width: 1000px) {

    .logo img {
        max-width: 110px;
        max-height: 36px;
        margin-left: 0.2vh;
    }

    .content .text-box {
        width: 90%;
        padding: 10px;
    }

    .topmenu nav.mainMenu {
        display: none;
    }

    .topmenu {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .topnav {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        width: 100%;
        position: relative;
    }

    .topnav #myLinks {
        display: none;
        position: fixed;
        top: 75px; /* Juster for å dekke alt innhold under topmenu */
        left: 0;
        width: 100%;
        height: 100%; /* Dekker hele høyden */
        background-color: rgb(203, 207, 206);
        z-index: 1000;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        text-align: center;
    }

    .topnav #myLinks a {
        color: #015582; ;
        text-decoration: none;
        font-size: 24px;
        padding: 15px 0; /* Avstand mellom lenker */
        display: block;
    }

    .topnav .icon {
        background: none;
        display: block;
        position: relative;
        border: none;
        cursor: pointer;
    }

    .topnav .icon img {
        width: 30px;
        height: 30px;
    }

    .topnav a:hover {
        background-color: #ddd;
        color: black;
    }

    .topnav .active {
        color: white;
        font-weight: bold; /* Legg til denne linjen for å gjøre skriften tykk */
    }    

    .hamburger-icon {
        width: 30px;
        height: 30px;
    }

    .hamburger-icon.close {
        content: url('assets/icons/close.webp');
    }

    .language-flag {
        width: 47px;
        height: 30px;
    }

    .languagemenu {
        display: none;
    }

    ul.horizontal-list {
        flex-direction: column;
        align-items: flex-start;
    }

    ul.horizontal-list li {
        margin-right: 0;
        padding-left: 0;
    }

    ul.horizontal-list li::before {
        position: static;
        margin-right: 10px;
    }
    .articles-container {
        flex-direction: column;
        padding-left: 30px;
    }

    .articles-container article {
        flex: 1 1 100%;
        padding-left: 20px;
    }

    .articles-container article::before {
        left: -25px;
    }
}
