/* Berita (list & detail). Butuh site-shell.css (token), form-page.css (fp-hero) & landing-page.css (lp-card). */

/* ---------- Hero detail ---------- */
.np-hero .fp-title { max-width: 32ch; }
.np-hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem 1rem;
    margin-top: 1rem;
    color: rgb(255 255 255 / .92);
    font-size: .925rem;
}
.np-hero-meta time { display: inline-flex; align-items: center; gap: .35rem; }
.np-hero-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.np-hero-tag {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: .2rem .75rem;
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
    background: rgb(255 255 255 / .16);
    border: 1px solid rgb(255 255 255 / .45);
    border-radius: 999px;
    transition: background-color .15s ease, color .15s ease;
}
.np-hero-tag:hover { color: var(--gm-blue-600); background: #fff; }

/* ---------- Toolbar list ---------- */
.np-toolbar { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.5rem; }
.np-search { position: relative; }
.np-search > i {
    position: absolute;
    top: 50%;
    left: .9rem;
    color: var(--gm-slate-600);
    font-size: 1.15rem;
    line-height: 1;
    transform: translateY(-50%);
    pointer-events: none;
}
.np-search .fp-input { padding-left: 2.6rem; }
.np-chips {
    display: flex;
    gap: .5rem;
    margin: 0 calc(var(--bs-gutter-x, 1.5rem) * -.5);
    padding: 0 calc(var(--bs-gutter-x, 1.5rem) * .5) .25rem;
    overflow-x: auto;
    scrollbar-width: none;
}
.np-chips::-webkit-scrollbar { display: none; }
.np-chip {
    flex: 0 0 auto;
    min-height: 40px;
    padding: .4rem .95rem;
    color: var(--gm-slate-700);
    font-size: .875rem;
    font-weight: 600;
    white-space: nowrap;
    background: #fff;
    border: 1px solid var(--gm-slate-200);
    border-radius: 999px;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.np-chip:hover { color: var(--gm-ink); border-color: #94a3b8; }
.np-chip[aria-pressed="true"] { color: #fff; background: var(--gm-blue-600); border-color: var(--gm-blue-600); }
.np-result-info { margin: 0 0 1rem; color: var(--gm-slate-600); font-size: .9rem; }
.np-result-info strong { color: var(--gm-ink); }

/* ---------- Grid & kartu ---------- */
.np-results { transition: opacity .2s ease; }
.np-results.is-loading { opacity: .5; }
.np-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.np-card .lp-card-media { overflow: hidden; }
.np-card .lp-card-media img { transition: transform .5s cubic-bezier(.22, 1, .36, 1); }
.np-card:hover .lp-card-media img { transform: scale(1.04); }
.np-card-excerpt {
    display: -webkit-box;
    overflow: hidden;
    font-size: .95rem;
    line-height: 1.6;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}
.np-card-featured .lp-card-media { height: 220px; }
.np-card-featured .np-card-title { font-size: 1.15rem; line-height: 1.3; }

/* ---------- Pagination ---------- */
.np-pager { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: 2rem; }
.np-pager-status { margin: 0; color: var(--gm-slate-600); font-size: .9rem; }
.np-pager-pages { align-items: center; gap: .25rem; margin: 0; padding: 0; list-style: none; }
.np-pager-btn,
.np-pager-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .25rem;
    min-width: 44px;
    min-height: 44px;
    padding: 0 .75rem;
    color: var(--gm-slate-700);
    font-size: .925rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    background: #fff;
    border: 1px solid var(--gm-slate-200);
    border-radius: var(--gm-radius-sm);
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.np-pager-btn i { font-size: 1.25rem; line-height: 1; }
button.np-pager-btn:hover,
button.np-pager-num:hover { color: var(--gm-ink); border-color: #94a3b8; }
.np-pager-btn[aria-disabled="true"] { color: #94a3b8; background: var(--gm-slate-50); }
.np-pager-num.is-active { color: #fff; background: var(--gm-blue-600); border-color: var(--gm-blue-600); }
.np-pager-dots { display: inline-flex; min-width: 28px; justify-content: center; color: var(--gm-slate-600); }

/* ---------- Detail artikel ---------- */
.np-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
.np-figure { margin: 0 0 1.75rem; }
.np-figure img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 560px;
    object-fit: contain;
    background: var(--gm-slate-100);
    border-radius: var(--gm-radius);
}
.np-figure figcaption { margin-top: .6rem; color: var(--gm-slate-600); font-size: .85rem; line-height: 1.5; }

.np-prose {
    max-width: 70ch;
    color: var(--gm-slate-700);
    font-size: 1.0625rem;
    line-height: 1.8;
    text-wrap: pretty;
    overflow-wrap: break-word;
}
.np-prose > :first-child { margin-top: 0; }
.np-prose p { margin: 0 0 1.25rem; }
.np-prose h1, .np-prose h2, .np-prose h3, .np-prose h4 {
    margin: 2rem 0 .75rem;
    color: var(--gm-ink);
    font-weight: 700;
    line-height: 1.3;
}
.np-prose h1, .np-prose h2 { font-size: 1.4rem; }
.np-prose h3, .np-prose h4 { font-size: 1.15rem; }
.np-prose a { color: var(--gm-blue-600); text-decoration: underline; text-underline-offset: 2px; }
.np-prose strong { color: var(--gm-ink); }
.np-prose ul, .np-prose ol { margin: 0 0 1.25rem; padding-left: 1.4rem; }
.np-prose li + li { margin-top: .35rem; }
.np-prose img { display: block; max-width: 100%; height: auto !important; margin: 1.5rem 0; border-radius: var(--gm-radius-sm); }
.np-prose iframe, .np-prose video { max-width: 100%; border-radius: var(--gm-radius-sm); }
.np-prose blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    color: var(--gm-ink);
    font-size: 1.05rem;
    background: var(--gm-blue-50);
    border-radius: var(--gm-radius-sm);
}
.np-prose blockquote > :last-child { margin-bottom: 0; }
.np-prose table { display: block; width: 100%; max-width: 100%; margin: 1.5rem 0; overflow-x: auto; border-collapse: collapse; font-size: .95rem; }
.np-prose th, .np-prose td { padding: .6rem .8rem; border: 1px solid var(--gm-slate-200); }
.np-prose th { color: var(--gm-ink); font-weight: 600; background: var(--gm-slate-50); }

.np-aside { display: grid; align-content: start; gap: 1rem; }
.np-share,
.fp-aside .np-share { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.fp-aside .np-share li + li { margin-top: 0; }
.np-share a,
.np-share button {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: var(--gm-slate-700);
    font-size: 1.2rem;
    background: #fff;
    border: 1px solid var(--gm-slate-200);
    border-radius: 999px;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.np-share a:hover,
.np-share button:hover { color: #fff; background: var(--gm-blue-600); border-color: var(--gm-blue-600); }
.np-copied { margin: .6rem 0 0; color: #15803d; font-size: .85rem; font-weight: 500; }
.np-aside .fp-btn { width: 100%; }
.np-back {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    min-height: 44px;
    color: var(--gm-blue-600);
    font-weight: 600;
}
.np-back:hover { color: var(--gm-ink); }

/* ---------- Breakpoints ---------- */
@media (min-width: 576px) {
    .np-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
    .np-toolbar { flex-direction: row; align-items: center; justify-content: space-between; gap: 1.5rem; }
    .np-search { flex: 0 0 320px; order: 2; }
    .np-chips { flex-wrap: wrap; margin: 0; padding: 0; overflow: visible; }
    .np-card-featured { grid-column: 1 / -1; flex-direction: row; }
    .np-card-featured .lp-card-media { flex: 0 0 55%; height: auto; min-height: 340px; }
    .np-card-featured .lp-card-body { justify-content: center; gap: .75rem; padding: 1.75rem 2rem; }
    .np-card-featured .np-card-title { font-size: clamp(1.3rem, 1rem + 1vw, 1.75rem); line-height: 1.25; letter-spacing: -0.02em; }
    .np-card-featured .lp-card-foot { margin-top: .25rem; }
}
@media (min-width: 992px) {
    .np-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
    .np-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    /* ponytail: sorotan 2x2 + 11 kartu = 5 baris penuh pada 12 item/halaman */
    .np-card-featured { grid-column: span 2; grid-row: span 2; flex-direction: column; }
    .np-card-featured .lp-card-media { flex: 1 1 auto; min-height: 300px; }
    .np-card-featured .lp-card-body { flex: 0 0 auto; justify-content: flex-start; padding: 1.5rem 1.75rem; }
    .np-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 3rem; }
    .np-aside { position: sticky; top: 96px; }
}

@media (prefers-reduced-motion: reduce) {
    .np-results,
    .np-card .lp-card-media img,
    .np-chip,
    .np-hero-tag,
    .np-pager-btn,
    .np-pager-num,
    .np-share a,
    .np-share button { transition: none; }
    .np-card:hover .lp-card-media img { transform: none; }
}
