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

body {
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    background: #f5f7fa;
    color: #222;
    line-height: 1.6;
}

/* Header */
header {
    background: #0a2540;
    color: #fff;
    padding: 30px 20px;
    text-align: center;
}

header h1 {
    font-size: 34px;
    margin-bottom: 8px;
}

header p {
    font-size: 15px;
    opacity: 0.9;
}

nav {
    margin-top: 15px;
}

nav a {
    color: #ffd43b;
    text-decoration: none;
    margin: 0 10px;
    font-weight: bold;
}

nav a:hover {
    text-decoration: underline;
}

.menu-btn {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    margin-left: 15px;
}

/* Layout */
#container {
    display: flex;
    flex-wrap: nowrap;
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 20px;
    gap: 20px;
}

#main {
    flex: 3;
    min-width: 300px;
}

#sidebar {
    flex: 1;
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    min-width: 250px;
    height: fit-content;
}

/* Blog posts */
article {
    background: #fff;
    margin-bottom: 30px;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: transform 0.2s ease;
}

article:hover {
    transform: translateY(-3px);
}

article h2 {
    font-size: 22px;
    margin-bottom: 10px;
    color: #0a2540;
}

article small {
    display: block;
    margin-bottom: 12px;
    font-size: 13px;
    color: #666;
}

/* Sidebar */
#sidebar h3 {
    margin-bottom: 15px;
    font-size: 18px;
    color: #0a2540;
}

#sidebar ul {
    list-style: none;
}

#sidebar li {
    margin-bottom: 10px;
}

#sidebar a {
    color: #0a2540;
    text-decoration: none;
    font-weight: 500;
}

#sidebar a:hover {
    text-decoration: underline;
}

/* Pagination */
.pagination {
    text-align: center;
    margin: 20px 0;
}
.pagination a {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 5px;
    background: #f0f4fa;
    border-radius: 6px;
    text-decoration: none;
    color: #0a2540;
}
.pagination a.active {
    background: #0a2540;
    color: #fff;
}
.pagination a:hover {
    background: #081d33;
    color: #fff;
}

/* Forms */
form input, form textarea, form button {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 15px;
}

form button {
    background: #0a2540;
    color: #fff;
    border: none;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s ease;
}

form button:hover {
    background: #081d33;
}

/* Footer */
footer {
    background: #0a2540;
    color: #fff;
    text-align: center;
    padding: 20px;
    font-size: 14px;
    margin-top: 40px;
}

@media (max-width: 768px) {
    /* Sidebar hidden by default */
    #sidebar {
        display: none !important;
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100%;
        background: #fff;
        box-shadow: -2px 0 6px rgba(0,0,0,0.25);
        z-index: 1000;
        overflow-y: auto;
        padding: 20px;
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }

    /* Sidebar active when toggled */
    #sidebar.active {
        display: block !important;
        transform: translateX(0);
    }

    /* Posts take full width */
    #main {
        width: 100% !important;
        margin-right: 0;
    }

    /* Show menu button */
    .menu-btn {
        display: inline-block !important;
    }

    /* Container stacks vertically */
    #container {
        flex-direction: column !important;
    }
}

#sidebar button#sidebarClose {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #0a2540;
    margin-bottom: 15px;
}


#main img, article img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px 0;
}

/* Optional: center images by default */
#main img, article img {
    margin-left: auto;
    margin-right: auto;
}

