/* ============================================
   BLOG CSS - Khazanah Ilmu
   Magazine Layout Style
   ============================================ */

/* Blog Layout specific overrides or additions */
body {
    background: #f4f6f9; /* Lighter background for blog reading comfort */
    color: #333;
}
.site-header {
    background: #0B1428;
}

.blog-main {
    padding: 120px 24px 60px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Magazine Layout - Front Page */
.magazine-featured {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 50px;
}
@media (max-width: 900px) {
    .magazine-featured {
        grid-template-columns: 1fr;
    }
}

.featured-main {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 500px;
}
.featured-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.featured-main:hover img {
    transform: scale(1.05);
}
.featured-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 40px;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    color: white;
}

.featured-side {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.side-post {
    display: flex;
    gap: 15px;
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    height: 160px;
}
.side-post img {
    width: 120px;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}
.side-content h4 {
    font-size: 16px;
    margin-bottom: 5px;
    line-height: 1.4;
}

/* Post Categories Grid */
.category-blocks {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}
@media (max-width: 768px) {
    .category-blocks {
        grid-template-columns: 1fr;
    }
}

.cat-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--gold);
    margin-bottom: 20px;
    padding-bottom: 10px;
}
.cat-block-header h3 {
    font-size: 20px;
    color: var(--navy-dark);
}

.standard-post {
    margin-bottom: 20px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.standard-post img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}
.standard-content {
    padding: 15px;
}
.standard-content h4 {
    font-size: 16px;
    margin-bottom: 10px;
}
.meta {
    font-size: 12px;
    color: #888;
    display: flex;
    gap: 15px;
}

/* Single Post Layout (with Sidebar) */
.single-post-wrapper {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 40px;
    padding-top: 100px;
}
@media (max-width: 900px) {
    .single-post-wrapper {
        grid-template-columns: 1fr;
    }
}

.post-content-area {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.post-header {
    text-align: center;
    margin-bottom: 40px;
}
.post-header h1 {
    font-size: 36px;
    color: var(--navy-dark);
    margin: 15px 0;
    line-height: 1.3;
}
.post-featured-image {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 30px;
}
.post-body {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
}
.post-body h2, .post-body h3 {
    color: var(--navy-dark);
    margin: 30px 0 15px;
}
.post-body p {
    margin-bottom: 20px;
}
.post-body ul, .post-body ol {
    margin: 0 0 20px 20px;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}
.widget {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}
.widget-title {
    font-size: 18px;
    color: var(--navy-dark);
    border-bottom: 2px solid var(--gold);
    padding-bottom: 10px;
    margin-bottom: 20px;
}
.widget-list li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}
.widget-list li:last-child {
    border-bottom: none;
}
.widget-list a {
    color: #555;
    display: flex;
    justify-content: space-between;
}
.widget-list a:hover {
    color: var(--gold-dark);
}

/* Comments Section */
.comments-section {
    margin-top: 50px;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}
.comment-list {
    margin-top: 30px;
}
.comment-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}
.comment-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--navy-light);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 20px;
}
.comment-content h5 {
    margin-bottom: 5px;
    font-size: 16px;
}
.comment-meta {
    font-size: 12px;
    color: #888;
    margin-bottom: 10px;
}

.comment-form {
    margin-top: 40px;
}
.comment-form input, .comment-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
}
.comment-form button {
    background: var(--gold);
    color: var(--navy-dark);
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}

/* ============================================
   MODERN POST LAYOUT (Reference Inspired)
   ============================================ */
.blog-main.modern-view {
    background: #111827; /* Darkest Navy/Gray */
    max-width: 100%;
    padding: 100px 0 60px;
    color: #f3f4f6;
    min-height: 100vh;
}

.modern-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
    text-align: center;
}


.modern-hero {
    position: relative;
    margin-bottom: 80px;
}

.modern-hero-img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}



.modern-avatar {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 5px solid #111827;
    overflow: hidden;
    background: #1f2937;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.modern-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modern-meta {
    font-size: 18px;
    color: #9ca3af;
    margin-bottom: 20px;
    font-weight: 500;
}

.modern-title {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 40px;
    color: #ffffff;
    letter-spacing: -0.02em;
}


.modern-content-wrapper {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 40px;
    text-align: left;
    position: relative;
}

.modern-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.modern-sidebar .widget {
    background: #111827;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.05);
    position: relative;
    overflow: hidden;
}

.modern-sidebar .widget-title {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gold);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modern-sidebar .widget-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modern-sidebar .widget-list li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.modern-sidebar .widget-list li:last-child {
    border-bottom: none;
}

.modern-sidebar .widget-list a {
    color: #d1d5db;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.modern-sidebar .widget-list a:hover {
    color: var(--gold);
    padding-left: 5px;
}



.modern-body {
    flex: 1;
    font-size: 18px;
    line-height: 1.7;
    color: #d1d5db;
    overflow-wrap: break-word;
    word-wrap: break-word;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
}

/* Force all content inside body to respect max-width */
.modern-body * {
    max-width: 100% !important;
    box-sizing: border-box !important;
}


.modern-body img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 16px;
    display: block;
    margin: 30px auto;
}

.modern-body iframe, .modern-body video {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 12px;
}

.modern-body p {
    margin-bottom: 25px;
}


.modern-social-sidebar {
    position: sticky;
    top: 150px;
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 25px;
    color: #6b7280;
    font-size: 20px;
}

.modern-social-sidebar a {
    color: #6b7280;
    transition: color 0.3s ease;
}

.modern-social-sidebar a:hover {
    color: var(--gold);
}

@media (max-width: 900px) {
    .modern-content-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .modern-container {
        padding: 0 15px;
    }
    .modern-hero-img {
        height: 220px;
        border-radius: 12px;
    }
    .modern-title {
        font-size: 24px;
        line-height: 1.3;
        margin-top: 15px;
    }
    .modern-body {
        font-size: 16px;
        line-height: 1.6;
    }
    .modern-body img {
        border-radius: 8px;
        margin: 20px auto;
    }
    .modern-content-wrapper {
        gap: 30px;
    }
    .modern-sidebar {
        gap: 20px;
    }
    .modern-sidebar .widget {
        padding: 20px;
    }
}



