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

:root {
    --bg-color: #1a1a1a;
    --card-bg: #242424;
    --text-primary: #e8e8e8;
    --text-secondary: #9a9a9a;
    --accent-color: #8b4513;
    --accent-hover: #a0522d;
    --border-color: #333333;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.nav-brand {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

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

.nav-links > a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s;
    font-size: 0.95rem;
}

.nav-links > a:hover,
.nav-links > a.active {
    color: var(--text-primary);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    color: var(--text-secondary);
    background: none;
    border: none;
    font-size: 0.95rem;
    font-weight: 400;
    font-family: inherit;
    cursor: pointer;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.dropdown-toggle:hover {
    color: var(--text-primary);
}

.dropdown-arrow {
    display: inline-block;
    transition: transform 0.3s;
}

.dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    min-width: 320px;
    max-height: 70vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    padding-top: 1rem;
    margin-top: -1rem;
}

.dropdown:hover .dropdown-menu,
.dropdown-menu:hover {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 0.8rem 1.2rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
    border-bottom: 1px solid var(--border-color);
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background: rgba(139, 69, 19, 0.1);
    color: var(--text-primary);
    padding-left: 1.5rem;
}

.chapter-num {
    color: var(--accent-color);
    font-size: 0.8rem;
    margin-right: 0.5rem;
    font-weight: 600;
}

/* Cover Page */
.cover-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 2rem;
    position: relative;
    background: linear-gradient(to bottom, var(--bg-color) 0%, #0f0f0f 100%);
}

.cover-content {
    max-width: 700px;
    text-align: center;
}

.ministry-header {
    margin-bottom: 3rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-family: 'Georgia', serif;
}

.ministry-header p {
    margin: 0.5rem 0;
}

.project-type {
    margin-bottom: 2rem;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 2px;
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
}

.main-title {
    font-size: 3rem;
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 3rem;
    letter-spacing: 0px;
    color: var(--text-primary);
}

.title-highlight {
    color: var(--accent-color);
    font-style: italic;
}

.project-info {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin: 3rem 0;
    padding: 2rem;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.info-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
}

.info-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.info-value {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-primary);
}

.info-detail {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.location-date {
    margin: 2rem 0 3rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.location-date p {
    margin: 0.2rem 0;
}

.cta-button {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.8rem 2rem;
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 2px;
    font-weight: 400;
    font-size: 0.9rem;
    transition: background 0.3s;
    letter-spacing: 1px;
}

.cta-button:hover {
    background: var(--accent-hover);
}

/* Content Pages */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 8rem 2rem 4rem;
}

.page-header {
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.chapter-number {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-color);
    margin-bottom: 0.8rem;
    font-weight: 400;
    display: block;
}

.page-title {
    font-size: 2.2rem;
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.content-section {
    margin-bottom: 2rem;
}

.content-section h2 {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-weight: 400;
}

.content-section h3 {
    font-size: 1.2rem;
    margin: 2.5rem 0 1rem;
    color: var(--accent-color);
    font-weight: 400;
}

.content-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    text-align: justify;
}

.content-section ul {
    list-style: none;
    margin: 1.5rem 0;
}

.content-section ul li {
    padding: 0.6rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.8;
}

.content-section ul li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

.content-section ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.content-section ol li {
    padding: 0.6rem 0;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Table of Contents */
.toc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 3rem;
}

.toc-item {
    border: 1px solid var(--border-color);
    border-radius: 2px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s;
    display: block;
}

.toc-item:hover {
    border-color: var(--accent-color);
    background: rgba(139, 69, 19, 0.05);
}

.toc-number {
    font-size: 0.75rem;
    color: var(--accent-color);
    font-weight: 400;
    margin-bottom: 0.5rem;
    display: block;
    letter-spacing: 1px;
}

.toc-title {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
}

/* Bibliography Links */
.biblio-link {
    display: block;
    color: var(--accent-color);
    text-decoration: none;
    padding: 0.5rem 0;
    word-break: break-all;
    transition: color 0.3s;
    font-size: 0.9rem;
}

.biblio-link:hover {
    color: var(--accent-hover);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem 1.5rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .main-title {
        font-size: 2rem;
    }
    
    .project-info {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .info-section {
        text-align: center;
    }
    
    .page-title {
        font-size: 1.8rem;
    }
    
    .container {
        padding: 6rem 1.5rem 2rem;
    }
    
    .toc-grid {
        grid-template-columns: 1fr;
    }

    .dropdown-menu {
        right: auto;
        left: 0;
        min-width: 280px;
    }
}
