/* =====================================================
   GLOBAL / COMMON
===================================================== */
body {
    font-family: "Poppins", sans-serif;
    background: #f9f9fb;
    margin: 0;
    padding: 0;
}

.loader {
    text-align: center;
    margin-top: 20px;
    color: #0073aa;
    font-weight: 500;
    display: none;
}

.lazy-img {
    filter: blur(8px);
    transition: filter 0.4s ease;
}
.lazy-img.loaded {
    filter: blur(0);
}

/* =====================================================
   CATEGORY PAGE
===================================================== */
.container {
    max-width: 1100px;
    margin: 50px auto;
    padding: 20px;
}

.container h1 {
    color: #0073aa;
    font-size: 32px;
    margin-bottom: 30px;
    text-align: center;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.post-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}

.post-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid #eee;
}

.post-card h2 {
    font-size: 18px;
    color: #000;
    padding: 12px;
    text-align: center;
    line-height: 1.4;
}

.cat-ad-container {
    width: 100%;
    margin: 20px 0;
    text-align: center;
}

/* =====================================================
   SINGLE POST PAGE
===================================================== */
.single-post-container {
    max-width: 900px;
    margin: 50px auto;
    padding: 30px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
}

.single-post-container h1 {
    color: #000;
    font-size: 32px;
    margin-bottom: 15px;
    line-height: 1.3;
}

/* Featured Image */
.single-post-container img.post-featured {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 10px;
    margin: 20px 0;
}

/* =====================================================
   POST CONTENT
===================================================== */
.post-content {
    line-height: 1.8;
    font-size: 16px;
    color: #000;
    margin-bottom: 30px;
}

.post-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 15px 0;
    object-fit: contain;
    border-radius: 6px;
}

/* Tables */
.post-content .table-responsive {
    width: 100%;
    overflow-x: auto;
    margin: 20px 0;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
}

.post-content table th,
.post-content table td {
    border: 1px solid #ddd;
    padding: 8px;
}

/* Lists */
.post-content ul,
.post-content ol {
    padding-left: 30px;
    margin: 15px 0;
}

/* Blockquote */
.post-content blockquote {
    border-left: 4px solid #0073aa;
    padding: 10px 15px;
    margin: 15px 0;
    background-color: #f5faff;
}

/* Code block */
.post-content code {
    display: block;
    background: #f2f2f2;
    padding: 8px 12px;
    margin: 10px 0;
    border-radius: 6px;
    font-family: monospace;
    font-size: 14px;
    overflow-x: auto;
}

/* Divider */
.post-content hr {
    border: 0;
    height: 1px;
    background-color: #eee;
    margin: 20px 0;
}

/* Back Button */
.single-post-container a.back-home {
    display: inline-block;
    padding: 10px 25px;
    background: #0073aa;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s;
}
.single-post-container a.back-home:hover {
    background: #005f8d;
}

/* =====================================================
   AUTHOR BOX
===================================================== */
.author-box {
    display: flex;
    gap: 14px;
    padding: 16px;
    margin: 30px 0;
    border: 1px solid #eee;
    border-radius: 12px;
    background: #f8f9fb;
    align-items: flex-start;
}

.author-box img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info strong {
    font-size: 16px;
    display: block;
}

.author-info p {
    font-size: 14px;
    margin: 6px 0;
    color: #555;
}

.author-info a {
    font-size: 13px;
    color: #0073aa;
    text-decoration: none;
}
.author-info a:hover {
    text-decoration: underline;
}

/* =====================================================
   RELATED POSTS
===================================================== */
.related-posts {
    margin-top: 60px;
}

.related-posts h2 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #000;
}

.related-post-filter {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 500;
}

.related-post-filter select {
    padding: 8px 12px;
    font-size: 16px;
    border-radius: 6px;
    border: 1px solid #ccc;
    background: #fff;
    min-width: 150px;
}

.related-post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.related-post-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.related-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.related-post-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.related-post-card h3 {
    font-size: 16px;
    padding: 12px;
    text-align: center;
    line-height: 1.4;
}

.ad-container {
    width: 100%;
    margin: 20px 0;
    text-align: center;
}