/* --- Material 3 Theme Tokens --- */
:root {
    --primary-color: #4A55A2;       
    --primary-container: #E8EAF6;   
    --background-color: #F8F9FA;    
    --surface-color: #FFFFFF;       
    --text-color-primary: #1C1B1F;
    --text-color-secondary: #5F6368;
    --active-nav-bg: #E0E7FF;
    
    --elevation-1: 0 1px 2px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.1);
    --elevation-2: -4px 0 8px rgba(0,0,0,0.15); /* Shadow for right drawer */
    --border-radius-lg: 24px;
    --border-radius-md: 16px;
    /* Updated Font Family */
    --font-family: 'Noto Sans Oriya', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color-primary);
    line-height: 1.8; /* Increased slightly for Odia readability */
    padding-top: 70px; /* Space for fixed header */
    overflow-x: hidden;
}

/* --- RIGHT-SIDE Navigation Drawer --- */
.drawer-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

.drawer-overlay.open {
    opacity: 1;
    visibility: visible;
}

.nav-drawer {
    position: fixed;
    top: 0; 
    right: 0; 
    width: 280px;
    height: 100%;
    background-color: var(--surface-color);
    z-index: 1000;
    transform: translateX(100%); 
    transition: transform 0.3s cubic-bezier(0.2, 0.0, 0, 1.0);
    border-top-left-radius: var(--border-radius-lg);
    border-bottom-left-radius: var(--border-radius-lg);
    display: flex;
    flex-direction: column;
    box-shadow: var(--elevation-2);
}

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

.drawer-header {
    padding: 32px 24px;
    background-color: var(--primary-container);
    border-top-left-radius: var(--border-radius-lg);
    position: relative;
}

.drawer-logo {
    width: 60px;
    height: 60px;
    margin-bottom: 12px;
    border-radius: 12px;
    box-shadow: var(--elevation-1);
}

.drawer-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

.close-drawer-btn {
    position: absolute;
    top: 16px; 
    right: 16px; 
    background: rgba(255,255,255,0.6);
    border: none;
    cursor: pointer;
    color: var(--text-color-secondary);
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.close-drawer-btn:hover { background: #fff; }

.drawer-nav-links {
    padding: 24px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.drawer-item {
    display: flex;
    align-items: center;
    height: 56px;
    padding: 0 16px 0 24px;
    border-radius: 28px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color-primary);
    text-decoration: none;
    transition: background 0.2s;
}

.drawer-item .material-symbols-rounded {
    margin-right: 16px;
    color: var(--primary-color);
}

.drawer-item:hover, .drawer-item:active {
    background-color: var(--active-nav-bg);
}

/* --- Top App Bar --- */
.top-app-bar {
    background-color: var(--primary-container);
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-container img { height: 40px; }

.logo-container span {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    transition: background-color 0.2s;
}

.icon-btn:hover {
    background-color: rgba(74, 85, 162, 0.1);
}

/* --- Language Switcher --- */
.lang-switcher { position: relative; }

.lang-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 120%;
    background-color: var(--surface-color);
    min-width: 300px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 101;
    border-radius: var(--border-radius-md);
    padding: 1rem;
    border: 1px solid #E0E0E0;
    max-height: 70vh;
    overflow-y: auto;
}

.lang-dropdown.show { display: block; }

.lang-dropdown h4 {
    color: var(--text-color-primary);
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #E0E0E0;
    font-size: 14px;
}

.lang-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.lang-item a {
    color: var(--text-color-secondary);
    padding: 6px 8px;
    text-decoration: none;
    display: block;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 13px;
    text-align: center;
}

.lang-item a:hover {
    background-color: var(--primary-container);
    color: var(--primary-color);
}

.lang-item.active a {
    background-color: var(--primary-color);
    color: #fff;
    font-weight: 600;
}

/* --- Main Content --- */
main {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2.5rem;
    background-color: var(--surface-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--elevation-1);
}

main h1 {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--text-color-primary);
    line-height: 1.3;
}

.last-updated {
    text-align: center;
    color: var(--text-color-secondary);
    margin-bottom: 2rem;
    font-style: italic;
    font-size: 0.9rem;
}

main h2 {
    font-size: 1.6rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--primary-container);
    color: var(--text-color-primary);
    scroll-margin-top: 90px;
}

main p, main ul {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--text-color-secondary);
}
main ul { padding-left: 20px; }

main a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    word-break: break-word;
}
main a:hover { text-decoration: underline; }

/* --- Table of Contents (Animated) --- */
.toc-container {
    background-color: #F8F9FA;
    border-radius: var(--border-radius-md);
    margin-bottom: 2rem;
    border: 1px solid #E0E0E0;
    overflow: hidden;
}

.toc-toggle {
    width: 100%;
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color-primary);
    font-family: var(--font-family);
}

.toc-toggle .material-symbols-rounded {
    transition: transform 0.3s ease;
}

.toc-container.active .toc-toggle .material-symbols-rounded {
    transform: rotate(180deg);
}

.toc-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
    background-color: #fff;
}

.toc-content ul {
    list-style: none;
    padding: 1rem 1.5rem;
    margin-bottom: 0;
}

.toc-content li a {
    display: block;
    padding: 0.5rem 0;
    color: var(--text-color-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.toc-content li a:hover {
    color: var(--primary-color);
    text-decoration: none;
    padding-left: 5px; /* Subtle movement */
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 2rem;
    color: var(--text-color-secondary);
    font-size: 0.9rem;
    background: #fff;
    border-top: 1px solid #eee;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    body { padding-top: 60px; }
    .top-app-bar { height: 60px; }
    main {
        margin: 1rem;
        padding: 1.5rem;
        border-radius: var(--border-radius-md);
    }
    main h1 { font-size: 1.8rem; }
    .logo-container span { display: none; } 
    .lang-list { grid-template-columns: repeat(2, 1fr); }
    .lang-dropdown { min-width: 280px; }
}
