/* ------------------------------
   GRUNNINNSTILLINGER
------------------------------ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: #F5F3F0;
    color: #202020;
    line-height: 1.6;

    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2 {
    line-height: 1.2;
}

h1 {
    font-size: 42px;
    margin-bottom: 25px;
}

p {
    margin-bottom: 15px;
}


/* ------------------------------
   PLASS TIL HEADER
------------------------------ */

.header-space {
    height: 155px;
    flex-shrink: 0;
}


/* ------------------------------
   HEADER
------------------------------ */

header {
    background-color: #343434;
    padding: 20px 8%;

    border-bottom: 1px solid #E0DAD5;

    position: fixed;
    top: 0;
    left: 0;
    width: 100%;

    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: space-between;

    transition:
        padding 0.25s ease,
        box-shadow 0.25s ease;
}

header img {
    width: 220px;
    max-width: 100%;
    height: auto;

    display: block;

    margin-bottom: 5px;

    transition:
        width 0.25s ease,
        margin 0.25s ease;
}


/* ------------------------------
   MENYKNAPP
------------------------------ */

/* Skjult på PC */

.menu-button {
    display: none;
}


/* ------------------------------
   NAVIGASJON
------------------------------ */

nav {
    display: flex;
    gap: 30px;

    margin-top: 0;

    flex-wrap: wrap;

    transition: margin 0.25s ease;
}

nav a {
    color: #d5d5d5;
    text-decoration: none;

    font-size: 16px;
    font-weight: bold;

    padding-bottom: 5px;

    border-bottom: 2px solid transparent;

    transition:
        color 0.2s ease,
        border-color 0.2s ease;
}

nav a:hover {
    color: #CB322C;
    border-bottom-color: #CB322C;
}


/* ------------------------------
   HEADER VED SCROLL - PC
------------------------------ */

header.scrolled {
    padding-top: 8px;
    padding-bottom: 8px;

    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
}

header.scrolled img {
    width: 140px;
    margin-bottom: 0;
}

/* ------------------------------
   HOVEDINNHOLD
------------------------------ */

main {
    width: 100%;
    max-width: 1200px;

    margin: 0 auto;

    flex: 1;

    background-color: #E8E2DD;
}


/* ------------------------------
   HERO
------------------------------ */

.hero {
    background-color: #202020;
    color: white;

    padding: 100px 8%;
    min-height: 500px;

    display: flex;
    align-items: center;
}

.hero-content {
    max-width: 650px;
}

.hero h2 {
    font-size: 52px;
    margin-bottom: 25px;
}

.hero p {
    font-size: 20px;
    color: #d5d5d5;

    margin-bottom: 30px;
}


/* ------------------------------
   KNAPPER
------------------------------ */

.button {
    display: inline-block;

    background-color: #CB322C;
    color: white;

    padding: 14px 25px;

    text-decoration: none;
    font-weight: bold;

    border-radius: 4px;

    transition: background-color 0.2s ease;
}

.button:hover {
    background-color: #A92521;
}


/* ------------------------------
   SEKSJONER
------------------------------ */

.section {
    padding: 70px 8%;

    background-color: #E8E2DD;
}

.section h2 {
    font-size: 34px;
    margin-bottom: 25px;
}

.section h3 {
    font-size: 28px;
    margin-bottom: 5px;
}


/* ------------------------------
   KONTAKT
------------------------------ */

.contact {
    background-color: #E8E2DD;
}

.contact p {
    font-size: 18px;
}


/* ------------------------------
   FOOTER
------------------------------ */

footer {
    background-color: #151515;
    color: white;

    text-align: center;

    padding: 30px 20px;
}

footer p {
    margin: 0;
    color: #d5d5d5;
}


/* ------------------------------
   MOBIL
------------------------------ */

@media (max-width: 700px) {

    /*
       Mobilheaderen har fast og kompakt høyde.
    */

    .header-space {
        height: 80px;
    }

    header,
    header.scrolled {
        height: 80px;

        padding: 10px 20px;

        display: flex;
        align-items: center;
        justify-content: space-between;

        gap: 0;
    }


    /* Logo */

    header img,
    header.scrolled img {
        width: 135px;

        margin: 0;
    }


    /* Menyknapp */

    .menu-button {
        display: block;

        background: none;
        border: none;

        color: #FFFFFF;

        font-size: 30px;

        line-height: 1;

        cursor: pointer;

        padding: 8px;
    }


    /* Menyen er skjult som standard */

    nav,
    header.scrolled nav {
        display: none;

        position: absolute;

        top: 80px;
        left: 0;

        width: 100%;

        margin: 0;

        background-color: #343434;

        border-top: 1px solid #4A4A4A;

        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    }


    /* Vises når menyknappen trykkes */

    nav.open {
        display: flex;

        flex-direction: column;

        gap: 0;
    }


    nav a {
        width: 100%;

        padding: 16px 20px;

        font-size: 16px;

        border-bottom: 1px solid #4A4A4A;
    }

    nav a:hover {
        border-bottom: 1px solid #4A4A4A;

        background-color: #404040;
    }


    /* Innhold */

    .hero {
        padding: 70px 25px;
        min-height: 400px;
    }

    .hero h2 {
        font-size: 38px;
    }

    .hero p {
        font-size: 18px;
    }

    h1 {
        font-size: 32px;
    }

    .section {
        padding: 50px 25px;
    }

    .section h2 {
        font-size: 28px;
    }

}