﻿/* ============================================================
   blogs.css — Trang danh sách bài viết Blog
   ============================================================ */

/* Fonts loaded via master.php - Noto Sans and Noto Sans SC */

/* ---- Section wrapper ---- */
.blog_area {
    padding: 80px 0;
    background: #fff;
}

/* ============================================================
   LEFT — Danh sách bài viết
   ============================================================ */
.blog_left_sidebar {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ---- Đường kẻ ngăn cách giữa các bài ---- */
.lt_blog_item {
    background: transparent;
    padding-bottom: 48px;
    margin-bottom: 48px;
    border-bottom: 1px solid #e8e8e8;
}

.lt_blog_item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* ---- Thumbnail: full width, hover overlay tối ---- */
.blog_img {
    display: block;
    overflow: hidden;
    position: relative;
}

.blog_img img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
    transition: transform .45s ease;
}

/* Overlay tối khi hover */
.blog_img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background .35s ease;
    pointer-events: none;
}

.lt_blog_item:hover .blog_img::after {
    background: rgba(0, 0, 0, 0.35);
}

.lt_blog_item:hover .blog_img img {
    transform: scale(1.05);
}

/* ---- Date badge — đè lên ảnh, góc dưới trái ---- */
/* Font: Poppins theo yêu cầu (ngày tạo) */
.blog-date-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    background: #3363DD;
    color: #ffffff;
    font-family: 'Noto Sans', 'Noto Sans SC', sans-serif;
    font-size: 19px;
    font-weight: 700;
    padding: 12px 26px;
    letter-spacing: .2px;
    line-height: 1.4;
    z-index: 2;
}

/* ---- Expiry badge — đè lên ảnh, góc dưới phải (cho tuyển dụng) ---- */
.blog-expiry-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    font-family: 'Noto Sans', 'Noto Sans SC', sans-serif;
    font-size: 19px;
    font-weight: 700;
    padding: 12px 26px;
    letter-spacing: .2px;
    line-height: 1.4;
    z-index: 2;
}

.blog-expiry-badge.active {
    background: #3363DD;
    color: #ffffff;
}

.blog-expiry-badge.expired {
    background: #dc3545;
    color: #ffffff;
}

/* ---- Post meta: By admin / tags — dưới ảnh, +20% ---- */
/* Font: Poppins (người tạo, tags dưới bài) */
.post_info {
    padding: 19px 0 0;
    text-align: right;
}

.blog_author_area {
    font-family: 'Noto Sans', 'Noto Sans SC', sans-serif;
    font-size: 19px;
    color: #B8B8B8;
    line-height: 1.6;
}

.blog_author_area a {
    font-family: 'Noto Sans', 'Noto Sans SC', sans-serif;
    color: #B8B8B8;
    font-weight: 600;
    text-decoration: none;
    transition: color .2s;
}

/* Author hover → vàng */
.blog_author_area a:hover {
    color: #3363DD;
}

.blog_author_area .sep {
    margin: 0 8px;
    color: #d0d0d0;
}

/* Tags dưới bài viết — Poppins */
.blog_author_area .tag-link {
    font-family: 'Noto Sans', 'Noto Sans SC', sans-serif;
    color: #B8B8B8;
    text-decoration: none;
    transition: color .2s;
}

.blog_author_area .tag-link:hover {
    color: #3363DD;
}

/* ---- Blog text body — +20% ---- */
.blog-text {
    padding: 24px 0 0;
}

/* Tiêu đề bài viết — Poppins, hover vàng, không gạch dưới */
.blog-text h4.title_color {
    font-family: 'Noto Sans', 'Noto Sans SC', sans-serif;
    font-size: 26px;
    font-weight: 600;
    color: #2c2c2c;
    margin-bottom: 16px;
    line-height: 1.4;
    transition: color .2s;
    text-decoration: none;
}

.blog-text a {
    text-decoration: none !important;
}

.blog-text a:hover h4.title_color {
    color: #3363DD;
}

/* Tóm tắt — Open Sans, màu #333333 */
.blog-text p {
    font-family: 'Noto Sans', 'Noto Sans SC', sans-serif;
    font-size: 17px;
    color: #0F1A40;
    line-height: 1.85;
    margin-bottom: 26px;
}

/* ---- Read More — outlined button, hover vàng, không gạch dưới ---- */
.read_btn_two {
    display: inline-block;
    font-family: 'Noto Sans', 'Noto Sans SC', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #555;
    text-decoration: none !important;
    border: 1px solid #ccc;
    padding: 11px 28px;
    border-radius: 2px;
    transition: background .2s, color .2s, border-color .2s;
}

.read_btn_two:hover {
    background: #3363DD;
    color: #fff !important;
    border-color: #3363DD;
    text-decoration: none !important;
}

/* ---- View Count Styling ---- */
.blog-views {
    font-family: 'Noto Sans', 'Noto Sans SC', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #555;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
    white-space: nowrap;
}

.blog-views i {
    font-size: 13px;
    color: #999;
}

.blog-views-detail {
    font-family: 'Noto Sans', 'Noto Sans SC', sans-serif;
    font-size: 16px;
    color: #555;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
    white-space: nowrap;
}

/* ============================================================
   PAGINATION — hover vàng
   ============================================================ */
.blog_pagination {
    margin-top: 44px;
    display: flex;
    justify-content: flex-start;
}

.blog_pagination .page-link {
    font-family: 'Noto Sans', 'Noto Sans SC', sans-serif;
    color: #555;
    border: 1px solid #ddd;
    border-radius: 2px !important;
    padding: 9px 20px;
    font-size: 16px;
    transition: background .2s, color .2s, border-color .2s;
}

.blog_pagination .page-item.active .page-link {
    background: #3363DD;
    border-color: #3363DD;
    color: #fff;
}

.blog_pagination .page-link:hover {
    background: #3363DD;
    border-color: #3363DD;
    color: #fff;
}

.blog_pagination .page-item.disabled .page-link {
    color: #bbb;
    pointer-events: none;
}

/* ============================================================
   RIGHT SIDEBAR — +20% toàn bộ
   ============================================================ */
.blog_sidebar_area {
    display: flex;
    flex-direction: column;
    gap: 43px;
}

.r_widget {
    background: transparent;
}

/* ---- Widget title — Poppins ---- */
.r_widget_title {
    margin-bottom: 22px;
}

.r_widget_title h3.title_color {
    font-family: 'Noto Sans', 'Noto Sans SC', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #2c2c2c;
    margin: 0;
    display: inline-block;
}

.title_br {
    display: inline-block;
    width: 34px;
    height: 3px;
    background: #3363DD;
    margin-left: 10px;
    vertical-align: middle;
    border-radius: 2px;
}

/* ---- Search widget — nền đen, placeholder xám sáng, input trắng ---- */
.search_widget .input-group {
    border-radius: 3px;
    overflow: hidden;
    display: flex;
    width: 100%;
}

.search_widget .form-control {
    border: none;
    font-family: 'Noto Sans', 'Noto Sans SC', sans-serif;
    font-size: 13px;
    padding: 14px 12px;
    box-shadow: none;
    outline: none;
    background: #3363DD;
    color: #fff;
    flex: 1;
    min-width: 0;
    width: 0;
}

.search_widget .form-control::placeholder {
    color: #8a9099;
}

.search_widget .input-group-btn {
    display: flex;
    flex-shrink: 0;
}

.search_widget .btn {
    background: #000;
    border: none;
    color: #fff;
    padding: 0 16px;
    cursor: pointer;
    transition: background .2s;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search_widget .btn:hover {
    background: #3363DD;
}

.search_widget .btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: #fff;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---- Categories widget — Poppins, hover vàng ---- */
.widget_categories ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget_categories ul li {
    border-bottom: 1px solid #f0f0f0;
}

.widget_categories ul li:last-child {
    border-bottom: none;
}

.widget_categories ul li a {
    display: block;
    padding: 13px 0;
    font-family: 'Noto Sans', 'Noto Sans SC', sans-serif;
    font-size: 17px;
    color: #555;
    text-decoration: none;
    transition: color .2s;
}

.widget_categories ul li a:hover,
.widget_categories ul li.active a {
    color: #3363DD;
}

/* Special handling for category-children lists - override parent styles */
.blog-categories-hierarchical .category-children {
    border-bottom: none !important;
}

.blog-categories-hierarchical .category-children li {
    border-bottom: 1px solid #f0f0f0;
}

/* ---- Recent News widget ---- */
.recent_inner {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* Add margin after recent widget to separate from first blog post */
.widget_news {
    margin-bottom: 30px;
}

.recent_item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.recent_item img {
    width: 86px;
    height: 80px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
}

.recent_item .media-body {
    flex: 1;
}

.recent_item .media-body a {
    text-decoration: none;
}

/* Tiêu đề recent news — Open Sans, hover vàng */
.recent_item .media-body h4 {
    font-family: 'Noto Sans', 'Noto Sans SC', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.45;
    margin: 0 0 6px;
    transition: color .2s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recent_item .media-body a:hover h4 {
    color: #3363DD;
}

/* Ngày tạo recent news — Poppins */
.recent_item .media-body h5 {
    font-family: 'Noto Sans', 'Noto Sans SC', sans-serif;
    font-size: 15px;
    color: #aaa;
    margin: 0;
    font-weight: 400;
}

/* ---- Tags widget — Open Sans, pill/badge ---- */
.tagcloud .wp-tag-cloud {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tagcloud .wp-tag-cloud li a {
    display: inline-block;
    font-family: 'Noto Sans', 'Noto Sans SC', sans-serif;
    font-size: 15px !important;
    color: #555;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 8px 20px;
    text-decoration: none;
    transition: background .2s, color .2s, border-color .2s;
}

.tagcloud .wp-tag-cloud li a:hover,
.tagcloud .wp-tag-cloud li a.active {
    background: #3363DD;
    color: #fff;
    border-color: #3363DD;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991px) {
    .blog_area { padding: 50px 0; }
    .blog_img img { height: 280px; }
    .blog_sidebar_area { margin-top: 50px; }
    .blog-text h4.title_color { font-size: 22px; }
    .r_widget_title h3.title_color { font-size: 22px; }
}

@media (max-width: 767px) {
    /* ---- Mobile: Hide tags widget ---- */
    .blog_sidebar_area .widget_tag_cloud {
        display: none !important;
    }
}

@media (max-width: 575px) {
    .blog_img img { height: 220px; }
    .blog-text h4.title_color { font-size: 19px; }
    .blog-date-badge { font-size: 16px; padding: 9px 18px; }
    .blog_author_area { font-size: 15px; }
}

/* ============================================================
   HIERARCHICAL CATEGORIES — Danh mục phân cấp với collapsible
   ============================================================ */

.blog-categories-hierarchical {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-categories-hierarchical .category-item {
    border-bottom: 1px solid #f0f0f0;
}

.blog-categories-hierarchical .category-item:last-child {
    border-bottom: none;
}

/* Category header with toggle button */
.blog-categories-hierarchical .category-header {
    display: flex;
    align-items: center;
    gap: 0;
    width: 100%;
}

/* Toggle button (expand/collapse) - HIDDEN since using hover mode */
.blog-categories-hierarchical .category-toggle {
    display: none;
}

.blog-categories-hierarchical .toggle-icon {
    display: none;
}

/* Category link styling */
.blog-categories-hierarchical .category-link {
    display: flex;
    align-items: center;
    padding: 13px 0;
    font-family: 'Noto Sans', 'Noto Sans SC', sans-serif;
    font-size: 17px;
    color: #555;
    text-decoration: none;
    transition: color 0.2s;
    flex: 1;
    min-width: 0;
}

.blog-categories-hierarchical .category-link:hover,
.blog-categories-hierarchical .category-item.active .category-link {
    color: #3363DD;
}

/* Category name */
.blog-categories-hierarchical .cat-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Depth-based styling */
.blog-categories-hierarchical .category-depth-0 {
    font-weight: 600;
}

.blog-categories-hierarchical .category-depth-0 .category-link {
    padding-left: 0;
}

.blog-categories-hierarchical .category-depth-1 {
    font-weight: 500;
}

.blog-categories-hierarchical .category-depth-1 .category-link {
    padding-left: 12px;
}

.blog-categories-hierarchical .category-depth-2 {
    font-weight: 400;
    font-size: 16px;
}

.blog-categories-hierarchical .category-depth-2 .category-link {
    padding-left: 24px;
}

.blog-categories-hierarchical .category-depth-3,
.blog-categories-hierarchical .category-depth-4,
.blog-categories-hierarchical .category-depth-5 {
    font-weight: 400;
    font-size: 15px;
}

.blog-categories-hierarchical .category-depth-3 .category-link {
    padding-left: 36px;
}

.blog-categories-hierarchical .category-depth-4 .category-link {
    padding-left: 48px;
}

.blog-categories-hierarchical .category-depth-5 .category-link {
    padding-left: 60px;
}

/* Category "All" item styling */
.blog-categories-hierarchical .category-all {
    font-weight: 600;
    margin-bottom: 8px;
}

.blog-categories-hierarchical .category-all a {
    color: #333;
    padding: 13px 0;
    padding-left: 0;
}

.blog-categories-hierarchical .category-all a:hover,
.blog-categories-hierarchical .category-all.active a {
    color: #3363DD;
}

/* Children wrapper - smooth slide down animation */
.blog-categories-hierarchical .category-children {
    list-style: none;
    padding: 0;
    margin: 0;
    display: none;
    background: transparent;
    opacity: 0;
    transition: opacity 0.3s ease;
    position: static;
    visibility: visible;
    max-height: 0;
    overflow: visible;
}

.blog-categories-hierarchical .category-children.show {
    display: block !important;
    padding-top: 8px;
    opacity: 1;
    visibility: visible;
    max-height: 5000px;
    overflow: visible;
}

/* Has children indicator */
.blog-categories-hierarchical .category-has-children .category-link {
    flex: 1;
}

/* Ensure proper alignment of category items with and without toggle */
.blog-categories-hierarchical .category-item {
    display: flex;
    flex-direction: column;
}

.blog-categories-hierarchical .category-item > a,
.blog-categories-hierarchical .category-item > .category-header {
    display: flex;
    align-items: center;
    width: 100%;
}

/* No left padding for items without toggle button since toggle is hidden */
.blog-categories-hierarchical .category-item:not(.category-has-children) > a {
    padding-left: 0;
}







