* {
    margin: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 1.2rem;
    height: 100%;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
}

h1,
h2,
h3 {
    font-family: Georgia, 'Times New Roman', Times, serif;
    margin: 1.2rem 0;
    color: #444;
}

h1 {
    font-size: 1.2rem;
}

h2 {
    font-size: 1.1rem;
}

@media screen and (min-width: 375px) {
    h1 {
        font-size: 1.4rem;
    }

    h2 {
        font-size: 1.2rem;
    }
}

@media screen and (min-width: 425px) {
    h1 {
        font-size: 1.7rem;
    }

    h2 {
        font-size: 1.5rem;
    }
}

@media screen and (min-width: 555px) {
    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.8rem;
    }
}

p {
    color: #222;
}

body {
    line-height: 2rem;
    background-color: rgb(255, 247, 240);
    height: 100%;
}

nav {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 2rem;
    width: auto;
    max-width: 1400px;
    margin: 0 auto;
}

@media screen and (max-width: 580px) {
    nav {
        flex-direction: column;
    }
}

.logo {
    font-size: xx-large;
    text-decoration: none;
    color: #444;
}

@media screen and (max-width: 580px) {
    .logo {
        text-align: center;
    }
}

.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

@media screen and (max-width: 580px) {
    .nav-links {
        justify-content: space-between;
        flex-direction: column;
    }
}

.nav-link {
    text-decoration: none;
    color: #444;
}

.nav-link:hover {
    text-decoration: underline;
    color: #222;
}

.active {
    text-decoration: underline;
}

main {
    width: auto;
    max-width: 780px;
    margin: 0 auto;
    padding: 2rem;
}

.chapter-links {
    display: flex;
    flex-direction: column;
    margin-top: 2rem;
    gap: 1rem;
    font-size: larger;
}

.chapter-links a {
    text-decoration: none;
    color: #444;
}

.chapter-links a:hover {
    text-decoration: underline;
    color: #222;
}

.button {
    background-color: rgb(24, 126, 92);
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    padding: 1rem 2rem;
    border-radius: 5px;
    text-align: center;
}

.button:hover {
    background-color: rgb(14, 104, 74);
}

@media screen and (max-width: 375px) {
    .button {
        font-size: 14px;
    }
}

.grid {
    margin: 1rem 0;
    display: grid;
    grid-template-columns: auto auto;
    gap: 1.2rem;
}

@media screen and (max-width: 650px) {
    .grid {
        grid-template-columns: auto;
    }
}

.btn-grid {
    margin: 4rem 0;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

@media screen and (max-width: 650px) {
    .btn-grid {
        flex-direction: column;
        flex-flow: column-reverse;
    }
}

.img-placeholder {
    margin: 1rem 0;
    padding: 12px;
    width: 220px;
    height: 280px;
    background-color: rgb(214, 214, 214);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.page-container {
    position: relative;
    min-height: 100vh;
}

.content-wrap {
    padding-bottom: 4rem;
    /* Footer height */
}

footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 4rem;
    text-align: center;
}

hr {
    margin-bottom: 2.2rem;
}

p {
    text-align: justify;
}