/* --- 1. Global & Base Styles --- */
html {
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Lora', serif;
    color: #3D352A;
    background-color: #D3C4B3;
    background-image: linear-gradient(rgba(0,0,0,0.02) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(0,0,0,0.02) 1px, transparent 1px);
    background-size: 20px 20px;
}

.background-image {
    display: none;
}


/* --- 2. Main Container Style --- */
.book {
    max-width: 850px;
    margin: 50px auto;
    padding: 50px 60px;
    background-color: #FDFCF7;
    border: 1px solid #D1C7B8;
    border-radius: 3px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.3), 0 0 0 10px rgba(0,0,0,0.1);
}


/* --- 3. Top Navigation --- */
.navigation {
    width: 100%;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #EAE6E0;
}

.navigation-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navigation-list a {
    font-family: 'Open Sans', sans-serif;
    text-decoration: none;
    color: #8A795D;
    padding: 8px 12px;
    font-weight: 700;
    font-size: 0.9em;
    border-radius: 3px;
    transition: background-color 0.3s, color 0.3s;
}

.navigation-list a:hover {
    background-color: #F9F6F0;
    color: #5C4033;
}


/* --- 4. Header & Typography --- */
.content-text-header {
    text-align: center;
    margin-bottom: 40px;
}

.content-text-header h1 {
    font-size: 2.8em;
    font-weight: 700;
    color: #3D352A;
    line-height: 1.3;
}

.content-text-header h2 {
    font-size: 1.3em;
    color: #8A795D;
    font-style: italic;
    font-weight: 400;
    letter-spacing: 1px;
    margin-top: 10px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.content-text-article h3 {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.6em;
    font-weight: 700;
    color: #5C4033;
    border-bottom: 1px solid #D1C7B8;
    padding-bottom: 10px;
    margin-top: 40px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.content-text-article h4 {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.3em;
    font-weight: 700;
    color: #8A795D;
    margin-top: 30px;
    margin-bottom: 15px;
}

.content-text-article p, .content-text-article li {
    font-size: 1.1em;
    line-height: 1.9;
    color: #3D352A;
    margin-bottom: 1.5em;
    text-align: justify;
}

.content-text-article ul {
    list-style-type: none;
    padding-left: 20px;
    border-left: 3px solid #EAE6E0;
    margin: 20px 0;
}

.content-text-article ul ul {
    border-left: none;
    margin-top: 10px;
    margin-bottom: 10px;
}

.content-text-article ul li {
    position: relative;
    padding-left: 15px;
}

.content-text-article ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #8A795D;
}


.content-text-article hr {
    border: none;
    border-top: 3px double #D1C7B8;
    margin: 50px 0;
}

.content-text-article strong {
    font-weight: 700;
    color: #5C4033;
}


/* --- 5. Explore More Section --- */
.content-text-content h3 {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.6em;
    font-weight: 700;
    color: #5C4033;
    text-align: center;
    margin: 50px 0 30px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.explore-menu {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 15px;
    text-align: center;
    max-width: 600px; /* Limit width for single items */
}

.explore-menu a {
    font-family: 'Open Sans', sans-serif;
    display: block;
    text-decoration: none;
    color: #8A795D;
    padding: 15px;
    border: 1px solid #EAE6E0;
    border-radius: 3px;
    transition: all 0.3s ease;
    font-weight: 700;
    font-size: 1em;
}

.explore-menu a:hover {
    background-color: #F9F6F0;
    border-color: #D1C7B8;
    color: #5C4033;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}


/* --- 6. Footer Styles --- */
.footer {
    text-align: center;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #EAE6E0;
    font-family: 'Open Sans', sans-serif;
}

.footer a, .footer p {
    font-size: 0.9em;
    color: #8A795D;
    text-decoration: none;
    margin: 5px 0;
}

.footer a:hover {
    text-decoration: underline;
}

.footer ul { list-style: none; padding: 0; margin: 10px 0 0 0; }
.footer ul li { display: inline-block; margin: 0 10px; }


/* --- 7. Responsive Design --- */
@media (max-width: 768px) {
    .book {
        margin: 20px;
        padding: 20px 25px;
    }
    .content-text-header h1 { font-size: 2em; }
    .content-text-article p, .content-text-article li { font-size: 1em; }
    .explore-menu { flex-direction: column; }
}


/* --- 8. Table of Contents Specific Styles --- */
.table-of-contents-container {
    background-color: #F9F6F0;
    border: 1px solid #EAE6E0;
    padding: 25px 35px;
    margin: 30px 0;
    border-radius: 3px;
}

.table-of-contents-container h3 {
    text-align: center;
    border-bottom: none;
    margin-bottom: 25px;
}

.table-of-contents {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.table-of-contents li {
    margin-bottom: 12px;
}

.table-of-contents a {
    text-decoration: none;
    color: #5C4033;
    font-size: 1.1em;
    font-weight: 400;
    transition: color 0.2s;
}

.table-of-contents a:hover {
    color: #8B4513;
    text-decoration: underline;
}

/* Sub-list styling */
.table-of-contents ul {
    list-style: none;
    padding-left: 25px; /* Indent sub-items */
    margin-top: 10px;
}

.table-of-contents ul li {
    margin-bottom: 10px;
    font-size: 0.95em; /* Make sub-items slightly smaller */
}

/* Add a subtle visual cue for sub-items */
.table-of-contents ul li::before {
    content: "—";
    color: #8A795D;
    margin-right: 8px;
    font-weight: bold;
}