/* ==========================================
   ChapterShelf - General Website Styling
   Vintage Library meets Modern Web Design
========================================== */


/* ==========================================
   Google Fonts
   Elegant serif font for headings
   and readable font for text
========================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Lora:wght@400;500;600&display=swap');


/* ==========================================
   Color Variables
   These make changing the design easier
========================================== */

:root {
    --paper-background: #f7f2e8;
    --dark-text: #2b241f;
    --gold-accent: #b08a45;
    --soft-brown: #6b5848;
    --light-card: #fffaf0;
    --shadow: rgba(0, 0, 0, 0.08);
}


/* ==========================================
   Basic Page Styling
========================================== */

* {
    box-sizing: border-box;
}


body {
    margin: 0;
    padding: 0;

    background-color: var(--paper-background);
    color: var(--dark-text);

    font-family: "Lora", serif;

    line-height: 1.6;
}
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Headings use an elegant book-like font */

h1,
h2,
h3 {
    font-family: "Cormorant Garamond", serif;
    font-weight: 600;
}


/* ==========================================
   Header
========================================== */

header {

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 1.5rem 5%;

    background-color: var(--light-card);

    box-shadow: 0 3px 10px var(--shadow);

}


/* ==========================================
   Logo / Website Name
========================================== */

.logo h1 {

    margin: 0;

    font-size: 2rem;

    color: var(--dark-text);

}


/* ==========================================
   Navigation
========================================== */

nav ul {

    display: flex;

    list-style: none;

    gap: 1.5rem;

    padding: 0;
    margin: 0;

}


nav a {

    text-decoration: none;

    color: var(--dark-text);

    font-size: 1rem;

    transition: color 0.3s ease;

}


nav a:hover {

    color: var(--gold-accent);

}


/* ==========================================
   Search and Filter Area
========================================== */

.search-section form {

    display: flex;

    gap: 0.8rem;

    align-items: center;

}


input,
select {

    padding: 0.7rem 1rem;

    border-radius: 20px;

    border: 1px solid #d8cbb8;

    background-color: white;

    font-family: "Lora", serif;

}


input:focus,
select:focus {

    outline: none;

    border-color: var(--gold-accent);

}

/* ==========================================
   Main Content Alignment
   Centers the homepage content
========================================== */

main {
    text-align: center;
}


/* ==========================================
   Hero Section
   Main introduction area of the website
========================================== */

.hero {

    padding: 5rem 10%;

}


.hero h2 {

    font-size: 3.5rem;

    margin-bottom: 1.5rem;

    color: var(--dark-text);

}


.hero p {

    max-width: 750px;

    margin: auto;

    font-size: 1.2rem;

    color: var(--soft-brown);

}


/* ==========================================
   Genre Section
========================================== */

.genres {

    padding: 3rem 8%;

}


.genre-container {

    display: flex;

    justify-content: center;

    flex-wrap: wrap;

    gap: 1.5rem;

    margin-top: 2rem;

}


.genre-card {

    background-color: var(--light-card);

    width: 200px;

    padding: 1.5rem;

    border-radius: 20px;

    box-shadow: 0 5px 15px var(--shadow);

    transition: transform 0.3s ease, box-shadow 0.3s ease;

}


.genre-card:hover {

    transform: translateY(-8px);

    box-shadow: 0 10px 20px var(--shadow);

}

/* ==========================================
   Footer
========================================== */

footer {

    margin-top: 4rem;

    padding: 2rem;

    text-align: center;

    background-color: var(--light-card);

    color: var(--soft-brown);

}

/* =========================
   AUTHORS PAGE
========================= */

.authors-page {
    text-align: center;
    padding: 7px 20px;
}


.authors-page h2:first-child {
    margin-bottom: 0;
}

/* Introduction text */
.authors-page p {
    line-height: 1.6;
    margin-bottom: 20px;
}



/* ==========================================
   AUTHORS PAGE - BOOKSHELF DESIGN
========================================== */

.bookshelf {

    display: flex;

    justify-content: center;

    align-items: flex-end;

    flex-wrap: wrap;

    gap: 1.5rem;

    margin-top: 3rem;

    padding: 2rem;


}


.author-book {

    width: 120px;

    height: 340px;

    display: flex;

    flex-direction: column;

    justify-content: flex-end;

    align-items: center;

}


.book-spine {

    width: 90px;

    height: 260px;

    background-color: var(--light-card);

    border-radius: 8px 8px 3px 3px;

    box-shadow: 0 8px 15px var(--shadow);

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 1rem;

    margin-bottom: 15px;

    transition: transform 0.3s ease, box-shadow 0.3s ease;

}


.book-spine h3 {

    writing-mode: vertical-rl;

    transform: rotate(180deg);

    font-size: 1.3rem;

    margin: 0;

}


.author-book:hover .book-spine {

    transform: translateY(-15px);

    box-shadow: 0 15px 25px var(--shadow);

}


.author-book p {

    height: 45px;

    width: 120px;

    margin: 0;

    color: var(--soft-brown);

    font-size: 0.9rem;

}
/* ==========================================
   ABOUT PAGE
========================================== */

.about-page {
    text-align: center;
    padding: 60px 20px;
}

.about-page p {
    max-width: 750px;
    margin: 0 auto 30px auto;
    line-height: 1.8;
}
/* ==========================================
   Small Animations
========================================== */

a,
button,
input,
select {

    transition: all 0.3s ease;

}


/* ==========================================
   Responsive Design
   Makes the website usable on smaller screens
========================================== */

@media (max-width: 900px) {


    header {

        flex-direction: column;

        gap: 1.5rem;

        text-align: center;

    }


    nav ul {

        justify-content: center;

        flex-wrap: wrap;

    }


    .search-section form {

        flex-direction: column;

        width: 100%;

    }


    input,
    select {

        width: 100%;

    }


}
/* ==========================================
   BOOK PAGE DESIGN
   ChapterShelf Individual Book Pages
========================================== */


/* Main container */

.book-page {

    max-width: 1200px;

    margin: 0 auto;

    padding: 60px 20px;

}


/* Title area */

.book-header {

    text-align: center;

    margin-bottom: 40px;

}


.book-header h2 {

    font-size: 3.5rem;

    margin-bottom: 10px;

}


/* Author */

.book-author {

    font-size: 1.3rem;

    color: var(--soft-brown);

}


/* Rating */

.book-rating {

    font-size: 1.4rem;

    color: var(--gold-accent);

}



/* Cover + information side by side */

.book-details {

    display: grid;

    grid-template-columns: 350px 1fr;

    gap: 50px;

    align-items: start;

}



/* Book cover */

.book-cover {

    margin: 0;

    background-color: var(--light-card);

    padding: 20px;

    border-radius: 15px;

    box-shadow: 0 8px 20px var(--shadow);

    text-align: center;

}


.book-cover img {

    width: 100%;

    height: auto;

    border-radius: 8px;

}


.book-cover figcaption {

    margin-top: 10px;

    color: var(--soft-brown);

}



/* Information box */

.book-information {

    background-color: var(--light-card);

    padding: 30px;

    border-radius: 15px;

    box-shadow: 0 8px 20px var(--shadow);

    text-align: left;

}


.book-information h3 {

    font-size: 2rem;

    margin-top: 0;

}



/* Summary */

.book-summary {

    margin-top: 40px;

    background-color: var(--light-card);

    padding: 35px;

    border-radius: 15px;

    box-shadow: 0 8px 20px var(--shadow);

    text-align: left;

}


.book-summary h3 {

    font-size: 2rem;

}


.book-summary p {

    color: var(--soft-brown);

    line-height: 1.8;

}



/* Responsive */

@media (max-width: 900px) {


    .book-details {

        grid-template-columns: 1fr;

    }


    .book-cover {

        width: 280px;

        margin: auto;

    }


    .book-header h2 {

        font-size: 2.5rem;

    }

}
/* ==========================================
   AUTHORS PAGE - BOOK SPINE LINKS
========================================== */

.book-spine a {

    text-decoration: none;

    color: var(--dark-text);

    transition: color 0.3s ease;

}


.book-spine a:hover {

    color: var(--gold-accent);

}
/* ==========================================
   BOOK PAGE - MORE BOOKS LINK
========================================== */

.more-books {

    margin-top: 60px;

    text-align: center;

}


.more-books p {

    font-family: "Cormorant Garamond", serif;

    font-size: 1.5rem;

    color: var(--soft-brown);

}


.more-books a {

    display: inline-block;

    margin-top: 10px;

    padding: 12px 25px;

    background-color: var(--light-card);

    color: var(--dark-text);

    text-decoration: none;

    border-radius: 20px;

    box-shadow: 0 5px 15px var(--shadow);

    transition: all 0.3s ease;

}


.more-books a:hover {

    color: var(--gold-accent);

    transform: translateY(-3px);

    box-shadow: 0 10px 20px var(--shadow);

}