/* ============================================================
   projects.css — Trang Dự án MTECH
   Đồng bộ hoàn toàn với thiết kế trang Lĩnh vực (categories.css) và hệ thống widget (blogs.css)
   Hỗ trợ chế độ duyệt phân cấp (Drill-Down: Lĩnh vực cha -> con -> dự án)
   ============================================================ */

/* ---- Utilities & Section wrapper ---- */
.projects_area {
    padding: 80px 0;
    background: #f5f5f5;
}

.sec_gap {
    padding: 80px 0;
}

.mb_55 {
    margin-bottom: 55px;
}

.mt_7 {
    margin-top: 7px;
}

/* ---- Section Title (Đồng bộ với categories.css) ---- */
.section_title h2 {
    font-size: 32px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 0;
    font-family: 'Noto Sans', 'Noto Sans SC', sans-serif;
}

.section_title .title_br {
    display: block;
    width: 60px;
    height: 3px;
    background-color: #3363DD;
    margin: 14px 0 18px;
}

.section_title p {
    color: #666;
    font-size: 15px;
    line-height: 1.7;
    max-width: 680px;
    margin: 0;
    font-family: 'Noto Sans', 'Noto Sans SC', sans-serif;
}

/* ============================================================
   DRILL-DOWN BREADCRUMBS NAVIGATION
   ============================================================ */
.project-drilldown-breadcrumbs {
    background: #ffffff;
    padding: 10px 18px;
    border: 1px solid #e8e8e8;
    border-radius: 3px;
    margin-bottom: 20px;
}

.breadcrumb-drilldown-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 8px;
    font-size: 14px;
    font-family: 'Noto Sans', 'Noto Sans SC', sans-serif;
}

.breadcrumb-drilldown-list .breadcrumb-item {
    display: inline-flex;
    align-items: center;
    color: #666;
}

.breadcrumb-drilldown-list .breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    padding-right: 8px;
    color: #bbb;
}

.breadcrumb-drilldown-list .breadcrumb-item a {
    color: #3363DD;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.breadcrumb-drilldown-list .breadcrumb-item a:hover {
    color: #1530A0;
    text-decoration: underline;
}

.breadcrumb-drilldown-list .breadcrumb-item.active {
    color: #1a1a2e;
    font-weight: 600;
}

/* ============================================================
   PROJECTS & CATEGORIES GRID — Dạng Card đồng bộ service_item
   ============================================================ */
.project_info_two {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.project-grid-item {
    margin-bottom: 30px;
}

.service_item.project_service_card {
    margin-bottom: 30px;
    background: #ffffff;
    padding-bottom: 16px;
    border-radius: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service_item.project_service_card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.service_img {
    position: relative;
    overflow: hidden;
    margin-bottom: 15px;
    background-color: #e9ecef;
}

.service_img img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.service_item:hover .service_img img {
    transform: scale(1.05);
}

.service_img .hover_content {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service_item:hover .hover_content {
    opacity: 1;
}

.hover_content .read_more {
    display: inline-block;
    padding: 10px 24px;
    background-color: #3363DD;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 3px;
    transition: background-color 0.2s ease;
    font-family: 'Noto Sans', 'Noto Sans SC', sans-serif;
}

.hover_content .read_more:hover {
    background-color: #1530A0;
    color: #ffffff;
}

.service_item a {
    text-decoration: none;
}

.service_item h3.project_item_title {
    font-size: 19px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 12px 15px 6px;
    line-height: 1.4;
    transition: color 0.2s ease;
    font-family: 'Noto Sans', 'Noto Sans SC', sans-serif;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 52px;
}

.service_item a:hover h3.project_item_title {
    color: #3363DD;
}

.service_item .bottom_br {
    display: block;
    width: 40px;
    height: 2px;
    background-color: #3363DD;
    margin: 6px 15px 8px;
}

.project_cat_subtitle {
    font-size: 13.5px;
    color: #777777;
    margin: 0 15px;
    font-family: 'Noto Sans', 'Noto Sans SC', sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.badge-cat-type {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #555;
    font-size: 13px;
}

.badge-cat-type i {
    color: #3363DD;
}

/* ============================================================
   STATUS BAR & ACTIVE TAGS
   ============================================================ */
.projects_filter_status_bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #ffffff;
    padding: 12px 18px;
    border: 1px solid #e8e8e8;
    margin-bottom: 25px;
    border-radius: 3px;
}

.projects_count_text {
    font-size: 14px;
    color: #555;
    font-family: 'Noto Sans', 'Noto Sans SC', sans-serif;
}

.projects_count_text strong {
    color: #3363DD;
    font-weight: 700;
}

.active-filter-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.active-filter-label {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    margin-right: 4px;
}

.filter-tag-badge {
    display: inline-flex;
    align-items: center;
    background: #eef3ff;
    color: #3363DD;
    border: 1px solid #d0e0ff;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 3px;
}

.filter-tag-badge .btn-remove-tag {
    background: transparent;
    border: none;
    color: #3363DD;
    font-size: 14px;
    line-height: 1;
    margin-left: 5px;
    padding: 0;
    cursor: pointer;
}

.filter-tag-badge .btn-remove-tag:hover {
    color: #dc3545;
}

.btn-clear-all-tags {
    color: #dc3545;
    font-size: 12px;
    font-weight: 600;
    text-decoration: underline;
    background: transparent;
    border: none;
    cursor: pointer;
    margin-left: 6px;
    padding: 0;
}

.btn-clear-all-tags:hover {
    color: #bd2130;
}

/* ============================================================
   SIDEBAR BỘ LỌC (r_widget chuẩn của website)
   ============================================================ */
.project_sidebar_area {
    margin-bottom: 40px;
}

.r_widget.widget_project_filter {
    background: #ffffff;
    padding: 25px 22px;
    border: 1px solid #e8e8e8;
    border-radius: 3px;
}

/* Tiêu đề Widget */
.r_widget_title {
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.r_widget_title h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a2e;
    display: inline-block;
    margin: 0;
    font-family: 'Noto Sans', 'Noto Sans SC', sans-serif;
}

.r_widget_title .title_br {
    display: inline-block;
    width: 34px;
    height: 3px;
    background: #3363DD;
    margin-left: 10px;
    vertical-align: middle;
    border-radius: 2px;
}

/* Category List & Tree */
.project_categories_wrapper {
    max-height: 460px;
    overflow-y: auto;
    padding-right: 4px;
}

.project_categories_wrapper::-webkit-scrollbar {
    width: 4px;
}

.project_categories_wrapper::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 2px;
}

.project-categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.project-cat-item {
    list-style: none;
    border-bottom: 1px solid #f2f2f2;
}

.project-cat-item:last-child {
    border-bottom: none;
}

.project-cat-row {
    display: flex;
    align-items: center;
    padding: 9px 0;
}

/* Nút Chevron toggle cho cha-con */
.btn-tree-toggle {
    background: transparent;
    border: none;
    color: #888888;
    width: 20px;
    height: 20px;
    padding: 0;
    margin-right: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    cursor: pointer;
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.btn-tree-toggle:hover {
    color: #3363DD;
}

.btn-tree-toggle:focus {
    outline: none;
}

.tree-toggle-spacer {
    width: 20px;
    margin-right: 4px;
    flex-shrink: 0;
}

/* Checkbox ô vuông */
.cat-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
    flex: 1;
    user-select: none;
}

.cat-checkbox-label input.project-filter-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.square-box {
    width: 16px;
    height: 16px;
    background-color: #ffffff;
    border: 1.5px solid #b8b8b8;
    border-radius: 2px;
    margin-right: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    position: relative;
}

.cat-checkbox-label:hover .square-box {
    border-color: #3363DD;
}

.cat-checkbox-label input:checked ~ .square-box {
    background-color: #3363DD;
    border-color: #3363DD;
}

.cat-checkbox-label input:checked ~ .square-box::after {
    content: "";
    position: absolute;
    width: 4px;
    height: 8px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-0.5px, -0.5px);
}

.cat-label-name {
    font-family: 'Noto Sans', 'Noto Sans SC', sans-serif;
    font-size: 15px;
    color: #444;
    line-height: 1.35;
    transition: color 0.2s;
}

.project-cat-item.depth-0 > .project-cat-row .cat-label-name {
    font-weight: 600;
    color: #222;
}

.cat-checkbox-label:hover .cat-label-name {
    color: #3363DD;
}

.cat-checkbox-label input:checked ~ .cat-label-name {
    color: #3363DD;
    font-weight: 600;
}

.cat-count {
    font-size: 12px;
    color: #999;
    margin-left: 6px;
    flex-shrink: 0;
}

/* Danh mục con thụt vào */
.project-cat-children {
    list-style: none;
    padding-left: 18px;
    margin: 0 0 4px 6px;
    border-left: 1.5px solid #ebebeb;
}

.project-cat-children .project-cat-item {
    border-bottom: 1px solid #f6f6f6;
}

.project-cat-children .cat-label-name {
    font-size: 14px;
}

/* Nút Action lọc trong Sidebar */
.filter_actions_box {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.btn_filter_apply {
    width: 100%;
    background-color: #3363DD;
    color: #ffffff;
    border: none;
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-family: 'Noto Sans', 'Noto Sans SC', sans-serif;
}

.btn_filter_apply:hover {
    background-color: #1530A0;
    color: #ffffff;
}

.btn_filter_reset {
    display: block;
    text-align: center;
    margin-top: 10px;
    font-size: 13px;
    color: #777777;
    text-decoration: none;
    transition: color 0.2s ease;
    font-family: 'Noto Sans', 'Noto Sans SC', sans-serif;
}

.btn_filter_reset:hover {
    color: #3363DD;
    text-decoration: underline;
}

/* ============================================================
   PAGINATION (Đồng bộ blogs.css)
   ============================================================ */
.projects_pagination_area {
    margin-top: 25px;
}

.projects-pagination-nav .pagination {
    margin: 0;
    gap: 6px;
}

.projects-pagination-nav .page-item .page-link {
    border-radius: 3px !important;
    border: 1px solid #e0e0e0;
    color: #555;
    font-weight: 600;
    font-size: 14px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s ease;
    background: #ffffff;
}

.projects-pagination-nav .page-item.active .page-link {
    background-color: #3363DD;
    border-color: #3363DD;
    color: #ffffff;
}

.projects-pagination-nav .page-item:not(.active):not(.disabled) .page-link:hover {
    background-color: #f5f5f5;
    color: #3363DD;
    border-color: #3363DD;
}

.projects-pagination-nav .page-item.disabled .page-link {
    color: #ccc;
    background: #fafafa;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.no-projects-found {
    text-align: center;
    padding: 50px 20px;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 3px;
    margin: 10px 0 30px;
}

.no-projects-icon {
    font-size: 40px;
    color: #bbb;
    margin-bottom: 12px;
}

.no-projects-found h4 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.no-projects-found p {
    font-size: 14px;
    color: #666;
    max-width: 420px;
    margin: 0 auto 16px;
}

.btn_filter_reset_inline {
    display: inline-block;
    padding: 8px 18px;
    background-color: #3363DD;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    border-radius: 3px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.btn_filter_reset_inline:hover {
    background-color: #1530A0;
    color: #ffffff;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991px) {
    .projects_area {
        padding: 50px 0;
    }
    .project_sidebar_area {
        margin-bottom: 30px;
    }
    .service_img img {
        height: 200px;
    }
}

@media (max-width: 767px) {
    .col-lg-4,
    .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}
