/* Expeditious Tools - Blog System Stylesheet */

:root {
    --blog-primary: #ffc107;
    --blog-primary-hover: #e0a800;
    --blog-primary-light: #fff8e1;
    --blog-dark: #111827;
    --blog-dark-soft: #1f2937;
    --blog-gray-text: #4b5563;
    --blog-gray-light: #9ca3af;
    --blog-bg-light: #f9fafb;
    --blog-card-border: #e5e7eb;
    --blog-radius-sm: 8px;
    --blog-radius-md: 14px;
    --blog-radius-lg: 20px;
    --blog-shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
    --blog-shadow-md: 0 10px 25px rgba(0, 0, 0, 0.08);
    --blog-shadow-hover: 0 16px 36px rgba(0, 0, 0, 0.12);
}

/* ==========================================================================
   Blog Header & Hero Section
   ========================================================================== */

/* Navbar on blog pages (no bgimg hero) */
#mainNav {
    background-color: #212529 !important;
}

.blog-hero {
    background: linear-gradient(180deg, #111827 0%, #1f2937 100%);
    color: #ffffff;
    padding: 125px 20px 55px;
    text-align: center;
    position: relative;
    border-bottom: 3px solid var(--blog-primary);
}

.blog-post-main {
    padding-top: 80px;
}

.blog-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 193, 7, 0.15);
    color: var(--blog-primary);
    border: 1px solid rgba(255, 193, 7, 0.35);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 18px;
}

.blog-hero-title {
    font-size: 2.75rem;
    font-weight: 800;
    margin-bottom: 14px;
    letter-spacing: -0.5px;
    color: #ffffff;
}

.blog-hero-desc {
    font-size: 1.15rem;
    color: #d1d5db;
    max-width: 680px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

/* Search bar in Hero */
.blog-search-box {
    max-width: 620px;
    margin: 0 auto;
    position: relative;
}

.blog-search-form {
    display: flex;
    background: #ffffff;
    border-radius: 50px;
    padding: 6px 8px 6px 20px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    align-items: center;
}

.blog-search-icon {
    color: #9ca3af;
    font-size: 18px;
    margin-right: 12px;
}

.blog-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    color: #111827;
    background: transparent;
}

.blog-search-input::placeholder {
    color: #9ca3af;
}

.blog-search-btn {
    background: var(--blog-primary);
    color: #111827;
    border: none;
    border-radius: 50px;
    padding: 10px 24px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.blog-search-btn:hover {
    background: var(--blog-primary-hover);
    transform: translateY(-1px);
}

/* Category Filter Bar */
.blog-categories-nav {
    background: #ffffff;
    border-bottom: 1px solid var(--blog-card-border);
    padding: 14px 0;
    position: sticky;
    top: 60px;
    z-index: 99;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.blog-categories-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 10px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.blog-category-pill {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    color: #4b5563;
    text-decoration: none;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.blog-category-pill:hover {
    background: #e5e7eb;
    color: #111827;
    transform: translateY(-1px);
}

.blog-category-pill.active {
    background: var(--blog-dark);
    color: #ffffff;
    border-color: var(--blog-dark);
}

.blog-category-pill.active .pill-badge {
    background: var(--blog-primary);
    color: #111827;
}

.pill-badge {
    background: #e5e7eb;
    color: #4b5563;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 12px;
    font-weight: 700;
}

/* ==========================================================================
   Featured Post Card
   ========================================================================== */

.featured-post-card {
    background: #ffffff;
    border: 1px solid var(--blog-card-border);
    border-radius: var(--blog-radius-lg);
    overflow: hidden;
    box-shadow: var(--blog-shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 45px;
}

.featured-post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--blog-shadow-hover);
}

.featured-post-img-wrapper {
    position: relative;
    overflow: hidden;
    min-height: 280px;
    background: #111827;
}

.featured-post-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.featured-post-card:hover .featured-post-img {
    transform: scale(1.04);
}

.featured-badge {
    position: absolute;
    top: 18px;
    left: 18px;
    background: var(--blog-primary);
    color: #111827;
    font-weight: 800;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 14px;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.featured-post-body {
    padding: 35px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-post-category {
    display: inline-block;
    color: #d97706;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    text-decoration: none;
}

.featured-post-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 15px;
    color: var(--blog-dark);
}

.featured-post-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.featured-post-title a:hover {
    color: #d97706;
}

.featured-post-excerpt {
    font-size: 1.05rem;
    color: var(--blog-gray-text);
    line-height: 1.6;
    margin-bottom: 25px;
}

/* Post Meta (Author, Date, Reading time) */
.post-meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
}

.author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--blog-primary);
}

.author-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--blog-dark);
    line-height: 1.2;
}

.post-date-reading {
    font-size: 12px;
    color: var(--blog-gray-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ==========================================================================
   Blog Post Grid & Cards
   ========================================================================== */

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.blog-card {
    background: #ffffff;
    border: 1px solid var(--blog-card-border);
    border-radius: var(--blog-radius-md);
    overflow: hidden;
    box-shadow: var(--blog-shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--blog-shadow-hover);
}

.blog-card-thumb-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #111827;
}

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

.blog-card:hover .blog-card-img {
    transform: scale(1.05);
}

.blog-card-category-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(17, 24, 39, 0.85);
    color: var(--blog-primary);
    backdrop-filter: blur(4px);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
}

.blog-card-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 10px;
    color: var(--blog-dark);
}

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

.blog-card-title a:hover {
    color: #d97706;
}

.blog-card-excerpt {
    font-size: 0.95rem;
    color: var(--blog-gray-text);
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
}

.blog-card-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.blog-card-author-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--blog-dark);
}

.blog-card-reading-time {
    font-size: 12px;
    color: var(--blog-gray-light);
    font-weight: 500;
}

/* Empty State */
.blog-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border: 1px dashed #d1d5db;
    border-radius: var(--blog-radius-md);
    margin: 40px 0;
}

.blog-empty-icon {
    font-size: 48px;
    color: var(--blog-primary);
    margin-bottom: 16px;
}

.blog-empty-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--blog-dark);
    margin-bottom: 8px;
}

.blog-empty-desc {
    color: var(--blog-gray-text);
    margin-bottom: 24px;
}

/* Pagination */
.blog-pagination {
    display: flex;
    justify-content: center;
    margin: 40px 0;
}

.blog-pagination .pagination {
    display: flex;
    gap: 6px;
}

.blog-pagination .page-item .page-link {
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    color: #4b5563;
    padding: 8px 16px;
    font-weight: 600;
    transition: all 0.2s;
}

.blog-pagination .page-item.active .page-link {
    background: var(--blog-primary);
    border-color: var(--blog-primary);
    color: #111827;
}

.blog-pagination .page-item .page-link:hover {
    background: #f3f4f6;
    color: #111827;
}

/* ==========================================================================
   Blog Detail Page Styles
   ========================================================================== */

.article-header {
    margin-bottom: 35px;
}

.article-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--blog-gray-light);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.article-breadcrumbs a {
    color: #4b5563;
    text-decoration: none;
    transition: color 0.2s;
}

.article-breadcrumbs a:hover {
    color: var(--blog-primary-hover);
}

.article-breadcrumbs-sep {
    color: #d1d5db;
}

.article-category-badge {
    display: inline-block;
    background: var(--blog-primary-light);
    color: #b45309;
    border: 1px solid #fde68a;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 14px;
    border-radius: 50px;
    margin-bottom: 16px;
    text-decoration: none;
}

.article-title {
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--blog-dark);
    line-height: 1.25;
    margin-bottom: 18px;
    letter-spacing: -0.5px;
}

.article-lead {
    font-size: 1.25rem;
    color: var(--blog-gray-text);
    line-height: 1.6;
    margin-bottom: 25px;
}

.article-meta-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.article-author-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.article-author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--blog-primary);
}

.article-author-name {
    font-weight: 700;
    font-size: 16px;
    color: var(--blog-dark);
}

.article-author-bio {
    font-size: 12px;
    color: var(--blog-gray-text);
}

.article-dates-reading {
    font-size: 13px;
    color: var(--blog-gray-light);
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.article-reading-badge {
    background: #f3f4f6;
    color: #374151;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 12px;
}

/* Featured image on detail page */
.article-featured-figure {
    margin-bottom: 40px;
    border-radius: var(--blog-radius-lg);
    overflow: hidden;
    box-shadow: var(--blog-shadow-md);
}

.article-featured-img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

.article-featured-caption {
    padding: 10px 16px;
    font-size: 13px;
    color: var(--blog-gray-light);
    background: #f9fafb;
    border-top: 1px solid #eee;
    text-align: center;
}

/* ==========================================================================
   Table of Contents (TOC)
   ========================================================================== */

.article-toc-box {
    background: #fdfdfd;
    border: 1px solid #e5e7eb;
    border-left: 4px solid var(--blog-primary);
    border-radius: var(--blog-radius-md);
    padding: 24px;
    margin-bottom: 35px;
    box-shadow: var(--blog-shadow-sm);
}

.article-toc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.article-toc-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--blog-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.article-toc-item {
    margin-bottom: 10px;
    line-height: 1.4;
}

.article-toc-item.level-3 {
    padding-left: 20px;
    font-size: 14px;
}

.article-toc-link {
    color: #4b5563;
    text-decoration: none;
    font-size: 15px;
    transition: all 0.2s ease;
    display: inline-block;
}

.article-toc-link:hover {
    color: #d97706;
    transform: translateX(3px);
}

/* ==========================================================================
   Article Rich Prose Typography
   ========================================================================== */

.article-content {
    font-size: 1.125rem;
    line-height: 1.85;
    color: #2e3440;
    word-break: break-word;
}

.article-content p {
    margin-bottom: 24px;
}

.article-content h2 {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--blog-dark);
    margin-top: 45px;
    margin-bottom: 18px;
    line-height: 1.3;
    padding-bottom: 8px;
    border-bottom: 2px solid #f3f4f6;
    scroll-margin-top: 90px;
}

.article-content h3 {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--blog-dark);
    margin-top: 35px;
    margin-bottom: 14px;
    line-height: 1.35;
    scroll-margin-top: 90px;
}

.article-content ul,
.article-content ol {
    margin-bottom: 24px;
    padding-left: 28px;
}

.article-content li {
    margin-bottom: 8px;
}

.article-content blockquote {
    background: #fffbeb;
    border-left: 4px solid var(--blog-primary);
    border-radius: 0 12px 12px 0;
    padding: 20px 24px;
    margin: 30px 0;
    font-style: italic;
    color: #4b5563;
}

.article-content blockquote p:last-child {
    margin-bottom: 0;
}

.article-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 30px 0;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.article-content th {
    background: #111827;
    color: #ffffff;
    font-weight: 700;
    padding: 14px 18px;
    text-align: left;
    font-size: 14px;
}

.article-content td {
    padding: 14px 18px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 15px;
    color: #374151;
}

.article-content tr:last-child td {
    border-bottom: none;
}

.article-content tr:nth-child(even) td {
    background: #f9fafb;
}

/* Inline Code */
.article-content code:not(pre code) {
    background: #f3f4f6;
    color: #d97706;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.9em;
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Code Blocks */
.code-block-wrapper {
    position: relative;
    margin: 30px 0;
    border-radius: 12px;
    overflow: hidden;
    background: #111827;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.code-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1f2937;
    padding: 8px 16px;
    font-size: 12px;
    color: #9ca3af;
    border-bottom: 1px solid #374151;
}

.code-copy-btn {
    background: transparent;
    border: 1px solid #4b5563;
    color: #d1d5db;
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}

.code-copy-btn:hover {
    background: var(--blog-primary);
    color: #111827;
    border-color: var(--blog-primary);
}

.article-content pre {
    margin: 0;
    padding: 20px;
    overflow-x: auto;
    background: #111827;
    color: #e5e7eb;
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 14px;
    line-height: 1.6;
}

.article-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    border: none;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 25px 0;
}

.article-content a {
    color: #1d2433;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: #ffc107;
    transition: all 0.2s;
}

.article-content a:hover {
    color: #d97706;
}

/* ==========================================================================
   Article Tags & Social Share
   ========================================================================== */

.article-tags-section {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 35px 0 25px;
}

.article-tag-pill {
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.article-tag-pill:hover {
    background: var(--blog-primary);
    color: #111827;
    border-color: var(--blog-primary);
}

.article-share-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 45px;
    flex-wrap: wrap;
    gap: 15px;
}

.article-share-label {
    font-weight: 700;
    font-size: 15px;
    color: var(--blog-dark);
}

.article-share-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: #ffffff;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.share-btn-x { background: #000000; }
.share-btn-x:hover { background: #333333; color: #ffffff; }

.share-btn-linkedin { background: #0a66c2; }
.share-btn-linkedin:hover { background: #084e96; color: #ffffff; }

.share-btn-facebook { background: #1877f2; }
.share-btn-facebook:hover { background: #0d65d9; color: #ffffff; }

.share-btn-copy {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}
.share-btn-copy:hover {
    background: #e5e7eb;
    color: #111827;
}

/* Copy Link Toast */
.copy-toast {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: #111827;
    color: #ffffff;
    padding: 12px 22px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    border-left: 4px solid var(--blog-primary);
    z-index: 9999;
    display: none;
    animation: fadeIn 0.3s ease;
}

/* ==========================================================================
   Prev / Next Article Navigation
   ========================================================================== */

.article-nav-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 40px 0 50px;
}

.article-nav-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
}

.article-nav-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--blog-shadow-md);
    border-color: var(--blog-primary);
    color: inherit;
}

.article-nav-direction {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--blog-gray-light);
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.article-nav-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--blog-dark);
    line-height: 1.35;
    margin: 0;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 992px) {
    .blog-hero-title {
        font-size: 2.2rem;
    }

    .article-title {
        font-size: 2.15rem;
    }

    .featured-post-body {
        padding: 25px;
    }
}

@media (max-width: 768px) {
    .blog-hero {
        padding: 50px 15px 40px;
    }

    .blog-hero-title {
        font-size: 1.85rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .article-title {
        font-size: 1.75rem;
    }

    .article-meta-box {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .article-share-bar {
        flex-direction: column;
        align-items: flex-start;
    }
}
