/* Blog-specific styles - optimized to use existing theme classes */
h2,
.h2 {
    font-weight: 700;
    font-size: 25px;
    line-height: 35px;
    margin-bottom: 10px;
}

/* Post content basic styling */
.post-content {
    line-height: 1.7;
}

/* Typography spacing */
.post-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 0.5rem;
}

.post-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.post-content p {
    margin-bottom: 1rem;
}

/* Links and inline code */
.post-content a {
    color: #049CFF;
}

/* Inline code */
.post-content code {
    background: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
    font-size: 0.9em;
    color: #e11d48;
    word-wrap: break-word;
}

/* Code blocks */
.post-content pre {
    position: relative;
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
}

/* Code block wrapper for copy button positioning */
.code-block-wrapper {
    position: relative;
    margin: 1.5rem 0;
}

.code-block-wrapper pre {
    margin: 0;
}

/* Copy button for code blocks */
.code-copy-button {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: #334155;
    border: 1px solid #475569;
    color: #e2e8f0;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    z-index: 10;
}

.code-copy-button:hover {
    background: #475569;
    border-color: #64748b;
}

.code-copy-button.copied {
    background: #059669;
    border-color: #10b981;
    color: white;
}

.code-copy-button svg {
    width: 14px;
    height: 14px;
}

.post-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
    white-space: pre;
    word-wrap: normal;
}

/* Custom scrollbar for code blocks */
.post-content pre::-webkit-scrollbar {
    height: 8px;
}

.post-content pre::-webkit-scrollbar-track {
    background: #0f172a;
    border-radius: 4px;
}

.post-content pre::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 4px;
}

.post-content pre::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

.post-content hr {
    margin: 2rem 0;
}

/* Header anchors - visible only on hover */
.post-content h2 a.header-anchor,
.post-content h3 a.header-anchor {
    opacity: 0;
    transition: opacity 0.2s;
    text-decoration: none;
    margin-left: 0.5rem;
}

.post-content h2:hover a.header-anchor,
.post-content h3:hover a.header-anchor {
    opacity: 0.4;
}

/* Ordered lists */
.post-content ol {
    padding-left: 1.5rem;
}

/* Blog listing - 3 column grid */
.grid-blog .grid-box {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 30px;
    width: 100%;
    margin: 0;
}

.grid-blog .grid-item {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0;
    padding: 0;
}

.grid-blog .cnt-box {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.grid-blog .cnt-box .caption {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.grid-blog .cnt-box .caption .post-excerpt {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #64748b;
}

/* Card hover effect */
.grid-blog .cnt-box.boxed {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #E4F1FA;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    overflow: hidden;
}

.grid-blog .cnt-box.boxed:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    border-color: #049CFF;
}

.grid-blog .cnt-box.boxed .caption {
    padding: 25px;
    background: #fff;
}

/* Search box - unified with filters */
.search-box {
    position: relative;
    width: 100%;
}

.search-box .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    pointer-events: none;
}

.search-box input {
    width: 100%;
    height: 56px;
    padding: 0 20px 0 48px;
    background: white;
    border: 1px solid #E4F1FA;
    border-radius: 8px;
    font-size: 16px;
    color: #1e293b;
    outline: none;
    transition: all 0.2s ease;
}

.search-box input::placeholder {
    color: #64748b;
}

.search-box input:focus {
    border-color: #049CFF;
    box-shadow: 0 0 0 3px rgba(4, 156, 255, 0.1);
}

.search-box input:focus+.search-icon,
.search-box:hover .search-icon {
    color: #049CFF;
}

/* Image aspect ratio */
.cnt-box .img-box {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background-color: #f8f9fa;
}

.cnt-box .img-box img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.4s ease;
}

.app-badge-overlay .app-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2;
    margin: 0 !important;
    padding: 8px 16px;
    border-radius: 5px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: normal;
    line-height: 1.2;
    color: #fff;
    background-color: rgba(4, 156, 255, 0.85);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset;
    backdrop-filter: blur(6px);
    display: inline-block;
    cursor: pointer;
    text-decoration: none !important;
    border: none !important;
    transition:
        transform 0.2s ease,
        filter 0.2s ease,
        box-shadow 0.2s ease;
}

.app-badge-overlay .app-badge:hover {
    transform: translateY(-1px) scale(1.02);
    filter: brightness(1.05);
    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}


.card-footer {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 5px;
    border-top: 1px solid #E4F1FA;
    flex-wrap: wrap;
    gap: 16px;
}


.meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.date-time-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

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

.post-meta svg {
    width: 20px;
    height: 20px;
    opacity: 0.7;
    flex-shrink: 0;
}

.card-footer .btn {
    margin-top: 0;
    white-space: nowrap;
}

/* Author info styling */
.author-info {
    font-weight: 400;
    color: #1e293b !important;
}

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

/* Desktop hover effect */
@media (min-width: 992px) {
    .grid-blog .cnt-box:hover .img-box img {
        transform: scale(1.1);
    }
}

/* Responsive grid */
@media (max-width: 991px) {
    .grid-blog .grid-box {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .grid-blog .grid-box {
        grid-template-columns: 1fr;
    }
}

/* Mobile optimizations */
@media (max-width: 767px) {
    .post-content h2 {
        font-size: 1.5rem;
    }

    .post-meta {
        font-size: 0.8125rem;
        gap: 12px;
    }
}

/* ========================================
   SEARCH & FILTERS - UNIFIED DESIGN
   ======================================== */

.filters-wrapper {
    margin: 15px;
}

.filters-wrapper .row>[class*="col-"] {
    padding-right: 15px;
    padding-left: 15px;
}

/* ========================================
   MULTISELECT DROPDOWN (TAG/APP FILTERS)
   ======================================== */

.custom-multiselect {
    position: relative;
    width: 100%;
}

.multiselect-toggle {
    width: 100%;
    height: 56px;
    padding: 0 20px;
    background: white;
    border: 1px solid #E4F1FA;
    border-radius: 8px;
    font-size: 16px;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.multiselect-toggle:hover {
    border-color: #049CFF;
}

.multiselect-toggle.active {
    border-color: #049CFF;
    box-shadow: 0 0 0 3px rgba(4, 156, 255, 0.1);
}

.multiselect-toggle .toggle-icon {
    transition: transform 0.2s ease;
}

.multiselect-toggle.active .toggle-icon {
    transform: rotate(180deg);
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-icon {
    color: #64748b;
    width: 20px;
    height: 20px;
}

.multiselect-toggle:hover .filter-icon,
.multiselect-toggle.active .filter-icon {
    color: #049CFF;
}

/* Dropdown Menu */
.multiselect-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #E4F1FA;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 1000;
    max-height: 420px;
    display: none;
    flex-direction: column;
}

.multiselect-dropdown.active {
    display: flex;
}

/* Dropdown Header (Select All) */
.dropdown-header {
    padding: 12px 16px;
    border-bottom: 1px solid #E4F1FA;
}

/* Dropdown Search */
.dropdown-search {
    padding: 12px 16px;
    border-bottom: 1px solid #E4F1FA;
}

.dropdown-search .search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #E4F1FA;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}

.dropdown-search .search-input:focus {
    border-color: #049CFF;
}

/* Dropdown List */
.dropdown-list,
.dropdown-options {
    overflow-y: auto;
    max-height: 300px;
    padding: 8px 0;
}

/* Custom Scrollbar */
.dropdown-list::-webkit-scrollbar,
.dropdown-options::-webkit-scrollbar {
    width: 8px;
}

.dropdown-list::-webkit-scrollbar-track,
.dropdown-options::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.dropdown-list::-webkit-scrollbar-thumb,
.dropdown-options::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
    transition: background 0.2s ease;
}

.dropdown-list::-webkit-scrollbar-thumb:hover,
.dropdown-options::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Firefox scrollbar */
.dropdown-list,
.dropdown-options {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

/* ========================================
   CHECKBOX STYLING
   ======================================== */

.checkbox-label {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    cursor: pointer;
    gap: 8px;
    transition: background 0.2s ease;
}

.checkbox-label:hover {
    background: #f8f9fa;
}

.checkbox-label.selected {
    background: #E4F1FA;
}

.checkbox-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #049CFF;
}

.checkbox-custom {
    display: none;
}

.checkbox-text {
    font-size: 14px;
    color: #1e293b;
    user-select: none;
}

/* ========================================
   SELECTED BADGES
   ======================================== */

.selected-badges-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.badges-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.selected-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #E4F1FA;
    color: #049CFF;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}

.remove-badge {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: #049CFF;
    transition: color 0.2s ease;
}

.remove-badge:hover {
    color: #0284D1;
}

.remove-badge svg {
    width: 14px;
    height: 14px;
}

/* ========================================
   MOBILE RESPONSIVE
   ======================================== */

@media (max-width: 767px) {
    .filters-wrapper .row {
        flex-direction: column;
        gap: 12px;
    }

    .filters-wrapper .col-md-6 {
        width: 100%;
    }
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
    margin-bottom: 2rem;
    padding: 1rem 0;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    background-color: #ffffff;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.page-link:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
    color: #1f2937;
}

.page-link.active {
    background-color: #049CFF;
    border-color: #049CFF;
    color: #ffffff;
}

.page-link.active:hover {
    background-color: #0284c7;
    border-color: #0284c7;
}

.page-link.next,
.page-link.prev {
    padding: 0.5rem 1.25rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .pagination {
        gap: 0.25rem;
        margin-top: 2rem;
    }

    .page-link {
        min-width: 2rem;
        height: 2rem;
        padding: 0.375rem 0.75rem;
        font-size: 0.8125rem;
    }

    .page-link.next,
    .page-link.prev {
        padding: 0.375rem 1rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .page-link {
        background-color: #1f2937;
        border-color: #374151;
        color: #d1d5db;
    }

    .page-link:hover {
        background-color: #374151;
        border-color: #4b5563;
        color: #f3f4f6;
    }

    .page-link.active {
        background-color: #049CFF;
        border-color: #049CFF;
        color: #ffffff;
    }
}

/* ========================================
   POST TEMPLATE - UX ENHANCEMENTS
   ======================================== */

/* Section spacing override */

main>section>.container {
    padding-top: 30px;
}

/* Ensure all post elements align properly */
.post article,
.post .breadcrumb {
    padding-left: 0;
    margin-left: 0;
}

.post h1,
.post-tags,
.post-meta,
.post-content {
    padding-left: 0;
    margin-left: 0;
}

/* Post Featured Image */
.post-featured-image {
    margin: 25px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 20px -2px rgba(20, 45, 100, .1);
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Breadcrumb Navigation - SIMPLE & CLEAN */
.breadcrumb {
    font-size: 14px;
    margin-bottom: 14px;
    padding-left: 2px;
    background: transparent;
    border: none;
    box-shadow: none;
    color: #486D85;
    font-weight: 400;
}

.breadcrumb a {
    color: #049CFF;
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
}

.breadcrumb a:hover {
    color: #0381d1;
    text-decoration: underline;
}

.breadcrumb .separator {
    margin: 0 10px;
    color: #ccc;
    font-weight: 300;
}

.breadcrumb span:last-child {
    color: #283C49;
    font-weight: 500;
}

/* Post Tags */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.post-tags .tag,
.tag-sm {
    display: inline-block;
    padding: 2px 10px;
    background: #E4F1FA;
    color: #049CFF;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s;
}

.post-tags .tag:hover,
.tag-sm:hover {
    background: #049CFF;
    color: #fff;
}

.post-tags-sm {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.tag-sm {
    padding: 6px 8px;
    font-size: 12px;
}

/* Author Meta Bar */
.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 15px;
    color: #486D85;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.author-name {
    font-weight: 600;
    color: #283C49;
}

.author-link {
    color: #049CFF;
    text-decoration: none;
    transition: color 0.3s;
}

.author-link:hover {
    color: #0381d1;
    text-decoration: underline;
}

.post-meta .separator {
    color: #ccc;
    font-weight: 300;
}

.reading-time,
.last-updated {
    color: #486D85;
}

/* Author Card */
.author-card {
    display: flex;
    gap: 25px;
    margin: 60px 0 50px 0;
    padding: 40px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #E4F1FA;
    box-shadow: 0 3px 20px -2px rgba(20, 45, 100, .1);
}

.author-avatar-lg {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 3px solid #E4F1FA;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.author-info h3 {
    margin: 0 0 12px 0;
    font-size: 24px;
    color: #283C49;
    font-weight: 600;
}

.author-info h3 a {
    color: #283C49;
    text-decoration: none;
    transition: color 0.3s;
}

.author-info h3 a:hover {
    color: #049CFF;
}

.author-info p {
    margin: 0 0 20px 0;
    line-height: 1.7;
    color: #486D85;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #049CFF;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
}

.social-links a:hover {
    background: #0381d1;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(4, 156, 255, 0.3);
}

.social-links svg {
    fill: currentColor;
}

/* Previous/Next Navigation - MODERN CARDS */
.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 60px;
    padding: 0;
}

.nav-prev,
.nav-next {
    flex: 1;
    max-width: 48%;
}

.nav-prev a,
.nav-next a {
    display: block;
    background: #fff;
    border: 1px solid #E4F1FA;
    border-radius: 8px;
    padding: 25px;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    height: 100%;
}

.nav-prev a:hover,
.nav-next a:hover {
    border-color: #049CFF;
    box-shadow: 0 5px 20px rgba(4, 156, 255, 0.15);
    transform: translateY(-2px);
}

.nav-next a {
    text-align: right;
}

.nav-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #049CFF;
    margin-bottom: 10px;
    font-weight: 700;
}

.nav-title {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #283C49;
    line-height: 1.4;
    margin-top: 5px;
}

/* Table of Contents Sidebar - FIXED WITH POSITION FIXED */
.toc-sidebar {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid #E4F1FA;
    box-shadow: 0 3px 20px -2px rgba(20, 45, 100, .1);
    z-index: 100;
}

.toc-list {
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 8px;
}

/* Custom scrollbar for TOC */
.toc-list::-webkit-scrollbar {
    width: 6px;
}

.toc-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.toc-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
    transition: background 0.2s ease;
}

.toc-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Firefox scrollbar */
.toc-list {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}


/* TOC positioning - parent container gets the padding */
.col-lg-4 {
    position: relative;
}

@media (max-width: 1199px) {
    .col-lg-4 {
        padding-top: 0;
    }
}

.toc-sidebar h4 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #283C49;
    font-weight: 600;
    padding-bottom: 15px;
    border-bottom: 2px solid #E4F1FA;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-item {
    margin-bottom: 8px;
    list-style: none;
}

/* Remove any inherited ::before pseudo-elements */
.toc-item::before {
    content: none !important;
    display: none !important;
}

.toc-level-3 {
    padding-left: 20px;
    margin-bottom: 6px;
}

.toc-link {
    color: #486D85;
    text-decoration: none;
    font-size: 15px;
    display: block;
    transition: all 0.3s;
    padding: 8px 12px 8px 28px;
    border-radius: 6px;
    line-height: 1.4;
    position: relative;
}

/* Dash indicator on the left */
.toc-link::before {
    content: '−';
    position: absolute;
    left: 12px;
    color: #cbd5e1;
    font-weight: 600;
    transition: color 0.3s;
}

.toc-link:hover {
    color: #049CFF;
    background: #E4F1FA;
}

.toc-link:hover::before {
    color: #049CFF;
}

.toc-link.active {
    color: #049CFF;
    font-weight: 600;
    background: #E4F1FA;
    border-left: 3px solid #049CFF;
    padding-left: 25px;
}

.toc-link.active::before {
    color: #049CFF;
}

/* Recent Posts Section - CARDS */
.recent-posts-section {
    margin-top: 60px;
    padding-top: 60px;
    border-top: 2px solid #f0f0f0;
}

.recent-posts-section h3 {
    font-size: 28px;
    color: #283C49;
    margin-bottom: 30px;
    font-weight: 600;
}

.recent-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.recent-post-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #E4F1FA;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.recent-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(4, 156, 255, 0.15);
    border-color: #049CFF;
}

.recent-post-image {
    display: block;
    overflow: hidden;
}

.recent-post-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.3s;
}

.recent-post-card:hover .recent-post-image img {
    transform: scale(1.05);
}

.recent-post-content {
    padding: 20px;
}

.recent-post-content h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    line-height: 1.4;
}

.recent-post-content h4 a {
    color: #283C49;
    text-decoration: none;
    transition: color 0.3s;
}

.recent-post-content h4 a:hover {
    color: #049CFF;
}

.recent-post-meta {
    font-size: 13px;
    color: #486D85;
    margin: 0;
}

/* Archive Pages - IMPROVED DESIGN */
.archive-header {
    text-align: center;
    margin-bottom: 50px;
}

.archive-header h1 {
    font-size: 42px;
    margin-bottom: 15px;
    color: #283C49;
}

.archive-header .lead {
    font-size: 18px;
    color: #486D85;
}

/* Back to Blog Button */
.text-center .btn-border {
    display: inline-block;
    padding: 14px 32px;
    border: 2px solid #049CFF;
    color: #049CFF;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    margin-top: 40px;
}

.text-center .btn-border:hover {
    background: #049CFF;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(4, 156, 255, 0.3);
}

/* Author Archive */
.author-archive-header {
    display: flex;
    gap: 30px;
    align-items: center;
    padding: 50px;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border-radius: 12px;
    border: 1px solid #E4F1FA;
    box-shadow: 0 5px 30px -5px rgba(20, 45, 100, .08);
    margin-bottom: 50px;
}

.author-archive-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    flex-shrink: 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.author-archive-info h1 {
    margin: 0 0 15px 0;
    font-size: 36px;
}

.author-archive-info .lead {
    margin-bottom: 20px;
    font-size: 17px;
    line-height: 1.6;
}

/* Tag Archive Badge */
.tag-badge {
    display: inline-block;
    padding: 10px 20px;
    background: #049CFF;
    color: #fff;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 30px;
}

/* Mobile Responsive */
@media (max-width: 991px) {
    .toc-sidebar {
        display: none;
    }

    .recent-posts-grid {
        grid-template-columns: 1fr;
    }

    .author-card,
    .author-archive-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 30px 20px;
    }

    .author-avatar-lg,
    .author-archive-avatar {
        margin-bottom: 15px;
    }

    .social-links {
        justify-content: center;
    }

    .post-navigation {
        flex-direction: column;
        gap: 20px;
    }

    .nav-prev,
    .nav-next {
        max-width: 100%;
    }

    .nav-next a {
        text-align: left;
    }

    .post-meta {
        font-size: 14px;
    }

    .archive-header h1 {
        font-size: 32px;
    }
}

@media (max-width: 575px) {
    .breadcrumb {
        font-size: 13px;
    }

    .author-card {
        padding: 25px 15px;
    }

    .author-avatar-lg {
        width: 80px;
        height: 80px;
    }

    .nav-prev a,
    .nav-next a {
        padding: 20px;
    }

    .nav-title {
        font-size: 16px;
    }

    .recent-posts-grid {
        grid-template-columns: 1fr;
    }

    .author-archive-header {
        padding: 30px 20px;
    }

    .archive-header h1 {
        font-size: 28px;
    }
}

.card-footer .btn {
    width: 100%;
    text-align: center;
}

/* Author link styling */
.author-link {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #049CFF;
    font-weight: 500;
    transition: color 0.2s ease;
}

.author-link:hover {
    color: #0284D1;
    text-decoration: none;
}

.author-link:hover .author-avatar {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

.author-by {
    color: #64748b;
    font-weight: 400;
    font-size: 0.75rem;
}

.author-name {
    font-weight: 500;
    color: #049CFF;
}

/* Post page specific overrides */
.post .post-meta {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.9rem;
    color: #64748b;
}

.post .post-meta .author-avatar-sm {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.post .post-meta .author-name {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #64748b;
}

.post .post-meta .reading-time,
.post .post-meta .last-updated {
    display: flex;
    align-items: center;
    gap: 6px;
}

.post .post-meta svg {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

.post .post-meta .separator {
    color: #cbd5e1;
    margin: 0 4px;
}

.post .post-meta .author-link {
    color: #049CFF;
    font-weight: 500;
    text-decoration: none;
}

.post .post-meta .author-link:hover {
    color: #0284D1;
    text-decoration: none;
}

/* Mobile Table of Contents */
.toc-mobile {
    display: none;
    background: #f8f9fa;
    border: 1px solid #E4F1FA;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.toc-mobile h4 {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    color: #1e293b;
}

/* Show mobile TOC only on mobile */
@media (max-width: 991px) {
    .toc-mobile {
        display: block;
    }

    /* Hide desktop TOC on mobile */
    .toc-sidebar {
        display: none !important;
    }
}

/* Hide mobile TOC on desktop */
@media (min-width: 992px) {
    .toc-mobile {
        display: none !important;
    }
}

/* Filter Dropdowns - Tag and Author */
.custom-multiselect {
    position: relative;
    width: 100%;
}

.multiselect-toggle {
    width: 100%;
    height: 56px;
    padding: 0 20px;
    background: white;
    border: 1px solid #E4F1FA;
    border-radius: 8px;
    font-size: 16px;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.multiselect-toggle:hover {
    border-color: #049CFF;
}

.multiselect-toggle.active {
    border-color: #049CFF;
    box-shadow: 0 0 0 3px rgba(4, 156, 255, 0.1);
}

.multiselect-toggle .toggle-icon {
    transition: transform 0.2s ease;
}

.multiselect-toggle.active .toggle-icon {
    transform: rotate(180deg);
}

.dropdown-header {
    padding: 12px 16px;
    border-bottom: 1px solid #E4F1FA;
}

.dropdown-search {
    padding: 12px 16px;
    border-bottom: 1px solid #E4F1FA;
}

.dropdown-search .search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #E4F1FA;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}

.dropdown-search .search-input:focus {
    border-color: #049CFF;
}

.dropdown-list {
    overflow-y: auto;
    max-height: 300px;
    padding: 8px 0;
}

/* App filter dropdown options with scrollbar */
.dropdown-options {
    overflow-y: auto;
    max-height: 300px;
    padding: 8px 0;
}

/* Custom scrollbar for dropdown lists */
.dropdown-list::-webkit-scrollbar,
.dropdown-options::-webkit-scrollbar {
    width: 8px;
}

.dropdown-list::-webkit-scrollbar-track,
.dropdown-options::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.dropdown-list::-webkit-scrollbar-thumb,
.dropdown-options::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
    transition: background 0.2s ease;
}

.dropdown-list::-webkit-scrollbar-thumb:hover,
.dropdown-options::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Firefox scrollbar */
.dropdown-list,
.dropdown-options {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}


.checkbox-label {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    cursor: pointer;
    gap: 8px;
    transition: background 0.2s ease;
}

.checkbox-label:hover {
    background: #f8f9fa;
}

.checkbox-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #049CFF;
}

.checkbox-custom {
    display: none;
}

.checkbox-text {
    font-size: 14px;
    color: #1e293b;
    user-select: none;
}

/* Selected badges - mobile-first: default is relative */
.selected-tags-container,
.selected-authors-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

/* Desktop: use absolute positioning to prevent layout shift */
@media (min-width: 768px) {

    .selected-tags-container,
    .selected-authors-container {
        position: absolute;
        bottom: calc(100% + 4px);
        left: 0;
        right: 0;
        margin-bottom: 0;
        z-index: 10;
    }
}

.selected-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: #E4F1FA;
    color: #049CFF;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}

.remove-badge {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: #049CFF;
    transition: color 0.2s ease;
}

.remove-badge:hover {
    color: #0284D1;
}

.remove-badge svg {
    width: 12px;
    height: 12px;
}