/* ===============================
   GLOBAL
=================================*/
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f4f6f9;
    color: #222;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* ===============================
   HEADER
=================================*/
.site-header {
    background: #fff;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.header-container {
    width: 90%;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap; /* important */
}

.logo a {
    font-size: 22px;
    font-weight: bold;
    color: #e63946;
}
.menu-toggle {
    display: none;
    font-size: 26px;
    cursor: pointer;
}
.nav-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}
.nav-menu a:hover {
    color: #e63946;
}

.search-form {
    display: flex;
}

.search-form input {
    width: 160px;
    max-width: 100%;
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px 0 0 4px;
    outline: none;
}

.search-form button {
    padding: 6px 10px;
    border: none;
    background: #007bff;
    color: white;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

/* ===============================
   MAIN LAYOUT (POST PAGE)
=================================*/
.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 15px;
}

.main-content {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.sidebar {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    height: fit-content;
    position: sticky;
    top: 20px;
}

/* ===============================
   POST PAGE
=================================*/
.post-header h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.meta {
    font-size: 14px;
    color: #777;
    margin-bottom: 20px;
}

.featured-image img {
    border-radius: 12px;
    margin-bottom: 25px;
}

.content {
    font-size: 18px;
    line-height: 1.7;
}

/* ===============================
   SHARE BUTTONS
=================================*/
.share-box {
    margin-top: 30px;
}

.share-box a {
    display: inline-block;
    padding: 6px 12px;
    background: #1877f2;
    color: #fff;
    border-radius: 4px;
    margin-right: 8px;
    font-size: 14px;
}

/* ===============================
   RELATED POSTS
=================================*/
.related-title {
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 22px;
    font-weight: 600;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.related-card {
    border: 1px solid #eee;
    padding: 10px;
    border-radius: 8px;
    transition: 0.3s;
    background: #fff;
}

.related-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.related-card img {
    height: 140px;
    object-fit: cover;
    border-radius: 6px;
}

.related-card h4 {
    font-size: 16px;
    margin-top: 10px;
    text-align: center;
}

/* ===============================
   SIDEBAR POSTS
=================================*/
.sidebar-title {
    font-size: 18px;
    margin-bottom: 15px;
}

.sidebar-list {
    list-style: none;
    padding: 0;
}

.sidebar-item {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

.sidebar-text a {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.sidebar-text span {
    display: block;
    font-size: 12px;
    color: #777;
}

.view-count {
    font-size: 12px;
    color: #888;
}

/* ===============================
   BLOG LIST PAGE
=================================*/
.page-title {
    font-size: 32px;
    margin-bottom: 30px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.news-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-image img {
    height: 200px;
    object-fit: cover;
}

.news-content {
    padding: 20px;
}

.news-content h2 {
    font-size: 20px;
    margin: 10px 0;
}

.news-content p {
    color: #555;
    font-size: 15px;
}

.read-more {
    display: inline-block;
    margin-top: 10px;
    font-size: 14px;
    color: #007bff;
    font-weight: bold;
}

/* ===============================
   FOOTER
=================================*/
.site-footer {
    background: #111;
    color: #aaa;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

.footer-container {
    max-width: 1100px;
    margin: auto;
}

/* ===============================
   RESPONSIVE
=================================*/
@media (max-width: 900px) {
    .container {
        grid-template-columns: 1fr;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .main-content {
        padding: 25px;
    }
}
/* POST PAGE LAYOUT */
.post-layout {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 40px;
}

.post-main {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.post-sidebar {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    height: fit-content;
    position: sticky;
    top: 20px;
}

@media (max-width: 900px) {
    .post-layout {
        grid-template-columns: 1fr;
    }
}
.blog-card {
    transition: 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
}
.blog-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
}

@media (max-width: 768px) {

    .header-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .menu-toggle {
        display: block;
    }

    /* Prevent horizontal scroll */
html, body {
    overflow-x: hidden;
}

/* Mobile Fix */
@media (max-width: 768px) {

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        height: 100vh;
        background: #fff;
        display: flex;
        flex-direction: column;
        padding: 20px;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: 0.3s ease;
        overflow-y: auto;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu a {
        padding: 10px 0;
        width: 100%;
    }

    /* SEARCH FORM FIX */
    .search-form {
        display: flex;
        width: 100%;
        margin-top: 10px;
    }

    .search-form input {
        flex: 1;
        min-width: 0;
        padding: 10px;
        box-sizing: border-box;
    }

    .search-form button {
        width: 45px;
        flex-shrink: 0;
    }
}
    
}
@media (max-width: 768px) {

    .mobile-menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-weight: 600;
        margin-bottom: 15px;
    }

    .close-menu {
        font-size: 22px;
        cursor: pointer;
    }

}

/* Desktop me hide karo */
@media (min-width: 769px) {
    .mobile-menu-header {
        display: none;
    }
}