/* ==========================================================================
   NewsPortal theme
   Nepali news-portal look: white nav with navy links, a light trending tag
   strip, bold navy headline-over-photo stories and per-category panels
   (one lead story + a compact headline list), all built from existing
   categories and articles.
   ========================================================================== */

body {
    font-family: var(--font-family);
    color: var(--newsportal-text);
    background: var(--newsportal-light);
}

h1, h2, h3, h4, h5, h6,
.font-heading {
    font-family: var(--font-heading);
}

a {
    color: var(--newsportal-primary);
    text-decoration: none;
}

a:hover {
    color: var(--newsportal-secondary);
}

/* ---------------------------------------------------------------------- */
/* Utility bar                                                            */
/* ---------------------------------------------------------------------- */
.np-topbar {
    background: var(--newsportal-navy);
    color: rgba(255,255,255,.75);
    font-size: .8rem;
}

.np-topbar a {
    color: rgba(255,255,255,.75);
}

.np-topbar a:hover {
    color: #fff;
}

.np-topbar .np-date {
    letter-spacing: .02em;
}

.np-topbar .social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    margin-left: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
}

.np-topbar .social-icons a:hover {
    background: var(--newsportal-primary);
    color: #fff;
}

/* ---------------------------------------------------------------------- */
/* Masthead                                                                */
/* ---------------------------------------------------------------------- */
.np-masthead {
    background: #fff;
    padding: 18px 0;
    border-bottom: 1px solid rgba(0,0,0,.06);
}

.np-logo-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 8px;
    background: var(--newsportal-navy);
    color: #fff;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.5px;
    flex-shrink: 0;
}

.np-brand-name {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.9rem;
    line-height: 1.1;
    color: var(--newsportal-primary);
    letter-spacing: -0.5px;
}

.np-tagline {
    font-size: .78rem;
    color: var(--newsportal-navy);
    text-transform: uppercase;
    letter-spacing: .1em;
    font-weight: 600;
}

.np-search-form .form-control {
    border-radius: 4px 0 0 4px;
    border: 1px solid #e3e3e3;
}

.np-search-form .btn {
    border-radius: 0 4px 4px 0;
    background: var(--newsportal-navy);
    color: #fff;
    border: 1px solid var(--newsportal-navy);
}

/* ---------------------------------------------------------------------- */
/* Category strip / nav                                                   */
/* ---------------------------------------------------------------------- */
.np-category-nav {
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 1030;
    border-bottom: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}

.np-category-nav .navbar-nav .nav-link {
    color: var(--newsportal-navy);
    font-weight: 700;
    font-size: .92rem;
    padding: 14px 14px;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
}

.np-category-nav .navbar-nav .nav-link:hover,
.np-category-nav .navbar-nav .nav-link.active {
    color: var(--newsportal-primary);
    border-bottom-color: var(--newsportal-primary);
}

.np-category-nav .navbar-toggler {
    border: none;
    color: var(--newsportal-navy);
}

.np-category-scroll {
    overflow-x: auto;
    scrollbar-width: none;
}

.np-category-scroll::-webkit-scrollbar {
    display: none;
}

/* ---------------------------------------------------------------------- */
/* Trending tag strip                                                      */
/* ---------------------------------------------------------------------- */
.np-trending-bar {
    background: #f3f4f7;
    border-bottom: 1px solid rgba(0,0,0,.05);
    padding: 10px 0;
}

.np-trending-bar .np-trending-label {
    flex-shrink: 0;
    color: var(--newsportal-primary);
    font-weight: 800;
    font-size: .85rem;
    white-space: nowrap;
}

.np-trending-list {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
}

.np-trending-list::-webkit-scrollbar {
    display: none;
}

.np-trending-list a {
    color: #5b6270;
    font-size: .85rem;
    font-weight: 600;
    white-space: nowrap;
    margin-right: 1.5rem;
}

.np-trending-list a:hover {
    color: var(--newsportal-primary);
}

/* ---------------------------------------------------------------------- */
/* Sections                                                                */
/* ---------------------------------------------------------------------- */
.np-section {
    padding: 2.5rem 0;
}

/* ---------------------------------------------------------------------- */
/* Hero story (headline above photo, Safal Khabar style)                   */
/* ---------------------------------------------------------------------- */
.np-hero-story {
    text-align: center;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(0,0,0,.08);
}

.np-hero-headline {
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1.35;
    color: var(--newsportal-navy);
    margin-bottom: .6rem;
    display: block;
}

a.np-hero-headline:hover {
    color: var(--newsportal-primary);
}

.np-hero-byline {
    color: var(--newsportal-primary);
    font-weight: 700;
    font-size: .9rem;
    margin-bottom: 1.25rem;
}

.np-hero-image {
    display: block;
    border-radius: 6px;
    overflow: hidden;
}

.np-hero-image img {
    width: 100%;
    max-height: 440px;
    object-fit: cover;
}

.np-hero-side-item {
    display: flex;
    gap: .9rem;
    padding: .85rem 0;
    border-bottom: 1px solid rgba(0,0,0,.08);
}

.np-hero-side-item:last-child {
    border-bottom: none;
}

.np-hero-side-item img {
    width: 96px;
    height: 72px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.np-hero-side-item h3 {
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 .3rem;
    color: var(--newsportal-navy);
}

.np-hero-side-item:hover h3 {
    color: var(--newsportal-primary);
}

/* ---------------------------------------------------------------------- */
/* Category badge / meta                                                  */
/* ---------------------------------------------------------------------- */
.np-badge {
    display: inline-block;
    background: var(--newsportal-primary);
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 3px 10px;
    border-radius: 3px;
}

.np-meta {
    font-size: .78rem;
    color: #9298a2;
}

/* ---------------------------------------------------------------------- */
/* Category panels (lead story + compact headline list, 2 per row)        */
/* ---------------------------------------------------------------------- */
.np-cat-panel {
    margin-bottom: 2.5rem;
}

.np-cat-panel-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    border-bottom: 2px solid #ececef;
    padding-bottom: .6rem;
    margin-bottom: 1.1rem;
}

.np-cat-panel-header h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--newsportal-navy);
    margin: 0;
}

.np-cat-panel-header .np-view-all {
    font-size: .82rem;
    font-weight: 700;
    color: var(--newsportal-primary);
    white-space: nowrap;
}

.np-cat-panel-header .np-view-all:hover {
    color: var(--newsportal-navy);
}

.np-cat-lead {
    display: block;
    margin-bottom: 1.1rem;
}

.np-cat-lead h3 {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--newsportal-navy);
    margin: 0 0 .75rem;
}

.np-cat-lead:hover h3 {
    color: var(--newsportal-primary);
}

.np-cat-lead img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    border-radius: 6px;
}

.np-cat-lead-img-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 210px;
    background: #f1f2f4;
    border-radius: 6px;
    color: #c7cbd1;
    font-size: 2rem;
}

.np-cat-list-item {
    display: flex;
    gap: .8rem;
    padding: .65rem 0;
    border-bottom: 1px solid #f0f0f2;
}

.np-cat-list-item:last-child {
    border-bottom: none;
}

.np-cat-list-item img {
    width: 78px;
    height: 58px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.np-cat-list-item-img-empty {
    width: 78px;
    height: 58px;
    border-radius: 4px;
    flex-shrink: 0;
    background: #f1f2f4;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c7cbd1;
}

.np-cat-list-item h4 {
    font-size: .92rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
    color: var(--newsportal-navy);
}

.np-cat-list-item:hover h4 {
    color: var(--newsportal-primary);
}

/* ---------------------------------------------------------------------- */
/* News cards (category listing / search results)                        */
/* ---------------------------------------------------------------------- */
.np-card {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    height: 100%;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    transition: box-shadow .2s ease, transform .2s ease;
}

.np-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
    transform: translateY(-2px);
}

.np-card .np-card-img {
    display: block;
    height: 170px;
    overflow: hidden;
    background: #eee;
}

.np-card .np-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.np-card .np-card-body {
    padding: 1rem 1.1rem 1.2rem;
}

.np-card h3 {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    margin: .5rem 0;
}

.np-card h3 a {
    color: var(--newsportal-navy);
}

.np-card:hover h3 a {
    color: var(--newsportal-primary);
}

.np-card p {
    font-size: .88rem;
    color: #666d78;
    margin-bottom: 0;
}

.np-card-img-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c7cbd1;
    font-size: 2rem;
}

/* ---------------------------------------------------------------------- */
/* Sidebar                                                                 */
/* ---------------------------------------------------------------------- */
.np-widget {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.np-widget-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--newsportal-navy);
    padding-bottom: .6rem;
    margin-bottom: 1rem;
    border-bottom: 3px solid var(--newsportal-primary);
}

.np-trending-item {
    display: flex;
    gap: .75rem;
    padding: .7rem 0;
    border-bottom: 1px solid rgba(0,0,0,.06);
    align-items: flex-start;
}

.np-trending-item:last-child {
    border-bottom: none;
}

.np-trending-num {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--newsportal-primary);
    opacity: .55;
    line-height: 1;
    width: 28px;
    flex-shrink: 0;
}

.np-trending-item h4 {
    font-size: .9rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
    color: var(--newsportal-navy);
}

.np-trending-item:hover h4 {
    color: var(--newsportal-primary);
}

.np-category-pill-list a {
    display: flex;
    justify-content: space-between;
    padding: .55rem 0;
    border-bottom: 1px solid rgba(0,0,0,.06);
    color: var(--newsportal-navy);
    font-weight: 600;
    font-size: .9rem;
}

.np-category-pill-list a:last-child {
    border-bottom: none;
}

.np-category-pill-list a:hover {
    color: var(--newsportal-primary);
}

.np-category-pill-list .badge {
    background: #f1f2f4;
    color: #6b7280;
    font-weight: 600;
}

/* ---------------------------------------------------------------------- */
/* Page header band (category/content/search pages)                       */
/* ---------------------------------------------------------------------- */
.np-page-header {
    background: var(--newsportal-navy);
    color: #fff;
    padding: 2.5rem 0;
}

.np-page-header h1 {
    font-weight: 800;
    margin-bottom: .25rem;
}

.np-page-header p {
    color: rgba(255,255,255,.7);
    margin: 0;
}

/* ---------------------------------------------------------------------- */
/* Article view                                                            */
/* ---------------------------------------------------------------------- */
.np-article-body {
    font-size: 1.08rem;
    line-height: 1.9;
    color: var(--newsportal-text);
}

.np-article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.np-share-bar a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f1f2f4;
    color: var(--newsportal-navy);
    margin-right: 8px;
}

.np-share-bar a:hover {
    background: var(--newsportal-primary);
    color: #fff;
}

/* ---------------------------------------------------------------------- */
/* Closing CTA                                                             */
/* ---------------------------------------------------------------------- */
.np-newsletter {
    background: var(--newsportal-primary);
    color: #fff;
}

.np-newsletter h2 {
    font-weight: 800;
}

.np-newsletter .btn {
    border-radius: 4px;
    background: var(--newsportal-navy);
    color: #fff;
    font-weight: 700;
    padding: .75rem 1.75rem;
}

/* ---------------------------------------------------------------------- */
/* Footer                                                                  */
/* ---------------------------------------------------------------------- */
.np-footer {
    background: var(--newsportal-dark);
    color: rgba(255,255,255,.65);
    padding-top: 3rem;
    border-top: 4px solid var(--newsportal-primary);
}

.np-footer h5 {
    color: #fff;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.np-footer a {
    color: rgba(255,255,255,.6);
}

.np-footer a:hover {
    color: #fff;
}

.np-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.np-footer ul li {
    margin-bottom: .6rem;
}

.np-footer .social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    margin-right: 8px;
}

.np-footer .social-icons a:hover {
    background: var(--newsportal-primary);
}

.np-footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    margin-top: 2.5rem;
    padding: 1.25rem 0;
    font-size: .85rem;
}

/* ---------------------------------------------------------------------- */
/* Misc                                                                    */
/* ---------------------------------------------------------------------- */
#back-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--newsportal-navy);
    color: #fff;
    border-radius: 50%;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease;
    z-index: 1040;
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.custom-pagination .pagination {
    margin: 0;
}

.custom-pagination .page-link {
    color: var(--newsportal-navy);
    border-color: rgba(0,0,0,.08);
}

.custom-pagination .page-item.active .page-link {
    background: var(--newsportal-primary);
    border-color: var(--newsportal-primary);
}

@media (max-width: 991.98px) {
    .np-hero-headline {
        font-size: 1.5rem;
    }
}
