* {
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Tinos", sans-serif;
    font-size: 15px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

header {
    padding: 20px;
    padding-right: 40px;
    display: flex;
    justify-content: space-between;
}

.logo {
    display: block;
    width: 300px;
    height: 150px;
}

.logo img {
    display: inline-block;
}

h1 {
    display: none;
}

.navigation {
    margin: auto 0;
}

.navigation-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.navigation-item__dropdown {
    position: relative;
}

.navigation-link {
    color: black;
    background-color: white;
    text-decoration: none;
    border: none;
    padding: 0;
    margin: 0;
    font-size: 20px;
    font-family: "Tinos", sans-serif;
    padding: 10px;
    cursor: pointer;
    display: block;
}

.navigation-link:hover {
    color: grey;
}

.dropdown {
    position: absolute;
    z-index: 1;
    display: none;
}

.navigation-item__dropdown:hover .dropdown {
    display: block;
}

main {
    padding: 60px;
    padding-top: 0;
    position: relative;
}

h2 {
    text-align: center;
    font-size: 45px;
    margin-top: 50px;
    margin-bottom: 80px;
}

.author {
    margin-bottom: 50px;
}

.author-photo {
    width: 250px;
    float: left;
}

.author-biography {
    font-size: 18px;
    margin-left: 270px;
}

.partners-title {
    font-size: 24px;
    text-align: center;
}

.partners-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
}

.partners-item_mini {
    display: flex;
}

.partners-link_mini {
    margin: auto;
}

.partners-logo {
    height: 100px;
}

.partners-logo_mini {
    height: 80px;
    display: flex;
    margin: auto;
}

/* Books */

.btn-up {
    position: fixed;
    right: 10px;
    top: 0;
    background-color: lightgray;
    width: 50px;
    height: 50px;
    border: none;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
}

.btn-up::before, .btn-up::after {
    content: '';
    position: absolute;
    width: 3px;
    height: 15px;
    border-radius: 5px;
    background-color: #000;
    top: 17px;
}

.btn-up::before {
    transform: rotate(-45deg);
    right: 18px;
}

.btn-up::after {
    transform: rotate(45deg);
    right: 28px;
}

.btn-up_hide {
    display: none;
}

.text-list, .type-list, .image-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.text-item, .type-item {
    position: relative;
    padding-left: 250px;
    margin-bottom: 30px;
    
}

.text-year, .type-description {
    position: absolute;
    padding: 0;
    margin: 0;
    left: 30px;
    top: 0;
    color: gray;
}

.text-link {
    color: black;
    font-weight: bold;
}

.text-link[href]:hover {
    color: grey;
}

.text-description {
    margin: 0;
}

/* Image list */

.image-type {
    position: relative;
}

.image-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-evenly;
}

.image-item {
    margin: 0;
    padding: 0;
    display: block;
}

.image-button {
    background-color: transparent;
    padding: 0;
    margin: 0;
    border: 1px solid transparent;
}

.image-button:hover {
    border: 1px solid grey;
    cursor: pointer;
}

.image-button img {
    display: block;
    height: 200px;
    max-width: 600px;
}

.popup_fade::before {
    content: '';
    background: #000;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    opacity: 0.7;
}

.popup {
    display: none;
}

.popup_on {
    position: fixed;
    width: 60%;
    height: 80vh;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    flex-direction: column;
    z-index: 610;

}

.popup-img {
    display: block;
    max-width: 100%;
    max-height: 100%;
}

.popup-close {
    appearance: none;
    width: 40px;
    height: 40px;
    background-color: transparent;
    position: absolute;
    top: -40px;
    right: -40px;
    border-radius: 50%;
    border: 3px solid #fff;
}

.popup-close::before, .popup-close::after {
    content: '';
    position: absolute;
    width: 3px;
    height: 25px;
    background-color: #fff;
    top: 5px;
    left: 16px;
}

.popup-close::before {
    transform: rotate(45deg);
}

.popup-close::after {
    transform: rotate(-45deg);
}

.popup-close:hover {
    cursor: pointer;
    border-color: gray;
}

.popup-close:hover::before, .popup-close:hover::after {
    background-color: gray;
}

/* Image type list */

.category-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.type-item .image-list {
    justify-content: flex-start;
}

/* Memories list */

.memories-item {
    padding-left: 0;
}

.memories-button {
    position: relative;
    border: none;
    background-color: transparent;
    cursor: pointer;
    font-family: "Tinos", sans-serif;
    font-size: 15px;
    padding: 10px 35px 10px 0;
}

.memories-title {
    margin: 0;
    font-size: 25px;
}

.memories-title::before, .memories-title::after {
    content: '';
    position: absolute;
    width: 3px;
    height: 15px;
    border-radius: 5px;
    background-color: #000;
    top: 17px;
}

.memories-title::before {
    transform: rotate(45deg);
    right: 5px;
}

.memories-title::after {
    transform: rotate(-45deg);
    right: 14px;
}

.memories-title_open::before {
    transform: rotate(-45deg);
}

.memories-title_open::after {
    transform: rotate(45deg);
}

.memories-button:hover .memories-title {
    color: gray;
    text-decoration: underline;
}

.memories-button:hover .memories-title::before, .memories-button:hover .memories-title::after {
    background-color: gray;
}

.memories-author {
    font-style: italic;
    margin-top: 0;
}

.memories-description {
    display: none;
}

.memories-description_on {
    display: block;
}

.memories-description p {
    margin: 0;
    margin-bottom: 5px;
}

/* Footer */

footer {
    background-color: #2c2c2c;
    padding: 20px 60px;
    margin-top: auto;
    display: flex;
    justify-content: space-between;
}

.footer-navigation-list {
    list-style: none;
    display: flex;
    gap: 20px;
    padding: 0;
    margin: 0;
}

.footer-navigation-inner-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-navigation-link {
    background-color: transparent;
    border: none;
    color: white;
    text-decoration: none;
    font-family: "Tinos", sans-serif;
    font-size: 14px;
    padding: 0;
    line-height: normal;
    appearance: none;
    display: flex;
    flex-direction: column;
}

a.footer-navigation-link:hover {
    text-decoration: underline;
}

.author-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 16px;
}

.author-link {
    color: white;
    text-decoration: none;
}

.author-link:hover {
    text-decoration: underline;
}

.toc__list li {
  margin-bottom: 1em;
}