@charset "utf-8";
/* ============================================================
   NPL World News — Category / Listing Page Redesign
   Reuses --npl-navy / --npl-orange / --npl-line / --npl-bg-soft /
   --npl-ink / --npl-grey from header-redesign.css — fallback hex
   values included so this also works standalone.
   ============================================================ */

/* ---------- Category title (light, not a heavy block) ---------- */
.cat-title-section{
    margin: 6px 0 26px;
}
.cat-title-section .cat-title{
    display: inline-block;
    font: 700 26px 'Mukta', sans-serif;
    color: var(--npl-ink, #242424);
    text-decoration: none;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--npl-orange, #eb8d02);
}

/* ---------- Card grid ---------- */
.news-grid{
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}
.news-card-col{
    display: block;
}
.news-card{
    background: #ffffff;
    border: 1px solid var(--npl-line, #e6e6e6);
    border-radius: 10px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform .18s ease, box-shadow .18s ease;
}
.news-card:hover{
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(20,16,88,.08);
}
.news-card-thumb{
    position: relative;
    display: block;
    aspect-ratio: 16/10;
    background: var(--npl-bg-soft, #f6f7fb);
    overflow: hidden;
}
.news-card-thumb img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.news-card-noimg{
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c7c3d6;
    font-size: 28px;
}
.news-card-date{
    position: absolute;
    left: 10px;
    bottom: 10px;
    background: var(--npl-navy, #1c1677);
    color: #ffffff;
    font: 600 12px 'Open Sans', sans-serif;
    padding: 6px 12px;
    border-radius: 14px;
}
.news-card-body{
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.news-card-title{
    display: block;
    font: 700 19px/1.4 'Mukta', sans-serif;
    color: var(--npl-ink, #242424);
    text-decoration: none;
    margin-bottom: 10px;
}
.news-card-title:hover{
    color: var(--npl-navy, #1c1677);
}
.news-card-excerpt{
    font: 400 15px/1.65 'Open Sans', sans-serif;
    color: var(--npl-grey, #5f5f5f);
    margin: 0;
}

/* ---------- Summary text ---------- */
.cat-list-summary{
    font: 400 14px 'Open Sans', sans-serif;
    color: var(--npl-grey, #5f5f5f);
    margin-bottom: 16px;
}

/* ---------- Pagination ---------- */
.cat-list-pagination{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    list-style: none;
    margin: 34px 0 50px;
    padding: 0;
}
.cat-list-pagination li a,
.cat-list-pagination li span{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid var(--npl-line, #e6e6e6);
    background: #ffffff;
    color: var(--npl-ink, #242424);
    font: 600 14px 'Mukta', sans-serif;
    text-decoration: none;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.cat-list-pagination li a:hover{
    border-color: var(--npl-navy, #1c1677);
    color: var(--npl-navy, #1c1677);
}
.cat-list-pagination li.active a,
.cat-list-pagination li.active span{
    background: var(--npl-navy, #1c1677);
    border-color: var(--npl-navy, #1c1677);
    color: #ffffff;
}
.cat-list-pagination li.disabled a,
.cat-list-pagination li.disabled span{
    opacity: .4;
    cursor: default;
}

/* ---------- Sticky sidebar (same pattern as the article page) ---------- */
.newsViewRow{
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 50px;
}
.sidebarStickyInner{
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) and (min-width: 992px){
    .news-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1400px){
    .news-grid{ grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 991px){
    .newsViewRow{ display: block; }
    .sidebarStickyInner{
        position: static;
        max-height: none;
        overflow: visible;
    }
}
@media (max-width: 600px){
    .news-grid{ grid-template-columns: 1fr; }
    .cat-title-section .cat-title{ font-size: 22px; }
}

/* ============================================================
   SETUP NOTES (delete once applied)
   ------------------------------------------------------------
   1. Save at web/css/listing-redesign.css — registered per-view
      via registerCssFile() in the category view, no AppAsset
      change needed.

   2. _item.php field names ($model->url, ->coverImage, ->content,
      ->created_at) are a best guess based on the article page's
      Post model usage — send me the real _item.php (or confirm
      field names) and I'll match it exactly.

   3. Desktop default is 2 columns; a 3-column rule kicks in only
      above 1400px width. Say the word if you'd rather have 3
      columns at the normal desktop width instead.
   ============================================================ */
