* {
    box-sizing: border-box;
}

.md-callout {
    background: #f97316;
    border: 2px solid #000;
    padding: 14px 18px;
    margin: 16px 0;
    text-align: center;
    font-size: 2em;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f4f4f4;
    color: #222;
}

.page {
    display: grid;
    grid-template-columns: 240px 1fr 240px;
    min-height: 100vh;
}

.sidebar {
    background: #e9e9e9;
    padding: 20px;
    overflow-y: auto;
}

.sidebar h2 {
    margin-top: 0;
    font-size: 1.1rem;
}

.content {
    display: flex;
    flex-direction: column;
    background: white;
    min-width: 0;
}

.content-header,
.content-footer {
    background: #ddd;
    padding: 20px;
}

.content-main {
    flex: 1;
    padding: 30px 20px;
}

nav ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

nav li {
    margin: 8px 0;
}

nav li ul {
    padding-left: 20px;
    margin-top: 6px;
}

nav a,
nav button.linklike {
    color: inherit;
    text-decoration: none;
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    cursor: pointer;
}

.mobile-topbar {
    display: none;
    flex-wrap: wrap;
    background: #333;
    color: white;
    padding: 12px 8px;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.mobile-topbar-logo-wrap {
    width: 100%;
    order: -1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mobile-topbar-logo {
    display: block;
    width: 100%;
    height: auto;
}

.hamburger {
    background: #555;
    color: white;
    border: none;
    padding: 10px 14px;
    font-size: 1.2rem;
    cursor: pointer;
    flex-shrink: 0;
}

/* Logo visibility */
.content-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 16px 0;
    background: #0071bc;
}

.content-logo img {
    display: block;
    width: 100%;
    max-width: 1000px;
    height: auto;
}

/* Desktop: show wide logo, hide mobile-specific logo */
.desktop-logo {
    display: flex;
}

.mobile-logo {
    display: none;
}

@media (max-width: 900px) {
    .page {
        grid-template-columns: 1fr;
    }

    /* Keep mobile menu panels directly under the top bar when opened. */
    .left-sidebar {
        order: 1;
    }

    .right-sidebar {
        order: 2;
    }

    .content {
        order: 3;
    }

    .mobile-topbar {
        display: flex;
    }

    .sidebar {
        display: none;
        padding-top: 10px;
    }

    .sidebar.open {
        display: block;
    }

    .left-sidebar {
        border-bottom: 1px solid #ccc;
    }

    .right-sidebar {
        border-top: 1px solid #ccc;
        text-align: right;
    }

    .right-sidebar nav ul {
        text-align: right;
    }

    .right-sidebar nav li ul {
        padding-left: 0;
        padding-right: 20px;
    }

    .desktop-logo {
        display: none;
    }
}
