:root {
    /* Media variables */
    --story_poster_1: url('media/story_poster_1.jpg');
    --story_poster_2: url('media/story_poster_2.jpg');
    --story_poster_3: url('media/story_poster_3.jpg');
    --profile_picture: url('media/profile_picture.jpg');
    --blog_post_poster: url('media/blog-post_poster.jpg');
    --book_cover_1: url('media/book_cover_1.jpg');
    --book_cover_2: url('media/book_cover_2.webp');
    --book_cover_3: url('media/book_cover_3.jpg');
    --book_cover_4: url('media/book_cover_4.webp');
    --book_cover_5: url('media/book_cover_5.webp');
    --book_cover_6: url('media/book_cover_6.webp');
    scroll-behavior: smooth;
}

/* Header */

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.1% 3%;
}

nav img {
    width: 80px;
}

.nav_links {
    flex: 1;
    text-align: right;
}

.nav_links ul li {
    list-style: none;
    display:  inline-block;
    padding: 8px 12px;
    position: relative;
}

.nav_links ul li a {
    color: black;
    text-decoration: none;
    font-size: 18px;
}

.nav_links ul li::after {
    content: '';
    width: 0%;
    height: 1px;
    background: black;
    display: block;
    margin: auto;
    transition: 0.4s;
}

.nav_links ul li:hover::after {
    width: 100%;
}

/* Main page about */

.text_box {
    width: 90%;
    color: black;
    position: absolute;
    top: 25%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.text_box h1 {
    font-size: 52px;
}

.text_box p {
    margin: 10px 0 40px;
    font-size:  18px;
    color: black;
}

.hero_button {
    display: inline-block;
    text-decoration: none;
    color: black;
    border: 1px solid black;
    padding: 1% 3%;
    font-size: 13px;
    background: transparent;
    position: relative;
    cursor: pointer;
    transition: 0.4s;
}

.hero_button:hover {
    padding: 2% 6%;
}

nav .fa {
    display: none;
}

/* Library Landing Segment */

.segment {
    width:  90%;
    margin: auto;
    text-align: center;
    padding-top: 60px;
}

.card_row {
    margin: 5%;
    display: flex;
    justify-content: space-between;
}

@media(max-width: 700px) {
    .card_row {
        flex-direction: column;
    }
}

h1 {
    font-size: 36px;
    font-weight: 600;
}

.h3 {
    text-align: center;
    font-weight: 600;
    margin: 10px 0;
}

p {
    color: black;
    font-size: 18px;
    font-weight: 300;
    line-height: 22px;
    padding: 10px;
}

/* About */

.about_card {
    flex-basis: 31%;
    /* background: blanchedalmond; */
    border: 1px solid gray;
    /* border-radius: 10px; */
    margin-bottom: 5%;
    padding: 20px 12px;   
    box-sizing: border-box;
    transition: 0.4s;
}

.about_card:hover {
    box-shadow: 0 0 20px 0px rgba(0, 0, 0, 0.15);
}

@media(max-width: 700px) {
    .about_card_row {
        flex-direction: column;
    }
}

/* Stories */

.story_card {
    flex-basis: 31%;
    border-radius: 5px;
    margin-bottom: 5%;
    position: relative;
    display: inline-block;
    overflow: hidden;
}

.story_card h3 {
    width: 100%;
    font-weight: 500;
    color: white;
    font-size: 26px;
    bottom: -20%;
    left: 50%;
    transform: translateX(-50%);
    position: absolute;
    transition: 0.4s;
}

.story_card:hover h3 {
    bottom: 0;
    /* bottom: 49%; */
    /* opacity: 0; */
}
  
.story_card img {
    display: block;
    width: 100%;
    height: auto;
}

.story_card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255, 250, 240, 0), rgba(255, 250, 240, 0.4));
    opacity: 0;
    transition: opacity 0.4s;
}

.story_card:hover::after {
    opacity: 1;
}

/* Books */

.book_container {
    position: relative;
    display: flex;
    justify-content: space-between;
    position: relative;
}
  
.book_container::after {
    content: '';
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(to left, transparent, rgba(255, 250, 240, 1)), linear-gradient(to right, transparent, rgba(255, 250, 240, 1));
    background-position: 0 0, 100% 0;
    background-size: 20px 100%, 20px 100%;
    background-repeat: no-repeat;
    /* Элемент не реагирует на события ввода мыши */
    pointer-events: none;
    transition: 0.4s;
}

.book_container:hover::after {
    background-size: 30px 100%, 30px 100%;
}
  
.book_scroll_container {
    overflow-x: scroll;
    scrollbar-width: none;
    display: flex;
    /* Скрываем стандартный скроллбар в Internet Explorer/Edge */
    -ms-overflow-style: none;
    /* Добавляем сглаживание при прокрутке для устройств с сенсорным экраном */
    -webkit-overflow-scrolling: touch; 
    padding-left: 30px;
}

.book_card {
    flex: 0 0 270px;
    margin-right: 32px;
    margin-bottom: 5%;
    position: relative;
    display: inline-block;
    overflow: hidden;
    border: 1px solid;
    border-color: transparent;
    padding: 10px; 
    margin-inline: 5px;
    transition: 0.4s;
}

.book_card:hover {
    border-color: black;
}

.book_card img {
    border-radius: 5px;
    display: block;
    width: 100%;
    height: auto;
}

.book_card h2 {
    text-align: left;
    font-weight: 600;
    font-size: 16px;
    margin-top: 15px;
}

.book_card h3 {
    text-align: right;
    font-weight: 500;
    font-size: 16px;
    margin: 5px;
}

.book_card h4 {
    text-align: left;
    font-weight: 400;
    font-size: 13px;
    /* margin: 5px; */
    margin-top: 15px;
}

/* Profile */

.user_block {
    display: flex;
    /* margin: 5%;  */
}

.user_block img {
    width: 280px;
    height: fit-content;
    border-radius: 5px;
    margin-right: 30px;
}

.user_block_header {
    display: flex;
}

.user_block_header h2 {
    font-weight: 600;
    font-size: 24px;
}

.user_content_listing {
    text-align: left;
}

.user_information_block {
    flex: 1;
}

.user_book_card {
    display: flex;
    border: 1px solid;
    border-color: transparent;
    padding: 10px;
    margin-block: 5px;
    margin-left: 0;
    transition: 0.4s;
    margin-top: 30px;
}

.user_book_card:hover {
    border-color: black;
    margin-left: 10px;
}

.user_book_card img {
    border-radius: 5px;
    height: 150px;
    width: auto;
}

.user_book_card h2 {
    font-weight: 600;
    font-size: 16px;
}

.user_book_card h3 {
    font-weight: 500;
    font-size: 16px;
    margin: 0;
}

.user_book_card h4 {
    font-weight: 500;
    font-size: 13px;
    margin-right: 30px;
    cursor: pointer;
}

.user_book_metadata {
    display: flex;
}

.user_book_metadata h4::after {
    content: '';
    width: 0%;
    height: 1px;
    background-color: black;
    display: block;
    margin: auto;
    transition: 0.4s;
}

.user_book_metadata h4:hover::after {
    width: 100%;
}

.user_content_listing {
    position: relative;
}

.user_content_listing::after {
    content: '';
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(to top, transparent, rgba(255, 250, 240, 1)), linear-gradient(to bottom, transparent, rgba(255, 250, 240, 1));
    background-position: 0 0, 100% 100%;
    background-size: 100% 20px, 100% 20px;
    background-repeat: no-repeat;
    pointer-events: none;
    transition: 0.4s;
}

.user_content_listing:hover::after {
    background-size: 100% 30px, 100% 30px;
}

.user_content_scroll_container {
    overflow-y: scroll;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch; 
    height: 520px;
    margin-top: 0;
}



/* .book_container {
    position: relative;
    display: flex;
    justify-content: space-between;
    position: relative;
}
  
.book_container::after {
    content: '';
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(to left, transparent, rgba(255, 250, 240, 1)), linear-gradient(to right, transparent, rgba(255, 250, 240, 1));
    background-position: 0 0, 100% 0;
    background-size: 20px 100%, 20px 100%;
    background-repeat: no-repeat;
    pointer-events: none;
    transition: 0.4s;
}

.book_container:hover::after {
    background-size: 30px 100%, 30px 100%;
}
  
.book_scroll_container {
    overflow-x: scroll;
    scrollbar-width: none;
    display: flex;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch; 
    padding-left: 30px;
} */


/* Typography variables */

@font-face {
    font-family: Jenriv;
    src: url("typography/JenrivTitling-Light.otf") format("opentype");
}

@font-face {
    font-family: Merriweather;
    src: url("typography/Merriweather-Light.ttf") format("truetype");
}

body {
    font-family: "Merriweather";
    font-weight: 400;
    display:flex; flex-direction:column; justify-content:center;
}

/* Same thing on top */
/* h1{
    display: flex;
    justify-content: center;
} */

.general_poster {
    width: 25%;
    height: auto;
    border-radius:2%;
    margin: 10px;
    box-shadow: 0px 5px 10px 0px rgba(0, 0, 0, 0.5)
}

/* Converting media variables into reusable html classes */

.story_poster_1 {content: var(--story_poster_1);}
.story_poster_2 {content: var(--story_poster_2);}
.story_poster_3 {content: var(--story_poster_3);}

.profile_picture {content: var(--profile_picture);}
.blog_post_poster {content: var(--post_poster);}

.book_cover_1 {content: var(--book_cover_1);}
.book_cover_2 {content: var(--book_cover_2);}
.book_cover_3 {content: var(--book_cover_3);}
.book_cover_4 {content: var(--book_cover_4);}
.book_cover_5 {content: var(--book_cover_5);}
.book_cover_6 {content: var(--book_cover_6);}
