/* ============================================
 * CSS for Interaktivt Eventyrspill
 * @Author: Sebastian O.A
 * @Last Modified by:   Sebastian O.A
 * ============================================ */

/* ========== BASIS ========== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    min-height: 100vh;
    font-family: Arial, sans-serif;
    background-color: #ffffff;
    color: #333;
    display: flex;
    flex-direction: column;
}

/* ========== HEADER ========== */
header {
    width: 100%;
    background-color: #b1b1b1;
    padding: 1rem 0;
}

.header-innhold {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-wrap: wrap;
    text-align: center;
}

.header-innhold h1 {
    font-size: 2em;
    flex-grow: 1;
}

.header-innhold button {
    position: absolute;
    left: 0;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border-radius: 5px;
}

/* ========== MAIN / TEKST ========== */
main {
    flex: 1;
    padding-bottom: 150px;
    width: 100%;
    min-height: 400px;
}

#tekst {
    text-align: center;
    font-size: 1.2em;
    padding: 1rem;
    max-width: 90%;
    margin: auto;
    position: relative;
    z-index: 2;
}

.overskrift {
    font-family: 'Tangerine', sans-serif;
}

/* ========== HISTORIEBILDE ========== */
.historie-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    gap: 1rem;
    width: 100%;
}

.historie-container img, .historie-container video {
    max-width: 50%;
    height: auto;
    border-radius: 10px;
    z-index: 1;
}

/* ========== KNAPPER (VALG OG NAVIGASJON) ========== */
.knapper {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    z-index: 10;
}

#valgContainer {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    z-index: 3;
}

.knapper button,
#valgContainer button {
    height: 40px;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background-color 0.2s ease;
    color: #333;
}

#valgContainer button:hover {
    border: 2px dotted #d3e117;
    background-color: #d3e1173c;
}

button:disabled {
    background-color: #ccc;
    color: #666;
    border: none;
    opacity: 0.6;
    cursor: not-allowed;
}

#forrigeBilde {
    border: 2px solid #ff0303;
    background-color: #ff030388;
}

#forrigeBilde:hover {
    border: 2px dotted #ff0303;
    background-color: #ff030388;
}

#nesteBilde {
    border: 2px solid #17bb28;
    background-color: #17bb277d;
}

#nesteBilde:hover {
    border: 2px dotted #17bb28;
    background-color: #17bb277d;
}

/* ========== FOOTER ========== */
footer {
    width: 100%;
    background-color: #b1b1b1;
    text-align: center;
    padding: 1rem 0;
    flex-shrink: 0;
}

/* ========== RESPONSIVITET ========== */
@media (min-width: 1280px) {
    .historie-container img {
        max-width: 70%;
    }
}

@media (max-width: 1024px) {
    .header-innhold {
        flex-direction: column;
        text-align: center;
    }

    .header-innhold button {
        position: static;
        margin-bottom: 0.5rem;
    }

    .header-innhold h1 {
        font-size: 1.8em;
    }

    .historie-container img {
        max-width: 65%;
    }
}

@media (max-width: 768px) {
    .header-innhold h1 {
        font-size: 1.5em;
    }

    #tekst {
        font-size: 1em;
    }

    .historie-container img {
        max-width: 80%;
    }

    .knapper {
        flex-direction: column;
    }

    .knapper button,
    #valgContainer button {
        width: 90%;
    }
}

@media (max-width: 480px) {
    button {
        padding: 10px 20px;
        font-size: 1em;
    }

    .header-innhold h1 {
        font-size: 1.2em;
    }

    #tekst {
        font-size: 0.95em;
        padding: 0.5rem;
    }

    .historie-container img {
        max-width: 100%;
    }

    .knapper button,
    #valgContainer button {
        width: 100%;
    }
}
