* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0px;
    min-height: 100vh;

    display: flex;
    flex-direction: column;
}



#slagordTopp {
    color: #1F2E2E;
    font-family: 'inter';

    display: flex;
    justify-content: center;
}

#slagordTopp h1 {
    font-weight: 400;
}



main {
    padding: 50px;
    scroll-margin-top: 300px;

    flex: 1;
    display: flex;
    justify-content: center;
}



#flippBoks {
    color: white;
    font-family: 'inter';
    width: 700px;
    max-width: 100%;
    height: 550px;

    z-index: 1;
    perspective: 1000px;
    cursor: pointer;
}

#flippBoks:hover {
    transform: scale(1.01);
}

#flippKort {
    width: 100%;
    height: 100%;

    position: relative;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

#flippBoks.active #flippKort {
    transform: rotateY(180deg);
}

#front, #bak {
    background-color: #69A9A7;
    width: 100%;
    height: 100%;
    padding: 20px;
    border-radius: 10px;
    
    position: absolute;
    backface-visibility: hidden; 
}

#front {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

#front h1 {
    font-weight: 400;
}

#bak {
    font-size: 20px;
    line-height: 1.5;

    display: flex;
    flex-direction: row;
    gap: 10px;

    transform: rotateY(180deg);
}

#bildetBeltet, #bildetBeltetBruk  {
    border-radius: 10px;
}



/* Nettbrett */
@media (max-width: 1024px) {
    #flippBoks {
        width: 90%;
        height: 500px;
    }
}

/* Mobil */
@media (max-width: 768px) {
    #flippBoks {
        width: 100%;
        height: auto;       
        min-height: 450px;  
        perspective: 1000px;
    }

    #flippKort {
        width: 100%;
        height: 600px;       
        position: relative; 
    }

    #front, #bak {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        padding: 15px;
        border-radius: 10px;

        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 10px;
        text-align: center;

        overflow: visible;

        backface-visibility: hidden;
    }

    #bak {
        transform: rotateY(180deg);
    }

    #bildetBeltet, #bildetBeltetBruk {
        width: 90%;
        height: auto;
        max-width: 350px;
        border-radius: 10px;
    }
}
