
@font-face {
    font-family: 'Source Serif';
    src: url('fonts/SourceSerif4Variable-Roman.otf.woff2') format('woff2');
}
:root {
    --primary-colour: rgb(10, 10, 10);
    --alt-primary-colour: ;
    --link-hover: ;
    --alt-link-hover: ;
}
body {
    background: no-repeat url('../images/bookcover-clipped.webp');
    background-size: cover;
    background-color: #FBFCF4;
}
#body-wrapper {
    margin: 0;
    min-height: 90vh;
    backdrop-filter: blur(20px);
    background-color: rgba(241, 241, 241, 0.65);
}
#html-body {
    font-family: 'Source Serif', serif;
    overflow-x: hidden;
    font-feature-settings: "kern" 1, "liga" 1;
    font-optical-sizing: auto;
    margin: 0;
    font-size: 17px;
}
h2 {
    text-align: center;
}
h4 {
    margin-top: 0;
    margin-bottom: 5px;
}
a {
    color: var(--primary-colour);
    text-decoration: underline;
    text-underline-position: under;
}
a:visited {
    color: var(--primary-colour);
}
ul {
    margin-top: 0;
}
hr {
    max-width: 900px;
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, rgba(185, 185, 185, 0), rgba(150, 150, 150, 0.75), rgba(112, 112, 112, 0));
    margin: 35px auto;
}

/* Top Navigation */
#topnav {
    background: #36512E;
    border-bottom: 1px solid black;
    position: relative;
    box-shadow: 0 0 2px black;
    z-index: 1;
    font-size: 18px;
}
#topnav-wrapper {
    max-width: 900px;
    margin: 0 auto;
}
ul#topnav-urls {
    display: flex;
    flex-direction: column;
    padding: 0;
    list-style: none;
    margin: 0;
    justify-content: right;
}
.topnav-url {
    color: #FBFCF4;
}
.topnav-url a {
    display: flex;
    justify-content: center;
    padding: 3px 5px;
    color: #FBFCF4;
    text-decoration: none;
}

/* Default: Small devices (less than 768px) */
/* Book Cover */
.content-wrapper {
    background-color: rgba(255, 255, 255, 0.75);
}
#book-content-wrapper {
    margin: 0;
}
.body-content-wrapper {
    max-width: 900px;
    margin: 0 auto;
    min-height: 90vh;
}
.book-cover {
    min-height: 100px;
    align-self: center;
    z-index: 2;
}
.book-cover-container {
    display: flex;
    flex-direction: column;
    padding-top: 5%;
    justify-content: space-between;
    column-gap: 5%;
}
.book-cover img {
    height: 200px;
    width: auto;
    border-radius: 4px;
    box-shadow: 2px 2px 7px rgba(0, 0, 0, 0.4);
}
.author-wrapper {
    padding-left: 5%;
    padding-right: 5%;
    flex-direction: column-reverse;
}
.book-header-container {
    padding-left: 5%;
    padding-right: 5%;
    max-width: 900px;
    margin: 0 auto;
}
.content-wrapper {
    padding-left: 5%;
    padding-right: 5%;
}
.footer-content-wrapper {
    padding-left: 5%;
    padding-right: 5%;
}
.book-highlight {
    align-self: center;
    font-size: 20px;
    line-height: 1.4;
    font-weight: 500;
    text-align: justify;
    text-justify: inter-word;
}
.book-highlight p:first-child:first-letter {
    color: rgb(153, 56, 0);
    float: left;
    font-size: 3.2em;
    line-height: 0.85;
    padding-top: 0px;
    padding-right: 5.5px;
    padding-left: 3px;
  }
.book-reviews-header {
    text-align: center;
}

.book-reviews-wrapper {
    text-align: center;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    column-gap: 10px;
    row-gap: 12px;
}
#review-item {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    justify-content: space-evenly;
    border: 1px solid lightgray;
    box-shadow: 0px 2px 3px rgba(216, 216, 216, 0.5);
    border-radius: 3px;
    padding: 10px 15px;
    font-size: 17px;
}
#review-item-body {
    text-align: center;
    text-justify: inter-word;
}
#review-item-author {
    padding-top: 10px;
}

#book-buynow {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
    margin-top: 5px;
}
.book-separator img {
    max-width: 150px;
    display: block;
    margin: 0 auto;
}
footer {
    background-color: rgb(29, 29, 29);
    color: rgb(231, 231, 231);
    padding-top: 10px;
    padding-bottom: 10px;
}
#footer-content a {
    color: rgb(231, 231, 231);
}
#footer-content a:hover {
    color: rgb(153, 153, 153);
}
.footer-content-wrapper {
    display: flex;
    flex-direction: column;
    max-width: 900px;
    margin: 0 auto;
}
#uk-buynow h2 {
    margin: 0 0 10px 0;
}
#uk-shops-wrapper {
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    row-gap: 7px;
}
a.uk-shops {
    border: 1px solid rgb(14, 14, 14);
    background-color: rgb(240, 173, 44);
    color: rgb(0, 0, 0);
    border-radius: 3px;
    padding: 5px 12px;
    margin: 0 2px;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
}
a.uk-shops:hover {
    text-decoration: underline;
}
#global-buynow a {
    font-size: 13px;
}

a.uk-shops:hover {
    background-color: rgba(0, 0, 0, 0.4);
}
#global-buynow {
    margin-top: 5px;
}
#global-buynow a:hover {
    background-color: rgba(0, 0, 0, 0.4);;
}

/* Book Contents / Description */
.book-description {
    font-size: 1.1em;
    line-height: 1.35;
}

.book-description p:first-child:first-letter {
    color: rgb(153, 56, 0);
    float: left;
    font-size: 4.5em;
    line-height: 0.85;
    padding-top: 3.5px;
    padding-right: 8px;
    padding-left: 3px;
  }

#retailers {
    padding-bottom: 10px;
}


/* Contact Page */
.contact-body {
    padding: 20px 0;
}

/* Resources Page */
.resources-body {
    padding: 20px 0;
}

.glossary-wrapper {
    display: grid;
    grid-template-columns:
    1fr 1fr 1fr;
    column-gap: 10px;
    row-gap: 10px;
}

#glossary-item {
    border: 1px solid lightgray;
    border-radius: 3px;
    box-shadow: 1px 1px 3px rgb(216, 216, 216);
    display: flex;
    min-height: 185px;
    padding: 10px;
    flex-direction: column;
    flex-wrap: wrap;
}

#glossary-item:hover {
    background-color: #d1e2cc;
}

#glossary-item-title {
    padding-bottom: 5px;
    font-size: larger;
}

/* About the Author Page */
.author-body {
    padding: 20px 0;
}

/* About Aelfred Page */
.alfred-body {
    padding: 20px 0;
}

#alfred-qa-wrapper {
    border: 1px solid rgb(240, 240, 240);
    margin: 10px 0;
    display: flex;
}

#alfred-question {
    font-size: large;
    font-weight: 600;
    flex: 0 1 20%;
    margin: 5px;
}
#alfred-answer {
    margin: 5px;
    flex: 0 1 80%;
}

.author-wrapper {
    display: flex;
    flex-direction: column-reverse;
    column-gap: 5%;
    max-width: 900px;
    padding-top: 5%;
    margin: 0 auto;
    font-size: 20px;
    align-items: center;
    line-height: 1.4;
    font-weight: 500;
}
.author-highlight-photo img {
    height: 300px;
    border-radius: 4px;
    box-shadow: 2px 2px 7px rgba(0, 0, 0, 0.4);
}
.author-highlight {
    text-align: justify;
}

@media only screen and (max-width: 659px) {
    li.topnav-url {
        padding: 0;
    }
}
@media only screen and (min-width: 925px) {
    .book-header-container {
        padding-left: 0;
        padding-right: 0;
    }
    .content-wrapper {
        padding-left: 0;
        padding-right: 0;
    }
    .footer-content-wrapper {
        padding-left: 0;
        padding-right: 0;
    }
    .author-wrapper {
        padding-left: 0;
        padding-right: 0;
    }
}

/* Medium devices such as tablets (768px and up) */
@media only screen and (min-width: 660px) {
    
    ul#topnav-urls {
        flex-direction: row;
        background: rgba(0, 0, 0, 0.05);
    }
    .topnav-url {
        border-bottom: 3px solid rgba(0, 0, 0, 0.6);
        /*border-width: 0 0 0 1px;
        border-style: solid;
        border-image: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgb(255, 255, 255,0.5) 50%, rgba(255,255,255,0) 100%) 1;*/
    }
    .topnav-url li {
        padding: none;
    }
    .topnav-url a {
        height: 40px;
        align-items: center;
        padding: 5px 10px;
    }
    .topnav-url:hover {
        background: rgba(0, 0, 0, 0.4);
        border-bottom: 2px solid rgb(240, 173, 44);
    }
    .topnav-url.home {
        margin-right: auto;
        border-right: none;
        border-left: none;
    }

    .book-cover-container {
        flex-direction: row;
    }
    .book-cover img {
        height: 300px;
    }
    .book-reviews-wrapper {
        text-align: center;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
        column-gap: 10px;
        row-gap: 12px;
    }
    #review-item:nth-child(1) {
        grid-column: 1 / 3;
    }
    #book-buynow {
        align-self: center;
    }
    #global-retailers {
        columns: 2;
    }
    #global-retailers li {
        padding: 5px 0;
    }
    .author-wrapper {
        flex-direction: row;
    }
}

/* Large devices such as laptops (1023px and up) */
@media only screen and (min-width: 1023px) {
    #content {
        margin: 0 auto;
    }
    .book-cover img {
        max-width: auto;
        height: 350px;
        object-fit: contain;
    }
    .book-header-container {
        max-width: 900px;
        margin: 0 auto;
    }
    .book-cover-container {
        padding: 5% 0% 0% 0%;
    }
}