/* ==========================================================================
   LTIA PLATFORM - CMS CONTENT STANDARDS & RESPONSIVE RESILIENCE STYLESHEET
   Cảng Hàng Không Quốc Tế Long Thành (LTIA.ERP & LongThanhAirport-Website)
   Đảm bảo 100% nội dung thêm từ CMS không làm vỡ giao diện trên mọi thiết bị
   ========================================================================== */

/* 1. LỚP ĐẠI DIỆN NỘI DUNG CMS (CMS Content Containers) */
.article-content,
.content-wrapper,
.about-text,
.procurement-cms-custom-content,
.press-release-cms-content,
.service-section,
.caution-box,
.faq-answer,
.job-description-content,
.cms-rich-content {
    font-family: var(--font-primary, 'ACV Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif) !important;
    font-size: 1.05rem;
    line-height: 1.75;
    color: #334155;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    hyphens: auto;
}

/* 2. TYPOGRAPHY & ĐẦU MỤC (Headings) */
.article-content h1, .content-wrapper h1, .about-text h1, .procurement-cms-custom-content h1, .press-release-cms-content h1,
.article-content h2, .content-wrapper h2, .about-text h2, .procurement-cms-custom-content h2, .press-release-cms-content h2,
.article-content h3, .content-wrapper h3, .about-text h3, .procurement-cms-custom-content h3, .press-release-cms-content h3,
.article-content h4, .content-wrapper h4, .about-text h4, .procurement-cms-custom-content h4, .press-release-cms-content h4,
.article-content h5, .content-wrapper h5, .about-text h5, .procurement-cms-custom-content h5, .press-release-cms-content h5,
.article-content h6, .content-wrapper h6, .about-text h6, .procurement-cms-custom-content h6, .press-release-cms-content h6 {
    font-family: var(--font-primary, 'ACV Sans', sans-serif) !important;
    color: #0f172a;
    font-weight: 700;
    line-height: 1.35;
    margin-top: 2rem;
    margin-bottom: 0.85rem;
    letter-spacing: -0.01em;
}

.article-content h2, .content-wrapper h2, .about-text h2, .procurement-cms-custom-content h2, .press-release-cms-content h2 {
    font-size: 1.65rem;
    color: #1e3a8a;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.article-content h3, .content-wrapper h3, .about-text h3, .procurement-cms-custom-content h3, .press-release-cms-content h3 {
    font-size: 1.35rem;
    color: #1e40af;
    border-left: 4px solid #c59b27;
    padding-left: 0.75rem;
}

.article-content h4, .content-wrapper h4, .about-text h4, .procurement-cms-custom-content h4, .press-release-cms-content h4 {
    font-size: 1.15rem;
    color: #0f172a;
}

/* 3. ĐOẠN VĂN & LIÊN KẾT (Paragraphs & Links) */
.article-content p, .content-wrapper p, .about-text p, .procurement-cms-custom-content p, .press-release-cms-content p {
    margin-bottom: 1.35rem;
    text-align: justify;
}

.article-content a, .content-wrapper a, .about-text a, .procurement-cms-custom-content a, .press-release-cms-content a {
    color: #0284c7;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.article-content a:hover, .content-wrapper a:hover, .about-text a:hover, .procurement-cms-custom-content a:hover, .press-release-cms-content a:hover {
    color: #1e3a8a;
}

/* 4. HÌNH ẢNH & CHÚ THÍCH (Resilient Images & Figcaptions) */
/* Đảm bảo hình ảnh không bao giờ tràn ra ngoài khung hoặc bị kéo dãn vỡ nét */
.article-content img,
.content-wrapper img,
.about-text img,
.procurement-cms-custom-content img,
.press-release-cms-content img,
.service-section img {
    max-width: 100% !important;
    height: auto !important;
    object-fit: cover;
    border-radius: 10px;
    margin: 1.25rem auto;
    display: block;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

.article-content figure,
.content-wrapper figure,
.about-text figure,
.procurement-cms-custom-content figure,
.press-release-cms-content figure {
    margin: 1.5rem auto !important;
    max-width: 100% !important;
    text-align: center;
}

.article-content figcaption,
.content-wrapper figcaption,
.about-text figcaption,
.procurement-cms-custom-content figcaption,
.press-release-cms-content figcaption {
    font-size: 0.875rem;
    color: #64748b;
    font-style: italic;
    margin-top: 0.5rem;
    text-align: center;
    line-height: 1.4;
}

/* Hỗ trợ hình ảnh căn lề trái/phải từ CKEditor / TinyMCE */
.article-content .image-style-side,
.content-wrapper .image-style-side {
    float: right;
    max-width: 50% !important;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.article-content .image-style-align-left,
.content-wrapper .image-style-align-left {
    float: left;
    max-width: 50% !important;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

/* Clearfix tự động để chống vỡ layout khi dùng float */
.article-content::after,
.content-wrapper::after,
.about-text::after,
.procurement-cms-custom-content::after {
    content: "";
    display: table;
    clear: both;
}

/* 5. BẢNG DỮ LIỆU ĐÁP ỨNG (Responsive Data Tables) */
/* Tự động biến bảng bất kỳ từ CMS thành bảng responsive không tràn mobile */
.article-content table,
.content-wrapper table,
.about-text table,
.procurement-cms-custom-content table,
.press-release-cms-content table,
.service-section table {
    width: 100% !important;
    max-width: 100% !important;
    border-collapse: collapse !important;
    margin: 1.5rem 0 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    display: table !important;
    background: #ffffff !important;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04) !important;
}

/* Tự động thêm cuộn ngang trên thiết bị nhỏ */
@media (max-width: 768px) {
    .article-content table,
    .content-wrapper table,
    .about-text table,
    .procurement-cms-custom-content table,
    .press-release-cms-content table,
    .service-section table {
        display: block !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        white-space: nowrap;
    }
}

.article-content table thead th,
.content-wrapper table thead th,
.about-text table thead th,
.procurement-cms-custom-content table thead th,
.press-release-cms-content table thead th,
.service-section table thead th,
.article-content table tr:first-child th,
.content-wrapper table tr:first-child th,
.about-text table tr:first-child th,
.procurement-cms-custom-content table tr:first-child th {
    background-color: #1e3a8a !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    padding: 12px 16px !important;
    border: 1px solid #1e3a8a !important;
    font-size: 0.925rem !important;
    letter-spacing: 0.02em !important;
    text-transform: uppercase !important;
}

.article-content table tbody td,
.content-wrapper table tbody td,
.about-text table tbody td,
.procurement-cms-custom-content table tbody td,
.press-release-cms-content table tbody td,
.service-section table tbody td,
.article-content table tr:not(:first-child) td,
.content-wrapper table tr:not(:first-child) td {
    padding: 12px 16px !important;
    border: 1px solid #e2e8f0 !important;
    font-size: 0.95rem !important;
    color: #334155 !important;
    line-height: 1.5 !important;
    vertical-align: middle !important;
}

.article-content table tbody tr:nth-child(even),
.content-wrapper table tbody tr:nth-child(even),
.about-text table tbody tr:nth-child(even),
.procurement-cms-custom-content table tbody tr:nth-child(even),
.article-content table tr:not(:first-child):nth-child(even),
.content-wrapper table tr:not(:first-child):nth-child(even) {
    background-color: #f8fafc !important;
}

.article-content table tbody tr:hover,
.content-wrapper table tbody tr:hover,
.about-text table tbody tr:hover,
.procurement-cms-custom-content table tbody tr:hover,
.article-content table tr:not(:first-child):hover,
.content-wrapper table tr:not(:first-child):hover {
    background-color: #f1f5f9 !important;
}

/* 6. DANH SÁCH (Lists: ul, ol, li) */
.article-content ul, .about-text ul, .procurement-cms-custom-content ul, .press-release-cms-content ul, .service-section ul {
    padding-left: 1.5rem !important;
    margin-bottom: 1.5rem !important;
    list-style: disc !important;
}

.article-content ol, .about-text ol, .procurement-cms-custom-content ol, .press-release-cms-content ol, .service-section ol {
    padding-left: 1.5rem !important;
    margin-bottom: 1.5rem !important;
    list-style: decimal !important;
}

.article-content li, .about-text li, .procurement-cms-custom-content li, .press-release-cms-content li, .service-section li {
    margin-bottom: 0.5rem;
    line-height: 1.65;
    color: #334155;
}

/* 7. TRÍCH DẪN (Blockquotes) */
.article-content blockquote,
.content-wrapper blockquote,
.about-text blockquote,
.procurement-cms-custom-content blockquote,
.press-release-cms-content blockquote {
    margin: 1.75rem 0 !important;
    padding: 1.25rem 1.75rem !important;
    border-left: 4px solid #1e3a8a !important;
    background: #f8fafc !important;
    font-style: italic !important;
    font-size: 1.05rem !important;
    color: #475569 !important;
    border-radius: 0 10px 10px 0 !important;
}

/* 8. VIDEO / IFRAME NHÚNG TỪ YOUTUBE (Responsive Video Embeds) */
.article-content iframe,
.content-wrapper iframe,
.about-text iframe,
.procurement-cms-custom-content iframe,
.press-release-cms-content iframe {
    width: 100% !important;
    max-width: 100% !important;
    aspect-ratio: 16 / 9 !important;
    height: auto !important;
    border-radius: 10px !important;
    border: none !important;
    margin: 1.5rem 0 !important;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.1) !important;
}

/* 9. THẺ CARD GRID UNIFORMITY (Đồng đều chiều cao thẻ khi tiêu đề CMS dài) */
.job-card-title,
.tender-title,
.detail-card h3,
.party-article-card h3 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    min-height: 2.8em;
}

.job-card .text-clamp-2,
.tender-desc,
.detail-card p,
.party-article-card p.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 10. PLACEHOLDER DỰ PHÒNG CHO ẢNH HỎNG (Missing Thumbnail Safety) */
img.img-fluid,
.party-article-thumb,
.card-image img {
    background-color: #f1f5f9;
}
