/* Chi tiết tin tức — đồng bộ với danh sách tin C22 */
.news-detail-page {
    font-family: 'SVN-Gilroy', sans-serif;
    overflow-x: clip;
    padding-bottom: clamp(2rem, 5vw, 3.5rem);
}

/* Breadcrumb */
.news-detail-breadcrumb {
    margin-bottom: 1.25rem;
}

.news-detail-breadcrumb .breadcrumb {
    --bs-breadcrumb-divider: "";
    display: flex;
    flex-wrap: nowrap;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0;
    padding-bottom: 0.15rem;
    margin-bottom: 0;
    font-size: 0.875rem;
}

.news-detail-breadcrumb .breadcrumb-item {
    flex: 0 0 auto;
}

.news-detail-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    padding: 0 0.45rem;
    color: #9ca3af;
    font-weight: 500;
}

.news-detail-breadcrumb__link {
    color: #269af2;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.news-detail-breadcrumb__link:hover {
    color: #fe7814;
}

.news-detail-breadcrumb .breadcrumb-item.active {
    color: #6b6b6b;
    min-width: 0;
}

/* Cột Bootstrap là flex item: cho phép co nhỏ để ảnh max-width hoạt động đúng */
.news-detail-page .row > [class*="col-"] {
    min-width: 0;
}

/* Article shell */
.news-detail-article {
    background: #fff;
    border-radius: 18px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
    padding: clamp(1.25rem, 3vw, 2rem);
    max-width: 100%;
    overflow-x: hidden;
}

.news-detail-header {
    margin-bottom: 1.25rem;
}

.news-detail-kicker {
    display: inline-flex;
    align-items: center;
    margin-bottom: 0.65rem;
    padding: 0.28rem 0.85rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(254, 120, 20, 0.1);
    color: #c45a0a;
}

.news-detail-title {
    font-size: clamp(1.35rem, 3.6vw, 2.05rem);
    font-weight: 700;
    line-height: 1.22;
    letter-spacing: -0.02em;
    color: #111;
    margin: 0;
}

/* Hero image */
.news-detail-figure {
    margin: 0 0 1.5rem;
    border-radius: 14px;
    overflow: hidden;
    background: #f0f2f5;
    aspect-ratio: 16 / 9;
}

.news-detail-figure__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Prose */
.news-detail-content.prose {
    font-size: 1rem;
    line-height: 1.75;
    color: #333;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-wrap: break-word;
}

.news-detail-content.prose > *:first-child {
    margin-top: 0;
}

.news-detail-content.prose > *:last-child {
    margin-bottom: 0;
}

.news-detail-content.prose p {
    margin-bottom: 1rem;
}

.news-detail-content.prose h2,
.news-detail-content.prose h3,
.news-detail-content.prose h4 {
    margin: 1.5rem 0 0.75rem;
    font-weight: 700;
    line-height: 1.3;
    color: #141414;
    letter-spacing: -0.01em;
}

.news-detail-content.prose h2 {
    font-size: 1.35rem;
}

.news-detail-content.prose h3 {
    font-size: 1.15rem;
}

.news-detail-content.prose ul,
.news-detail-content.prose ol {
    margin: 0 0 1rem;
    padding-left: 1.35rem;
}

.news-detail-content.prose li {
    margin-bottom: 0.35rem;
}

.news-detail-content.prose a {
    color: #269af2;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.news-detail-content.prose a:hover {
    color: #fe7814;
}

.news-detail-content.prose img,
.news-detail-content.prose video,
.news-detail-content.prose svg,
.news-detail-content.prose canvas {
    display: block;
    max-width: 100% !important;
    height: auto !important;
    border-radius: 12px;
    margin: 1rem auto;
    box-sizing: border-box;
}

/* Ảnh inline trong đoạn văn */
.news-detail-content.prose p img,
.news-detail-content.prose li img {
    display: inline-block;
    vertical-align: middle;
    margin: 0.25rem 0;
}

.news-detail-content.prose picture {
    display: block;
    max-width: 100%;
}

.news-detail-content.prose picture > img {
    margin-left: auto;
    margin-right: auto;
}

/* iframe / embed (video nhúng) */
.news-detail-content.prose iframe,
.news-detail-content.prose embed,
.news-detail-content.prose object {
    max-width: 100% !important;
    margin: 1rem auto;
    display: block;
    border: 0;
}

.news-detail-content.prose iframe {
    aspect-ratio: 16 / 9;
    height: auto;
    min-height: 200px;
}

.news-detail-content.prose figure {
    max-width: 100%;
    margin: 1rem 0;
}

.news-detail-content.prose figure img {
    margin-left: auto;
    margin-right: auto;
}

.news-detail-content.prose table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.news-detail-content.prose th,
.news-detail-content.prose td {
    overflow-wrap: anywhere;
    word-break: break-word;
    vertical-align: top;
}

.news-detail-content.prose pre {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.news-detail-content.prose blockquote {
    margin: 1.25rem 0;
    padding: 0.85rem 1rem 0.85rem 1rem;
    border-left: 4px solid #269af2;
    background: rgba(38, 154, 242, 0.06);
    border-radius: 0 10px 10px 0;
    color: #374151;
}

/* Footer CTA */
.news-detail-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.news-detail-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.5rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #fe7814, #e56d10);
    color: #fff !important;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none !important;
    box-shadow: 0 8px 22px rgba(254, 120, 20, 0.32);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.news-detail-cta:hover {
    transform: translateY(-2px);
    filter: brightness(1.03);
    box-shadow: 0 12px 28px rgba(254, 120, 20, 0.38);
    color: #fff !important;
}

/* Sidebar */
.news-detail-sidebar__sticky {
    position: sticky;
    top: 5.5rem;
    padding: 1.25rem 1.2rem 1.35rem;
    border-radius: 18px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

.news-detail-sidebar__title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    color: #141414;
    letter-spacing: -0.01em;
}

.news-detail-sidebar__empty {
    margin: 0;
    font-size: 0.9rem;
    color: #888;
    line-height: 1.5;
}

/* Related cards */
.news-related-card {
    display: flex;
    gap: 0.85rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1), transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.news-related-card:first-of-type {
    padding-top: 0;
}

.news-related-card:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.news-related-card.c22-news-detail-visible {
    opacity: 1;
    transform: translateY(0);
}

.news-related-card__thumb {
    flex: 0 0 88px;
    width: 88px;
    height: 88px;
    border-radius: 12px;
    overflow: hidden;
    background: #f0f2f5;
    flex-shrink: 0;
    transition: box-shadow 0.25s ease;
}

.news-related-card__thumb:hover {
    box-shadow: 0 6px 16px rgba(38, 154, 242, 0.2);
}

.news-related-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.news-related-card__thumb:hover img {
    transform: scale(1.06);
}

.news-related-card__body {
    min-width: 0;
    flex: 1;
}

.news-related-card__title {
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 0.35rem;
    letter-spacing: -0.01em;
}

.news-related-card__title a {
    color: #141414;
    text-decoration: none;
    transition: color 0.2s ease;
}

.news-related-card__title a:hover {
    color: #269af2;
}

.news-related-card__date {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    font-size: 0.8rem;
    color: #6b6b6b;
}

.news-related-card__date .bi {
    color: #9ca3af;
    font-size: 0.85rem;
}

@media (max-width: 991.98px) {
    .news-detail-sidebar__sticky {
        position: static;
        margin-top: 0.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .news-related-card {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .news-related-card__thumb img {
        transition: none;
    }

    .news-related-card__thumb:hover img {
        transform: none;
    }

    .news-detail-cta:hover {
        transform: none;
    }
}
