/*
Theme Name:         Boi Toan
Theme URI:          https://khaiphathienco.com/
Author:             Thien Menh La So
Author URI:         https://khaiphathienco.com/
Description:        Một theme WordPress tối giản và sạch sẽ.
Version:            1.0.0
License:            GNU General Public License v2 or later
License URI:        https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:        boitoan
Tags:               custom-background, custom-logo, custom-menu, featured-images, block-styles, full-site-editing

Requires at least:  6.2
Tested up to:       6.5
Requires PHP:       7.4
*/
/* -- Cài đặt chung -- */
body, html {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    color: #f0f0f0;
    background: #0f0c29; /* fallback for old browsers */
    background: -webkit-linear-gradient(to right, #24243e, #302b63, #0f0c29);
    background: linear-gradient(to right, #24243e, #302b63, #0f0c29);
    min-height: 100vh;
    text-align: center;
    box-sizing: border-box;
}

a {
    text-decoration: none;
    color: inherit;
}

.main-container {
    padding: 0rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto; /* Tự động căn giữa container chính */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

h2 {
    font-size: 1.5rem;
}

p {
    font-size: 1.1rem;
    max-width: 800px;
    line-height: 1.6;
}
ul {
    list-style: none !important;
    margin: 0;
    padding: 0;
}


/* -- Trang chủ: Các thẻ lựa chọn -- */
.options-container {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 3rem;
}

.card-option {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    width: 25%;
    height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    box-sizing: border-box;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.card-option:hover {
    transform: translateY(-15px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.5);
}

.card-option i {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* -- Nút bấm chung -- */
.btn {
    background-color: #8e44ad;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 1rem; /* Điều chỉnh margin */
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
}

.btn:hover {
    background-color: #9b59b6;
    transform: scale(1.05);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid #8e44ad;
}

.btn-secondary:hover {
    background-color: #8e44ad;
}

.btn:disabled {
    background-color: #555;
    cursor: not-allowed;
    transform: none;
}

/* -- Vùng chọn loại trải bài (Tarot, Kinh Dịch) -- */
.spread-options {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* -- Trang Tarot -- */
.tarot-reading-area {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    align-items: stretch; /* Căn các thẻ bằng nhau */
    flex-wrap: wrap;
    gap: 2rem;
}

.tarot-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 1.5rem;
    width: 250px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
}

.tarot-card img {
    max-width: 100%;
    border-radius: 8px;
    margin-bottom: 1rem;
    height: 350px;
    object-fit: cover;
}

.tarot-card h3 {
    margin-bottom: 0.5rem;
    color: #f1c40f;
}
.tarot-card p {
    font-size: 0.9rem;
    line-height: 1.4;
    flex-grow: 1; /* Đẩy nội dung xuống */
}

/* -- Trang Tử Vi -- */
.tuvi-form {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.tuvi-form label {
    font-size: 1.2rem;
}

.tuvi-form input[type="date"] {
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 1rem;
}

.tuvi-result {
    margin-top: 2rem;
    background: rgba(0, 0, 0, 0.4);
    padding: 2rem;
    border-radius: 15px;
    max-width: 600px;
}

/* -- Trang Kinh Dịch -- */
.hexagram-comparison {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.hexagram-display {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 1.5rem;
    width: 300px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hexagram-display h4 {
    color: #f1c40f;
    min-height: 48px; /* Giữ chiều cao ổn định */
}

.hexagram-display p {
    font-size: 0.9rem;
    min-height: 100px; /* Giữ chiều cao ổn định */
}

.hexagram-visual {
    margin: 1.5rem 0;
}
.line {
    height: 10px;
    background-color: #f0f0f0;
    margin: 8px auto;
    width: 150px;
    border-radius: 5px;
}
.line.yin {
    position: relative;
}
.line.yin::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 100%;
    background: #24243e; /* Màu nền để tạo khoảng trống */
}
.hexagram-visual .line.changing {
    background-color: #e74c3c; /* Hào động có màu đỏ */
    position: relative;
}
.hexagram-visual .line.changing::before {
    content: '►';
    color: #f1c40f;
    font-size: 1.2rem;
    position: absolute;
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
}

.change-indicator {
    text-align: center;
}

.change-indicator .fa-arrow-right-long {
    font-size: 3rem;
    color: #8e44ad;
    margin-top: 1rem;
    transition: transform 0.3s ease; /* Thêm hiệu ứng chuyển đổi */
}
/* === BẢNG CHI TIẾT NẠP GIÁP (MỚI) === */
.details-section {
    margin-top: 3rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 2rem;
    width: 100%;
    max-width: 800px;
    box-sizing: border-box;
}
.details-section h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
}
.date-info, .hex-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 2rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #ccc;
}
.date-info strong, .hex-info strong {
    color: #f1c40f;
}

.napgiap-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 1rem;
}
.napgiap-table th, .napgiap-table td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.napgiap-table thead th {
    background-color: rgba(255, 255, 255, 0.1);
    color: #f1c40f;
}
.napgiap-table tbody tr:last-child td {
    border-bottom: none;
}
.napgiap-table .the-ung {
    font-weight: bold;
    color: #3498db;
}
.napgiap-table .changing-row {
    background-color: rgba(231, 76, 60, 0.2); /* Nền đỏ nhạt cho hào động */
    font-weight: bold;
}
.napgiap-table .changing-row td {
     color: #ffdd57; /* Chữ màu vàng cho hào động */
}

/* === KHU VỰC CHỌN PHƯƠNG PHÁP GIEO QUẺ (MỚI) === */
.casting-methods-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
    width: 100%;
    max-width: 550px;
}

.method-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}

.kinhdich-form {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem 2rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    box-sizing: border-box;
    text-align: left;
}

.kinhdich-form label {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #f1c40f;
    text-align: center;
}

.kinhdich-form .form-group {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.kinhdich-form input[type="number"],
.kinhdich-form input[type="text"] {
    flex-grow: 1;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #555;
    background-color: #333;
    color: #f0f0f0;
    font-size: 1rem;
}
/* Hide arrows from number input */
.kinhdich-form input[type=number]::-webkit-inner-spin-button, 
.kinhdich-form input[type=number]::-webkit-outer-spin-button { 
  -webkit-appearance: none; 
  margin: 0; 
}
.kinhdich-form input[type=number] {
  -moz-appearance: textfield; /* Firefox */
}

.kinhdich-form .btn {
    padding: 12px 20px;
    margin-top: 0;
    font-size: 1rem;
    flex-shrink: 0; /* Ngăn nút bị co lại */
    text-transform: none;
    letter-spacing: 0;
}

/* -- Vùng luận giải AI -- */
.gemini-section {
    margin-top: 3rem;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 800px;
    width: 100%;
    box-sizing: border-box;
}

.gemini-section h2 {
    color: #f1c40f;
}

.gemini-section textarea {
    width: 100%; /* Sửa lại để vừa vặn */
    height: 100px;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #555;
    background-color: #333;
    color: #f0f0f0;
    font-size: 1rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
    box-sizing: border-box;
}

#gemini-result-container {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    min-height: 50px;
    text-align: left;
    line-height: 1.8;
}

#gemini-result strong, #gemini-result-kinhdich strong {
    color: #f1c40f;
}

#gemini-result br, #gemini-result-kinhdich br {
    margin-bottom: 10px;
}

#gemini-result-kinhdich {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    min-height: 50px;
    text-align: left;
    line-height: 1.8;
}


/* -- Hiệu ứng loading -- */
.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #8e44ad;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* -- Link Quay về trang chủ -- */
.back-link {
    display: inline-block;
    margin-top: 3rem;
    font-size: 1rem;
    color: #f1c40f;
    text-decoration: underline;
}


/*
================================================================
==                    RESPONSIVE CHO MOBILE                   ==
==        (Áp dụng cho màn hình có chiều rộng <= 768px)       ==
================================================================
*/
@media (max-width: 768px) {
    /* -- Điều chỉnh chung -- */
    .main-container {
        padding: 0rem; /* Giảm padding */
    }

    h1 {
        font-size: 2.2rem; /* Giảm cỡ chữ tiêu đề chính */
    }

    h2 {
        font-size: 1.3rem;
    }

    p {
        font-size: 1rem;
    }

    /* -- Trang chủ: Xếp các thẻ lựa chọn theo chiều dọc -- */
    .options-container {
        flex-direction: column; /* Xếp dọc */
        align-items: center;
        gap: 1.5rem;
    }

    .card-option {
        width: 90%; /* Chiếm gần hết chiều rộng */
        max-width: 320px;
        height: auto; /* Chiều cao tự động */
        min-height: 250px;
        transform: none !important; /* Bỏ hiệu ứng hover trên mobile */
        box-shadow: none !important;
    }

    /* -- Trang Tarot: Xếp các lá bài theo chiều dọc -- */
    .tarot-reading-area {
        flex-direction: column;
        align-items: center;
    }
    
    .tarot-card {
        width: 90%; /* Chiếm gần hết chiều rộng */
        max-width: 350px;
    }

    .tarot-card img {
        height: auto; /* Chiều cao tự động để giữ tỷ lệ */
        max-height: 400px; /* Giới hạn chiều cao tối đa */
    }

    /* -- Trang Tử vi: Xếp form theo chiều dọc -- */
    .tuvi-form {
        flex-direction: column;
        gap: 1rem;
    }

    .tuvi-form .btn {
        width: 100%;
    }
    
    /* -- Trang Kinh Dịch: Xếp các quẻ theo chiều dọc -- */
    .hexagram-comparison {
        flex-direction: column;
        gap: 1rem;
    }

    .hexagram-display {
        width: 90%; /* Chiếm gần hết chiều rộng */
        max-width: 400px;
    }
    
    .hexagram-display p {
        min-height: auto; /* Bỏ chiều cao tối thiểu */
    }

    .change-indicator .fa-arrow-right-long {
        transform: rotate(90deg); /* Xoay mũi tên chỉ xuống dưới */
        margin: 1rem 0;
    }
    
    .hexagram-visual .line.changing::before {
        display: none; /* Ẩn mũi tên nhỏ bên cạnh hào động trên mobile */
    }
    
    /* -- Form gieo quẻ Kinh Dịch -- */
    .kinhdich-form .form-group {
        flex-direction: column;
        align-items: stretch;
    }
    .kinhdich-form .btn {
        width: 100%;
    }

    /* -- Bảng chi tiết nạp giáp -- */
    .details-section {
        padding: 1rem;
    }
    .napgiap-table {
        font-size: 0.8rem;
    }
    .napgiap-table th, .napgiap-table td {
        padding: 8px 5px;
    }
    .date-info {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }
    /* -- Vùng luận giải AI -- */
	.gemini-section {
        padding: 0px !important; /* Giảm padding tổng thể của khu vực luận giải */
    }
    
    .card-header {
        padding: 0.75rem 1rem; /* Giảm padding cho header của card */
    }

    .card-body {
        font-size: 1rem;
        padding: 0px; /* Giữ padding của body là 1rem */
    }

    .card-body ul {
        padding-left: 0; /* Bỏ hoàn toàn padding mặc định của thẻ ul */
        margin-top: 0.5rem;
    }

    .card-body li {
        padding-left: 1.2rem; /* Chỉ giữ lại padding này để căn lề cho icon và text */
        position: relative;
        margin-bottom: 0.75rem;
    }

    .card-body li::before {
        left: 0;
        top: 4px; /* Căn chỉnh lại icon một chút */
    }
}


/* -- 1. Cấu trúc Layout 3 cột với Sidebar -- */
.site-container {
    display: flex;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto; /* Căn giữa toàn bộ layout trên màn hình lớn */
    flex-grow: 1;
}

#main-content {
    flex-grow: 1;
    padding: 0 1rem; /* Tạo khoảng cách với sidebar */
}

.sidebar {
    width: 220px;
    flex-shrink: 0;
    padding: 2rem 1rem;
    box-sizing: border-box;

    /* --- CODE MỚI CHO STICKY SIDEBAR --- */
    position: -webkit-sticky; /* Tương thích Safari cũ */
    position: sticky;
    top: 15%; /* Dính vào đỉnh màn hình */
    height: 100vh; /* Chiều cao bằng chiều cao màn hình */
    align-self: flex-start; /* Quan trọng để sticky hoạt động đúng trong flexbox */
}

.sidebar-placeholder {
    width: 100%;
    height: 300px;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgba(255, 255, 255, 0.4);
    font-weight: bold;
}

/* -- 2. Khu vực Tin tức trang chủ -- */
.latest-posts-section {
    width: 100%;
    margin-top: 5rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.latest-posts-section h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    color: #f1c40f;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.post-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.post-thumbnail-wrapper {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.post-thumbnail-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.post-card:hover .post-thumbnail-wrapper img {
    transform: scale(1.1);
}

.post-card-content {
    padding: 0.5rem;
    text-align: left;
    flex-grow: 1;
}

.post-card-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
    color: #f0f0f0;
}

.post-excerpt {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #ccc;
}
.post-excerpt > p{
	font-size:0.7rem;
}

/* -- 3. Giao diện trang chi tiết bài viết (single.php) -- */
.single-post-container {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1rem;
    text-align: left;
    max-width: 900px;
    margin: 0 auto;
}

.post-header .post-title {
    font-size: 2.8rem;
    color: #f1c40f;
    text-shadow: none;
    margin: 0;
}

.post-meta {
    margin-top: 1rem;
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: #ccc;
    font-size: 0.9rem;
}
.post-meta a {
    color: #f1c40f;
    text-decoration: none;
}
.post-meta a:hover {
    text-decoration: underline;
}
.post-meta i {
    margin-right: 8px;
}

.post-thumbnail-single {
    margin-bottom: 2rem;
}
.post-thumbnail-single img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.post-content {
	text-align: justify;
    line-height: 1.8;
    font-size: 1.1rem;
}
.post-content h2, .post-content h3 {
    color: #f1c40f;
    margin-top: 2.5rem;
}
.post-content p {
    margin-bottom: 1.5rem;
}
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 1.5rem 0;
}
.post-content blockquote {
    border-left: 4px solid #8e44ad;
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #ccc;
}

.post-footer {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}
.post-tags span {
    font-weight: bold;
    color: #f1c40f;
}
.post-tags a {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 10px;
    border-radius: 5px;
    margin-left: 5px;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}
.post-tags a:hover {
    background: #8e44ad;
}


/* -- 4. Bài viết liên quan (single.php) -- */
.related-posts-section {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.related-posts-section h2 {
    font-size: 2rem;
    color: #f1c40f;
    margin-bottom: 2rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.archive-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}

.archive-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.archive-title {
    font-size: 2.8rem;
    color: #f1c40f;
}

.archive-description {
    font-size: 1.1rem;
    color: #ccc;
    margin-top: 1rem;
}

.archive-posts-list .archive-post-item {
    display: flex;
    gap: 1.5rem;
    background: rgba(0, 0, 0, 0.15);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    transition: background-color 0.3s ease;
    text-align: left;
}

.archive-posts-list .archive-post-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.archive-post-thumbnail {
    width: 150px;
    height: 100px;
    flex-shrink: 0;
}

.archive-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
}

.archive-post-title {
    margin: 0 0 0.5rem 0;
}

.archive-post-title a {
    font-size: 1.5rem;
    color: #f0f0f0;
    text-decoration: none;
}
.archive-post-title a:hover {
    color: #f1c40f;
}

.archive-post-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: #ccc;
    margin-bottom: 0.75rem;
}
.archive-post-meta a {
    color: #ccc;
}
.archive-post-meta a:hover {
    color: #f1c40f;
}
.archive-post-meta i {
    margin-right: 5px;
}

.archive-post-excerpt {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #bbb;
}

/* Phân trang */
.pagination {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}
.pagination .nav-links {
    display: flex;
    gap: 0.5rem;
}
.pagination .page-numbers {
    display: block;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    color: #f0f0f0;
    text-decoration: none;
    transition: background-color 0.3s ease;
}
.pagination .page-numbers:hover {
    background: #8e44ad;
}
.pagination .page-numbers.current {
    background: #8e44ad;
    font-weight: bold;
}

/* RESPONSIVE cho Archive */
@media(max-width: 768px) {
    .archive-post-item {
        flex-direction: column;
    }
    .archive-post-thumbnail {
        width: 100%;
        height: 180px;
    }
}

/* -- CSS cho hình ảnh placeholder trong sidebar -- */
.sidebar-placeholder {
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden; /* Ẩn phần thừa của ảnh nếu có */
    height: auto; /* Chiều cao tự động theo ảnh */
}

.sidebar-placeholder img {
    display: block; /* Bỏ khoảng trắng thừa dưới ảnh */
    width: 100%;
    height: auto; /* Giữ đúng tỷ lệ ảnh */
    border-radius: 10px;
}

#ez-toc-container a{
	color: white !important;
}
.centered-image-container {
      text-align: center;
      margin: 0 auto;
      max-width: 100%;
    }
/* -- RESPONSIVE CHO CÁC THAY ĐỔI MỚI -- */
@media (max-width: 1200px) {
    .sidebar {
        display: none; /* Ẩn sidebar trên tablet và các màn hình nhỏ hơn */
    }
    #main-content {
        padding: 0; /* Bỏ padding khi không có sidebar */
    }
    .posts-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 cột trên tablet */
    }
}

@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr; /* 1 cột trên mobile */
    }
    .single-post-container {
        padding: 0.75rem; /* Giảm padding trên mobile */
    }
    .post-header .post-title {
        font-size: 2rem;
    }
}