/* Tổng thể section */
.section-du-an {
    width: 100%;
    color: #171717; /* neutral-900 */
    overflow: hidden;
    position: relative;
    z-index: 20;
    padding-top: 6rem;
    padding-bottom: 6rem;
}
.section-du-an .du-an-container {
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
    padding-right: 0;
}
/* Phần Tiêu đề */
.section-du-an .du-an-header {
    text-align: center;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 3rem;
    padding:0 24px;
}
.section-du-an .du-an-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background-color: color-mix(in srgb, var(--mau-chinh) 10%, transparent);
    color: var(--mau-chinh);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    border: 1px solid color-mix(in srgb, var(--mau-chinh) 20%, transparent);
}
.section-du-an .du-an-title {
    font-size: 1.875rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 1rem;
}
@media (min-width: 640px) {
    .section-du-an .du-an-title {
        font-size: 2.25rem;
    }
}
@media (min-width: 1024px) {
    .section-du-an .du-an-title {
        font-size: 3rem;
        line-height: 1.3em;
    }
}
.section-du-an .du-an-desc {
    font-size: 1rem;
    color: #525252; /* neutral-600 */
}
@media (min-width: 640px) {
    .section-du-an .du-an-desc {
        font-size: 1.125rem;
    }
}
/* Lưới Dự Án */
.section-du-an .du-an-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
}
@media (min-width: 640px) {
    .section-du-an .du-an-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (min-width: 768px) {
    .section-du-an .du-an-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
@media (min-width: 1024px) {
    .section-du-an .du-an-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}
/* Từng Item trong lưới */
.section-du-an .du-an-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    cursor: pointer;
}
.section-du-an .du-an-item-hidden-sm {
    display: none;
}
@media (min-width: 640px) {
    .section-du-an .du-an-item-hidden-sm {
        display: block;
    }
}
/* Phần chữ placeholder hiển thị bên dưới ảnh */
.section-du-an .du-an-placeholder {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.75rem;
    color: #ffffff;
    transition: opacity 0.5s ease;
}
@media (min-width: 640px) {
    .section-du-an .du-an-placeholder {
        padding: 1.25rem;
    }
}
/* Khung bọc ảnh */
.section-du-an .du-an-img-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}
.section-du-an .du-an-img {
    width: 100%;
    height: auto;
    min-height:100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0, 0, 0.2, 1);
}
.section-du-an .du-an-item:hover .du-an-img {
    transform: scale(1.1);
}
/* Khung nội dung khi Hover */
.section-du-an .du-an-hover-box {
    position: absolute;
    inset: 0;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0.75rem;
    color: #ffffff;
    z-index: 20;
    overflow-y: auto;
}
@media (min-width: 640px) {
    .section-du-an .du-an-hover-box {
        padding: 1rem;
    }
}
.section-du-an .du-an-item:hover .du-an-hover-box {
    transform: translateY(0);
}
.section-du-an .du-an-link {
    position: absolute;
    inset: 0;
    z-index: 30;
}
/* Định dạng Tiêu đề và Mô tả bên trong Item */
.section-du-an .item-title {
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #DDD;
    margin-bottom: 1em;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
@media (min-width: 640px) {
    .section-du-an .item-title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
        -webkit-line-clamp: unset;
    }
}
.section-du-an .item-text-preview {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.375;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
@media (min-width: 640px) {
    .section-du-an .item-text-preview {
        font-size: 0.875rem;
        line-height: 1.5;
        -webkit-line-clamp: unset;
    }
}
.section-du-an .item-title-hover {
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #DDD;
    margin-bottom: 1em;
}
@media (min-width: 640px) {
    .section-du-an .item-title-hover {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
}
.section-du-an .item-text-detail {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.375;
}
@media (min-width: 640px) {
    .section-du-an .item-text-detail {
        font-size: 0.875rem;
        line-height: 1.5;
    }
}
/* Tag Group Name */
.section-du-an .item-group-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.4rem;
}
/* Ô liên hệ nổi bật chèn giữa lưới */
.section-du-an .du-an-contact-box {
    position: relative;
    overflow: hidden;
    background-color: var(--mau-chinh);
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
    color: #ffffff;
    z-index: 10;
    transition: all 0.7s cubic-bezier(0, 0, 0.2, 1);
}
@media (min-width: 640px) {
    .section-du-an .du-an-contact-box {
        padding: 1.25rem;
    }
}
.section-du-an .du-an-contact-box:hover {
    z-index: 30;
    transform: scale(1.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}
.section-du-an .contact-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.1);
    transition: background-color 0.5s ease;
}
.section-du-an .du-an-contact-box:hover .contact-overlay {
    background-color: transparent;
}
.section-du-an .contact-content {
    position: relative;
    z-index: 10;
    transition: transform 0.5s cubic-bezier(0, 0, 0.2, 1);
}
.section-du-an .contact-title {
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}
@media (min-width: 640px) {
    .section-du-an .contact-title {
        font-size: 1rem;
    }
}
.section-du-an .contact-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.75rem;
}
@media (min-width: 640px) {
    .section-du-an .contact-desc {
        font-size: 0.75rem;
        margin-bottom: 1rem;
    }
}
.section-du-an .contact-btn {
    display: inline-block;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    padding-top: 0.375rem;
    padding-bottom: 0.375rem;
    background-color: #ffffff;
    color: #171717;
    font-weight: 700;
    font-size: 11px;
    border-radius: 9999px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}
@media (min-width: 640px) {
    .section-du-an .contact-btn {
        padding-left: 1rem;
        padding-right: 1rem;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
        font-size: 0.75rem;
    }
}
.section-du-an .contact-btn:hover {
    transform: scale(1.1);
}
/* Hiệu ứng rung lắc (Animation) */
@keyframes shake-and-pause {
    0%, 100% {
        transform: rotate(0deg) scale(1.2);
    }
    3% {
        transform: rotate(-2deg) scale(1.03);
    }
    6% {
        transform: rotate(2deg) scale(1.05);
    }
    9% {
        transform: rotate(-1.5deg) scale(1.04);
    }
    12% {
        transform: rotate(1.5deg) scale(1.03);
    }
    16%, 100% {
        transform: rotate(0deg) scale(1);
    }
}
.section-du-an .attention-box {
    animation: shake-and-pause 6s ease-in-out infinite;
}
.section-du-an .attention-box:hover {
    animation-play-state: paused;
    transform: rotate(0deg) scale(1.1) !important;
}
/* Hiệu ứng mờ dần khi ảnh load xong */
.section-du-an .du-an-item img.lazy-fade {
    opacity: 0 !important;
    transform: scale(1.05);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}
.section-du-an .du-an-item img.lazy-fade.loaded {
    opacity: 1 !important;
    transform: scale(1);
}
/* Ẩn phần nội dung dự phòng khi ảnh đã load xong */
.section-du-an .du-an-item img.lazy-fade.loaded ~ .du-an-placeholder,
.section-du-an .du-an-item img.lazy-fade.loaded + .du-an-placeholder,
.section-du-an .du-an-item:has(img.lazy-fade.loaded) .du-an-placeholder {
    opacity: 0;
    pointer-events: none;
}
.section-du-an .du-an-placeholder {
    transition: opacity 0.8s ease-out;
}
/* Custom Scrollbar cho khung hover khi nội dung dài */
.section-du-an .custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}
.section-du-an .custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}
.section-du-an .custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.4);
    border-radius: 4px;
}
.section-du-an .custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.7);
}
@media (min-width:1500px){
    .section-du-an .item-title-hover { font-size:1.2rem; }
    .section-du-an .item-text-detail { font-size:1rem; }
}
/* Nút Xem tất cả dự án dưới phần header */
.du-an-header-action {
    margin-top: 1.25rem;
}
.du-an-all-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.5rem;
    border-radius: 9999px;
    background-color: transparent;
    border: 1px solid var(--mau-chinh);
    color: var(--mau-chinh);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.du-an-all-btn:hover {
    background-color: var(--mau-chinh);
    color: #fff;
    transform: translateY(-2px);
}
/* Nút Xem chi tiết trong khung hover: nền trắng, chữ trùng màu nền ngẫu nhiên được xử lý qua JS, bo tròn */
.du-an-action-wrap {
    margin-top: 1rem;
    position: relative;
    z-index: 35; /* Nằm trên thẻ a bọc ngoài để bấm được trực tiếp */
}
.du-an-detail-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    background-color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.25s ease;
}
.du-an-detail-btn:hover {
    background-color: #171717;
    color: #ffffff !important;
    transform: scale(1.05);
}
/* Đảm bảo thẻ a trùm toàn khung không chặn click của nút chi tiết */
.du-an-hover-box {
    position: relative;
}
.du-an-hover-box > .du-an-link {
    position: absolute;
    inset: 0;
    z-index: 30;
}