/*
 * Page     : Blog Listing
 * File     : css/desktop/pages/pageblog.css
 * Loaded by: page-blog.php (mobile + desktop)
 *
 * Blog card CSS also applies to AJAX-loaded content injected into .all_blogs_data.
 */

/* ══════════════════════════════════════════
   HERO
   ══════════════════════════════════════════ */
.np-blog-hero {
    padding: 60px 20px;
    background: linear-gradient(135deg, #fff7ed, #ffffff, #ffe4e6);
}

.np-hero-container {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.np-blog-hero .trust-badge {
    display: inline-block;
    margin-bottom: 20px;
}

.np-blog-hero .trust-badge .badge-text {
    background: linear-gradient(135deg, #059669, #10B981);
    color: #fff;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

.np-hero-badge {
    display: inline-block;
    background: #ffedd5;
    color: #c2410c;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
}

.np-hero-title {
    font-size: 40px;
    font-weight: 700;
    color: var(--np-text-dark, #3E2723);
    margin-bottom: 15px;
    line-height: 1.25;
}

.np-hero-subtitle {
    font-size: 18px;
    color: #6b7280;
    max-width: 750px;
    margin: 0 auto 35px;
    line-height: 1.6;
}

/* Search (used in AJAX content) */
.np-hero-search {
    position: relative;
    max-width: 800px;
    margin: 0 auto 35px;
}

.np-hero-search input {
    width: 100%;
    padding: 14px 45px 14px 16px;
    border-radius: 16px;
    font-size: 16px;
    border: 2px solid #e5e7eb;
    outline: none;
    transition: border-color 0.2s;
}

.np-hero-search input:focus {
    border-color: var(--np-saffron, #F37420);
}

.np-search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #9ca3af;
}

/* Category filter buttons */
.np-hero-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.np-hero-buttons button {
    padding: 10px 18px;
    border-radius: 25px;
    border: 1px solid #e5e7eb;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.np-hero-buttons button:hover {
    border-color: var(--np-saffron, #F37420);
    color: var(--np-saffron, #F37420);
}

.np-hero-buttons .active {
    background: linear-gradient(90deg, var(--np-saffron, #F37420), #ef4444);
    color: #fff;
    border: none;
}

.np-hero-buttons .active:hover {
    color: #fff;
}

/* ══════════════════════════════════════════
   BLOG CARD GRID (np-article variant)
   ══════════════════════════════════════════ */
.np-article-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.np-article-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.np-article-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.15);
}

.np-article-card:hover .np-article-title {
    color: var(--np-saffron, #F37420);
}

.np-article-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: #f0ebe4;
}

.np-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.np-article-card:hover .np-article-image img {
    transform: scale(1.04);
}

.np-badge-category {
    color: var(--np-saffron, #F37420);
    font-size: 12px;
    padding: 0 10px;
    font-weight: 500;
}

.np-article-content {
    padding: 16px;
}

.np-article-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #111;
    line-height: 1.4;
    transition: color 0.2s;
}

.np-article-desc {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

.np-article-footer {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.np-read-more {
    color: var(--np-saffron, #F37420);
    font-weight: 600;
    text-decoration: none;
}

.blog_post_date {
    color: var(--np-text-dark, #3E2723);
    font-weight: 500;
}

/* ══════════════════════════════════════════
   BLOG CARD (Bootstrap .card variant)
   ══════════════════════════════════════════ */
.card.blogs-cards.h-100 {
    background: #fff !important;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    border: none;
}

.card.blogs-cards.h-100:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.15);
}

.card.blogs-cards.h-100 img {
    border-radius: 16px 16px 0 0;
    width: 100%;
    height: auto;
}

.blogs-cards-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #111;
    line-height: 1.4;
}

.card-footer {
    height: auto;
    background: transparent;
    border-top: 1px solid #eee;
}

/* ══════════════════════════════════════════
   PAGINATION
   ══════════════════════════════════════════ */
.pagination-wrap {
    display: flex;
    justify-content: center;
    margin-top: 32px;
}

.pagination-ui {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-btn {
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    border: 2px solid #d1d5db;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s, border-color 0.25s;
    font-size: 15px;
}

.page-btn:hover:not(.disabled):not(.active) {
    background: #f9fafb;
    border-color: #9ca3af;
}

.page-btn.active {
    background: linear-gradient(90deg, var(--np-saffron, #F37420), #ef4444);
    color: #fff;
    border: none;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.page-btn.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Bootstrap pagination override */
.pagination {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
}

.pagination .page-item {
    height: 44px;
    padding: 0 14px;
    border: 2px solid #d1d5db;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.25s;
}

.pagination .page-item .page-link {
    text-decoration: none;
    color: inherit;
    background: transparent;
    border: 0;
    padding: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    box-shadow: none;
}

.pagination .page-item.inactive {
    opacity: 0.4;
    pointer-events: none;
    cursor: default;
}

/* Currently selected page */
.pagination .page-item.selected {
    background: linear-gradient(90deg, var(--np-saffron, #F37420), #ef4444);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(243, 116, 32, 0.25);
}

.pagination .page-item.selected .page-link {
    color: #fff;
}

/* Clickable pages hover */
.pagination .page-item.active:hover {
    background: #fff7ed;
    border-color: var(--np-saffron, #F37420);
    color: var(--np-saffron, #F37420);
}

/* ══════════════════════════════════════════
   FILTER BAR (search + category tabs)
   ══════════════════════════════════════════ */
.np-blog-filter {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

/* np-input-group flex grow inside the filter bar */
.np-blog-search {
    flex: 1;
    min-width: 200px;
}

/* Mobile filter toggle — gap for SVG icon */
.np-filter-toggle {
    gap: 6px;
    white-space: nowrap;
}

/* Mobile: title + filter icon on first row, search full-width on second row */
.np-blog-filter--mobile {
    flex-wrap: wrap;
    align-items: center;
}

.np-blog-filter__title {
    flex: 1;
    font-size: 18px;
    font-weight: 700;
    color: var(--np-text-dark, #3E2723);
    order: 1;
}

.np-blog-filter--mobile .np-filter-toggle {
    order: 2;
}

.np-blog-filter--mobile .np-blog-search {
    order: 3;
    flex: 0 0 100%;
    min-width: 0;
}

/* Mobile: category tabs drop below filter bar when open */
.np-cat-tabs.category-menuuu.open {
    flex-wrap: wrap !important;
    padding: 8px 0 4px;
}

/* ══════════════════════════════════════════
   CATEGORY TABS WRAPPER (desktop scroll buttons)
   ══════════════════════════════════════════ */
.np-cat-tabs-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
}

.np-cat-tabs-wrap .np-cat-tabs {
    flex: 1;
    margin-bottom: 0 !important;
    scroll-behavior: smooth;
    /* hide scrollbar on desktop */
    scrollbar-width: none;
}

.np-cat-tabs-wrap .np-cat-tabs::-webkit-scrollbar {
    display: none;
}

.np-cat-scroll-btn {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    color: var(--np-text-dark, #3E2723);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
    padding: 0;
}

.np-cat-scroll-btn:hover {
    border-color: var(--np-saffron, #F37420);
    color: var(--np-saffron, #F37420);
    box-shadow: 0 2px 8px rgba(243, 116, 32, 0.2);
}

/* ══════════════════════════════════════════
   CATEGORY TABS
   ══════════════════════════════════════════ */
.np-cat-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 4px;
    margin-bottom: 20px !important;
    scrollbar-width: thin;
    scrollbar-color: var(--np-saffron, #F37420) transparent;
    background: transparent !important;
}

.np-cat-tabs::-webkit-scrollbar {
    height: 3px;
}

.np-cat-tabs::-webkit-scrollbar-thumb {
    background: var(--np-saffron, #F37420);
    border-radius: 10px;
}

.np-cat-tabs .nav-item {
    flex-shrink: 0;
    padding: 0;
    list-style: none;
}

.np-cat-tabs button.nav-link-red {
    display: inline-block;
    white-space: nowrap;
    border: 1.5px solid #e5e7eb !important;
    background: #fff !important;
    color: var(--np-text-dark, #3E2723) !important;
    border-radius: 25px;
    padding: 8px 18px !important;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s, box-shadow 0.2s;
    line-height: 1.4;
}

.np-cat-tabs button.nav-link-red:hover {
    border-color: var(--np-saffron, #F37420) !important;
    color: var(--np-saffron, #F37420) !important;
    background: #fff7ed !important;
}

.np-cat-tabs button.nav-link-red.active {
    background: var(--np-grad-saffron) !important;
    color: #fff !important;
    border-color: transparent !important;
}

/* Mobile: category menu collapsed/open */
.np-cat-tabs.category-menuuu {
    display: none !important;
}

.np-cat-tabs.category-menuuu.open {
    display: flex !important;
}

/* ══════════════════════════════════════════
   ALL BLOGS HEIGHT UTILITY
   ══════════════════════════════════════════ */
.all_blogs_data .height-200 {
    height: 100px;
}

/* ══════════════════════════════════════════
   LOADER (currently disabled)
   ══════════════════════════════════════════ */
.main-loader-3 {
    display: none !important; /* disabled — remove this line to re-enable */
    position: fixed;
    inset: 0;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 1;
    pointer-events: all;
    transition: opacity 0.5s ease;
}

.main-loader-3.fade-out-3 {
    pointer-events: none;
}

.main-loader-item-3 {
    text-align: center;
}

.progress-percent-3 {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    margin: 10px 0 8px;
    display: block;
    font-family: var(--np-font, 'Noto Sans', sans-serif);
}

.loader-progressbar-3 {
    width: 180px;
    height: 7px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.3);
}

.progress-fill-3 {
    width: 0%;
    height: 100%;
    background: var(--np-saffron, #F37420);
    transition: width 0.3s ease;
    border-radius: 10px 0 0 10px;
}

/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */
@media (max-width: 768px) {
    .np-blog-hero {
        display: none;
    }

    .np-hero-title {
        font-size: 28px;
    }

    .np-hero-subtitle {
        font-size: 15px;
        margin-bottom: 24px;
    }

    .np-article-row {
        grid-template-columns: 1fr;
    }

    .np-article-image {
        height: 180px;
    }

    .page-btn {
        min-width: 40px;
        height: 40px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .np-hero-title {
        font-size: 24px;
    }
}

/* ══════════════════════════════════════════
   BLOG CARD LINK WRAPPER
   ══════════════════════════════════════════ */
.blogs-cards a {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* ══════════════════════════════════════════
   LEGACY PAGINATION WRAPPER
   ══════════════════════════════════════════ */
.pagination_section {
    display: flex;
    justify-content: center;
}
