/*============= common ================*/

*, *::before, *::after {
    box-sizing: inherit;
}

html {
    box-sizing: border-box;
}

body, html {
    font-size: 100%;
    padding: 0;
    margin: 0;
    height: 100%;

}

body {
    font-family: Arial, sans-serif;
    background: #f6f6f6;
}

.visually-hidden {
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    border: 0;
    clip: rect(0 0 0 0);
    overflow: hidden;
    position: absolute;
}

.container {
    min-width: 320px;
    height: 100%;

}

@media(min-width: 700px) {

    .container {
        overflow: hidden;
    }
}

/*============= styles ================*/

.bb-item {
    display: block;
    height: auto;
    position: static;
}

.bb-bookblock {
    width: 100%;
    overflow: visible;
}

@media(min-width: 700px) {

    .bb-item {
        display: flex;
    }

    .bb-custom-wrapper {
        width: 100%;
        height: 100%;
        position: relative;
    }

    .bb-bookblock {
        width: 100%;
        height: 34.8vw;
        -webkit-perspective: 2000px;
        perspective: 2000px;
    }

    .bb-custom-side {
        width: 50%;
        float: left;
        height: 100%;
        overflow: hidden;
        background: #fff;
        /* Centering with flexbox */
        display: -webkit-box;
        display: -moz-box;
        display: -webkit-flex;
        display: flex;
        -webkit-flex-direction: row;
        flex-direction: row;
        -webkit-flex-wrap: wrap;
        flex-wrap: wrap;
        -webkit-box-pack: center;
        -moz-box-pack: center;
        -webkit-justify-content: center;
        justify-content: center;
        -webkit-box-align: center;
        -moz-box-align: center;
        -webkit-align-items: center;
        align-items: center;
    }

    .bb-custom-firstpage {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        text-align: center;
        padding: 0;
        width: 50%;
        float: left;
        height: 100%;
    }
}

@media(min-width: 900px) {

    .bb-bookblock {
        height: 32vw;
    }
}



/*============= nav ================*/

.nav {
    display: none;
}

@media(min-width: 700px) {

    .nav {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        height: 40px;
        margin: 0;
        position: fixed;
        left: 0;
        bottom: 20px;
        z-index: 1000;
        text-align: center;
    }

    .nav__link {
        width: 40px;
        height: 40px;
        margin: 5px;
        border-radius: 50%;
        background: #69cbf3;
        background-image: url("../img/sprite-arrows.svg");
        background-repeat: no-repeat;
        box-shadow: 0 -5px 10px 0 rgba(0,0, 0, 0.2);
        cursor: pointer;
        transition-duration: 0.3s;
        transition-property: opacity;
    }

    .nav__link:hover {
        opacity: 0.6;
    }

    .nav__link--first {
        background-position: center top;
    }

    .nav__link--prev {
        background-position: center top -40px;
    }

    .nav__link--next {
        background-position: center top -80px;
    }

    .nav__link--last {
        background-position: center top -120px;
    }

}




/* No JS */

@media(min-width: 700px) {

    .no-js .bb-custom-wrapper {
        height: auto;
    }

    .no-js .bb-custom-content {
        height: 470px;
    }

    @media screen and (max-width: 61.75em) {
        .bb-custom-side {
            font-size: 70%;
        }
    }

    @media screen and (max-width: 33em) {
        .bb-custom-side {
            font-size: 60%;
        }
    }
}




/*============= book ================*/

@media(min-width: 700px) {

    .book {
        padding: 0 1%;
    }
}

@media(min-width: 900px) {

    .book {
        padding: 0 5%;
    }
}

.book__img {
    display: block;
    transition-duration: 0.3s;
}

.book__img img {
    display: block;
    width: 100%;
    height: auto;
    transition-duration: 0.3s;
}

.book__text {
    max-width: 800px;
    margin: 0 auto;
    padding: 10px;
}

.book__text p {
    margin: 0;
    padding: 13px;
    font-size: 12px;
    color: #000000;
    line-height: 1.2;
    text-align: left;
}

.book__text a {
    color: #69cbf3;
    text-decoration: none;
    border-bottom: 1px dotted #69cbf3;
    transition-duration: 0.3s;
    transition-property: opacity;
    cursor: pointer;
}

.book__text a:hover {
    opacity: 0.7;
}

@media (min-width: 1200px) {

    .book__text {
        padding: 20px;
    }

    .book__text p {
        font-size: 18px;
        line-height: 1.6;
    }
}

/*============= site-header ================*/

.site-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    text-align: center;
}

.site-header__title {
    margin: 0;
    padding: 10px;
    font-size: 20px;
    font-weight: 400;
    color: #000000;
}

.site-header__out {
    display: block;
    padding: 5px;
    border: 1px solid #97a171;
    font-size: 16px;
    font-weight: 400;
    color: #97a171;
    text-decoration: none;
    transition-duration: 0.3s;
    transition-property: opacity;
    cursor: pointer;
}

.site-header__out:hover {
    opacity: 0.7;
}

@media(min-width: 700px) {

    .site-header {
        flex-direction: row;
        justify-content: center;
    }

    .site-header__title {
        padding-left: 30px;
    }
}