/* =========================================================================
   TIS — article.css: trang chuyên mục (dạng danh sách) và chi tiết bài viết
   ========================================================================= */

/* ---------- Chuyên mục dạng danh sách (T03) ---------- */
.list-item { margin-bottom: 1rem; }
.list-item-title { margin-bottom: 1rem; }
.list-item-title a { color: var(--text-primary); }
.list-item-photo { margin-bottom: 1rem; }
@media (min-width: 768px) {
    .list-item-photo { float: left; margin-bottom: 0; margin-right: 1rem; }
}
@media (min-width: 992px) { .list-item { margin-bottom: 3rem; } }

/* ---------- Chi tiết bài viết ---------- */
.story-detail { clear: both; font-family: Arial, sans-serif; font-size: 18px; font-weight: 400; color: #333; }
.story-detail-default { margin-bottom: 1.5rem; }
.story-headline { font-size: 36px; font-weight: 700; line-height: 1.4; margin-bottom: 1rem; }
.story-teaser { clear: both; margin-bottom: 1rem; line-height: 1.6; font-weight: 700; color: #121212; }
.story-teaser p { margin-bottom: 0 !important; }
.story-teaser-normal { font-weight: 400; }

.story-body {
    clear: both;
    margin-bottom: 1rem;
    line-height: 1.5;
    color: #121212 !important;
    inline-size: fit-content;
    max-width: 100%; /* site cũ không có dòng này nên nội dung dài bị tràn ngang */
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}
.story-body p { margin-bottom: 1rem; }
.story-body img { max-width: 100% !important; height: auto !important; }
.story-body table { width: 100% !important; max-width: 100% !important; table-layout: auto; border-collapse: collapse; }
.story-body ul { margin: 0; padding: 0 0 0 40px; }
.story-body ul li { margin: 0; padding: 0; }
.story-body strong, .story-body b { font-weight: bolder; }
.story-body a, .story-body a:hover, a.story-source { color: var(--c-primary) !important; }
.story-body a { text-decoration: none; }
.story-body a:hover { text-decoration: underline !important; }
.story-detail video { width: 100% !important; height: auto !important; max-width: 100%; }
.story-detail audio { width: 100% !important; height: 54px !important; max-width: 100%; }
.block-image, .block-video { clear: both; display: block; margin-left: auto; margin-right: auto; margin-bottom: 1rem; }
.block-image img { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.block-video video { width: 100%; height: auto; }
.photo-desc { padding: .75rem .5rem 0; text-align: center; font-style: italic; color: var(--c-primary); }

.story-author, .story-source { text-align: right; margin: 0 !important; }
.story-author { font-weight: 700; color: #404040; }
.story-source { font-weight: 400; font-style: italic; color: #333; }
.story-tags { clear: both; margin-bottom: 1rem; color: #333; }

/* Khối "bài liên quan" chèn trong nội dung và danh sách "Giải pháp liên quan" */
.relative-block { clear: both; padding: .75rem .5rem; border-left: 5px solid var(--c-border); background-color: var(--c-light); }
.relative-list, .relative-list-item { list-style: none; margin: 0 !important; clear: both; }
.relative-list { display: block; padding: 0 !important; }
.relative-list-item { display: block; position: relative; z-index: 0; padding: 0 0 0 24px !important; }
.relative-list-link { display: block; font-weight: 400; color: var(--text-primary); }
.relative-list-link::after {
    content: "";
    display: block;
    position: absolute;
    z-index: 0;
    left: 10px;
    top: 10px;
    width: 4px;
    height: 4px;
    background-color: #666;
}

/* ---------- Bố cục trang Giải pháp ---------- */
.solution-top { display: grid; grid-template-columns: minmax(0, 1fr); margin-bottom: 1.5rem; }
.solution-related { margin-bottom: 1rem; }
.solution-gallery { display: grid; grid-template-columns: minmax(0, 1fr); }
.solution-gallery-photo img { display: block; }
.solution-bottom { display: grid; grid-template-columns: minmax(0, 1fr); }
.solution-products { order: 1; margin-bottom: 1rem; }
.solution-detail { order: 0; min-width: 0; }
.solution-detail-inner { margin-bottom: 1.5rem; }
.solution-products-grid { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 1.5rem; }
.solution-product { margin-bottom: 1rem; }
.solution-product h1 { font-size: 100%; }
@media (min-width: 576px) { .solution-products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 768px) { .solution-products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 992px) {
    .solution-top { grid-template-columns: calc((100% + 1.5rem) * 5 / 12 - 1.5rem) minmax(0, 1fr); column-gap: 1.5rem; }
    .solution-gallery { grid-template-columns: calc((100% + 1rem) / 3 - 1rem) minmax(0, 1fr); column-gap: 1rem; }
    .solution-bottom { grid-template-columns: calc((100% + 1.5rem) / 4 - 1.5rem) minmax(0, 1fr); column-gap: 1.5rem; }
    .solution-products { order: 0; }
    .solution-detail { order: 1; }
    .solution-products-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 1400px) {
    .solution-top { grid-template-columns: calc((100% + 2rem) * 5 / 12 - 2rem) minmax(0, 1fr); column-gap: 2rem; }
    .solution-bottom { grid-template-columns: calc((100% + 2rem) / 4 - 2rem) minmax(0, 1fr); column-gap: 2rem; }
}

/* File đính kèm */
.solution-attachments { margin-bottom: 1rem; }
.attachment-list-link { color: var(--text-primary); }
.me-1 { margin-right: .25rem; }
