:root {
    --ff-primary: 'Poppins', sans-serif;
    --clr-primary: #ff6600;
    --clr-secondary: #3b3b3b;
    --clr-accent: #ffb300;
    --clr-bg: #f0e6d6;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: var(--ff-primary);
    background-color: #fff;
}

body {
    margin: auto; /* Center the body horizontally */
    padding: 3em 1.7em;
    line-height: 1.8;
    font-size: 2rem !important;
    color: var(--clr-secondary);
    display: block; /* Ensure the body uses block-level formatting */
    text-align: left; /* Keep text alignment as left */
}

br {
    line-height: 1em; /* Adjust line-height to change spacing */
}

h1, h2, h3, p {
    margin: 0;
}

h1 {
    font-size: 3rem;
    margin: 3rem 0 0 0;
}

h2 {
    font-size: 2.5rem;
    margin: 2.5rem 0 0 0;
}

footer {
    margin: 5rem 0 0 0;
    padding: 2rem 0 8rem 0;
    border-top: 0.15rem solid #ddd;
    text-align: center;
    color: #777;
    font-size: 1rem;
    user-select: none;
    pointer-events: none;
}

/* Header */

header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 0 4em 0;
}

header a{
    color: #555;
    font-size: 4rem;
}

/* Navigation Menu */
.navigation {
    margin: 2em 0;
    display: flex;
    justify-content: center;
    gap: 4em;
}

.navigation .prev, .navigation .next {
    background-color: #333;
    color: #fff;
    padding: 1.2rem 2.5rem;
    text-decoration: none;
    border-radius: .25em;
    transition: background-color 0.12s, transform 0.12s;
    justify-content: center;
    font-size: 2.5rem;
}

.navigation .prev:hover, .navigation .next:hover {
    background-color: #555;
    transform: scale(1.05);
}

/* Hamburger Menu Icon */
.nav-toggle {
    position: absolute;
    background: transparent;
    border: 0;
    cursor: pointer;
    top: 5.7rem;
    left: 3rem;
    z-index: 1000;
    width: 5rem;
    height: 5rem;
    padding: 0;
    font-size: 0;
    line-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hamburger {
    display: block;
    position: relative;
    width: 3rem;
    height: 5px;
    background: #5a5a5a;
    border-radius: 1em;
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.hamburger::before, .hamburger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 5px;
    background: #5a5a5a;
    border-radius: 1em;
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.hamburger::before {
    top: -1rem; /* Adjusted to ensure proper spacing */
    transform: translateX(-12px);
}

.hamburger::after {
    top: 1rem; /* Adjusted to ensure proper spacing */
    transform: translateX(-12px);
}

/* Sidebar Menu */
/* Sidebar Menu Styles */
.nav-mobile {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0; /* Align to the left */
    width: 50%;
    background: #f0e6d6; /* Off-white/beige background */
    color: #5a5a5a; /* Darker/saturated text color */
    transform: translateX(-100%);
    transition: transform 250ms cubic-bezier(.5, 0, .5, 1);
    z-index: 500;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow-y: auto; /* Enable vertical scrolling */
}

.nav-mobile__list {
    list-style-type: none;
    padding: 0;
    margin: 8rem 0 6rem 12rem;
}

.nav-mobile__item {
    margin: 0;
}

.nav-mobile__link {
    color: #3b3b3b;
    text-decoration: none;
    font-size: 1.8rem;
    font-weight: 600;
}

.nav-mobile__link:hover {
    color: #ff6600;
}

/* Sidebar Active State */
.nav-open .nav-toggle {
    position: fixed;
}

.nav-open .nav-mobile {
    transform: translateX(0);
}

.nav-open .hamburger {
    background: transparent;
    transform: translateX(-12px);
}

.nav-open .hamburger::before {
    transform: rotate(45deg) translate(11.3px, 11.3px); /* Slightly adjusted */
}

.nav-open .hamburger::after {
    transform: rotate(-45deg) translate(11.3px, -11.3px); /* Slightly adjusted */
}

/* Custom scrollbar for webkit browsers (Chrome, Safari) */
.nav-mobile::-webkit-scrollbar {
    width: 20rem;
}

.nav-mobile::-webkit-scrollbar-track {
    background: #e2d6c2; /* Match the background */
}

.nav-mobile::-webkit-scrollbar-thumb {
    background-color: #e2d6c2; /* Lighter scrollbar */
    border-radius: 10px;
}

/* Hide scrollbar for Firefox */
.nav-mobile {
    scrollbar-width: thin;
    scrollbar-color: #e2d6c2 #f0e6d6;
}

.chapter-header {
    margin: 0 0 0.5em 0;
    color: #ff6600;
    font-size: 4rem;
    text-shadow: -4.2px 3.4px 1px #ffb300;
}