/* Base Styles for Tech Article Layout */
:root {
    --primary-blue: #2563eb;
    --dark-blue: #1e3a8a;
    --light-gray: #f8fafc;
    --accent-gray: #64748b;
    --text-dark: #1e293b;
    --border-radius: 12px;
    --box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* Tech Article Wrapper */
.tech-article-wrapper {
    background: var(--light-gray);
    padding-bottom: 60px;
}

.tech-article-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Tech Breadcrumbs */
.tech-breadcrumbs {
    padding: 15px 0;
    background: white;
    margin-bottom: 30px;
}

.tech-breadcrumbs .breadcrumb {
    font-size: 0.9rem;
    color: var(--accent-gray);
}

.tech-breadcrumbs .breadcrumb a {
    color: var(--primary-blue);
    text-decoration: none;
    margin-right: 8px;
}

.tech-breadcrumbs .breadcrumb a:not(:last-child)::after {
    content: '›';
    margin-left: 8px;
    color: var(--accent-gray);
}

/* Tech Article Header */
.tech-article-header {
    background: white;
    padding: 30px 40px;
    border-bottom: 1px solid #e2e8f0;
}

.tech-article-category {
    display: inline-block;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-blue);
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    margin-bottom: 15px;
}

.tech-article-title {
    font-size: 2.5rem;
    line-height: 1.2;
    margin: 15px 0 20px;
    color: var(--dark-blue);
}

.tech-article-meta {
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.tech-article-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.tech-article-author img {
    border-radius: 50%;
    border: 2px solid var(--primary-blue);
}

.tech-author-name {
    font-weight: 600;
    color: var(--text-dark);
    display: block;
    margin-bottom: 4px;
}

.tech-meta-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--accent-gray);
}

.tech-meta-dot {
    color: var(--accent-gray);
}

/* Featured Image */
.tech-article-featured-image {
    margin-bottom: 0;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    overflow: hidden;
}

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

/* Tech Article Layout - Full Width Container */
.tech-article-layout {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

/* Main Content Area with Blue Line */
.tech-article-content {
    background: white;
    padding: 40px;
    position: relative;
}

.tech-article-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: var(--primary-blue);
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.tech-article-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.tech-article-content h2,
.tech-article-content h3,
.tech-article-content h4 {
    margin: 2rem 0 1rem;
    color: var(--dark-blue);
}

.tech-article-content blockquote {
    border-left: 3px solid var(--primary-blue);
    padding: 15px 20px;
    margin: 25px 0;
    background: rgba(37, 99, 235, 0.03);
    font-style: italic;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.tech-article-content a {
    color: var(--primary-blue);
    text-decoration: none;
}

.tech-article-content a:hover {
    color: var(--dark-blue);
    text-decoration: underline;
}

.tech-article-content ul,
.tech-article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.tech-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

/* Tags Section */
.tech-article-tags {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e2e8f0;
}

.tech-tags-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-right: 10px;
}

.tech-article-tags a {
    display: inline-block;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-blue);
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    text-decoration: none;
    margin: 5px 5px 5px 0;
    transition: all 0.3s ease;
}

.tech-article-tags a:hover {
    background: var(--primary-blue);
    color: white;
}

/* Share Section */
.tech-share-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e2e8f0;
}

.tech-share-section h4 {
    margin-bottom: 15px;
    color: var(--text-dark);
    font-size: 1.1rem;
}

.tech-share-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tech-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tech-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tech-twitter {
    background: #1da1f2;
}

.tech-facebook {
    background: #1877f2;
}

.tech-linkedin {
    background: #0a66c2;
}

.tech-copy {
    background: #64748b;
}

/* Sidebar */
.tech-article-sidebar {
    position: relative;
}

.tech-sidebar-sticky {
    position: sticky;
    top: 100px;
}

.tech-author-card,
.tech-sidebar-widget {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--box-shadow);
    margin-bottom: 25px;
}

.tech-author-card {
    text-align: center;
}

.tech-author-card img {
    border-radius: 50%;
    margin-bottom: 15px;
    border: 3px solid var(--primary-blue);
}

.tech-author-card h4 {
    margin-bottom: 10px;
    color: var(--dark-blue);
    font-size: 1.2rem;
}

.tech-author-card p {
    color: var(--accent-gray);
    font-size: 0.95rem;
    line-height: 1.6;
}

.tech-widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--dark-blue);
}

.tech-sidebar-posts {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tech-sidebar-post {
    display: flex;
    gap: 12px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.tech-sidebar-post:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.tech-sidebar-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
}

.tech-sidebar-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.tech-sidebar-thumb:hover img {
    transform: scale(1.1);
}

.tech-sidebar-post-content {
    flex: 1;
}

.tech-sidebar-post-content h5 {
    font-size: 0.95rem;
    margin-bottom: 8px;
    line-height: 1.4;
}

.tech-sidebar-post-content h5 a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.tech-sidebar-post-content h5 a:hover {
    color: var(--primary-blue);
}

.tech-sidebar-post-content time {
    font-size: 0.85rem;
    color: var(--accent-gray);
}

/* Related Articles Section */
.tech-related-section {
    margin-top: 60px;
    padding: 40px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.tech-section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-blue);
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
    display: block;
}

.tech-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--primary-blue);
}

.tech-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.tech-related-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tech-related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.tech-related-image {
    height: 180px;
    overflow: hidden;
}

.tech-related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.tech-related-card:hover .tech-related-image img {
    transform: scale(1.05);
}

.tech-related-content {
    padding: 20px;
}

.tech-category-badge {
    display: inline-block;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-blue);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 10px;
}

.tech-related-content h3 {
    margin-bottom: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-dark);
    display: block;
}

.tech-related-content h3 a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
}

.tech-related-content h3 a:hover {
    color: var(--primary-blue);
}

.tech-related-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-gray);
    font-size: 0.85rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .tech-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .tech-article-header,
    .tech-article-content,
    .tech-related-section {
        padding: 25px 20px;
    }
    
    .tech-article-title {
        font-size: 2rem;
    }
    
    .tech-related-grid {
        grid-template-columns: 1fr;
    }
    
    .tech-share-buttons {
        flex-direction: column;
    }
    
    .tech-share-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .tech-article-title {
        font-size: 1.6rem;
    }
    
    .tech-article-meta {
        flex-direction: column;
        align-items: flex-start;
    }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--light-gray);
    -webkit-font-smoothing: antialiased;
    padding-top: 80px; /* Space for fixed header */
}

.ast-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary-blue) 100%);
    padding: 12px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Breadcrumb */
.breadcrumb {
    padding: 15px 0;
    font-size: 0.9rem;
    color: var(--accent-gray);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    -ms-overflow-style: none;  /* Hide scrollbar for IE and Edge */
    scrollbar-width: none;  /* Hide scrollbar for Firefox */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.breadcrumb::-webkit-scrollbar {
    display: none;
}

.breadcrumb a {
    color: var(--primary-blue);
    text-decoration: none;
    display: inline-block;
    padding: 4px 0;
    margin-right: 4px;
}

.breadcrumb a:not(:last-child)::after {
    content: '›';
    margin-left: 8px;
    color: var(--accent-gray);
    display: inline-block;
}

.breadcrumb span:last-child {
    color: var(--text-dark);
    font-weight: 600;
    display: inline-block;
    padding: 4px 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .breadcrumb {
        font-size: 0.85rem;
        padding: 12px 0;
    }
    
    .breadcrumb a,
    .breadcrumb span:last-child {
        padding: 2px 0;
    }
    
    .breadcrumb a:not(:last-child)::after {
        margin-left: 6px;
    }
}

/* Featured Image */
.post-featured-image {
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: var(--box-shadow);
}

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

/* Post Header */
.post-header {
    margin-bottom: 30px;
}

.post-title {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 15px;
    color: var(--dark-blue);
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--accent-gray);
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

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

.post-category {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-blue);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    text-decoration: none;
}

/* Content Area */
.post-content {
    background: white;
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--box-shadow);
    margin-bottom: 40px;
    position: relative;
}

.post-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: var(--primary-blue);
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.post-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.post-content h2, 
.post-content h3, 
.post-content h4 {
    margin: 2rem 0 1rem;
    color: var(--dark-blue);
    position: relative;
    padding-left: 20px;
}

.post-content h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    width: 8px;
    height: 8px;
    background: var(--primary-blue);
    border-radius: 50%;
}

.post-content blockquote {
    border-left: 3px solid var(--primary-blue);
    padding: 15px 20px;
    margin: 25px 0;
    background: rgba(37, 99, 235, 0.03);
    font-style: italic;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

/* Content Area Links */
.post-content a:not([class]),
.entry-content a:not([class]) {
    color: #2563eb !important;
    text-decoration: none !important;
    word-break: normal !important;
    white-space: normal !important;
    display: inline !important;
}

.post-content a:not([class]):hover,
.entry-content a:not([class]):hover {
    color: #1e40af !important;
    text-decoration: none !important;
}

/* Fix code blocks and pre tags */
.post-content pre,
.post-content code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.9rem;
    background: #f8f9fa;
    border-radius: 4px;
    padding: 2px 6px;
    overflow-x: auto;
}

.post-content pre {
    padding: 1rem;
    margin: 1.5rem 0;
    border-left: 3px solid var(--primary-blue);
    background: #f8fafc;
}

/* Copy code button and tooltip */
.nu-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 6px 10px;
    font-size: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nu-copy-btn:hover {
    background: #f8fafc;
}

.nu-copy-tooltip {
    position: absolute;
    top: 8px;
    right: 62px;
    background: #111827;
    color: #ffffff;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}

.nu-copy-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Highlight-to-share popover */
.nu-share-popover {
    position: absolute;
    z-index: 9999;
    display: flex;
    gap: 6px;
    background: #0f172a;
    color: #ffffff;
    padding: 6px 8px;
    border-radius: 999px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.nu-share-popover.visible {
    opacity: 1;
    pointer-events: auto;
}

.nu-share-popover button {
    border: 0;
    background: transparent;
    color: #ffffff;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    border-radius: 50%;
    cursor: pointer;
}

.nu-share-x { background: #111827; }
.nu-share-li { background: #0a66c2; }
.nu-share-close { background: #6b7280; }

.nu-share-popover button:hover {
    filter: brightness(1.1);
}

/* Fix lists */
.post-content ul,
.post-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.post-content li {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Fix headings */
.post-content h2 {
    font-size: 1.8rem;
    margin: 2.5rem 0 1.5rem;
}

.post-content h3 {
    font-size: 1.5rem;
    margin: 2.2rem 0 1.3rem;
}

.post-content h4 {
    font-size: 1.3rem;
    margin: 2rem 0 1.2rem;
}
/* Tables */
.post-content table,
.entry-content table,
.wp-block-table table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1.5rem 0;
    background: #ffffff;
    box-shadow: var(--box-shadow);
    border-radius: 10px;
    overflow: hidden; /* rounds corners */
    display: block; /* enable horizontal scroll on small screens */
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.post-content table thead th,
.entry-content table thead th,
.wp-block-table table thead th {
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary-blue) 100%);
    color: #ffffff;
    font-weight: 600;
    text-align: left;
    border-bottom: 0;
    letter-spacing: 0.02em;
    position: sticky; /* keep header visible when scrolling horizontally */
    top: 0;
    z-index: 1;
    box-shadow: inset 0 -1px 0 rgba(255,255,255,0.25);
}

/* Header theme variants (apply to table element) */
.post-content table.table-theme-primary thead th,
.entry-content table.table-theme-primary thead th,
.wp-block-table table.table-theme-primary thead th { /* default blue */
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary-blue) 100%);
}

.post-content table.table-theme-emerald thead th,
.entry-content table.table-theme-emerald thead th,
.wp-block-table table.table-theme-emerald thead th {
    background: linear-gradient(135deg, #065f46 0%, #10b981 100%);
}

.post-content table.table-theme-amber thead th,
.entry-content table.table-theme-amber thead th,
.wp-block-table table.table-theme-amber thead th {
    background: linear-gradient(135deg, #92400e 0%, #f59e0b 100%);
}

.post-content table.table-theme-slate thead th,
.entry-content table.table-theme-slate thead th,
.wp-block-table table.table-theme-slate thead th {
    background: linear-gradient(135deg, #334155 0%, #64748b 100%);
}

.post-content table th,
.post-content table td,
.entry-content table th,
.entry-content table td,
.wp-block-table table th,
.wp-block-table table td {
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
    min-width: 140px; /* prevent overly narrow columns on mobile */
}

/* Compact density option */
.post-content table.table-compact th,
.post-content table.table-compact td,
.entry-content table.table-compact th,
.entry-content table.table-compact td,
.wp-block-table table.table-compact th,
.wp-block-table table.table-compact td {
    padding: 8px 10px;
    font-size: 0.95rem;
}

.post-content table tbody tr:last-child td,
.entry-content table tbody tr:last-child td,
.wp-block-table table tbody tr:last-child td {
    border-bottom: none;
}

/* Zebra striping */
.post-content table tbody tr:nth-child(even),
.entry-content table tbody tr:nth-child(even),
.wp-block-table table tbody tr:nth-child(even) {
    background: #f8fafc;
}

/* Row hover */
.post-content table tbody tr:hover,
.entry-content table tbody tr:hover,
.wp-block-table table tbody tr:hover {
    background: rgba(37, 99, 235, 0.06);
}

/* Subtle left accent on hover for focus */
.post-content table tbody tr:hover td:first-child,
.entry-content table tbody tr:hover td:first-child,
.wp-block-table table tbody tr:hover td:first-child {
    box-shadow: inset 3px 0 0 0 var(--primary-blue);
}

/* Emphasize first column (often labels) */
.post-content table td:first-child,
.entry-content table td:first-child,
.wp-block-table table td:first-child {
    font-weight: 600;
    color: #0f172a; /* slightly darker */
}

/* Softer borders for header separation */
.post-content table thead th + th,
.entry-content table thead th + th,
.wp-block-table table thead th + th {
    border-left: 1px solid rgba(255,255,255,0.2);
}

/* Gutenberg wrapper optimization: keep table layout, scroll on wrapper */
figure.wp-block-table,
.wp-block-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    border: 1px solid #e2e8f0;
}

figure.wp-block-table table,
.wp-block-table table {
    display: table;
    width: 100%;
    min-width: 620px; /* ensures horizontal scroll on small screens */
    border-spacing: 0;
}

/* Scrollbar styling for table wrappers */
figure.wp-block-table::-webkit-scrollbar,
.wp-block-table::-webkit-scrollbar {
    height: 10px;
}
figure.wp-block-table::-webkit-scrollbar-track,
.wp-block-table::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}
figure.wp-block-table::-webkit-scrollbar-thumb,
.wp-block-table::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
figure.wp-block-table:hover::-webkit-scrollbar-thumb,
.wp-block-table:hover::-webkit-scrollbar-thumb {
    background: #94a3b8;
}

/* Support WP striped style variant */
.wp-block-table.is-style-stripes table tbody tr:nth-child(odd) {
    background: #f1f5f9;
}

/* Table captions */
.post-content table caption,
.entry-content table caption,
.wp-block-table table caption {
    caption-side: top;
    padding: 12px 0 8px;
    font-weight: 600;
    color: var(--dark-blue);
    text-align: left;
}

/* Images within tables */
.post-content table img,
.entry-content table img,
.wp-block-table table img {
    max-width: 100%;
    height: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .post-content h2 {
        font-size: 1.6rem;
    }
    
    .post-content h3 {
        font-size: 1.4rem;
    }
    
    .post-content h4 {
        font-size: 1.2rem;
    }
    
    .post-content p,
    .post-content li,
    .post-content a {
        font-size: 1rem;
    }

    /* Tighter table spacing on mobile */
    .post-content table th,
    .post-content table td,
    .entry-content table th,
    .entry-content table td,
    .wp-block-table table th,
    .wp-block-table table td {
        padding: 10px 12px;
        font-size: 0.95rem;
        min-width: 120px;
    }

    figure.wp-block-table table,
    .wp-block-table table {
        min-width: 520px;
    }
}

/* Tags Section */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 30px 0;
}

.tag {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-blue);
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--primary-blue);
    color: white;
}

/* Author Bio */
.author-bio {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 40px;
    box-shadow: var(--box-shadow);
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--primary-blue);
    overflow: hidden;
    flex-shrink: 0;
}

.author-info h3 {
    margin-bottom: 10px;
    color: var(--dark-blue);
}

.author-links {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.author-links a {
    color: var(--accent-gray);
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.author-links a:hover {
    color: var(--primary-blue);
}

/* Social Sharing */
.social-sharing {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 30px 0;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 30px;
    text-decoration: none;
    color: white;
    font-weight: 500;
    transition: transform 0.3s ease;
}

.share-btn:hover {
    transform: translateY(-3px);
}

.facebook { background: #3b5998; }
.twitter { background: #1da1f2; }
.linkedin { background: #0077b5; }
.whatsapp { background: #25d366; }

/* Related Posts */
.related-posts {
    margin-bottom: 60px;
}

.section-title {
    font-size: 1.8rem;
    color: var(--dark-blue);
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--primary-blue);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.related-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease;
}

.related-card:hover {
    transform: translateY(-5px);
}

.related-image {
    height: 180px;
    overflow: hidden;
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.related-content {
    padding: 20px;
}

.related-content h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.related-content h3 a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-content h3 a:hover {
    color: var(--primary-blue);
}

.related-date {
    color: var(--accent-gray);
    font-size: 0.85rem;
}

/* Footer Styles */
.site-footer {
    background: #1a1f2e;
    color: white;
    padding: 60px 0 20px;
}

/* Floating Share Bar */
.nu-floating-share {
    position: sticky;
    top: 80px; /* account for fixed header */
    z-index: 20;
    display: inline-flex;
    gap: 8px;
    margin: 10px 0 20px;
}

@media (max-width: 768px) {
    .nu-floating-share {
        position: static;
        margin: 0 0 16px;
    }
}

.nu-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff;
    background: #334155; /* default */
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease;
    font-weight: 700;
    font-size: 14px;
}

.nu-share-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

.nu-share-btn.x { background: #111827; }
.nu-share-btn.fb { background: #1877f2; }
.nu-share-btn.li { background: #0a66c2; }
.nu-share-btn.wa { background: #25d366; }
.nu-share-btn.copy { background: #475569; }

/* Emoji Reactions */
.nu-reactions {
    margin-top: 24px;
    padding: 16px;
    border-radius: 12px;
    background: #f8fafc;
    box-shadow: var(--box-shadow);
    border: 1px solid #e2e8f0;
}

.nu-reactions-title {
    font-weight: 600;
    color: var(--dark-blue);
    margin-bottom: 10px;
}

.nu-reactions-summary {
    margin-bottom: 6px;
    color: var(--accent-gray);
    font-weight: 600;
}

.nu-reactions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.nu-reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #0f172a;
    padding: 8px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.nu-reaction-btn:hover {
    transform: translateY(-1px);
    background: #f8fafc;
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}

.nu-reaction-btn.voted {
    border-color: #93c5fd;
    background: #eff6ff;
}

.nu-reaction-emoji {
    font-size: 18px;
    line-height: 1;
}

.nu-reaction-count {
    font-weight: 600;
    color: #1e293b;
}

.nu-reaction-label {
    color: #475569;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .post-content {
        padding: 30px;
    }
    
    .post-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .post-content {
        padding: 25px 20px;
    }
    
    .post-title {
        font-size: 1.8rem;
    }
    
    .author-bio {
        flex-direction: column;
        text-align: center;
    }
    
    .author-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .post-title {
        font-size: 1.6rem;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .social-sharing {
        flex-direction: column;
    }
    
    .share-btn {
        justify-content: center;
    }

    /* Extra-small adjustments for tables */
    .post-content table th,
    .post-content table td,
    .entry-content table th,
    .entry-content table td,
    .wp-block-table table th,
    .wp-block-table table td {
        padding: 9px 10px;
        font-size: 0.92rem;
        word-break: break-word;
        white-space: normal;
    }

    figure.wp-block-table,
    .wp-block-table {
        border-radius: 8px;
    }

    /* Auto-stacked table pattern for very small screens.
       Add data-label attributes to <td> with their header text for best results.
       Opt-out by adding class .no-stack to the table. */
    .post-content table:not(.no-stack),
    .entry-content table:not(.no-stack),
    .wp-block-table table:not(.no-stack) {
        min-width: 0; /* allow stacking */
    }
    .post-content table:not(.no-stack) thead,
    .entry-content table:not(.no-stack) thead,
    .wp-block-table table:not(.no-stack) thead {
        display: none;
    }
    .post-content table:not(.no-stack) tbody tr,
    .entry-content table:not(.no-stack) tbody tr,
    .wp-block-table table:not(.no-stack) tbody tr {
        display: block;
        border-bottom: 1px solid #e2e8f0;
        padding: 8px 0;
    }
    .post-content table:not(.no-stack) td,
    .entry-content table:not(.no-stack) td,
    .wp-block-table table:not(.no-stack) td {
        display: grid;
        grid-template-columns: 140px 1fr;
        align-items: start;
        gap: 8px;
        border: 0;
        padding: 8px 0;
    }
    .post-content table:not(.no-stack) td::before,
    .entry-content table:not(.no-stack) td::before,
    .wp-block-table table:not(.no-stack) td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #334155;
    }
}