/* Blog Detail Styles */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6f42c1;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --border-color: #dee2e6;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Accessibility */
.skip-to-content {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 9999;
    padding: 1rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
}

.skip-to-content:focus {
    left: 0;
}

/* Breadcrumb */
.breadcrumb-container {
    background: var(--light-bg);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb-item a {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
}

.breadcrumb-item.active a {
    color: var(--primary-color);
    font-weight: 500;
}

/* Hero Image */
.blog-hero-image {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.hero-image-container {
    width: 100%;
    height: 100%;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.6));
}

/* Main Container */
.blog-detail-container {
    padding: 3rem 0;
    background: white;
}

/* Article Header */
.article-header {
    margin-bottom: 2.5rem;
}

.category-badge {
    margin-bottom: 1rem;
}

.category-badge .badge {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.meta-left {
    flex: 1;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.author-avatar-small {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.2rem;
}

.author-details {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    color: var(--text-color);
}

.author-role {
    font-size: 0.9rem;
    color: #666;
}

.publish-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
}

.publish-date,
.read-time,
.view-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    font-size: 0.9rem;
}

.publish-info i {
    font-size: 1.1rem;
    color: var(--primary-color);
}

/* Social Share */
.social-share-top {
    flex-shrink: 0;
}

.share-label {
    display: block;
    margin-bottom: 0.5rem;
    color: #666;
    font-size: 0.9rem;
}

.share-buttons {
    display: flex;
    gap: 0.5rem;
}

.share-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: transform 0.2s;
}

.share-btn:hover {
    transform: translateY(-2px);
}

.share-btn.twitter {
    background: #1DA1F2;
}

.share-btn.linkedin {
    background: #0077B5;
}

.share-btn.facebook {
    background: #4267B2;
}

.share-btn.copy-link {
    background: #6c757d;
}

/* Reading Progress */
.reading-progress {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 4px;
    background: var(--light-bg);
    margin-bottom: 2rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.1s;
}

/* Introduction */
.article-introduction {
    background: linear-gradient(135deg, #f8f9ff, #f0f4ff);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
}

.intro-icon {
    font-size: 2rem;
    color: var(--primary-color);
}

.intro-content h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.intro-content p {
    margin: 0;
    color: #555;
    line-height: 1.6;
}

/* Table of Contents */
.table-of-contents {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 2rem;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--light-bg);
    border-bottom: 1px solid var(--border-color);
}

.toc-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    color: var(--text-color);
}

.toc-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #666;
    cursor: pointer;
    transition: transform 0.3s;
}

.toc-toggle.active {
    transform: rotate(180deg);
}

.toc-list {
    list-style: none;
    padding: 1rem 1.5rem;
    margin: 0;
    max-height: 400px;
    overflow-y: auto;
}

.toc-list li {
    margin-bottom: 0.5rem;
}

.toc-list a {
    color: #555;
    text-decoration: none;
    display: block;
    padding: 0.5rem 0;
    border-left: 3px solid transparent;
    padding-left: 1rem;
    transition: all 0.2s;
}

.toc-list a:hover,
.toc-list a.active {
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    background: #f8f9ff;
}

.toc-list .toc-h3 {
    padding-left: 2rem;
    font-size: 0.95rem;
}

/* Article Content */
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
}

.content-wrapper {
    margin-bottom: 3rem;
}

.content-wrapper h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    font-weight: 700;
}

.content-wrapper h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: #555;
    font-weight: 600;
}

.content-wrapper p {
    margin-bottom: 1.5rem;
}

.content-wrapper img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: var(--shadow);
}

.content-wrapper blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #555;
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
}

.content-wrapper pre {
    background: #f5f5f5;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.content-wrapper code {
    background: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

/* Key Takeaways */
.key-takeaways {
    background: linear-gradient(135deg, #fff8e1, #ffecb3);
    border-left: 4px solid #ffc107;
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
    margin: 2rem 0;
}

.takeaways-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.takeaways-header i {
    font-size: 1.5rem;
    color: #ff9800;
}

.takeaways-header h4 {
    margin: 0;
    color: #5d4037;
}

.takeaways-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.takeaways-list li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    color: #5d4037;
}

.takeaways-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #4caf50;
    font-weight: bold;
}

/* Conclusion */
.article-conclusion {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    border-left: 4px solid #4caf50;
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
    margin: 2rem 0;
}

.article-conclusion h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0;
    margin-bottom: 1rem;
    color: #2e7d32;
}

/* Article Footer */
.article-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.article-tags {
    margin-bottom: 2rem;
}

.tags-label {
    display: block;
    margin-bottom: 0.75rem;
    color: #666;
    font-weight: 500;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: var(--light-bg);
    color: #555;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.tag:hover {
    background: var(--primary-color);
    color: white;
}

/* Social Share Bottom */
.social-share-bottom {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.share-section {
    text-align: center;
    margin-bottom: 1.5rem;
}

.share-section h4 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.share-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.share-btn-lg {
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: transform 0.2s;
}

.share-btn-lg:hover {
    transform: translateY(-2px);
    color: white;
}

.share-btn-lg.twitter {
    background: #1DA1F2;
}

.share-btn-lg.linkedin {
    background: #0077B5;
}

.share-btn-lg.facebook {
    background: #4267B2;
}

.copy-link-section {
    max-width: 500px;
    margin: 0 auto;
}

#article-url {
    background: white;
}

/* Author Bio Full */
.author-bio-full {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.author-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 2rem;
    flex-shrink: 0;
}

.author-bio-content {
    flex: 1;
}

.author-bio-content h4 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.author-role-bio {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 1rem;
}

.author-description {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.author-social {
    display: flex;
    gap: 1rem;
}

.author-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    text-decoration: none;
    transition: all 0.2s;
}

.author-social a:hover {
    background: var(--primary-color);
    color: white;
}

/* Article Navigation */
.article-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.nav-link {
    display: block;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.2s;
    position: relative;
}

.nav-link:hover {
    border-color: var(--primary-color);
    background: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.prev-article {
    text-align: left;
}

.next-article {
    text-align: right;
}

.nav-direction {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: #666;
    font-size: 0.9rem;
}

.prev-article .nav-direction {
    justify-content: flex-start;
}

.next-article .nav-direction {
    justify-content: flex-end;
}

.nav-title {
    font-weight: 600;
    line-height: 1.4;
}

/* Sidebar */
.sticky-sidebar {
    position: sticky;
    top: 2rem;
}

.sidebar-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.sidebar-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--text-color);
    font-size: 1.1rem;
}

/* Author Card Sidebar */
.author-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.author-avatar-sidebar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.2rem;
}

.author-info-sidebar h5 {
    margin: 0 0 0.25rem 0;
}

.author-card-body {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* TOC Sidebar */
.sidebar-toc {
    max-height: 300px;
    overflow-y: auto;
}

.sidebar-toc a {
    display: block;
    padding: 0.5rem 0;
    color: #555;
    text-decoration: none;
    border-left: 3px solid transparent;
    padding-left: 1rem;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.sidebar-toc a:hover,
.sidebar-toc a.active {
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    background: #f8f9ff;
}

.sidebar-toc .sidebar-toc-h3 {
    padding-left: 2rem;
    font-size: 0.9rem;
}

/* PDF Download */
.pdf-download .btn {
    font-weight: 500;
}

/* Newsletter Sidebar */
.newsletter-form-sidebar .btn {
    font-weight: 500;
}

/* Related Articles Sidebar */
.related-list {
    margin-bottom: 1rem;
}

.related-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-color);
    transition: background 0.2s;
}

.related-item:last-child {
    border-bottom: none;
}

.related-item:hover {
    background: #f8f9ff;
}

.related-image {
    width: 80px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-content h6 {
    margin: 0 0 0.25rem 0;
    font-size: 0.95rem;
    line-height: 1.3;
}

.related-meta {
    font-size: 0.85rem;
    color: #666;
}

/* Popular Articles */
.popular-list {
    margin-bottom: 1rem;
}

.popular-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-color);
}

.popular-item:last-child {
    border-bottom: none;
}

.popular-rank {
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    color: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

.popular-content h6 {
    margin: 0 0 0.25rem 0;
    font-size: 0.95rem;
    line-height: 1.3;
}

/* Floating Actions */
.floating-actions {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 1000;
}

.fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
    transition: all 0.2s;
}

.fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(13, 110, 253, 0.4);
}

.back-to-top {
    text-decoration: none;
    background: var(--secondary-color);
}

/* Responsive Design */
@media (max-width: 992px) {
    .blog-hero-image {
        height: 300px;
    }

    .article-title {
        font-size: 2rem;
    }

    .article-meta {
        flex-direction: column;
    }

    .social-share-top {
        width: 100%;
    }

    .share-buttons {
        justify-content: center;
    }

    .author-bio-full {
        flex-direction: column;
        text-align: center;
    }

    .article-navigation {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .blog-hero-image {
        height: 250px;
    }

    .article-title {
        font-size: 1.75rem;
    }

    .content-wrapper {
        font-size: 1rem;
    }

    .floating-actions {
        bottom: 1rem;
        right: 1rem;
    }

    .fab {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
}

/* Print Styles */
@media print {

    .blog-hero-image,
    .table-of-contents,
    .social-share-top,
    .social-share-bottom,
    .floating-actions,
    .sidebar-card,
    .article-navigation,
    .breadcrumb-container,
    .reading-progress,
    footer {
        display: none !important;
    }

    .blog-detail-container {
        padding: 0;
    }

    .article-title {
        font-size: 24pt;
        margin-bottom: 1rem;
    }

    .article-content {
        font-size: 12pt;
        line-height: 1.6;
    }

    .container {
        max-width: 100% !important;
        padding: 0 !important;
    }

    .row {
        margin: 0 !important;
    }

    .col-lg-8 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }

    a {
        color: black !important;
        text-decoration: none !important;
    }

    .article-footer {
        page-break-before: always;
    }
}
