/* Använd border-box för alla element */
* {
    box-sizing: border-box;
}

/* Grundinställningar för sidan */
body {
    background-color: rgb(237, 237, 237); /* reservbakgrund */
    background-image: url(bilder/background.jpg); /* bakgrundsbild */
    background-repeat: no-repeat;
    background-attachment: fixed; /* följer inte med vid scroll */
    background-size: cover; /* täcker hela sidan */
    font-family: "candara", sans-serif;
    min-height: 100vh; /* minst hela skärmhöjden */
    display: flex;
    flex-direction: column;
    margin: 8px;
}

/* Huvudrubrik */
h1 {
    font-size: 50px;
    text-align: center;
    background-color: rgb(197, 237, 237);
    margin-left: 35%;
    margin-right: 35%;
    margin-top: 130px;
    padding: 10px;
    transform: skew(-20deg); /* lutad effekt */
    border: solid 3px rgb(202, 255, 237);
    box-shadow: 0px 0px 3px rgba(20, 105, 30, 0.5);
    text-shadow: 0px 0px 3px rgba(20, 105, 30, 0.5);
}

/* Rätar upp texten inuti h1 */
h1 span {
    display: inline-block;
    transform: skew(20deg);
}

/* Stor titel */
#title {
    margin-top: 200px;
    font-size: 100px;
    margin-left: 20%;
    margin-right: 20%;
    border: solid 7px rgb(202, 255, 237);
    box-shadow: 0px 0px 8px rgba(20, 105, 30, 0.5);
}

/* Navigationsmeny fixerad högst upp */
nav {
    position: fixed;
    top: 0px;
    left: 0px;
    width: 100%;
    z-index: 1000;
}

/* Lista i navigation */
nav ul {
    list-style-type: none;
    margin: 0px;
    padding: 0px;
    display: flex;
}

/* Menyalternativ */
nav ul li {
    font-size: 30px;
    flex: 1; /* lika breda */
    text-align: center;
}

/* Länkar i navigation */
nav li a {
    color: black;
    padding: 20px 20px 5px 20px;
    display: block;
    text-decoration: none;
    transition: 0.1s;
    height: 100%;
    background-color: rgb(171, 219, 219);
    transform: skew(-10deg) scale(1.02);
    border: solid 3px rgb(202, 255, 237);
    border-radius: 2px;
    box-shadow: 0px 0px 3px rgba(20, 105, 30, 0.5);
}

/* Hover-effekt på meny */
nav li a:hover {
    background-color: rgb(99, 228, 232);
    transform: translateY(10%) scale(1.0, 1.2) skew(-10deg);
}

/* Videosektion */
#video {
    width: 50%;
    margin-left: 25%;
    margin-top: 15px;
    margin-bottom: 15px;
}

/* Gör iframe responsiv */
#video iframe {
    width: 100%;
}

/* Aktiv sida i menyn */
#current {
    transform: translateY(4%) scale(1.0, 1.05);
}

#current a {
    background-color: rgb(105, 214, 218);
}

/* Gemensam stil för sektioner */
section, article, aside {
    width: 30%;
    background-color: rgb(168, 224, 224);
    padding: 10px;
    border-radius: 2px;
    border: solid 5px rgb(202, 255, 237);
}

/* Bilder fyller sin container */
section img,
aside img {
    width: 100%;
}

/* Informationsruta */
.info {
    width: 90%;
    align-self: center;
    font-size: 20px;
}

/* Layout för flera sektioner */
.sections {
    margin-top: 200px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    font-size: 20px;
    margin-bottom: 50px;
}

/* Marginaler för workers */
#workers {
    margin: 100px 50px 0px 50px;
}

/* Galleri */
.gallery-container {
    justify-content: center;
    background-color: rgb(197, 237, 237);
    margin-top: 10px;
    padding: 15px;
    display: flex;
    flex-wrap: wrap; /* radbryt */
    gap: 5px;
    max-width: 1800px;
    margin: auto;
    align-items: center;
    border-radius: 10px;
    margin-bottom: 20px;
}

/* Enskild bild i galleri */
.gallery-item {
    flex-basis: 300px;
    flex-grow: 1;
    transition: 1s;
    background-color: rgb(100, 181, 181);
    padding: 5px;
}

/* Produktbild */
.product {
    width: 100%;
    height: 300px;
    object-fit: cover; /* beskär snyggt */
}

/* Produktinformation */
.productInfo {
    background-color: rgb(162, 210, 210);
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    text-align: center;
}

/* Text i produkt */
.productInfo p {
    background-color: rgb(192, 234, 234);
    margin-left: 10%;
    margin-right: 10%;
    padding: 2px 2px 4px 2px;
    box-shadow: 0px 0px 3px rgba(20, 105, 30, 0.5);
}

/* Knapp i produkt */
.productInfo button {
    margin-left: 35%;
    margin-right: 35%;
    border-radius: 10px;
    border: solid 1px black;
    padding: 4px;
    margin-bottom: 2px;
}

/* Klick-effekt */
.productInfo button:active {
    background-color: rgb(130, 130, 130);
}

/* Dolda produkter */
#product1, #product2, #product3,
#product4, #product5, #product6 {
    display: none;
}

/* Ikoner i navigation */
nav li a img {
    width: 40px;
}

/* Formulär */
#form {
    display: flex;
    justify-content: center;
    font-size: 20px;
    text-align: center;
}

/* Textfält */
.inputText {
    height: 50px;
}

/* Input och textarea */
input, textarea {
    border: 2px solid rgb(191, 191, 191);
    border-radius: 3px;
}

textarea {
    width: 250px;
    height: 70px;
}

/* Skicka-knapp */
#submitButton {
    border-radius: 8px;
    border: 2px solid rgb(191, 191, 191);
    height: 40px;
    width: 100px;
}

/* Rubrik i formulär */
legend {
    font-size: 30px;
    background-color: aliceblue;
    border-radius: 3px;
    box-shadow: 0px 0px 3px rgba(20, 105, 30, 0.5);
    padding: 5px;
}

/* Villkorstext */
#villkor {
    font-size: 15px;
}

/* Total-container */
#totalcontainer {
    display: flex;
    flex-direction: column;
    text-align: center;
}

/* Totalruta */
#total {
    margin: 0 10%;
    background-color: rgb(168, 224, 224);
    padding: 10px;
    border-radius: 2px;
    border: solid 5px rgb(202, 255, 237);
}

/* Köpknapp */
#purchase {
    margin-left: 35%;
    margin-right: 35%;
    border-radius: 7px;
    border: solid 1px black;
    padding: 4px 50px;
}

/* Klick-effekt */
#purchase:active {
    background-color: rgb(130, 130, 130);
}

/* Footer */
footer {
    font-size: 18px;
    text-align: center;
    background-color: rgb(197, 237, 237);
    padding: 5px;
    border: solid 3px rgb(202, 255, 237);
    box-shadow: 0px 0px 3px rgba(20, 105, 30, 0.5);
    display: flex;
    margin-top: auto; /* trycker ner till botten */
}

footer a {
    color: black;
}

footer p {
    margin: 2px 0;
}

footer img {
    margin-left: 10px;
    position: relative;
    top: 5px;
}

/* Dropdown-meny (mobil) */
#dropdown {
    display: none;
    width: 40px;
    height: 40px;
}

/* Responsiv design */
@media only screen and (max-width: 768px) {

    /* Ta bort lutning på små skärmar */
    h1 {
        transform: skew(0deg);
        border-radius: 10px;
        margin-top: 10px;
        margin-left: 20%;
        margin-right: 20%;
    }

    #title {
        margin-top: 20px;
    }

    /* Dölj meny, visa dropdown */
    nav ul {
        display: none;
    }

    h1 span {
        transform: skew(0deg);
    }

    #dropdown {
        display: block;
    }

    /* Stapla sektioner */
    .sections {
        flex-direction: column;
        margin-top: 20px;
    }

    section, aside {
        width: 100%;
        margin-bottom: 20px;
    }

    aside {
        text-align: center;
    }
}