/* Fixed header and footer layout */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
}

.site-logo {
    height: 60px;
    width: auto;
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.5rem;
}

nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #666;
}

main {
    flex: 1;
    padding: 0 20px;
}

main.container {
    display: flex;
    gap: 2rem;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

.content {
    flex: 2 1 0;
    min-width: 0;
    max-width: 900px;
    background: rgba(255,255,255,0.7); /* semi-transparent white */
    border-radius: 12px;
    padding: 120px 2rem 100px 2rem; /* top, right, bottom, left */
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    box-sizing: border-box;
}

.sidebar {
    flex: 1 1 320px;
    min-width: 220px;
    max-width: 350px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(255,255,255,0.6); /* semi-transparent white */
    border-radius: 12px;
    padding: 120px 1rem 100px 1rem; /* top, right, bottom, left */
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    box-sizing: border-box;
    overflow: auto;
    transition: transform 0.3s ease;
}

.sidebar img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #333;
    color: white;
    z-index: 1000;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
    padding: 0.2rem 0;
    font-size: 0.85rem;
    line-height: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
}

footer .container {
    padding: 0.2rem;
    text-align: center;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

/* Hamburger menu button (hidden on desktop) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    margin-left: 1rem;
    z-index: 1100;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    header .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0;
    }

    .site-logo {
        margin: 0 auto;
    }

    nav ul {
        display: none;
        flex-direction: column;
        background: rgba(255,255,255,0.98);
        position: absolute;
        top: 70px;
        left: 0;
        width: 100vw;
        z-index: 1050;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        padding: 1rem 0;
    }

    nav ul.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    main.container {
        flex-direction: column;
        padding: 0 5px;
    }

    .content {
        padding: 100px 0.5rem 70px 0.5rem;
        max-width: 100vw;
    }

    /* Sidebar hidden by default, slides in from right */
    .sidebar {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 85vw;
        max-width: 400px;
        background: rgba(255,255,255,0.98);
        box-shadow: -2px 0 8px rgba(0,0,0,0.08);
        transform: translateX(100%);
        z-index: 1200;
        padding: 80px 1rem 60px 1rem;
        flex-direction: column;
        gap: 10px;
        overflow-y: auto;
        border-radius: 0;
        transition: transform 0.3s ease;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar img {
        width: 100%;
        max-width: 320px;
        margin: 0 auto 10px auto;
    }

    /* Sidebar open button */
    .sidebar-open-btn {
        display: block;
        position: fixed;
        bottom: 80px;
        right: 20px;
        z-index: 1300;
        background: #333;
        color: #fff;
        border: none;
        border-radius: 50%;
        width: 48px;
        height: 48px;
        font-size: 2rem;
        box-shadow: 0 2px 8px rgba(0,0,0,0.18);
        cursor: pointer;
    }

    /* Hide sidebar open button if sidebar is open */
    .sidebar.active ~ .sidebar-open-btn {
        display: none;
    }
}

@media screen and (max-width: 1100px) {
    main.container {
        flex-direction: column;
        max-width: 98vw;
        gap: 1rem;
    }
    .content, .sidebar {
        max-width: 100%;
        padding: 140px 1rem 120px 1rem;
    }
    .sidebar {
        flex-direction: row;
        flex-wrap: wrap;
        min-width: 0;
        max-width: 100%;
        justify-content: center;
        align-items: flex-start;
    }
    .sidebar img {
        width: 150px;
        max-width: 45vw;
    }
}