/*
Theme Name: CJP Expert Style
Author: CJP Team
Version: 1.0
*/

body {
    background-color: #f0f2f5;
    margin: 0;
    padding: 0;
    font-family: "Arial", Osaka, sans-serif;
    color: #333;
}

#container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    gap: 20px;
    padding: 20px;
}

/* Header */
header {
    background: #fff;
    border-bottom: 3px solid #d35c00;
    padding: 20px 0;
    text-align: center;
}

header h1 a {
    color: #333;
    text-decoration: none;
    font-size: 28px;
    font-weight: bold;
}

/* Cột chính bên trái */
#main-content {
    flex: 3;
}

.post-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
}

.post-card h2 {
    font-size: 18px;
    margin: 0 0 10px 0;
}

.post-card h2 a {
    color: #333;
    text-decoration: none;
}

.post-card h2 a:hover {
    color: #d35c00;
}

/* Sidebar bên phải */
#sidebar {
    flex: 1;
}

.widget {
    background: #fff;
    border: 1px solid #ddd;
    margin-bottom: 20px;
    border-radius: 4px;
    overflow: hidden;
}

.widget-title {
    background: #444;
    color: #fff;
    padding: 10px 15px;
    font-size: 15px;
    margin: 0;
    border-left: 5px solid #d35c00;
}

.widget ul {
    list-style: none;
    padding: 10px 15px;
    margin: 0;
}

.widget ul li {
    padding: 7px 0;
    border-bottom: 1px dashed #eee;
    font-size: 13px;
}

.widget ul li a {
    color: #555;
    text-decoration: none;
}

.widget ul li a:hover {
    color: #d35c00;
}

/* Phân trang */
.pagination {
    margin-top: 20px;
    text-align: center;
}

.pagination a, .pagination span {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    text-decoration: none;
}
/* Tối ưu hiển thị nội dung bài viết */
.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 10px 0;
}

.entry-content p {
    margin-bottom: 1.5em;
}
/* 1. Hiệu ứng cho tiêu đề bài viết */
.entry-title a {
    display: inline-block;
    transition: all 0.2s ease; /* Tạo chuyển động mượt mà */
}

.entry-title a:active {
    transform: scale(0.96); /* Thu nhỏ lại một chút khi nhấn */
    opacity: 0.8;
}

/* 2. Hiệu ứng cho nút Xem chi tiết */
.post-card a[style*="color: #d35c00"] { /* Chọn nút dựa trên màu bạn đã đặt */
    padding: 5px 10px;
    border-radius: 4px;
    background: transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    border: 1px solid transparent;
}

/* Khi di chuột qua (Hover) */
.post-card a[style*="color: #d35c00"]:hover {
    background: #fff5eb;
    border-color: #d35c00;
    padding-left: 15px; /* Đẩy nhẹ sang phải */
}

/* Khi nhấn vào (Active) */
.post-card a[style*="color: #d35c00"]:active {
    transform: translateY(2px); /* Nhấn lún xuống 2px */
    background: #d35c00;
    color: #fff !important;
}

/* 3. Hiệu ứng cho danh mục ở Sidebar (đã làm ở bước trước, bổ sung thêm active) */
.sub-categories li a:active {
    background: #e2e8f0 !important;
    transform: scale(0.98);
}
/* --- CJP Post Panel Style --- */

/* Khối bao ngoài: Hiệu ứng khi di chuột qua */
.cjp-post-panel:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
    border-color: #d1d1d1 !important;
}

/* Tiêu đề: Đổi màu khi di chuột qua */
.cjp-post-panel .entry-title a:hover {
    color: #d35c00 !important; /* Màu cam đặc trưng CJP */
}

/* Tiêu đề: Hiệu ứng nhấn xuống (đã yêu cầu trước đó) */
.cjp-post-panel .entry-title a:active {
    display: inline-block;
    transform: scale(0.97);
    opacity: 0.8;
}

/* Tóm tắt nội dung: Giới hạn dòng */
.custom-entry-content {
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Giới hạn tối đa 3 dòng chữ */
    -webkit-box-orient: vertical;  
    overflow: hidden;
    text-overflow: ellipsis;
    margin-left: 15px;
}

/* Nút Xem chi tiết: Hiệu ứng Hover & Active */
.cjp-readmore-btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Khi di chuột qua nút */
.cjp-readmore-btn:hover {
    background: #fff5eb !important;
    border-color: #d35c00 !important;
    padding-right: 18px !important; /* Đẩy nhẹ mũi tên sang phải */
}

/* Khi nhấn vào nút */
.cjp-readmore-btn:active {
    transform: translateY(2px) !important; /* Nhấn lún xuống 2px */
    background: #d35c00 !important;
    color: #fff !important;
}
.entry-content p a {
    display: inline-block;
    margin: 4px 2px;
    padding: 6px 15px;
    background-color: #ffffff; /* Nền trắng */
    color: #2271b1 !important; /* Màu chữ xanh */
    border: 1px solid #2271b1; /* Viền xanh */
    border-radius: 4px; /* Bo góc nhẹ */
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important; /* Bỏ gạch chân */
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}
.entry-content p a:hover {
    background-color: #2271b1; /* Nền chuyển sang xanh */
    color: #ffffff !important; /* Chữ chuyển sang trắng */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transform: translateY(-1px); /* Nhích nhẹ lên trên */
}

/* Hiệu ứng khi nhấn vào (Active) */
.entry-content p a:active {
    transform: translateY(1px); /* Nhấn lún xuống */
    background-color: #1a5a8e;
    border-color: #1a5a8e;
}

/* Loại bỏ định dạng Button cho các link ảnh hoặc link đặc biệt nếu cần */
.entry-content p a img {
    padding: 0;
    border: none;
    background: none;
}