* {
    box-sizing: border-box;
}

/* Hoofdcontainer */

#boek-container {
    width: auto;
    max-width: 1400px;
    height: min(600px, calc(100vh - 20px));
    min-height: 600px;
    margin: 10px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}
/* Titel */

.boek-titell {
    flex-shrink: 0;
    text-align: center;
    font-size: 26px;
    color: #654b3c;
    margin: 5px 0 12px;
}

/* Boek */

#boekk {
    position: relative;
    width: 1100px;
    max-width: 100%;
    height: 620px;
    margin: 0 auto;
    flex-shrink: 0;
    min-height: 0;
    box-shadow: 0 12px 35px rgba(0,0,0,.22);
    background: #fff;
}
#boek {
    position: relative;
    width: 1100px;
    max-width: 100%;
    height: 620px;
    margin: 0 auto;
    flex-shrink: 0;
    min-height: 0;
    box-shadow: 0 12px 35px rgba(0,0,0,.22);
    background: #fff;
}    
/* Alle pagina's */

.page {
    background: #fffdf8;
    overflow: hidden;
}

/* Linkerpagina: afbeelding */

.page.afbeelding-pagina {
    background: #fffdf8;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
}

.page.afbeelding-pagina img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: top center;
    display: block;
}

/* Rechterpagina: tekst */

.page.tekst-pagina {
    background: #fffdf8;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 25px;
}

.tekst-inhoud h2 {
    font-size: 26px;
    color: #8c5639;
    margin: 0 0 25px;
    line-height: 1.3;
}

.tekst-inhoud p {
    font-size: 19px;
    line-height: 1.85;
    white-space: pre-line;
    margin: 0;
}

/* Voorleesknop */

.audio-knop {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    align-self: center;
    margin-top: 35px;
    padding: 13px 27px;
    border: none;
    border-radius: 30px;
    background: #936044;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: .2s;
}

.audio-knop:hover {
    background: #67412e;
    transform: translateY(-2px);
}

.audio-knop.actief {
    background: #3c805d;
}

/* Paginanummer */

.pagina-nummer {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 13px;
    color: #9a8b7e;
}

/* Navigatie */

.boek-navigatieee {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    margin-top: 12px;
}
.boek-navigatieee {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    margin: 0;
    z-index: 2000;
}
.boek-navigatie {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    margin: 0;
    z-index: 2000;
}
.boek-navigatie button {
    padding: 11px 24px;
    border: 0;
    border-radius: 6px;
    background: #79543e;
    color: white;
    font-size: 15px;
    cursor: pointer;
    z-index: 2000;
}

.boek-navigatie button:hover {
    background: #533827;
}

.boek-navigatie button:disabled {
    background: #aaa;
    cursor: default;
}

#pagina-info {
    min-width: 100px;
    text-align: center;
}

/* Voortgang */

/* Voortgangsbalk */

#boek-progress {
    flex-shrink: 0;
    width: 90%;
    max-width: 900px;
    height: 4px;
    margin: 12px auto 0;
    background: #d5cabe;
    border-radius: 10px;
    overflow: hidden;
}

#boek-progress-inner {
    height: 100%;
    width: 0;
    background: #a36e4c;
    transition: width .3s;
}

/* Smartphone */

@media(max-width: 650px) {

    body {
        padding: 10px;
    }

    .boek-titell {
        font-size: 23px;
    }

    .page.tekst-pagina {
        padding: 25px;
    }

    .tekst-inhoud h2 {
        font-size: 22px;
    }

    .tekst-inhoud p {
        font-size: 17px;
        line-height: 1.65;
    }

    .audio-knop {
        margin-top: 22px;
    }

    .boek-navigatie {
        gap: 10px;
    }

    .boek-navigatie button {
        padding: 12px 15px;
        font-size: 14px;
    }
}

/* Laptop met beperkte schermhoogte */

@media (max-height: 750px) and (min-width: 651px) {

    #boek-container {
        height: calc(100vh - 20px);
        max-height: 700px;
    }

    .boek-titell {
        font-size: 22px;
        margin: 2px 0 8px;
    }

    .boek-navigatie {
        margin-top: 8px;
    }

    #boek-progress {
        margin-top: 8px;
    }
}

/* Tablet en smartphone */

@media (max-width: 650px) {

    #boek-container {
        height: auto;
        min-height: 0;
        margin: 10px auto;
    }

    .boek-titell {
        font-size: 22px;
        margin-bottom: 15px;
    }

    .boek-navigatie {
        gap: 10px;
        margin-top: 20px;
    }

    .boek-navigatie button {
        padding: 11px 15px;
        font-size: 14px;
    }

    #boek-progress {
        margin-top: 15px;
    }
}