/* Component dùng chung: tiêu đề section – Views/Shared/_TieuDeSection.cshtml
   Giá trị lấy đúng theo style thực tế của tiêu đề section ở Trang chủ (PC / ≤ 991.98px / ≤ 575.98px).
   Dùng class riêng cmp-tieude__* nên không bị CSS từng trang (section-head, section-tag…) ghi đè. */

.cmp-tieude {
    position: relative;
    box-sizing: border-box;
    max-width: 1440px;
    height: 40px;
    margin: 0 auto 14px;
    padding: 0 24px;
}

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

/* Đường chấm chạy ngang phía sau tiêu đề */
.cmp-tieude::after {
    content: "";
    position: absolute;
    left: 24px;
    right: 24px;
    top: 0;
    border-top: 2px dotted rgba(11, 75, 179, .55);
    z-index: 0;
}

.cmp-tieude__tag {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 56px;
    padding: 0 14px 0 0;
    background: #0B4BB3;
    border-radius: 0 0 10px 10px;
    color: #fff;
    white-space: nowrap;
}

.cmp-tieude__icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 0 0 10px 10px;
    background: #F59E0B;
}

.cmp-tieude__icon {
    display: block;
    width: 46px;
    height: 46px;
    object-fit: contain;
}

.cmp-tieude__text {
    line-height: 1;
    letter-spacing: .2px;
    text-transform: uppercase;
    color: #fff;
}

/* Trang không bọc tiêu đề trong .container (vd Chính sách nhân sự – layout riêng):
   chiếm đúng phần nội dung của .container layout chung (lề 7.5px; mốc 540 / 720 / 960 / 1440px). */
:not(.container) > .cmp-tieude {
    width: calc(100% - 15px);
}

@media (min-width: 576px) {
    :not(.container) > .cmp-tieude { max-width: 525px; }
}

@media (min-width: 768px) {
    :not(.container) > .cmp-tieude { max-width: 705px; }
}

@media (min-width: 992px) {
    :not(.container) > .cmp-tieude { max-width: 945px; }
}

@media (min-width: 1200px) {
    :not(.container) > .cmp-tieude { max-width: 1425px; }
}

/* Tablet (≤ 991.98px) */
@media (max-width: 991.98px) {
    .cmp-tieude {
        height: 44px;
        margin: 0 auto 12px;
        padding: 0 16px;
    }

    .cmp-tieude::after {
        left: 16px;
        right: 16px;
    }

    .cmp-tieude__tag {
        left: 16px;
        height: 44px;
        gap: 8px;
        padding: 0 12px 0 0;
    }

    .cmp-tieude__icon-box {
        width: 44px;
        height: 44px;
    }

    .cmp-tieude__icon {
        width: 34px;
        height: 34px;
    }

    .cmp-tieude__text {
    }
}

/* Mobile (≤ 575.98px) */
@media (max-width: 575.98px) {
    .cmp-tieude {
        height: 40px;
        margin: 0 auto 10px;
        padding: 0 12px;
    }

    .cmp-tieude::after {
        left: 12px;
        right: 12px;
    }

    .cmp-tieude__tag {
        left: 12px;
        height: 40px;
        gap: 6px;
        padding: 0 10px 0 0;
        max-width: calc(100% - 24px);
        overflow: hidden;
    }

    .cmp-tieude__icon-box {
        width: 40px;
        height: 40px;
    }

    .cmp-tieude__icon {
        width: 30px;
        height: 30px;
    }

    /* Co theo bề rộng màn để tiêu đề dài (VD "VNVC HÌNH THÀNH & PHÁT TRIỂN") không bị cắt ở 360–390px */
    .cmp-tieude__text {
        text-overflow: ellipsis;
    }
}
