/* =============================================
   Dự Án – Inox Kim Thịnh  |  assets/css/du-an.css
   ============================================= */


/* ════════════════════════════════════════════
   ROW 1 – Wrapper trên
════════════════════════════════════════════ */
.section-du-an-top {
    padding: 32px 0 40px;
}

.du-an-row-top {
    align-items: flex-start;
}


/* ════════════════════════════════════════════
   CỘT TRÁI – Gallery
════════════════════════════════════════════ */
.du-an-col-gallery {
    /* Không đặt min-height cứng – để Flickity tự tính */
}

/* ── Wrapper bao ngoài (Flatsome cần .slider-wrapper) ── */
.du-an-slider-wrapper {
    border-radius: 8px;
    /* overflow KHÔNG được đặt ở đây – Flickity tự quản lý viewport */
    box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
    background: #dde3ec;
    line-height: 0;
}

/* ── MAIN SLIDER ──
 * - KHÔNG overflow:hidden ở đây → Flickity sẽ đặt trên .flickity-viewport
 * - Dùng padding-top trick thay vì aspect-ratio để tránh khoảng trắng
 *   khi Flickity chưa tính xong chiều cao
 */
.du-an-slider-main {
    border-radius: 8px;
    line-height: 0;
    background: #dde3ec;
    /* Đặt chiều cao tối thiểu bằng padding-top để tránh layout shift */
    position: relative;
}

/* Flickity viewport – đây mới là nơi clip đúng */
.du-an-slider-main .flickity-viewport {
    border-radius: 8px;
    /* overflow:hidden Flickity tự đặt */
}

/* Slide chính */
.du-an-slide-main-cell {
    width: 100%;
    line-height: 0;
}

.du-an-slide-main-cell img {
    width: 100%;
    /* padding-top trick thay aspect-ratio: Flickity đọc chiều cao img để tính viewport */
    display: block;
    height: auto;
    /* aspect-ratio chỉ dùng như gợi ý, không lock cứng */
    aspect-ratio: 4 / 3;
    object-fit: cover;
}


/* ── THUMB NAV SLIDER ──
 * Trước khi Flickity init: ẩn bằng visibility để không bị flash layout vỡ
 * Sau khi init (Flickity thêm class .flickity-enabled): hiển thị
 */
.du-an-slider-nav {
    margin-top: 10px;
    /* Ẩn trước khi Flickity init để tránh flash layout vỡ */
    visibility: hidden;
    min-height: 0;
}

/* Hiện khi Flickity đã init xong */
.du-an-slider-nav.flickity-enabled {
    visibility: visible;
}

.du-an-slider-nav img{
    border: 2px solid transparent;
}

.du-an-slide-nav-cell.is-selected img{
    border-color: #1a2e4a;
    opacity: 1;
}

.du-an-slide-nav-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

/* Fallback khi không có ảnh */
.du-an-no-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7a8aa0;
    font-size: .9rem;
    background: #dde3ec;
    border-radius: 8px;
}


/* ════════════════════════════════════════════
   CỘT PHẢI – Info box
════════════════════════════════════════════ */
.du-an-col-info {
    display: flex;
    flex-direction: column;
}

.du-an-info-box {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
    padding: 4px 0 0;
}

.du-an-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.du-an-cat-tag {
    display: inline-block;
    background: #1a2e4a;
    color: #fff !important;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    padding: 4px 14px;
    border-radius: 20px;
    text-decoration: none !important;
    transition: background .2s;
    line-height: 1.6;
}

.du-an-cat-tag:hover {
    background: #2a4a6e;
}

.du-an-title {
    font-size: clamp(1.4rem, 2.4vw, 2rem);
    color: #1a2e4a;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: .01em;
    margin: 0;
}

.du-an-excerpt {
    color: #4a5f75;
    line-height: 1.8;
    font-size: .97rem;
}

.du-an-excerpt p {
    margin: 0;
}

.du-an-cta {
    margin-top: auto;
    padding-top: 8px;
}

.du-an-btn-contact {
    display: inline-block;
    background: #1a2e4a !important;
    color: #fff !important;
    border: none !important;
    padding: 12px 32px !important;
    border-radius: 5px;
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: .03em;
    text-decoration: none !important;
    transition: background .2s, transform .15s, box-shadow .2s;
    box-shadow: 0 2px 8px rgba(26, 46, 74, .25);
}

.du-an-btn-contact:hover {
    background: #2a4a6e !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(26, 46, 74, .3);
}


/* ════════════════════════════════════════════
   ROW 2 – Nội dung chi tiết full-width
════════════════════════════════════════════ */
.section-du-an-body {
    padding: 40px 0 56px;
    background: #f8fafc;
    border-top: 1px solid #e4eaf2;
    border-bottom: 1px solid #e4eaf2;
}

.du-an-body-inner {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e4eaf2;
    padding: 36px 40px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .05);
}

.du-an-body-content {
    color: #333;
    font-size: .97rem;
    line-height: 1.85;
}

.du-an-body-content h2,
.du-an-body-content h3,
.du-an-body-content h4 {
    color: #1a2e4a;
    margin-top: 1.6em;
    margin-bottom: .6em;
}

.du-an-body-content h2 {
    font-size: 1.35rem;
}

.du-an-body-content h3 {
    font-size: 1.15rem;
}

.du-an-body-content ul,
.du-an-body-content ol {
    padding-left: 1.5em;
    margin-bottom: 1em;
}

.du-an-body-content li {
    margin-bottom: .4em;
}

.du-an-body-content p:last-child,
.du-an-body-content ul:last-child,
.du-an-body-content ol:last-child {
    margin-bottom: 0;
}

.du-an-body-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.du-an-body-content a {
    color: #1a2e4a;
    text-decoration: underline;
}

.du-an-body-content a:hover {
    color: #2a4a6e;
}


/* ════════════════════════════════════════════
   ROW 3 – Dự án liên quan
════════════════════════════════════════════ */
.section-du-an-related {
    padding: 52px 0 64px;
    background: #f4f7fb;
}

.du-an-related-title {
    color: #1a2e4a;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0;
}

.du-an-card {
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .07);
    transition: box-shadow .2s, transform .2s;
}

.du-an-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, .13);
    transform: translateY(-4px);
}

.du-an-card a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.du-an-card-img {
    width: 100% !important;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
}

.du-an-card-body {
    padding: 14px 16px;
}

.du-an-card-body h3 {
    color: #1a2e4a;
    margin: 0;
    font-size: 1rem;
    line-height: 1.4;
}


/* ════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════ */
@media (max-width: 960px) {
    .du-an-body-inner {
        padding: 28px;
    }
}

@media (max-width: 640px) {
    .section-du-an-top {
        padding: 24px 0 32px;
    }

    .section-du-an-body {
        padding: 28px 0 40px;
    }

    .du-an-col-info {
        margin-top: 24px;
    }

    .du-an-title {
        font-size: 1.35rem;
    }

    .du-an-body-inner {
        padding: 20px 18px;
        border-radius: 6px;
    }

    .du-an-btn-contact {
        width: 100%;
        text-align: center;
    }
}