/* Blog Redesign CSS */

/* Hero Overlay */
.hsj-blog-hero-overlay {
    position: relative;
    height: 480px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.hsj-hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.6) 100%);
    z-index: 1;
}

.hsj-blog-hero-overlay .container {
    position: relative;
    z-index: 2;
}

.hsj-hero-title {
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.hsj-hero-meta {
    font-size: 1.1rem;
    font-weight: 500;
}

.border-top-blue {
    border-top: 4px solid #1A4B89;
}

/* Breadcrumb in Content */
.hsj-content-breadcrumb {
    background: #f8f9fa;
    padding: 10px 20px;
    border-radius: 8px;
}

/* Sidebar Fixes */
.hsj-sidebar-widget .hsj-toc-list li a {
    padding: 8px 0;
    display: block;
    border-bottom: 1px dashed #eee;
    color: #555;
    font-weight: 500;
}

.hsj-sidebar-widget .hsj-toc-list li a:hover {
    color: #1A4B89;
    padding-left: 5px;
}

/* Grid Area */
.hsj-blog-grid-area {
    background: #fcfcfc;
}

/* Modern Blog Card */
.hsj-blog-card-modern {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: none;
    position: relative;
    display: flex;
    flex-direction: column;
}

.hsj-blog-card-modern:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1) !important;
}

.hsj-blog-card-thumb {
    position: relative;
    overflow: hidden;
    height: 240px;
}

.hsj-blog-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.hsj-blog-card-modern:hover .hsj-blog-img {
    transform: scale(1.1);
}

.hsj-blog-card-meta-overlay {
    position: absolute;
    bottom: 15px;
    left: 15px;
    z-index: 2;
}

.meta-date {
    background: rgba(26, 75, 137, 0.9);
    color: #fff;
    padding: 6px 15px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
}

.hsj-blog-card-title {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.4;
    transition: color 0.3s;
}

.hsj-blog-card-title a {
    text-decoration: none;
}

.hsj-blog-card-modern:hover .hsj-blog-card-title a {
    color: #1A4B89 !important;
}

.badge-primary-soft {
    background: rgba(26, 75, 137, 0.1);
    color: #1A4B89;
    padding: 6px 12px;
    font-weight: 600;
}

.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Blog Details */
.hsj-blog-details-title {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.2;
    color: #222;
}

.badge-primary-soft-lg {
    background: rgba(26, 75, 137, 0.1);
    color: #1A4B89;
    padding: 10px 20px;
    font-weight: 700;
    font-size: 14px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.author-avatar-sm {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.hsj-article-content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #444;
}

.hsj-article-content h2,
.hsj-article-content h3 {
    font-weight: 700;
    color: #222;
    margin-top: 40px;
    margin-bottom: 20px;
}

/* Modern Accordion */
.hsj-modern-accordion .accordion-item {
    border: none;
    margin-bottom: 15px;
    border-radius: 12px !important;
}

.hsj-modern-accordion .accordion-button {
    font-weight: 700;
    padding: 20px;
    border-radius: 12px !important;
    background: #f8f9fa;
    color: #222;
    box-shadow: none !important;
}

.hsj-modern-accordion .accordion-button:not(.collapsed) {
    background: #1A4B89;
    color: #fff;
}

.hsj-modern-accordion .accordion-button::after {
    filter: brightness(0.5);
}

.hsj-modern-accordion .accordion-button:not(.collapsed)::after {
    filter: brightness(1) invert(1);
}

/* Author Box */
.hsj-author-box-v2 {
    background: #fff;
    border-left: 5px solid #1A4B89;
}

.author-avatar-large img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
}

/* Sidebar & TOC */
.hsj-sidebar-widget {
    background: #fff;
    border-radius: 15px;
}

.hsj-toc-list li a {
    transition: all 0.3s;
    border-left: 2px solid transparent;
    padding-left: 15px !important;
}

.hsj-toc-list li a:hover {
    color: #1A4B89 !important;
    border-left-color: #1A4B89;
    background: rgba(26, 75, 137, 0.05);
}

.tag-link {
    display: inline-block;
    padding: 6px 15px;
    background: #f0f2f5;
    color: #555;
    border-radius: 20px;
    margin-right: 8px;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
}

.tag-link:hover {
    background: #1A4B89;
    color: #fff;
    text-decoration: none;
}

.share-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f0f2f5;
    color: #555;
    border-radius: 50%;
    margin-left: 10px;
    transition: all 0.3s;
}

.share-icon:hover {
    color: #fff;
    transform: translateY(-3px);
}

.share-icon.fb:hover {
    background: #3b5998;
}

.share-icon.tw:hover {
    background: #000;
}

.share-icon.pi:hover {
    background: #bd081c;
}

@media (max-width: 768px) {
    .hsj-blog-details-title {
        font-size: 2rem;
    }
}

/* --- NEW BLOG REDESIGN STYLES --- */

/* 1. Small Title Section */
.hsj-blog-header-small {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.hsj-page-title {
    font-weight: 700;
    color: #1A4B89;
    letter-spacing: -0.5px;
}

/* 2. Sticky TOC (Left Column) */
.hsj-blog-toc-sticky {
    /* Sticky position handled by Bootstrap class or inline style, but added here for safety */
    position: -webkit-sticky;
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding-right: 15px;
}

.hsj-toc-widget {
    border-right: 2px solid #e9ecef;
    padding-right: 15px;
}

.hsj-toc-nav .nav-link {
    color: #6c757d;
    padding: 6px 0;
    line-height: 1.4;
    transition: all 0.2s;
    border-left: 2px solid transparent;
    /* Highlight marker */
    padding-left: 10px;
    margin-left: -2px;
}

.hsj-toc-nav .nav-link:hover {
    color: #1A4B89;
    text-decoration: none;
}

.hsj-toc-nav .nav-link.active {
    color: #1A4B89;
    font-weight: 600;
    border-left-color: #1A4B89;
}

/* Scrollbar for TOC */
.hsj-blog-toc-sticky::-webkit-scrollbar {
    width: 4px;
}

.hsj-blog-toc-sticky::-webkit-scrollbar-thumb {
    background-color: #dee2e6;
    border-radius: 4px;
}

/* 3. Pagination Redesign (.hsj-pagination-wrapper) */
.hsj-pagination-wrapper .pagination {
    justify-content: center;
    gap: 8px;
}

.hsj-pagination-wrapper .page-item .page-link {
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-weight: 600;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hsj-pagination-wrapper .page-item .page-link:hover {
    background: #1A4B89;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(26, 75, 137, 0.3);
}

.hsj-pagination-wrapper .page-item.active .page-link {
    background: #1A4B89;
    color: #fff;
    box-shadow: 0 5px 15px rgba(26, 75, 137, 0.4);
    transform: scale(1.1);
}

.hsj-pagination-wrapper .page-item.disabled .page-link {
    background: #f8f9fa;
    color: #ccc;
    box-shadow: none;
    cursor: not-allowed;
}

/* 4. Content Typography Refinements for 3-col */
.hsj-article-content p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    /* Slightly smaller for tighter layout */
}

/* 5. Author Box Tweaks */
.hsj-author-box-v2 {
    border-left: 4px solid #1A4B89;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .hsj-toc-widget {
        border-right: none;
        border-bottom: 2px solid #e9ecef;
        padding-bottom: 20px;
        margin-bottom: 30px;
    }

    .hsj-blog-toc-sticky {
        position: static;
        max-height: none;
        padding-right: 0;
    }
}