/*
 * Blog detail view styles.
 *
 * These rules style the article detail layout used by blog.html when a single
 * blog is rendered from the URL query parameter. The components include the
 * featured image, article metadata, rich content blocks, and code snippets.
 */

.category-links-section {
    margin-top: 15px;
}

.category-links-section .abc {
    margin: 0;
}

.category-links-section .abc li a {
    text-decoration: none;
    color: #333;
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #ddd;
    margin: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.category-links-section .abc li a:hover {
    background-color: #3c8dbc;
    color: white;
    border-color: #3c8dbc;
}

.category-links-section .abc li a.active {
    background-color: #3c8dbc;
    color: white;
    border-color: #3c8dbc;
    font-weight: 600;
}

.blog-nav-links {
    margin-top: 15px;
}

.back-link {
    display: inline-block;
    color: #3c8dbc;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 8px 15px;
    border: 2px solid #3c8dbc;
    border-radius: 6px;
}

.back-link:hover {
    background-color: #3c8dbc;
    color: white;
}

/* Blog Detail Container */
.our-product {
    background: #f1f1f1;
    border-radius: 6px;
    padding: 15px 10px;
    border: 1px solid #e1e1e1;
    margin-bottom: 20px;
    /* font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; */
    font-size: 18px;
}

.blog-featured-image-container {
    overflow: visible;
    border-radius: 8px;
    margin-bottom: 20px;
    max-height: none;
}

.blog-featured-image {
    /* width: 100%; */
    height: auto;
    display: block;
    object-fit: contain;
}

.blog-detail-title {
    font-size: clamp(1.75rem, 3.2vw + 0.6rem, 2.45rem);
    font-weight: 700;
    color: #090449;
    margin-top: 10px;
    margin-bottom: 15px;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.blog-detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.blog-meta-item {
    display: inline-flex;
    align-items: center;
    color: #64748b;
    font-size: clamp(13.5px, 0.9vw + 10px, 15px);
    font-weight: 500;
}

.blog-meta-item i {
    margin-right: 8px;
    color: #3c8dbc;
}

.blog-description {
    font-size: clamp(1.12rem, 1.04rem + 0.45vw, 1.25rem);
    color: #060129;
    line-height: 1.72;
    margin-bottom: 20px;
}

/* AI Blog Content Styling */
.ai-blog-content {
    font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.15rem);
    line-height: 1.85;
    color: #060129;
    letter-spacing: 0.01em;
}

.ai-blog-content p {
    font-size: inherit;
    line-height: 1.85;
    margin-bottom: 1.35em;
}

.ai-blog-content h2,
.ai-blog-content h3,
.ai-blog-content h4,
.ai-blog-content h5,
.ai-blog-content h6 {
    margin-top: 1.6em;
    margin-bottom: 0.7em;
    color: #060129;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.ai-blog-content h2 {
    font-size: clamp(1.45rem, 2.5vw, 1.85rem);
    line-height: 1.38;
}

.ai-blog-content h3 {
    font-size: clamp(1.25rem, 1.8vw, 1.55rem);
    line-height: 1.4;
}

.ai-blog-content h4 {
    font-size: clamp(1.12rem, 1.3vw, 1.32rem);
    line-height: 1.45;
}

.ai-blog-content ul,
.ai-blog-content ol {
    margin-left: 24px;
    margin-bottom: 1.35em;
    font-size: inherit;
    line-height: 1.8;
}

.ai-blog-content li {
    margin-bottom: 8px;
    font-size: inherit;
    line-height: 1.8;
}

.ai-blog-content a {
    color: #3c8dbc;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.ai-blog-content a:hover {
    color: #2563eb;
    text-decoration: underline;
}

.ai-blog-content blockquote {
    border-left: 4px solid #3c8dbc;
    padding: 14px 20px;
    margin: 22px 0;
    font-style: italic;
    color: #64748b;
    font-size: clamp(1.05rem, 0.95rem + 0.35vw, 1.15rem);
    line-height: 1.8;
}

.ai-blog-content code {
    background: #f1f5f9;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: clamp(13.5px, 0.85vw + 11px, 15px);
    color: #e11d48;
}

.ai-blog-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

.ai-blog-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    border-radius: 0;
}

/* Tables in Blog Content */
.ai-blog-content table {
    width: 100%;
    max-width: 100%;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    margin: 24px 0;
    font-size: clamp(13.5px, 0.85vw + 11px, 15px);
    background: var(--card-bg, #ffffff);
    color: var(--text-primary, #060129);
    border: 1px solid #000000;
    border-radius: 6px;
    overflow: hidden;
}

.ai-blog-content table thead,
.ai-blog-content th {
    background: var(--bg-surface-secondary, #f1f5f9);
    color: var(--text-heading, #0f172a);
    font-weight: 700;
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid #000000;
    border-right: 1px solid #000000;
    border-top: none;
    border-left: none;
    letter-spacing: 0.01em;
}

.ai-blog-content table th:last-child {
    border-right: none;
}

.ai-blog-content td {
    padding: 11px 16px;
    border-bottom: 1px solid #000000;
    border-right: 1px solid #000000;
    border-top: none;
    border-left: none;
    vertical-align: top;
    line-height: 1.6;
    color: inherit;
}

.ai-blog-content table td:last-child {
    border-right: none;
}

.ai-blog-content table tr:last-child td {
    border-bottom: none;
}

.ai-blog-content tr:nth-child(even) td {
    background: var(--bg-surface-secondary, #f8fafc);
}

.ai-blog-content tr:hover td {
    background: var(--nav-hover-bg, rgba(60, 141, 188, 0.06));
}

/* Dark Theme Table Support */
[data-theme="dark-gray"] .ai-blog-content table,
[data-theme="dark"] .ai-blog-content table {
    background: #1e293b;
    color: #f1f5f9;
    border: 1px solid #ffffff;
}

[data-theme="dark-gray"] .ai-blog-content table thead,
[data-theme="dark-gray"] .ai-blog-content th,
[data-theme="dark"] .ai-blog-content table thead,
[data-theme="dark"] .ai-blog-content th {
    background: #0f172a;
    color: #f8fafc;
    border-bottom: 1px solid #ffffff;
    border-right: 1px solid #ffffff;
}

[data-theme="dark-gray"] .ai-blog-content table th:last-child,
[data-theme="dark"] .ai-blog-content table th:last-child {
    border-right: none;
}

[data-theme="dark-gray"] .ai-blog-content td,
[data-theme="dark"] .ai-blog-content td {
    border-bottom: 1px solid #ffffff;
    border-right: 1px solid #ffffff;
}

[data-theme="dark-gray"] .ai-blog-content table td:last-child,
[data-theme="dark"] .ai-blog-content table td:last-child {
    border-right: none;
}

[data-theme="dark-gray"] .ai-blog-content table tr:last-child td,
[data-theme="dark"] .ai-blog-content table tr:last-child td {
    border-bottom: none;
}

[data-theme="dark-gray"] .ai-blog-content tr:nth-child(even) td,
[data-theme="dark"] .ai-blog-content tr:nth-child(even) td {
    background: #15202e;
}

[data-theme="dark-gray"] .ai-blog-content tr:hover td,
[data-theme="dark"] .ai-blog-content tr:hover td {
    background: #1e2e42;
}

/* Code Block Wrapper */
.code-wrapper {
    background: #1e293b;
    border-radius: 8px;
    margin: 20px 0;
    overflow: hidden;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0f172a;
    padding: 12px 15px;
    border-bottom: 1px solid #334155;
}

.code-header span {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.code-header button {
    background: #3c8dbc;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.code-header button:hover {
    background: #2563eb;
}

.code-wrapper pre {
    margin: 0;
    background: transparent;
    border-radius: 0;
    padding: 0px;
}

/* Tags */
.blog-tags-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 0 0;
}

.tag-link {
    display: inline-block;
    background: rgba(60, 141, 188, 0.1);
    color: #3c8dbc;
    padding: 5px 12px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.tag-link:hover {
    background: #3c8dbc;
    color: white;
    border-color: #3c8dbc;
}

/* Back Button */
.mrgin-top30,
.blog-back-section {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color, #f0f0f0);
}

.btn-primary {
    background-color: #000000;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #367fa9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(60, 141, 188, 0.3);
}

/* =========================================
   Sidebar Topic Lists
   Matching prev-topic.png and related-topic-list.png
   ========================================= */

.sidebar-topic-list {
    background: #fff;
    border: 1px solid #3b3b3b;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 20px;
}

.sidebar-topic-list h3 {
    background: #000000;
    color: white;
    margin: 0;
    padding: 10px 15px;
    text-align: center;
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 0.5px;
    border-radius: 3px;
}

.sidebar-topic-list ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-topic-list li {
    border-bottom: 1px dashed #ccc;
    transition: background-color 0.2s ease;
}

.sidebar-topic-list li:last-child {
    border-bottom: none;
}

/* Hover highlight - dark grey row on hover, matching related-topic-list.png */
.sidebar-topic-list li:hover {
    background-color: #d5d5d5;
}

.sidebar-topic-list li a {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    text-decoration: none;
    color: #333;
    font-weight: 700;
    font-size: 14px;
}

.sidebar-topic-list li a:hover {
    text-decoration: none;
    color: #333;
}

/* Category badge - grey box with icon, matching the mockup exactly */
.sidebar-topic-list .topic-badge {
    background: #777;
    color: #fff;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 3px;
    margin-right: 12px;
    display: inline-flex;
    align-items: center;
    font-weight: 400;
    white-space: nowrap;
    flex-shrink: 0;
    content: "\f022";
}

.sidebar-topic-list .topic-badge i {
    margin-right: 5px;
    font-size: 11px;
}

/* =========================================
   Category Links in Header
   Matching blog-cat-links.png (arrow style)
   ========================================= */

.category-links-transparent {
    margin: 10px 0 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.category-links-transparent li {
    list-style: none;
}

.category-links-transparent li a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    display: inline-block;
    align-items: center;
    text-transform: uppercase;
    transition: opacity 0.2s ease;
    /* border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: none !important;
    border-radius: 0 !important; */
    position: relative;
    padding-left: 35px;
}

.category-links-transparent li a:hover {
    opacity: 0.8;
    color: white;
    background: none !important;
}

.category-links-transparent li a::before {
    content: '➮';
    position: absolute;
    
    /* Center it vertically (adjust 'top' if needed based on your font size) */
    top: 50%;
    transform: translateY(-50%); 
    
    /* Places it exactly 30px before the start of the link */
    left: 0px; 
    
    font-size: 30px;
    color: white;
    
    /* Keeps things tidy */
    line-height: 1; 
    width: 30px;
    height: 30px;
}

/* Responsive */
@media (max-width: 768px) {
    .blog-detail-title {
        font-size: 22px;
    }
    
    .blog-detail-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .ai-blog-content {
        font-size: 17px;
    }
    
    .code-header {
        flex-direction: column;
        gap: 10px;
    }

    .category-links-transparent {
        gap: 15px;
    }

    .category-links-transparent li a {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .blog-featured-image-container {
        max-height: 250px;
    }
    
    .blog-detail-title {
        font-size: 18px;
    }
    
    .ai-blog-content h2 {
        font-size: 18px;
    }
    
    .ai-blog-content h3 {
        font-size: 16px;
    }
}

/* ==========================================================================
   Article Share Button (Bottom of Center Block)
   ========================================================================== */
.blog-share-action-bar {
    margin-top: 14px;
    margin-bottom: 0;
    display: flex;
    align-items: center;
}

.btn-share-single {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 18px;
    min-height: 44px;
    min-width: 44px;
    border-radius: 6px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--btn-primary-bg, #2d3748);
    color: var(--btn-primary-text, #ffffff) !important;
    border: 1px solid var(--btn-primary-border, #2d3748);
    box-shadow: var(--btn-primary-shadow, 0 2px 6px rgba(0, 0, 0, 0.18));
}

.btn-share-single:hover {
    background: var(--btn-primary-hover, #1a202c);
    border-color: var(--btn-primary-hover, #1a202c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    color: #ffffff !important;
}

.btn-share-single:active {
    transform: translateY(0);
}

.btn-share-single i {
    font-size: 0.95rem;
}

/* Toast notification for link copied */
.share-copy-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #10b981;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    z-index: 999999;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.share-copy-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
