/* Grundinställningar */
html, body {
    height: 100%;
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    /* Bakgrundsbild över hela sidan */
    background-image: url('Bilder/computer-background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;

    /* Flexlayout för att footer ska ligga längst ner */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    color: white;
}

#SDG_Logga {
    height: 150px;
}

#SDG_text {
    height: 250px;
}

h1 {
    font-size: 50px;
}

header {
    color: white;
    background: linear-gradient(to bottom right, blue, rgb(130, 119, 222));
    padding: 40px;
    border: 1px solid white;
    text-align: center;
}

/* Navigationsmeny */
nav {
    /* Menyn följer med vid scroll (sticky */
    position: sticky;
    top: 0;
    padding: 20px;
    border: 1px solid white;
    background-color: aqua;
    margin-top: 20px;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
}

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

nav li a {
    display: block;
    padding: 10px 20px;
    text-decoration: none;
    color: black;
    text-align: center;
    transition: 0.3s;
    border-radius: 5px;
}

/* Menyknappar, där när man har muspekaren över dem blir de vita med blå bakgrund */

nav li a:hover {
    background-color: rgb(117, 119, 117);
    color: white;
}

/* Menyknappar med blå bakgrund */
#Home, #About, #Products, #Contact {
    background-color: blue;
    color: white;
}

/* Produktgrid */
#produkter {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 30px auto;
    padding: 50px;
}

.box {
    text-align: center;
    background: rgba(0,0,0,0.5);
    border-radius: 10px;
    padding: 10px;
    transition: transform 0.3s;
}

/* Liten zoom-effekt */

.box:hover {
    transform: scale(1.05);
}

figure {
    margin: 0;
}

figure img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

figcaption {
    margin-top: 5px;
    font-size: 16px;
}

/* Container-layout (kolumner) */
#container {
    display: flex;
    flex: 1;
    gap: 20px;
    padding: 20px;
    align-items: stretch;
}

#container2 {
    display: flex;
    flex: 1;
    gap: 200px;
    padding: 20px;
    align-items: stretch;
    height: 100%;
    width: 75%;
}

/* Huvudsektion */
section {
    flex: 2;
    border: 1px solid white;
    padding: 20px;
    background: linear-gradient(to bottom right, blue, rgb(23, 5, 85));
}

#section2 {
    font-size: 15px;
}

/* Aside */

aside {
    flex: 1;
    border: 1px solid white;
    padding: 50px;
    background: linear-gradient(to bottom right, blue, rgb(23, 5, 85));
    font-size: 100px;
}

/* Aside2, transperent bakgrund */

#aside2 {
    border: transparent;
    background-color: transparent;
    text-align: center;
    padding: 50px;
    width: 25%;
}

/* Footer */
footer {
    border: 1px solid white;
    color: white;
    background: linear-gradient(to bottom right, blue, rgb(130, 119, 222));
    padding: 20px;
    text-align: center;
    margin-top: auto;
}

/* Responsiv design */
@media (max-width: 650px) {
    #produkter {
        grid-template-columns: 1fr; 
    }

    aside {
        padding: 20px;
        font-size: 50px;
    }
}

@media (min-width: 651px) and (max-width: 1024px) {
    #produkter {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    #produkter {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Formulär */
input[type=text], select, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    margin-top: 6px;
    margin-bottom: 16px;
    resize: vertical;
}

input[type=submit] {
    background-color: #2769c5;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

input[type=submit]:hover {
    background-color: #3d58ce;
}

legend {
    font-size: 30px;
}