/* OMVEDU Brand Foundation & Layout Style System */
:root {
    --bg-obsidian: #121314;
    --text-white: #FFFFFF;
    --text-platinum: #E2E8F0;
    --accent-steel: #5C6F84;
    --accent-bronze: #B38F5D;
}

/* Tier accent coloring dynamic mappings based on body class */
body.core-tier {
    --tier-accent: var(--accent-steel);
}
body.premium-tier {
    --tier-accent: var(--accent-bronze);
}

body {
    background-color: var(--bg-obsidian);
    color: var(--text-platinum);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    margin: 0;
    min-height: 100vh;
    box-sizing: border-box;
}

/* Headings: Bold, Uppercase */
h1, h2, h3 {
    color: var(--text-white);
    font-weight: bold;
    text-transform: uppercase;
}

/* Tiered Application Classes */
.core-tier { border-top: 4px solid var(--accent-steel); }
.premium-tier { border-top: 4px solid var(--accent-bronze); }

/* Layout Grid for Sidebar & Content */
.page-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Sidebar Styling */
.sidebar {
    width: 300px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3rem 2rem;
    box-sizing: border-box;
    background-color: #0f1011; /* Dark Obsidian block */
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

/* Custom premium scrollbar for sidebar */
.sidebar::-webkit-scrollbar {
    width: 4px;
}
.sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--tier-accent);
}

/* Logo Clear Space Rule: At least 150% of letter 'O' height (approx 1.5rem / 1.5em) */
.logo-container {
    margin: 1.5em 0;
    display: inline-block;
}
.logo {
    height: 40px;
    display: block;
}

/* Mobile top bar (hidden on desktop) */
.mobile-bar {
    display: none;
    background-color: #0f1011;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 1.5rem;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.mobile-logo {
    height: 30px;
    display: block;
}
.menu-toggle {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-white);
    font-size: 1.2rem;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Overlay Backdrop for Mobile Drawer */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 1001;
}

/* Main Content Viewport */
.main-content {
    flex: 1;
    padding: 4.5rem;
    max-width: 1000px;
    box-sizing: border-box;
}

/* Two-side justification for main content body paragraphs and list items */
.main-content p, .main-content ul li, .main-content ol li {
    text-align: justify;
}

/* Accent Elements in Main Content */
.main-content h1 {
    border-bottom: 2px solid var(--tier-accent);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.main-content h2, .main-content h3 {
    color: var(--tier-accent);
}

.main-content strong {
    color: var(--tier-accent);
}

/* Custom list style with tier accent bullets */
.main-content ul {
    list-style: none;
    padding-left: 0;
}
.main-content ul li {
    position: relative;
    padding-left: 1.5rem;
    margin: 0.8rem 0;
}
.main-content ul li::before {
    content: "■";
    color: var(--tier-accent);
    font-size: 0.65rem;
    position: absolute;
    left: 0;
    top: 0.1rem;
}

/* Scale images cleanly without cropping */
.main-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5rem 0;
    border-radius: 4px;
}

/* Scale video cleanly */
.hero-video-container {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 1.5rem 0;
    background: #000;
}
.hero-video {
    width: 100%;
    display: block;
}

/* Scale inline videos cleanly */
.inline-video-container {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 1.5rem 0;
    background: #000;
}
.inline-video {
    width: 100%;
    display: block;
}

/* Sidebar Sitemap Title */
.nav-title {
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-white);
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

/* Navigation List & Accordion Indent Rules */
.recursive-nav ul {
    list-style-type: none;
    padding-left: 0.8rem; /* Small indent for subfolders/pages */
    margin: 0.5rem 0;
}

.recursive-nav > ul {
    padding-left: 0; /* Level 1 root menu has no indent */
}

/* Hide subfolders by default */
.recursive-nav ul ul {
    display: none;
}

.recursive-nav li {
    margin: 0.6rem 0;
}

.recursive-nav a {
    color: var(--text-platinum);
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 0.8rem; /* Page typography is smaller */
}

.recursive-nav a:hover {
    color: var(--text-white);
    text-decoration: underline;
}

.recursive-nav a.active {
    color: var(--tier-accent);
    font-weight: bold;
    text-decoration: underline;
}

/* Remove custom prefix from nested page links */
.recursive-nav ul ul li a::before {
    content: '';
}

/* Folder Accordion Toggle Header - Level 1 */
.nav-dir-name {
    display: block;
    color: var(--text-white);
    font-size: 0.95rem; /* Level 1 folder headers are larger */
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    cursor: pointer;
    margin-top: 1rem;
    margin-bottom: 0.4rem;
    user-select: none;
}

.nav-dir-name::before {
    content: '▸ ';
    display: inline-block;
    margin-right: 0.4rem;
    color: var(--text-platinum);
}

.nav-dir-name.open::before {
    content: '▾ ';
}

/* Level 2+ Subfolders: White, sentencecase, small indent, no enter symbol */
.recursive-nav ul ul .nav-dir-name {
    color: var(--text-white); /* Same color as main folder */
    font-size: 0.9rem; /* Subfolder headings are larger than page links */
    font-weight: 500;
    text-transform: capitalize; /* sentencecase */
    letter-spacing: 0.05em;
    margin-top: 0.5rem;
}

.recursive-nav ul ul .nav-dir-name::before {
    content: '▸ '; /* No enter symbol */
    color: var(--text-platinum);
}

.recursive-nav ul ul .nav-dir-name.open::before {
    content: '▾ ';
}

/* Fullscreen Video Intro Loader */
#intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #121314;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1), visibility 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}
#intro-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
#intro-video {
    max-width: 80%;
    max-height: 80%;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    outline: none;
}

/* Mobile Browsing Drawer Layout */
@media (max-width: 768px) {
    .mobile-bar {
        display: flex;
    }
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 1002;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.8);
        width: 280px;
        padding-top: 2rem;
    }
    .sidebar.drawer-open {
        transform: translateX(0);
    }
    .main-content {
        padding: 2.5rem 1.5rem;
    }
}

/* Language Switcher Styling */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0 1.5rem 0;
    font-size: 0.85rem;
}

.lang-switcher .lang-btn {
    color: rgba(255, 255, 255, 0.35);
    text-decoration: none;
    font-weight: bold;
    letter-spacing: 0.05em;
    transition: color 0.2s ease;
}

.lang-switcher .lang-btn:hover {
    color: rgba(255, 255, 255, 0.7);
}

.lang-switcher .lang-btn.active {
    color: var(--tier-accent);
}

.lang-switcher .lang-separator {
    color: rgba(255, 255, 255, 0.2);
}

/* Footer Styling */
.site-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 4rem;
    padding-top: 1.5rem;
    font-size: 0.78rem;
    color: var(--accent-steel);
}

.site-footer .footer-left {
    text-align: left;
}

.site-footer .footer-update {
    font-size: 0.72rem;
    margin-top: 0.25rem;
    opacity: 0.7;
}

.site-footer .footer-right {
    text-align: right;
    font-weight: bold;
    color: var(--text-white);
}

@media (max-width: 768px) {
    .site-footer {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
        align-items: center;
    }
    .site-footer .footer-left,
    .site-footer .footer-right {
        text-align: center;
    }
}