﻿/* ==================== ARTICLE DETAIL PAGE - CHI TIẾT BÀI VIẾT ==================== */
/* Design: SỬ DỤNG CSS VARIABLES TỪ ASHICO: --ashico-blue, --ashico-red */
/* Font: Plus Jakarta Sans (body), Inter (heading) - GIỐNG CÁC TRANG KHÁC */

/* ==================== PAGE LAYOUT ==================== */
.article-detail-content {
    padding: 30px 0 50px;
    background: #f8f9fa;
}

/* ==================== ARTICLE HEADER ==================== */
.article-header {
    background: #fff;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.06);
    border-left: 4px solid var(--ashico-blue, #034ea2);
}

.article-header__category {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.article-header__category .badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, var(--ashico-blue, #034ea2), #023d82);
    color: #fff;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-header__category .badge--pinned {
    background: linear-gradient(135deg, var(--ashico-red, #ec2028), #c41e22);
}

.article-header__category .badge--pinned i {
    font-size: 10px;
}

.article-header__title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: #1a1a1a;
    line-height: 1.3;
    margin: 0 0 15px 0;
}

.article-header__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 13px;
    color: #666;
}

.article-header__meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.article-header__meta i {
    font-size: 14px;
}

.article-header__author {
    color: var(--ashico-blue, #034ea2);
    font-weight: 600;
}

.article-header__author i {
    color: var(--ashico-blue, #034ea2);
}

.article-header__date {
    color: #888;
}

.article-header__date i {
    color: var(--ashico-red, #ec2028);
}

.article-header__views {
    color: #888;
}

.article-header__views i {
    color: #28a745;
}

/* ==================== FEATURED IMAGE ==================== */
.article-featured-image {
    margin-bottom: 25px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.article-featured-image img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    display: block;
}

/* ==================== ARTICLE BODY ==================== */
.article-body {
    background: #fff;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.06);
}

/* Excerpt / Lead paragraph */
.article-excerpt {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.article-excerpt p {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #333 !important;
    line-height: 1.7 !important;
    margin: 0;
    font-style: italic;
}

/* ==================== ARTICLE CONTENT - FORCE ASHICO STYLE ==================== */
/* Override ALL inline styles from Rich Text Editor */

.article-content {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 14px;
    color: #444;
    line-height: 1.8;
}

/* Force font cho TẤT CẢ elements trong content */
.article-content *,
.article-content p,
.article-content span,
.article-content div,
.article-content li,
.article-content td,
.article-content th,
.article-content a,
.article-content strong,
.article-content em,
.article-content b,
.article-content i:not(.fa):not(.fas):not(.far):not(.fab):not(.ti) {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

/* Override inline font-family từ Rich Text Editor */
.article-content [style*="font-family"],
.article-content span[style*="font-family"],
.article-content p[style*="font-family"],
.article-content div[style*="font-family"] {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

/* Override inline font-size từ Rich Text Editor - giữ tỷ lệ hợp lý */
.article-content [style*="font-size"],
.article-content span[style*="font-size"],
.article-content p[style*="font-size"] {
    font-size: inherit !important;
}

/* Paragraph styling */
.article-content p {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 14px !important;
    color: #444 !important;
    line-height: 1.8 !important;
    margin-bottom: 18px !important;
}

/* Headings - FORCE Plus Jakarta Sans */
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    margin-top: 30px !important;
    margin-bottom: 15px !important;
    line-height: 1.3 !important;
}

.article-content h1 {
    font-size: 26px !important;
}

.article-content h2 {
    font-size: 22px !important;
    color: var(--ashico-blue, #034ea2) !important;
    padding-bottom: 10px !important;
    border-bottom: 2px solid var(--ashico-blue, #034ea2) !important;
}

.article-content h3 {
    font-size: 18px !important;
    color: #333 !important;
}

.article-content h4 {
    font-size: 16px !important;
    color: #444 !important;
}

.article-content h5 {
    font-size: 14px !important;
    color: #555 !important;
}

.article-content h6 {
    font-size: 12px !important;
    color: #666 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Strong / Bold */
.article-content strong,
.article-content b {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-weight: 700 !important;
    color: #333 !important;
}

/* Italic / Emphasis */
.article-content em,
.article-content i:not(.fa):not(.fas):not(.far):not(.fab):not(.ti) {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-style: italic !important;
}

/* Images - căn giữa, có shadow */
.article-content img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px !important;
    margin: 20px auto !important;
    display: block !important;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1) !important;
}

/* Links */
.article-content a {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
    color: var(--ashico-blue, #034ea2) !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: color 0.3s ease !important;
}

.article-content a:hover {
    color: var(--ashico-red, #ec2028) !important;
    text-decoration: underline !important;
}

/* Lists */
.article-content ul,
.article-content ol {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
    margin-bottom: 18px !important;
    padding-left: 25px !important;
}

.article-content li {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 14px !important;
    color: #444 !important;
    margin-bottom: 8px !important;
    line-height: 1.7 !important;
}

.article-content ul li::marker {
    color: var(--ashico-blue, #034ea2) !important;
}

.article-content ol li::marker {
    color: var(--ashico-red, #ec2028) !important;
    font-weight: 700 !important;
}

/* Blockquote */
.article-content blockquote {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
    background: linear-gradient(135deg, rgba(3, 78, 162, 0.05), rgba(3, 78, 162, 0.02)) !important;
    border-left: 4px solid var(--ashico-blue, #034ea2) !important;
    padding: 20px 25px !important;
    margin: 25px 0 !important;
    border-radius: 0 8px 8px 0 !important;
    font-style: italic !important;
    color: #555 !important;
}

.article-content blockquote p {
    margin: 0 !important;
    font-style: italic !important;
}

/* Tables */
.article-content table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 20px 0 !important;
    font-size: 13px !important;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

.article-content table th,
.article-content table td {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
    border: 1px solid #e0e0e0 !important;
    padding: 12px 15px !important;
    text-align: left !important;
}

.article-content table th {
    background: var(--ashico-blue, #034ea2) !important;
    color: #fff !important;
    font-weight: 600 !important;
}

.article-content table tr:nth-child(even) {
    background: #f8f9fa !important;
}

.article-content table tr:hover {
    background: rgba(3, 78, 162, 0.05) !important;
}

/* Code blocks */
.article-content pre,
.article-content code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace !important;
    background: #f4f4f4 !important;
    border-radius: 4px !important;
}

.article-content pre {
    padding: 15px 20px !important;
    margin: 20px 0 !important;
    overflow-x: auto !important;
    font-size: 12px !important;
    line-height: 1.6 !important;
}

.article-content code {
    padding: 2px 6px !important;
    font-size: 12px !important;
    color: var(--ashico-red, #ec2028) !important;
}

/* HR / Divider */
.article-content hr {
    border: none !important;
    height: 2px !important;
    background: linear-gradient(90deg, var(--ashico-blue, #034ea2), var(--ashico-red, #ec2028)) !important;
    margin: 30px 0 !important;
    border-radius: 2px !important;
}

/* ==================== TAGS ==================== */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    background: #fff;
    border-radius: 10px;
    padding: 20px 25px;
    margin-bottom: 20px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.06);
}

.article-tags__label {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-tags__label i {
    color: var(--ashico-blue, #034ea2);
}

.article-tags__item {
    display: inline-block;
    background: #f0f0f0;
    color: #555;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 12px;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.article-tags__item:hover {
    background: var(--ashico-blue, #034ea2);
    color: #fff;
}

/* ==================== SHARE BUTTONS ==================== */
.article-share {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #fff;
    border-radius: 10px;
    padding: 20px 25px;
    margin-bottom: 30px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.06);
}

.article-share__label {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #333;
}

.article-share__buttons {
    display: flex;
    gap: 10px;
}

.article-share__btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.article-share__btn.facebook {
    background: #1877f2;
}

.article-share__btn.facebook:hover {
    background: #0d65d9;
    transform: translateY(-3px);
}

.article-share__btn.twitter {
    background: #1da1f2;
}

.article-share__btn.twitter:hover {
    background: #0c8de4;
    transform: translateY(-3px);
}

.article-share__btn.linkedin {
    background: #0077b5;
}

.article-share__btn.linkedin:hover {
    background: #005e94;
    transform: translateY(-3px);
}

/* ==================== RELATED ARTICLES ==================== */
.related-articles {
    background: #fff;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.06);
}

.related-articles__title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--ashico-blue, #034ea2);
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.related-articles__title i {
    color: var(--ashico-red, #ec2028);
}

.related-articles__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.related-article-card {
    display: flex;
    gap: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.related-article-card:hover {
    background: #fff;
    border-color: var(--ashico-blue, #034ea2);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.related-article-card__img {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
}

.related-article-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-article-card__content {
    flex: 1;
    min-width: 0;
}

.related-article-card__title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.related-article-card:hover .related-article-card__title {
    color: var(--ashico-blue, #034ea2);
}

.related-article-card__date {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 11px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 5px;
}

.related-article-card__date i {
    color: var(--ashico-red, #ec2028);
    font-size: 10px;
}

/* ==================== BACK BUTTON ==================== */
.article-back {
    text-align: center;
    margin-top: 25px;
}

.article-back .thm-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--ashico-blue, #034ea2);
    color: #fff;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
}

.article-back .thm-btn:hover {
    background: #023d82;
    transform: translateY(-2px);
    color: #fff;
}

.article-back .thm-btn i {
    font-size: 12px;
}

/* ==================== EMPTY STATE ==================== */
.article-empty {
    text-align: center;
    padding: 80px 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.06);
}

.article-empty__icon {
    font-size: 70px;
    color: #dee2e6;
    margin-bottom: 25px;
}

.article-empty h4 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #495057;
    margin: 0 0 12px 0;
}

.article-empty p {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    color: #6c757d;
    margin: 0 0 25px 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.article-empty .thm-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--ashico-blue, #034ea2);
    color: #fff;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 25px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.article-empty .thm-btn:hover {
    background: #023d82;
    color: #fff;
}

/* ==================== RESPONSIVE ==================== */

/* Full HD (≥1920px) */
@media (min-width: 1920px) {
    .article-header__title {
        font-size: 32px;
    }
    
    .article-content {
        font-size: 15px !important;
    }
    
    .article-content p {
        font-size: 15px !important;
    }
    
    .article-content li {
        font-size: 15px !important;
    }
    
    .article-content h1 {
        font-size: 30px !important;
    }
    
    .article-content h2 {
        font-size: 26px !important;
    }
    
    .article-content h3 {
        font-size: 22px !important;
    }
    
    .article-content h4 {
        font-size: 18px !important;
    }
    
    .article-featured-image img {
        max-height: 600px;
    }
}

/* Desktop (1366-1919px) */
@media (min-width: 1366px) and (max-width: 1919px) {
    .article-header__title {
        font-size: 26px;
    }
    
    .article-content {
        font-size: 14px !important;
    }
    
    .article-content p {
        font-size: 14px !important;
    }
}

/* Laptop (992-1365px) */
@media (min-width: 992px) and (max-width: 1365px) {
    .article-header {
        padding: 20px;
    }
    
    .article-header__title {
        font-size: 24px;
    }
    
    .article-body {
        padding: 25px;
    }
    
    .article-content {
        font-size: 13px !important;
    }
    
    .article-content p {
        font-size: 13px !important;
    }
    
    .article-content li {
        font-size: 13px !important;
    }
    
    .article-content h1 {
        font-size: 22px !important;
    }
    
    .article-content h2 {
        font-size: 20px !important;
    }
    
    .article-content h3 {
        font-size: 16px !important;
    }
    
    .article-content h4 {
        font-size: 14px !important;
    }
    
    .related-articles__grid {
        grid-template-columns: 1fr;
    }
}

/* Tablet (768-991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .article-detail-content {
        padding: 25px 0 40px;
    }
    
    .article-header {
        padding: 18px;
    }
    
    .article-header__title {
        font-size: 22px;
    }
    
    .article-header__meta {
        gap: 15px;
        font-size: 12px;
    }
    
    .article-body {
        padding: 20px;
    }
    
    .article-excerpt p {
        font-size: 14px !important;
    }
    
    .article-content {
        font-size: 13px !important;
    }
    
    .article-content p {
        font-size: 13px !important;
    }
    
    .article-content li {
        font-size: 13px !important;
    }
    
    .article-content h1 {
        font-size: 20px !important;
    }
    
    .article-content h2 {
        font-size: 18px !important;
    }
    
    .article-content h3 {
        font-size: 15px !important;
    }
    
    .article-content h4 {
        font-size: 13px !important;
    }
    
    .article-featured-image img {
        max-height: 350px;
    }
    
    .related-articles__grid {
        grid-template-columns: 1fr;
    }
    
    .article-tags,
    .article-share {
        padding: 15px 20px;
    }
}

/* Mobile (≤767px) */
@media (max-width: 767px) {
    .article-detail-content {
        padding: 20px 0 35px;
    }
    
    .article-header {
        padding: 15px;
        margin-bottom: 15px;
        border-left-width: 3px;
    }
    
    .article-header__category .badge {
        font-size: 10px;
        padding: 4px 10px;
    }
    
    .article-header__title {
        font-size: 20px;
        margin-bottom: 12px;
    }
    
    .article-header__meta {
        flex-direction: column;
        gap: 8px;
        font-size: 12px;
    }
    
    .article-featured-image {
        margin-bottom: 15px;
        border-radius: 8px;
    }
    
    .article-featured-image img {
        max-height: 250px;
    }
    
    .article-body {
        padding: 18px;
        margin-bottom: 15px;
    }
    
    .article-excerpt {
        margin-bottom: 18px;
        padding-bottom: 15px;
    }
    
    .article-excerpt p {
        font-size: 13px !important;
    }
    
    .article-content {
        font-size: 13px !important;
        line-height: 1.7 !important;
    }
    
    .article-content p {
        font-size: 13px !important;
        line-height: 1.7 !important;
    }
    
    .article-content li {
        font-size: 13px !important;
    }
    
    .article-content h1 {
        font-size: 18px !important;
        margin-top: 25px !important;
    }
    
    .article-content h2 {
        font-size: 16px !important;
        margin-top: 25px !important;
    }
    
    .article-content h3 {
        font-size: 14px !important;
    }
    
    .article-content h4 {
        font-size: 13px !important;
    }
    
    .article-content blockquote {
        padding: 15px 18px !important;
        margin: 20px 0 !important;
    }
    
    .article-content table {
        font-size: 11px !important;
    }
    
    .article-content table th,
    .article-content table td {
        padding: 8px 10px !important;
    }
    
    .article-tags {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .article-tags__label {
        font-size: 13px;
    }
    
    .article-tags__item {
        font-size: 11px;
        padding: 4px 10px;
    }
    
    .article-share {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .article-share__btn {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }
    
    .related-articles {
        padding: 18px;
        margin-bottom: 20px;
    }
    
    .related-articles__title {
        font-size: 16px;
        margin-bottom: 15px;
        padding-bottom: 10px;
    }
    
    .related-articles__grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .related-article-card {
        padding: 10px;
    }
    
    .related-article-card__img {
        width: 70px;
        height: 52px;
    }
    
    .related-article-card__title {
        font-size: 12px;
        margin-bottom: 6px;
    }
    
    .related-article-card__date {
        font-size: 10px;
    }
    
    .article-back {
        margin-top: 20px;
    }
    
    .article-back .thm-btn {
        padding: 10px 22px;
        font-size: 13px;
    }
    
    .article-empty {
        padding: 50px 20px;
    }
    
    .article-empty__icon {
        font-size: 55px;
        margin-bottom: 20px;
    }
    
    .article-empty h4 {
        font-size: 18px;
    }
    
    .article-empty p {
        font-size: 13px;
    }
    
    .article-empty .thm-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* Extra Small Mobile (≤480px) */
@media (max-width: 480px) {
    .article-header__title {
        font-size: 18px;
    }
    
    .article-content {
        font-size: 12px !important;
    }
    
    .article-content p {
        font-size: 12px !important;
    }
    
    .article-content li {
        font-size: 12px !important;
    }
    
    .article-content h1 {
        font-size: 16px !important;
    }
    
    .article-content h2 {
        font-size: 14px !important;
    }
    
    .article-content h3 {
        font-size: 13px !important;
    }
    
    .article-content h4 {
        font-size: 12px !important;
    }
    
    .article-featured-image img {
        max-height: 200px;
    }
    
    .related-article-card__img {
        width: 60px;
        height: 45px;
    }
}