/**
 * NJ Blog Grid & Slider Stylesheet
 * Responsive CSS Grid & Swiper Slider for Blog Posts
 */

/* ==================== WRAPPER ==================== */
.nj-blog-wrapper {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 50px 24px;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.nj-blog-wrapper *,
.nj-blog-wrapper *::before,
.nj-blog-wrapper *::after {
    box-sizing: border-box;
}

/* ==================== HEADER ==================== */
.nj-blog-header {
    margin-bottom: 35px;
}
.nj-blog-header.text-center {
    text-align: center;
}
.nj-blog-header.text-left {
    text-align: left;
}
.nj-blog-header.text-right {
    text-align: right;
}

.nj-blog-subtitle {
    display: inline-block;
    color: #f7941d;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
}

.nj-blog-title {
    color: #0f172a;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 12px 0;
}

.nj-blog-description {
    color: #64748b;
    font-size: 16px;
    line-height: 1.6;
    max-width: 650px;
    margin: 0;
}
.nj-blog-header.text-center .nj-blog-description {
    margin: 0 auto;
}

/* ==================== GRID LAYOUT ==================== */
.nj-blog-grid {
    display: grid;
    grid-template-columns: repeat(var(--nj-blog-cols, 3), 1fr);
    gap: var(--nj-blog-gap, 30px);
    width: 100%;
}

@media (max-width: 1024px) {
    .nj-blog-grid {
        grid-template-columns: repeat(var(--nj-blog-cols-tablet, 2), 1fr);
        gap: var(--nj-blog-gap-tablet, 24px);
    }
}

@media (max-width: 767px) {
    .nj-blog-grid {
        grid-template-columns: repeat(var(--nj-blog-cols-mobile, 1), 1fr);
        gap: var(--nj-blog-gap-mobile, 20px);
    }
}

/* ==================== CARD STYLES ==================== */
.nj-blog-card {
    background: #ffffff;
    border-radius: var(--nj-card-radius, 16px);
    border: 1px solid #f1f5f9;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.35s ease, border-color 0.35s ease;
    height: 100%;
}

.nj-blog-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 18px 40px rgba(43, 57, 146, 0.12);
    border-color: rgba(43, 57, 146, 0.2);
}

/* Image / Thumbnail Container */
.nj-blog-media {
    position: relative;
    width: 100%;
    height: var(--nj-img-height, 220px);
    overflow: hidden;
    background-color: #f8fafc;
}

.nj-blog-media > a:not(.nj-blog-badge),
.nj-blog-media .nj-blog-thumb-link {
    display: block;
    width: 100%;
    height: 100%;
}

.nj-blog-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.nj-blog-card:hover .nj-blog-media img {
    transform: scale(1.06);
}

/* Category Badge on Image */
.nj-blog-media a.nj-blog-badge,
.nj-blog-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    right: auto !important;
    bottom: auto !important;
    width: auto !important;
    height: auto !important;
    max-width: max-content !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: #2b3992 !important;
    background-color: #2b3992 !important;
    color: #ffffff !important;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 6px 14px !important;
    border-radius: 30px !important;
    box-shadow: 0 4px 12px rgba(43, 57, 146, 0.35);
    z-index: 5;
    text-decoration: none;
    line-height: 1.2;
    white-space: nowrap;
    transition: background-color 0.25s ease, transform 0.25s ease;
}

.nj-blog-media a.nj-blog-badge:hover,
.nj-blog-badge:hover {
    background: #f7941d !important;
    background-color: #f7941d !important;
    color: #ffffff !important;
    transform: translateY(-2px);
}

/* Card Body */
.nj-blog-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Post Meta (Date, Reading time) */
.nj-blog-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    color: #64748b;
    font-size: 13px;
    margin-bottom: 12px;
}

.nj-blog-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nj-blog-meta-item svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
    color: #f7941d;
}

/* Post Title */
.nj-blog-card-title {
    color: #0f172a;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 12px 0;
    transition: color 0.25s ease;
}

.nj-blog-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.25s ease;
}

.nj-blog-card:hover .nj-blog-card-title a,
.nj-blog-card-title a:hover {
    color: #2b3992;
}

/* Post Excerpt */
.nj-blog-excerpt {
    color: #64748b;
    font-size: 14.5px;
    line-height: 1.65;
    margin: 0 0 20px 0;
    flex-grow: 1;
}

/* Read More Button */
.nj-blog-footer {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}

.nj-blog-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #2b3992;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.3px;
    transition: color 0.25s ease, gap 0.25s ease;
}

.nj-blog-read-more svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
    transition: transform 0.25s ease;
}

.nj-blog-card:hover .nj-blog-read-more,
.nj-blog-read-more:hover {
    color: #f7941d;
    gap: 12px;
}

.nj-blog-read-more:hover svg {
    transform: translateX(3px);
}

/* ==================== SLIDER LAYOUT ==================== */
.nj-blog-slider-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 10px 4px 40px 4px;
}

.nj-blog-slider-container .swiper {
    width: 100%;
    overflow: visible;
}

.nj-blog-slider-container .swiper-slide {
    height: auto;
    display: flex;
}

.nj-blog-slider-container .swiper-slide .nj-blog-card {
    width: 100%;
}

/* Slider Navigation Arrows */
.nj-blog-slider-arrows {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 20px;
}

.nj-blog-slider-arrow {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #2b3992;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.25s ease;
}

.nj-blog-slider-arrow svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.nj-blog-slider-arrow:hover {
    background: #2b3992;
    color: #ffffff;
    border-color: #2b3992;
    box-shadow: 0 6px 18px rgba(43, 57, 146, 0.25);
    transform: translateY(-2px);
}

.nj-blog-slider-arrow.swiper-button-disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none !important;
}

/* Slider Pagination Dots */
.nj-blog-slider-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 25px;
}

.nj-blog-slider-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #cbd5e1;
    opacity: 1;
    border-radius: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nj-blog-slider-pagination .swiper-pagination-bullet-active {
    width: 28px;
    background: #2b3992;
    border-radius: 20px;
}
