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

body {
    font-family: 'Segoe UI', 'Myanmar Text', Arial, sans-serif;
    background: #f5f7fc;
    background-image: url("/background1.jpg");
    color: #1e293b;
}

h1 {
    text-align: center;
    font-weight: 600;
    font-size: 2.2rem;
    color: #0b1a33;
    /* background: white; */
    /*padding: 28px 20px;*/
    border-radius: 24px;
    margin-bottom: 20px; 
    margin-top: 20px; 
    /*box-shadow: 0 8px 20px rgba(0,0,0,0.03);*/
}

h1 {
    font-weight: 700;
    color: black;
    text-shadow: 
    -1px -1px 0 white,
    1px -1px 0 white,
    -1px 1px 0 white,
    1px 1px 0 white;
}



/* ============================================
   TOP SITE HEADER (Matches content width)
   ============================================ */
.header-wrapper {
    display: flex;
    justify-content: center;
    padding-top: 20px;
}

.site-header {
    background: #ffffff;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #eef2f8;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);

    /* Matches the layout-container width below (1400px - 40px padding) */
    width: 100%;
    max-width: 1360px; 
    margin: 0 20px;
}

.site-logo {
    font-size: 20px;
    font-weight: 700;
    color: #0b1a33;
}

.site-nav a {
    text-decoration: none;
    color: #6b7a93;
    margin-left: 20px;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.site-nav a:hover {
    color: #1f5f9e;
}

/* ============================================
   LAYOUT (MAIN + RIGHT SIDEBAR)
   ============================================ */
.layout-container {
    display: flex;
    max-width: 1400px;
    margin-top: 5px;
    padding: 0 20px 20px;
    gap: 20px;
}

/* Main content 80% */
.main-content {
    width: 80%;
    display: flex;
    flex-direction: column;
}

.article-wrapper {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    overflow: hidden;
}

/* Sidebar 20% (Right side) */
.sidebar {
    width: 20%;
    min-width: 200px;
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.sidebar-placeholder h3 {
    color: #0b1a33;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.sidebar-placeholder p {
    color: #6b7a93;
    font-size: 0.9rem;
    line-height: 1.5;
}

.random-links a {
    text-decoration: none;   
    font-size: 14px;
 }

 .random-links{
    padding-left: 10px;
 }


.random-links a:hover {
    text-decoration: underline;
 }

 .back-link {
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

/* ============================================
   ARTICLE HEADER
   ============================================ */
.article-header {
    padding: 15px 10px 0px 20px;
    border-bottom: 1px solid #eef2f8;
}

.article-title {
    font-size: 24px;
    color: #0b1a33;
    margin-bottom: 10px;
    line-height: 1.3;
    font-weight: 700;
    text-align: left;
}

.article-meta {
    padding-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: #6b7a93;
    font-size: 0.9rem;
    align-items: center;
}

.article-date,
.article-author {
    background: #f0f4fc;
    padding: 4px 14px;
    border-radius: 40px;
}

/* ============================================
   ARTICLE CONTENT
   ============================================ */
.article-content {
    padding: 0px 15px 5px 20px;
    line-height: 1.8;
    font-size: 1.05rem;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    color: #0b1a33;
    margin: 1.5em 0 0.5em 0;
}

.article-content h1 { font-size: 2rem; }
.article-content h2 { font-size: 1.6rem; }
.article-content h3 { font-size: 1.3rem; }

.article-content p {
    margin-bottom: 1em;
}

.article-content img {
    max-width: 90%;
    height: auto;
    border-radius: 12px;
    margin: 5px 0px 0px 0px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.article-content blockquote {
    border-left: 4px solid #1f5f9e;
    padding-left: 20px;
    margin: 1.5em 0;
    color: #4a5b78;
    font-style: italic;
}

.article-content ul,
.article-content ol {
    margin: 1em 0;
    padding-left: 2em;
}

.article-content li {
    margin-bottom: 0.3em;
}

.article-content code {
    background: #f0f4fc;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9em;
}

.article-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 1.5em 0;
}

.article-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
}

.article-content th,
.article-content td {
    border: 1px solid #e2e8f0;
    padding: 5px 5px 5px 5px;
    text-align: left;
}

.article-content th {
    background: #f0f4fc;
    font-weight: 600;
}

/* ============================================
   BACK BUTTONS
   ============================================ */
.back-button {
    background: white;
    border: 1px solid #dce5f0;
    padding: 10px 30px;
    border-radius: 40px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #1f3a63;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.back-button:hover {
    background: #e8f0fe;
    border-color: #b8d0e8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.back-button:active {
    transform: translateY(0px);
}

.top-back {
    margin: 10px 0px 0px 0px;
    text-decoration: none;
    display: inline-block;
}

.bottom-back {
    margin-top: 20px;
    text-decoration: none;
    display: inline-block;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 820px) {
    .layout-container {
        flex-direction: column;
    }
    .main-content, .sidebar {
        width: 100%;
    }
    .sidebar {
        position: relative;
        top: 0;
        /* Changed: Removed order: -1; so it drops to the bottom naturally */
    }
    .article-header, .article-content {
        padding: 24px;
    }
    .article-title {        
        font-size: 1.6rem;
    }
}

@media (max-width: 540px) {
    .header-wrapper {
        padding-top: 10px;
    }
    .site-header {
        padding: 12px 16px;
        margin: 0 10px;
        border-radius: 8px;
    }
    .site-logo {
        font-size: 1.2rem;
    }
    .layout-container {
        padding: 10px;
    }
    .article-header, .article-content {
        padding: 16px;
    }
    .article-title {
        font-size: 1.3rem;
    }
    .article-meta {
        font-size: 0.8rem;
        gap: 8px;
    }
    .back-button {
        padding: 8px 20px;
        font-size: 0.85rem;
    }
}
