html::before {
    background: url('img/bg.jpg') no-repeat center center fixed;
    background-size: cover;
    filter: brightness(70%) blur(2px);
}

h2 {
    font-size: calc(41.25 / 1920 * 100vw);
    text-shadow: 5px 5px 3px #000000; /* Black shadow for better readability */
}

.chapter-content > p, li {
    font-size: calc((1.59 * 16) / 1920 * 100vw);
    text-shadow: 4px 4px 4px #000000; /* Black shadow for better readability */
}

a {
    font-size: calc(22.5 / 1920 * 100vw);
}

h1, h2 {
    text-shadow: 2px 2px 8px #000000; /* Black shadow for better readability */
    text-align: center;
    color: #41c72b;
    margin: 0;
}

h2 {
    padding-top: 1.625vh;
}

#cover h1 {
    padding-top: 50vh;
    font-size: calc(80 / 1920 * 100vw);
}

.chapter-content > h2 {
    text-decoration: underline;
}

.table-of-contents {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--moss-green);
    padding-top: calc(100 / 1080 * 100vh);
}

.table-of-contents h2 {
    text-align: center;
    color: #41c72b;
    padding-right: calc(40 / 1920 * 100vw);
}

.table-of-contents ol {
    counter-reset: section; /* Initialize counter */
    list-style: none; /* Remove default list styles */
    padding-top: 0;
    margin-left: 0.5vw;
}

.table-of-contents ol li {
    counter-increment: section; /* Increment counter */
    position: relative; /* Establish positioning context */
    padding-left: 2.1vw; /* Space for number */
    margin-bottom: 0.5vw; /* Space between list items */
    color: var(--bright-green);
}

.table-of-contents ol li::before {
    content: counter(section) ". "; /* Display number and dot */
    position: absolute;
    left: 0; /* Align numbering to left */
    width: 1.6vw; /* Width of numbering area */
    text-align: left; /* Align text to left */
}

.table-of-contents ol li a {
    text-decoration: none; /* Remove underline */
    transition: color 0.3s; /* Smooth transition for hover effect */
    color: var(--bright-green);
}

.table-of-contents a:hover {
    color: var(--moss-green); /* Darker green on hover */
}

.chapters {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 437.5vw;
}

.chapter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 3vh 1.6vw;
    grid-template-columns: repeat(3, 1fr);
}

.chapter-image {
    width: 27vw;
    height: auto;
    border-radius: 1vw; /* 16 / sqrt(1920*1080) x 100 */
}

.chapter-content {
    flex-grow: 1;
    padding: 0 4.2vw; /* Add spacing between text and images */
    width: 30vw;
}

/* Add responsiveness */
@media (max-width: 39.1vw) {
    .chapter {
        flex-direction: column;
    }
    .chapter-image {
        width: 100%;
        margin: 10px 0;
    }
    .chapter-content {
        width: 50%;
        padding: 10px;
    }
}
