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

html {
    height: 100%;
    font-size: 16px;
}

body {
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Lato, Helvetica, Arial, sans-serif;
    background-color: #f8f9fa;
    color: #202122;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

/* Header - Full width, fixed height feel */
header {
    background-color: #ffffff;
    border-bottom: 1px solid #a2a9b1;
    padding: 10px 20px;
    flex-shrink: 0;
}

.header-container {
    max-width: 1920px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 400;
    color: #202122;
}

.site-title > img {
    width:35px;
    padding-right: 7px;
    margin-top: 5px;
}

.burger-menu {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #202122;
    padding: 5px 10px;
}

/* Main Layout Container - Flex column for header + middle + footer */
.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Middle Section - Flex row for sidebar + main, fills remaining space */
.content-wrapper {
    flex: 1;
    display: flex;
    max-width: 1920px;
    margin: 0 auto;
    width: 100%;
}

/* Sidebar - Fixed width left column */
.sidebar {
    flex: 0 0 280px;
    padding: 20px;
    background-color: #f8f9fa;
    border-right: 1px solid #a2a9b1;
    overflow-y: auto;
}

.nav-section h2 {
    font-size: 0.875rem;
    font-weight: bold;
    color: #54595d;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #a2a9b1;
}

.nav-section ul {
    list-style: none;
}

.nav-section li {
    margin-bottom: 8px;
}

.nav-section a {
    color: #0645ad;
    text-decoration: none;
    font-size: 0.9375rem;
}

.nav-section a:hover,
.nav-section a:focus {
    color: #0b0080;
    text-decoration: underline;
}

.nav-section a.active {
    font-weight: bold;
    color: #202122;
}

/* Main Content + Footer Wrapper - Column for main + footer */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
}

/* Main Content - No top padding to eliminate gap */
.main-content {
    flex: 1;
    padding: 0 20px 20px 20px;
    overflow-y: auto;
}

.content {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 20px;
}

.content h1 {
    font-size: 2.2rem;
    font-weight: normal;
    border-bottom: 1px solid #a2a9b1;
    padding-bottom: 12px;
    margin-bottom: 24px;
    color: #202122;
}

.content h2 {
    font-size: 1.6rem;
    font-weight: normal;
    margin: 24px 0 12px;
    color: #202122;
}

.content p {
    margin-bottom: 16px;
    font-size: 1rem;
    line-height: 1.8;
}

.content figure.image-box {
    float: right;
    clear: right;
    margin: 8px 0 20px 20px;
    text-align: center;
    max-width: 500px;
    background-color: #ffffff;
    border: 1px solid #c8ccd1;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    cursor: zoom-in;
    transition: all 0.3s ease;
}

.content figure.image-box img {
    display: block;
    margin: 0 auto 10px auto;
    max-width: 460px;
    height: auto;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.content figure.image-box figcaption {
    font-size: 0.8125rem;
    color: #54595d;
    font-style: italic;
    line-height: 1.5;
}

/* Enlarged state - Full natural size */
.content figure.image-box.enlarged {
    float: none;
    clear: both;
    margin: 40px auto;
    max-width: none !important;
    width: fit-content;
    padding: 20px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
    cursor: zoom-out;
    display: block;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.content figure.image-box.enlarged img {
    max-width: none !important;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto 10px auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.footer {
    flex-shrink: 0;
    background-color: #f8f9fa;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #a2a9b1;
}

.nav-section .has-submenu>a {
    position: relative;
    padding-right: 30px;
    display: block;
    min-height: 1.5em;
}

.nav-section .has-submenu>a .arrow {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    pointer-events: none;
}

.nav-section .has-submenu.active>a .arrow {
    transform: translateY(-50%) rotate(180deg);
}

.nav-section .submenu {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    margin-left: 15px;
    border-left: 2px solid #a2a9b1;
    padding-left: 10px;
}

.nav-section .has-submenu.active .submenu {
    max-height: 100vh;
    overflow-y: auto;
}

.nav-section .submenu li {
    margin-bottom: 6px;
}

.nav-section .submenu a {
    font-size: 0.875rem;
    color: #0645ad;
}

.nav-section .submenu a:hover,
.nav-section .submenu a.active {
    color: #0b0080;
    text-decoration: underline;
}

.nav-section .submenu a.coming-soon {
    text-decoration: line-through;
    opacity: 0.6;
    color: #888;
    cursor: not-allowed;
    pointer-events: none;
}

.nav-section .submenu a.coming-soon:hover {
    text-decoration: line-through;
    color: #888;
}

.license {
    font-size: 0.75rem;
    color: #54595d;
    text-align: center;
    margin: 0;
    padding-top: 15px;
}

.license a {
    color: #0645ad;
    text-decoration: none;
}

.license a:hover {
    color: #0b0080;
    text-decoration: underline;
}

@media (min-width: 1441px) {
    .sidebar {
        flex-basis: 300px;
    }

    .content {
        max-width: 1400px;
    }
}

@media (max-width: 768px) {
    .burger-menu {
        display: block;
    }

    .content-wrapper {
        flex-direction: column;
    }

    .sidebar {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 280px;
        background-color: #f8f9fa;
        border-right: 1px solid #a2a9b1;
        z-index: 1000;
        overflow-y: auto;
        box-shadow: 4px 0 12px rgba(0, 0, 0, 0.15);
        padding: 60px 20px 20px 20px;
    }

    .sidebar.active {
        display: block;
    }

    .content figure.image-box {
        float: none;
        clear: both;
        margin: 20px auto;
        max-width: 100%;
        padding: 12px;
    }

    .content figure.image-box img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        object-fit: contain;
    }

    /* Mobile: Enlarged state */
    .content figure.image-box.enlarged {
        max-width: 100%;
        width: 100%;
        padding: 16px;
        margin: 30px auto;
    }

    .content figure.image-box.enlarged img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        object-fit: contain;
    }

    .content p {
        font-size: 0.9375rem;
    }

    .content h1 {
        font-size: 1.8rem;
    }

    .nav-section .submenu {
        margin-left: 10px;
        padding-left: 8px;
    }
}