/* =========================================================
   DBB - DỰ ÁN NỔI BẬT
========================================================= */


/* =========================================================
   VARIABLES
========================================================= */

.dbb_projects {
    --dbb-brand-blue: #0473b7;
    --dbb-brand-blue-dark: #002a4a;
    --dbb-brand-orange: #f58021;
    --dbb-brand-orange-hover: #d96c14;

    --dbb-bg-light: #f8fafc;

    --dbb-text-dark: #111827;
    --dbb-text-gray: #6b7280;

    --dbb-border: #e5e7eb;

    --dbb-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --dbb-shadow-md: 0 8px 25px rgba(0, 0, 0, 0.08);
    --dbb-shadow-lg: 0 15px 40px rgba(0, 0, 0, 0.12);

    color: var(--dbb-text-dark);
    line-height: 1.5;

    overflow: hidden;
}


/* =========================================================
   RESET
========================================================= */

.dbb_projects *,
.dbb_projects *::before,
.dbb_projects *::after {
    box-sizing: border-box;
}

.dbb_projects img {
    display: block;
    max-width: 100%;
}

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

.dbb_projects button {
    font-family: inherit;
    cursor: pointer;
}


/* =========================================================
   CONTAINER
========================================================= */

.dbb_projects .dbb_container {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}


/* =========================================================
   SECTION
========================================================= */

.dbb_projects {
    padding: 80px 0;
    background: var(--dbb-bg-light);
}


/* =========================================================
   SECTION HEADER
========================================================= */

.dbb_projects-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 45px;

    text-align: left;
}


/* =========================================================
   TITLE
========================================================= */

.dbb_projects .dbb_section-title {
    margin: 0;

    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--dbb-text-dark);
    text-transform: uppercase;
}

.dbb_projects .dbb_section-subtitle {
    display: block;

    color: var(--dbb-brand-blue);

    font-size: 13px;
    font-weight: 800;

    letter-spacing: 2px;
    text-transform: uppercase;
}


/* =========================================================
   FILTER
========================================================= */

.dbb_filter-tabs {
    display: flex;
    flex-wrap: wrap;

    gap: 8px;
}

.dbb_filter-btn {
    padding: 9px 16px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: white;
    color: #000;
    font-size: 13px;
    font-weight: 600;
    transition: 0.25s;
}

.dbb_filter-btn:hover,
.dbb_filter-btn.dbb_active {
    background: var(--dbb-brand-blue);

    border-color: var(--dbb-brand-blue);

    color: white;
}


/* =========================================================
   PROJECT GRID
========================================================= */

.dbb_projects-grid {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 30px;
}


/* =========================================================
   PROJECT CARD
========================================================= */

.dbb_project-card {
    display: flex;
    flex-direction: column;

    overflow: hidden;

    background: white;

    border: 1px solid #edf0f3;

    border-radius: 18px;

    box-shadow: var(--dbb-shadow-sm);

    transition:
        transform 0.3s,
        box-shadow 0.3s;
}


/* Ẩn khi filter */

.dbb_project-card.dbb_hidden {
    display: none;
}


/* Hover */

.dbb_project-card:hover {
    transform: translateY(-6px);

    box-shadow: var(--dbb-shadow-lg);
}


/* =========================================================
   PROJECT IMAGE
========================================================= */

.dbb_project-image {
    position: relative;

    height: 225px;

    overflow: hidden;
}

.dbb_project-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform 0.5s;
}


/* Zoom ảnh khi hover */

.dbb_project-card:hover .dbb_project-image img {
    transform: scale(1.07);
}


/* =========================================================
   PROJECT STATUS
========================================================= */

.dbb_project-status {
    position: absolute;

    top: 14px;
    left: 14px;

    padding: 5px 12px;

    border-radius: 20px;

    color: white;

    font-size: 11px;
    font-weight: 800;
}


/* Đang mở bán */

.dbb_status-selling {
    background: var(--dbb-brand-orange);
}


/* Sắp mở bán */

.dbb_status-coming {
    background: var(--dbb-brand-blue);
}


/* Đã bàn giao */

.dbb_status-done {
    background: #4b5563;
}


/* =========================================================
   PROJECT CONTENT
========================================================= */

.dbb_project-content {
    display: flex;
    flex-direction: column;

    flex: 1;

    padding: 20px;
}


/* =========================================================
   PROJECT TITLE
========================================================= */

.dbb_project-title {
    margin: 0 0 8px;
    color: var(--dbb-brand-blue);
    font-size: 18px;
    font-weight: 800;
    transition: 0.2s;
    text-align: left;
}

.dbb_project-card:hover .dbb_project-title {
    color: var(--dbb-brand-orange);
}


/* =========================================================
   LOCATION
========================================================= */

.dbb_project-location {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 14px;
    color: #000000;
    font-size: 12px;
}

.dbb_project-location i {
    color: var(--dbb-brand-blue);
}


/* =========================================================
   PROJECT INFO
========================================================= */

.dbb_project-info {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 8px;

    margin-bottom: 16px;
}


/* Meta box */

.dbb_project-meta {
    padding: 11px;

    border-radius: 10px;

    background: #f8fafc;
}


/* Label */

.dbb_project-meta-label {
    display: block;
    margin-bottom: 3px;
    color: #000000;
    font-size: 12px;
    font-weight: 600;
}


/* Value */

.dbb_project-meta-value {
    display: block;
    color: var(--dbb-brand-blue);
    font-size: 14px;
    font-weight: 800;
}


/* =========================================================
   PRICE
========================================================= */

.dbb_project-price {
    display: flex;

    align-items: center;
    justify-content: space-between;

    padding: 12px;

    margin-bottom: 18px;

    border-radius: 10px;

    background: #eff6ff;
}


/* Price label */

.dbb_price-label {
    color: #000000;
    font-size: 12px;
    font-weight: 600;
}


/* Price value */

.dbb_price-value {
    color: var(--dbb-brand-orange);
    font-size: 14px;
    font-weight: 800;
    text-align: right;
}


/* =========================================================
   DETAIL BUTTON
========================================================= */

.dbb_project-button {
    display: flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    width: 100%;

    padding: 11px;

    margin-top: auto;

    border-radius: 10px;

    border: 1px solid var(--dbb-brand-blue);

    background: white;

    color: var(--dbb-brand-blue);

    font-size: 12px;
    font-weight: 700;

    transition: 0.25s;
}

.dbb_project-button:hover {
    background: var(--dbb-brand-blue);

    color: white;
}

/* =========================================================
   PAGINATION
========================================================= */

.dbb_pagination {
    display: flex;
    align-items: center;
    justify-content: center;

    flex-wrap: wrap;

    gap: 8px;

    margin-top: 45px;
}


.dbb_pagination a,
.dbb_pagination span {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-width: 42px;
    height: 42px;

    padding: 0 12px;

    border: 1px solid var(--dbb-border);

    border-radius: 10px;

    background: #fff;

    color: var(--dbb-text-dark);

    font-size: 13px;
    font-weight: 700;

    text-decoration: none;

    transition:
        background 0.25s,
        color 0.25s,
        border-color 0.25s,
        transform 0.25s;
}


.dbb_pagination a:hover {
    background: var(--dbb-brand-blue);

    border-color: var(--dbb-brand-blue);

    color: #fff;

    transform: translateY(-2px);
}


.dbb_pagination .current {
    background: var(--dbb-brand-blue);

    border-color: var(--dbb-brand-blue);

    color: #fff;
}


.dbb_pagination .prev,
.dbb_pagination .next {
    padding: 0 14px;
}


/* =========================================================
   FILTER LOADING
========================================================= */

.dbb_projects.dbb_filter-loading {
    opacity: 0.65;

    pointer-events: none;

    transition: opacity 0.2s;
}


/* =========================================================
   FILTER BUTTON
========================================================= */

.dbb_filter-btn {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 9px 16px;

    border-radius: 12px;

    border: 1px solid #e5e7eb;

    background: white;

    color: #000;

    font-size: 13px;
    font-weight: 600;

    text-decoration: none;

    transition: 0.25s;
}


.dbb_filter-btn:hover,
.dbb_filter-btn.dbb_active {
    background: var(--dbb-brand-blue);

    border-color: var(--dbb-brand-blue);

    color: white;
}

.dbb_projects-empty {
    grid-column: 1 / -1;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 24px;
    border: 1px solid #e8e8e8;
    border-radius: 16px;
    background: #fafafa;
}

.dbb_projects-empty-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #64748b;
    font-size: 22px;
}

.dbb_projects-empty-title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
}

.dbb_projects-empty-text {
    max-width: 480px;
    margin: 0 0 20px;
    color: #64748b;
    line-height: 1.7;
}

.dbb_projects-empty-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 8px;
    background: #111827;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.dbb_projects-empty-button:hover {
    background: #374151;
    color: #fff;
}


/* =========================================================
   PROJECT IMAGE LINK
========================================================= */

.dbb_project-image {
    display: block;

    text-decoration: none;

    color: inherit;
}


/* =========================================================
   PROJECT TITLE LINK
========================================================= */

.dbb_project-title a {
    color: inherit;

    text-decoration: none;
}


/* =========================================================
   RESPONSIVE PAGINATION
========================================================= */

@media (max-width: 600px) {

    .dbb_pagination {
        gap: 6px;

        margin-top: 35px;
    }


    .dbb_pagination a,
    .dbb_pagination span {

        min-width: 38px;
        height: 38px;

        padding: 0 9px;

        font-size: 12px;
    }

}



/* =========================================================
   RESPONSIVE - TABLET
========================================================= */

@media (max-width: 1024px) {

    .dbb_projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

}


/* =========================================================
   RESPONSIVE - MOBILE
========================================================= */

@media (max-width: 768px) {

    .dbb_projects {
        padding: 60px 0;
    }

    .dbb_projects .dbb_section-title {
        font-size: 30px;
    }

    .dbb_projects-header {
        flex-direction: column;

        align-items: flex-start;
    }

}


/* =========================================================
   RESPONSIVE - SMALL MOBILE
========================================================= */

@media (max-width: 600px) {

    .dbb_projects .dbb_container {
        width: min(100% - 24px, 1200px);
    }

    .dbb_projects-grid {
        grid-template-columns: 1fr;
    }

    .dbb_project-image {
        height: 220px;
    }

}



/* =========================================================
 * AJAX ERROR
 * ========================================================= */

.dbb_duan-ajax-error {
    margin: 20px 0;
}

.dbb_ajax-error-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;

    padding: 14px 18px;

    border: 1px solid #fecaca;
    border-radius: 12px;

    background: #fff7f7;

    color: #b91c1c;

    font-size: 14px;
    line-height: 1.5;
}

.dbb_ajax-error-message {
    display: inline-block;
}

.dbb_ajax-retry {
    appearance: none;
    border: 0;

    padding: 8px 14px;

    border-radius: 8px;

    background: #0077bd;
    color: #fff;

    font: inherit;
    font-size: 13px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background-color .2s ease,
        transform .2s ease;
}

.dbb_ajax-retry:hover {
    background: #005f98;
}

.dbb_ajax-retry:active {
    transform: translateY(1px);
}


/* =========================================================
 * EMPTY STATE
 * ========================================================= */

.dbb_projects-empty {
    grid-column: 1 / -1;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    min-height: 260px;

    padding: 40px 20px;

    text-align: center;

    border: 1px dashed #d9e1e8;
    border-radius: 18px;

    background: #fafcfe;
}

.dbb_projects-empty-icon {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 58px;
    height: 58px;

    margin-bottom: 16px;

    border-radius: 50%;

    background: #eef6fb;
    color: #0077bd;

    font-size: 22px;
}

.dbb_projects-empty h3 {
    margin: 0 0 8px;

    font-size: 18px;
    font-weight: 700;

    color: #142033;
}

.dbb_projects-empty p {
    margin: 0;

    max-width: 480px;

    color: #687386;

    font-size: 14px;
    line-height: 1.7;
}


/* =========================================================
 * PAGINATION
 * ========================================================= */

.dbb_projects-pagination-wrap {
    width: 100%;
}


/* =========================================================
 * ACCESSIBILITY / LOADING
 * ========================================================= */

/*.dbb_projects.dbb_filter-loading {
    pointer-events: none;
}
.dbb_projects.dbb_filter-loading .dbb_projects-grid {
    opacity: 1;
    transition: opacity .2s ease;
}

.dbb_projects.dbb_filter-loading .dbb_filter-btn {
    pointer-events: none;
}

.dbb_projects.dbb_filter-loading {
    cursor: wait;
}*/