/* ============================
   GLOBAL STYLES
============================== */
body {
    background: #ffffff;
    font-family: 'Inter', sans-serif;
    color: #333;
    line-height: 1.5;
    margin: 0;
}

/* Links */
a {
    text-decoration: none;
    color: inherit;
}

/* ============================
   NEWS CARD
============================== */
.news-card {
    display: flex;
    gap: 14px;
    padding: 16px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
    transition: transform 0.25s, box-shadow 0.25s;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 22px rgba(0,0,0,0.08);
}

/* Card image */
.news-card img {
    width: 160px;
    height: 110px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
}

/* Card content */
.news-card h5 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 6px;
}

.news-card p {
    font-size: .88rem;
    color: #555;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.news-card .publisher {
    font-size: .75rem;
    color: #777;
    display: flex;
    align-items: center;
    gap: 4px;
}


/* ============================
   PAGINATION
============================== */
.pagination .page-link {
    width: 40px;
    height: 40px;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================
   SIDEBAR
============================== */
.list-group-item {
    padding: 10px 12px;
    transition: background 0.2s;
    display: flex;
    gap: 10px;
    align-items: center;
}

.list-group-item:hover {
    background: #f3f5f8;
}

.sidebar-thumb {
    width: 55px;
    height: 55px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

/* ============================
   RESPONSIVE LAYOUT
============================== */
@media (max-width: 1200px) {
    /* Adjust card image */
    .news-card img {
        width: 140px;
        height: 100px;
    }
}

@media (max-width: 992px) {
    /* Tablet: stack news cards vertically */
    .news-card {
        flex-direction: column;
        padding: 14px;
    }

    .news-card img {
        width: 100%;
        height: 180px;
        margin-bottom: 10px;
    }

    .news-card h5 {
        font-size: 1.1rem;
    }

    .news-card p {
        font-size: .92rem;
        -webkit-line-clamp: 3;
        line-clamp: 3;

    }

    /* Sidebar move below main content */
    .col-lg-3 {
        width: 100%;
        order: 10;
        margin-top: 24px;
    }

    .card-header {
        font-size: 1rem;
        padding: 10px 16px;
    }

    .sidebar-thumb {
        width: 60px;
        height: 60px;
    }

    .list-group-item a {
        font-size: .92rem;
    }
}

@media (max-width: 768px) {
    /* Mobile */
    .container {
        padding-left: 8px;
        padding-right: 8px;
    }

    .btn-group {
        flex-direction: row; /* Giữ ngang */
        justify-content: center; /* Căn giữa hàng nếu muốn */
        gap: 8px; /* Khoảng cách giữa các button */
    }

    .btn-group a {
        flex: 1; /* Nếu muốn button cùng rộng */
        text-align: center;
    }

    .news-card {
        gap: 12px;
        padding: 12px;
    }

    .news-card img {
        height: 180px;
    }

    .news-card h5 {
        font-size: 1.15rem;
    }

    .news-card p {
        -webkit-line-clamp: 3;
        line-clamp: 3;

    }

    .list-group-item {
        padding: 12px;
    }

    .sidebar-thumb {
        width: 65px;
        height: 65px;
    }

    .list-group-item a {
        font-size: .92rem;
    }

    .sidebar-sticky {
        position: static !important;
    }
}

@media (max-width: 576px) {
    /* Extra small devices */
    .news-card h5 {
        font-size: 1rem;
    }

    .news-card p {
        font-size: .9rem;
    }

    .sidebar-thumb {
        width: 55px;
        height: 55px;
    }

    .list-group-item a {
        font-size: .88rem;
    }

    .btn-group a {
        font-size: .9rem;
    }
}

p.small.text-muted {
    display: none;
}
/* Sidebar sticky */
.sidebar-sticky {
    position: sticky;
    top: 100px; /* Khoảng cách từ trên đầu màn hình */
}

/* Trên mobile không sticky */
@media (max-width: 768px) {
    .sidebar-sticky {
        position: static !important;
        top: auto;
    }
}
/* Ảnh thumb bài viết */
.news-thumb {
    width: 180px;
    height: 120px;
    border-radius: 10px;
    object-fit: cover;
}

/* Logo nhà báo chuẩn đẹp */
.publisher-icon {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.publisher-name {
    line-height: 1.2;
}

/* Sidebar thumb */
.sidebar-thumb {
    width: 55px;
    height: 55px;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
}

/* Scroll mượt sidebar */
.list-group {
    scrollbar-width: thin;
}
