/* ==========================================
   1. QUY TẮC CHUNG & BẢNG MÀU
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

:root {
    --primary-color: #ea9400;
    --secondary-color: #0c0c0c;
    --accent-red: #e50914;
    --bg-body: #f4f5f8;
    --text-color: #2c3e50;
    --text-muted: #6c757d;
    --border-color: #e2e8f0;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
}

body {
    background-color: var(--bg-body);
    width: 100%;
    min-height: 100vh;
    scroll-behavior: smooth;
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    margin: 0 auto;
    width: 1140px;
    max-width: 100%;
    padding: 0 15px;
}

/* ==========================================
   2. HEADER & NAVIGATION
   ========================================== */
header {
    width: 100%;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.header-contact {
    width: 100%;
    padding: 8px 0;
    background: #fff;
    border-bottom: 1px solid var(--border-color);
}

.header-contact i {
    color: var(--text-muted);
    font-size: 18px;
}

.header-contact .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.contact-2 a {
    color: #1b65e4;
    text-decoration: none;
    font-weight: 500;
}

.header-nav {
    width: 100%;
    padding: 12px 0;
    background: var(--secondary-color);
    z-index: 10;
}

.header-nav .container {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-menu {
    list-style: none;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-menu li {
    padding: 4px 8px;
    font-weight: 600;
    font-size: 14px;
}

.header-menu li a {
    text-decoration: none;
    color: #f8f9fa;
    transition: all 0.25s ease;
    padding-bottom: 4px;
}

.header-menu li a:hover,
.header-menu li a.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

/* Slogan Bar */
.header-slogan {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 6px 0;
    box-shadow: var(--shadow-sm);
}

.header-slogan .container {
    display: flex;
    align-items: center;
}

.header-slogan .svg {
    position: relative;
    padding: 8px 16px;
    background: var(--accent-red);
    margin-right: 16px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    border-radius: 3px;
    text-transform: uppercase;
}

.header-slogan .svg::after {
    position: absolute;
    content: "";
    top: 0;
    left: 100%;
    border-width: 6px;
    border-style: solid;
    border-color: var(--accent-red) transparent transparent var(--accent-red);
}

/* ==========================================
   3. TIN NỔI BẬT (LAYOUT DẠNG LƯỚI)
   ========================================== */
.layout {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 210px 50px 210px;
    grid-gap: 12px;
    margin-top: 20px;
}

.layout-item {
    position: relative;
    text-decoration: none;
    border-radius: 8px;
    background: #111;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.layout-item:first-child {
    grid-column: 1 / 3;
    grid-row: 1 / 2;
}

.layout-item:nth-child(2),
.layout-item:nth-child(3) {
    grid-row: 1 / 3;
}

.layout-item:nth-child(4),
.layout-item:nth-child(5) {
    grid-row: 2 / 4;
}

.layout-item:last-child {
    grid-column: 3 / 5;
}

.layout-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.8);
    transition: transform 0.4s ease;
}

.layout-item:hover img {
    transform: scale(1.05);
    filter: brightness(0.95);
}

.layout-item h3 {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    padding: 15px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.88));
    font-weight: 600;
    color: #fff;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 2;
    font-size: 16px;
    line-height: 1.4;
}

/* ==========================================
   4. BẢNG TIN TỨC VÀ DANH SÁCH BÀI VIẾT
   ========================================== */
.title {
    padding: 8px 0;
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: 20px;
}

.categoryNews .title b {
    background: var(--primary-color);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    padding: 8px 24px;
    border-radius: 4px 4px 0 0;
    text-transform: uppercase;
}

.mottin {
    display: grid;
    grid-template-columns: 240px 1fr;
    grid-gap: 20px;
    padding: 16px;
    margin-bottom: 16px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mottin:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.mottin .hinhcuatin img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
}

.news-content .news {
    text-decoration: none;
    color: var(--text-color);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.news-content .news:hover {
    color: var(--primary-color);
}

.news-content .date-out {
    font-size: 13px;
    color: var(--text-muted);
}

.news-content p.tomtat {
    margin-top: 8px;
    font-size: 14px;
    color: #555;
    text-align: justify;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 3;
}

/* Sidebar Quảng Cáo */
.advertisement {
    position: sticky;
    top: 15px;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.advertisement .title {
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: #1a1a1a;
    padding: 10px;
    margin-bottom: 0;
}

.advertisement .content {
    padding: 12px;
}

.advertisement .postAdv img {
    width: 100%;
    border-radius: 6px;
}

/* ==========================================
   5. TRANG CHI TIẾT BÀI VIẾT
   ========================================== */
.categoryNews-header h1 {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    color: #1a202c;
    margin-bottom: 12px;
}

.motatin {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.5;
    color: #4a5568;
    margin-bottom: 15px;
}

.contentct {
    font-size: 17px;
    line-height: 1.8;
    color: #2d3748;
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.contentct img {
    display: block;
    margin: 20px auto;
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

/* Cards Bài Viết Liên Quan */
.related-Posts_list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 16px;
    margin-top: 15px;
}

.card {
    text-decoration: none;
    color: var(--text-color);
    background: #fff;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 0.25s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.card-txt {
    padding: 12px;
}

.card-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 2;
    height: 44px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
}

.card-date {
    font-size: 12px;
    color: var(--text-muted);
}

/* ==========================================
   6. FOOTER TỐI ƯU
   ========================================== */
footer {
    background: #121315;
    margin-top: 50px;
    padding-top: 40px;
    color: #a0aec0;
}

.footer-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 15px;
}

.txtf {
    color: #a0aec0;
    font-size: 14px;
    line-height: 1.6;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.footer-social a {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 20px;
    border-radius: 6px;
}

.socail-f { background: #39599f; color: #fff; }
.socail-ins { background: #e1306c; color: #fff; }
.socail-tw { background: #55acee; color: #fff; }
.socail-yb { background: #c61d23; color: #fff; }

.connect-line {
    display: block;
    padding: 8px 0;
    border-bottom: 1px solid #2d3748;
    color: #a0aec0;
    text-decoration: none;
}

.connect-line:hover {
    color: var(--primary-color);
}

.copyright {
    padding: 16px;
    margin-top: 30px;
    text-align: center;
    background: #0a0b0c;
    color: #718096;
    font-size: 13px;
    border-top: 1px solid #1a202c;
}

/* ==========================================
   7. CHỐNG VỠ KHUNG MOBILE
   ========================================== */
@media screen and (max-width: 768px) {
    .layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    .layout-item:first-child,
    .layout-item:last-child {
        grid-column: 1;
    }
    .mottin {
        grid-template-columns: 1fr;
    }
    .related-Posts_list {
        grid-template-columns: 1fr;
    }
}