
        .post-detail {
            text-align: center;
            margin: 20px auto;
            max-width: 800px;
        }
        .post-detail h1 {
            font-size: 28px;
            margin-bottom: 10px;
        }
        .post-detail .post-date {
            font-size: 14px;
            color: #0000009f;
            margin-bottom: 20px;
        }
        .post-detail .content {
            text-align: left;
            line-height: 1.7;
            color: black;
        }
        .post-detail .content img {
            display: block;
            margin: 20px auto;
            max-width: 100%;
            height: auto;
        }
        .related-posts {
            margin-top: 40px;
            text-align: center;
        }
        .related-posts h2 {
            margin-bottom: 20px;
        }
        .related-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 20px;
            justify-items: center;
            max-width: 1000px;
            margin: 0 auto;
        }
        #sidebar-ad {
            position: sticky;
            top: 100px;
        }
        .related-card {
            background: #fff;
            border: 1px solid #ddd;
            border-radius: 10px;
            overflow: hidden;
            width: 100%;
            max-width: 280px;
            text-align: center;
            transition: transform 0.2s;
        }
        .related-card:hover {
            transform: translateY(-5px);
        }
        .related-card img {
            width: 100%;
            height: 150px;
            object-fit: cover;
        }
        .related-body {
            padding: 10px;
        }
        .related-title a {
            font-size: 16px;
            font-weight: bold;
            text-decoration: none;
            color: #333;
        }
        .related-title a:hover {
            color: #007bff;
        }
        .related-date {
            font-size: 12px;
            color: #777;
            margin-top: 5px;
        }
        /* Khi về mobile, đổi thứ tự để "Tin nổi bật" lên trên */
@media (max-width: 767.98px) {
  .content-wrapper .row.g-4 {
    display: flex;
    flex-direction: column-reverse; /* đảo ngược thứ tự các cột */
  }
}

.pagination-custom {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-x: auto;
}
.pagination-custom::-webkit-scrollbar {
    display: none;
}
.pagination-custom li a,
.pagination-custom li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #198754;
    color: #198754;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}
.pagination-custom li.active span {
    background-color: #198754;
    color: #fff;
    border-color: #198754;
}
.pagination-custom li a:hover {
    background-color: #198754;
    color: #fff;
    border-color: #198754;
}
.pagination-custom li.disabled span {
    color: #ccc;
    border-color: #ccc;
    cursor: not-allowed;
    background-color: #f8f9fa;
}
@media (max-width: 575.98px) {
    .pagination-custom li a,
    .pagination-custom li span {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
}

body {
    background-color: #f7f9fb !important;
}
.post-container {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 0 15px rgba(0,0,0,0.05);
}
.breadcrumb-item + .breadcrumb-item::before {
    color: #999;
}
.content {
    line-height: 1.8;
    color: #333;
}
.content img {
    max-width: 100%;
    border-radius: 8px;
    margin: 15px 0;
}
.content h2, .content h3 {
    color: #222;
    margin-top: 25px;
    font-weight: 600;
}

/* Bảng */
.content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}
.content th, .content td {
    border: 1px solid #ccc;
    padding: 10px 12px;
    text-align: left;
}
.content th {
    background-color: #f5f5f5;
    font-weight: 600;
}
.content tr:nth-child(even) {
    background-color: #fafafa;
}
.content tr:hover {
    background-color: #f0f8ff;
}

/* Bài viết liên quan */
.related-posts .card:hover {
    transform: translateY(-4px);
    transition: all .3s ease;
}

/* Quảng cáo */
.sticky-ads {
    position: sticky;
    top: 0; /* JS sẽ tự động thêm offset */
    border: 1px solid #222 !important;
    box-shadow: 0 0 8px rgba(0,0,0,0.2) !important;
    border-radius: 12px;
    padding: 15px;
    background-color: #fff;
}

/* Hiệu ứng nhấp nháy */
@keyframes blinkSoft {
    0%, 100% { box-shadow: 0 0 5px rgba(0,0,0,0.2); }
    50% { box-shadow: 0 0 12px rgba(255,0,0,0.4); }
}
.blink-ads {
    animation: blinkSoft 2s infinite ease-in-out;
}

/* ========== RESPONSIVE MOBILE ========== */
@media screen and (max-width: 768px) {
    .post-container {
        padding: 20px 15px !important;
        border-radius: 8px !important;
        box-shadow: none !important;
    }
    .post-detail h1 {
        font-size: 1.4rem !important;
        line-height: 1.4 !important;
        word-break: break-word;
    }
    .breadcrumb {
        font-size: 14px;
        flex-wrap: wrap;
    }
    .content {
        font-size: 15px;
        line-height: 1.7;
        overflow-x: hidden;
        word-wrap: break-word;
    }
    .content table {
        display: block;
        width: 100%;
        overflow-x: auto;
        border: none;
    }
    .content td, .content th {
        white-space: nowrap;
        font-size: 14px;
    }
    iframe {
        width: 100% !important;
        height: 400px !important;
    }
    .pdf-viewer .btn {
        display: block;
        width: 100%;
        margin: 8px 0 !important;
    }
    .related-posts h3 {
        font-size: 1.2rem;
        text-align: center;
    }
    .col-md-4 {
        width: 100%;
        max-width: 100%;
    }
    .advertisement, .sticky-ads {
        display: none !important;
    }
    .btn-light {
        font-size: 14px;
        padding: 10px 20px;
    }
}

/* ========== POPUP QUẢNG CÁO MOBILE ========== */
#mobileAdPopup {
    display: none;
}
@media (max-width: 768px) {
    #mobileAdPopup {
        position: fixed;
        top: 0; left: 0;
        width: 100%; height: 100%;
        z-index: 9999;
        animation: fadeIn 0.4s ease-in-out;
    }
    .ad-overlay {
        position: absolute;
        width: 100%; height: 100%;
        background: rgba(0,0,0,0.6);
    }
    .ad-box {
        position: absolute;
        top: 50%; left: 50%;
        transform: translate(-50%, -50%);
        background: #fff;
        border: 1px solid #222;
        border-radius: 12px;
        padding: 15px;
        width: 300px;
        box-shadow: 0 0 15px rgba(0,0,0,0.3);
        text-align: center;
        animation: popUp 0.3s ease forwards;
    }
    .ad-box img {
        max-width: 100%;
        border-radius: 8px;
    }
    .ad-close {
        position: absolute;
        top: -12px; right: -12px;
        background: #ff3333;
        color: #fff;
        border: none;
        border-radius: 50%;
        font-size: 20px;
        width: 30px; height: 30px;
        cursor: pointer;
        box-shadow: 0 0 8px rgba(0,0,0,0.3);
    }
    @keyframes fadeIn {
        from { opacity: 0; } to { opacity: 1; }
    }
    @keyframes popUp {
        from { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
        to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    }
}

