/* 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;
}

/* Tech Article Wrapper */
.tech-article-wrapper {
    background: var(--light-gray);
    min-height: 100vh;
    padding: 20px; /* Add padding to all sides */
    box-sizing: border-box; /* Include padding in width calculation */
}

.tech-article-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px clamp(2rem, 6vw, 4rem); /* Added top/bottom padding + side margins */
    background: white; /* White background for content area */
    border-radius: var(--border-radius); /* Rounded corners */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow */
}

/* 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: 10px 40px 20px 40px;
    border-bottom: 1px solid #e2e8f0;
    margin-top: 0; /* Ensure no top margin */
}

.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: 10px 0 15px;
    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 - Simple and direct */
.tech-article-featured-image {
    margin: 0;
    padding: 0;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    overflow: hidden;
    background: #f8f9fa;
    width: 100%;
    display: block;
    position: relative;
    line-height: 0;
}

.tech-article-featured-image img {
    /* Inline styles handle the sizing, this is just backup */
    border-radius: 0;
}

/* Ensure no gap between featured image and header */
.tech-article-featured-image + .tech-article-header {
    margin-top: 0 !important;
    padding-top: 15px; /* Reduced from previous padding */
}

/* WordPress image overrides - Force proper sizing */
.tech-article-featured-image .wp-post-image,
.tech-article-featured-image .attachment-large,
.tech-article-featured-image img[class*="wp-image"],
.tech-article-featured-image img[class*="attachment"],
.tech-article-featured-image .single-post-featured {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: contain !important;
    object-position: center !important;
    aspect-ratio: auto !important;
    display: block !important;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

/* Nuclear option - Override ANY height constraint */
.tech-article-featured-image,
.tech-article-featured-image * {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
}

/* Container size overrides */
.tech-article-featured-image,
.tech-article-featured-image > *,
.tech-article-featured-image figure,
.tech-article-featured-image .wp-caption {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Responsive featured image adjustments */
@media (max-width: 768px) {
    .tech-article-featured-image {
        border-radius: var(--border-radius);
        margin-bottom: 20px;
    }
    
    .tech-article-featured-image img {
        border-radius: var(--border-radius) !important;
    }
}

/* Ensure proper aspect ratio preservation */
.tech-article-featured-image img {
    vertical-align: top;
    background-color: #f8f9fa;
}

/* Reset any conflicting styles from main theme */
.single .single-trend-stats *,
.single-post .single-trend-stats * {
    box-sizing: border-box !important;
}

/* Single Page Trend Statistics - High Specificity */
.single .single-trend-stats,
.single-post .single-trend-stats {
    margin: 30px 0 !important;
    padding: 25px !important;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
    border-radius: var(--border-radius) !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

.single .single-trend-stats .trend-stats-title,
.single-post .single-trend-stats .trend-stats-title {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 20px !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: var(--primary-color) !important;
}

.single .single-trend-stats .trend-stats-title svg,
.single-post .single-trend-stats .trend-stats-title svg {
    color: var(--primary-color) !important;
    flex-shrink: 0 !important;
}

.single .single-trend-stats .trend-stats-grid,
.single-post .single-trend-stats .trend-stats-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
    gap: 20px !important;
}

.single .single-trend-stats .trend-stat-item,
.single-post .single-trend-stats .trend-stat-item {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    padding: 20px !important;
    background: white !important;
    border-radius: var(--border-radius) !important;
    border: 1px solid #e2e8f0 !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
}

.single .single-trend-stats .trend-stat-item:hover,
.single-post .single-trend-stats .trend-stat-item:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    border-color: var(--primary-color) !important;
}

.single .single-trend-stats .trend-stat-icon,
.single-post .single-trend-stats .trend-stat-icon {
    font-size: 1.5rem !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f1f5f9 !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
}

.single .single-trend-stats .trend-stat-content,
.single-post .single-trend-stats .trend-stat-content {
    flex: 1 !important;
}

.single .single-trend-stats .trend-stat-value,
.single-post .single-trend-stats .trend-stat-value {
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 4px !important;
}

.single .single-trend-stats .trend-stat-label,
.single-post .single-trend-stats .trend-stat-label {
    font-size: 0.9rem !important;
    color: #64748b !important;
    font-weight: 500 !important;
}

.single .single-trend-stats .trend-direction,
.single-post .single-trend-stats .trend-direction {
    font-size: 1rem !important;
    font-weight: bold !important;
}

/* Trend Direction Colors - High Specificity */
.single .single-trend-stats .trend-stat-item.trend-up .trend-direction,
.single-post .single-trend-stats .trend-stat-item.trend-up .trend-direction {
    color: #10b981 !important;
}

.single .single-trend-stats .trend-stat-item.trend-down .trend-direction,
.single-post .single-trend-stats .trend-stat-item.trend-down .trend-direction {
    color: #ef4444 !important;
}

.single .single-trend-stats .trend-stat-item.trend-neutral .trend-direction,
.single-post .single-trend-stats .trend-stat-item.trend-neutral .trend-direction {
    color: #6b7280 !important;
}

.single .single-trend-stats .trend-stat-item.trend-up .trend-stat-icon,
.single-post .single-trend-stats .trend-stat-item.trend-up .trend-stat-icon {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0) !important;
}

.single .single-trend-stats .trend-stat-item.trend-down .trend-stat-icon,
.single-post .single-trend-stats .trend-stat-item.trend-down .trend-stat-icon {
    background: linear-gradient(135deg, #fee2e2, #fecaca) !important;
}

.single .single-trend-stats .trend-stat-item.trend-neutral .trend-stat-icon,
.single-post .single-trend-stats .trend-stat-item.trend-neutral .trend-stat-icon {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0) !important;
}

/* Mobile responsive - High Specificity */
@media (max-width: 768px) {
    .single .single-trend-stats,
    .single-post .single-trend-stats {
        margin: 20px 0 !important;
        padding: 20px !important;
    }
    
    .single .single-trend-stats .trend-stats-grid,
    .single-post .single-trend-stats .trend-stats-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .single .single-trend-stats .trend-stat-item,
    .single-post .single-trend-stats .trend-stat-item {
        padding: 15px !important;
    }
    
    .single .single-trend-stats .trend-stats-title,
    .single-post .single-trend-stats .trend-stats-title {
        font-size: 1rem !important;
        margin-bottom: 15px !important;
    }
}

/* Additional spacing fixes */
.tech-article-container > * {
    margin-top: 0 !important;
}

.tech-article-container > *:not(:first-child) {
    margin-top: 0 !important;
}

/* 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;
}

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

.tech-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--primary-blue);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    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-wrapper {
        padding: 15px; /* Reduced padding on mobile */
    }
    
    .tech-article-container {
        padding: 15px 20px; /* Reduced container padding on mobile */
    }
    
    .tech-article-header {
        padding: 10px 20px 15px 20px;
    }
    
    .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-wrapper {
        padding: 10px; /* Minimal padding on small mobile */
    }
    
    .tech-article-container {
        padding: 10px 15px; /* Minimal container padding on small mobile */
    }
    
    .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);
    background: #f8f9fa;
}

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

/* 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;
}

.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;
}
/* Table styling removed - using WordPress defaults */

/* 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;
    }

    /* Mobile table styling removed - using WordPress defaults */
}

/* 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;
    }
}

/* Enhanced Unified Progress Widget Styles */
.unified-progress-widget {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 16px;
    padding: 25px;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    color: white;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.unified-progress-widget.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.unified-progress-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    pointer-events: none;
}

.unified-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.unified-header h4 {
    margin: 0;
    color: white;
    font-size: 22px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.user-level {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 16px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.streak-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 15px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.streak-flame {
    font-size: 22px;
    animation: flicker 2s infinite alternate;
}

@keyframes flicker {
    0% { transform: scale(1) rotate(-2deg); }
    100% { transform: scale(1.1) rotate(2deg); }
}

.streak-current {
    font-weight: 700;
    font-size: 18px;
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Ensure all stat values are white */
.stat-value,
.streak-current,
.streak-longest {
    color: #ffffff !important;
}

.streak-label-mini {
    font-size: 12px;
    opacity: 0.9;
}

.unified-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

.unified-stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.unified-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    background: rgba(255, 255, 255, 0.15);
}

.stat-icon-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.stat-details {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    line-height: 1;
}

.stat-label {
    font-size: 11px;
    color: #ffffff !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.unified-progress-section {
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.unified-progress-section:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-label {
    font-weight: 700;
    color: white;
    font-size: 16px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-label::before {
    content: '⚡';
    font-size: 18px;
    animation: pulse 2s infinite;
}

.progress-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

.progress-bar-container {
    height: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        0 1px 2px rgba(255, 255, 255, 0.1);
    position: relative;
}

.progress-bar-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    border-radius: 12px 12px 0 0;
    pointer-events: none;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(135deg, 
        #ff6b6b 0%, 
        #feca57 25%, 
        #48dbfb 50%, 
        #ff9ff3 75%, 
        #54a0ff 100%);
    background-size: 400% 100%;
    border-radius: 10px;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 2px 8px rgba(255, 107, 107, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
    animation: gradientShift 3s ease-in-out infinite;
}

.progress-bar[data-width]::after {
    content: attr(data-width);
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    z-index: 10;
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 6px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, transparent 100%);
    border-radius: 10px 10px 0 0;
}

.progress-bar .shimmer-effect {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255,255,255,0.6) 30%, 
        rgba(255,255,255,0.8) 50%, 
        rgba(255,255,255,0.6) 70%, 
        transparent 100%);
    animation: shimmer 2.5s infinite;
    border-radius: 10px;
    z-index: 5;
}

.progress-bar:hover {
    transform: scaleY(1.1);
    box-shadow: 
        0 4px 16px rgba(255, 107, 107, 0.6),
        inset 0 1px 2px rgba(255, 255, 255, 0.4);
}

.progress-bar.progress-complete {
    animation: gradientShift 3s ease-in-out infinite, completePulse 1s ease-out;
}

@keyframes completePulse {
    0% { transform: scaleY(1); }
    50% { transform: scaleY(1.15); }
    100% { transform: scaleY(1); }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.unified-badges {
    position: relative;
    z-index: 1;
}

.unified-badges h5 {
    margin: 0 0 18px 0;
    color: white;
    font-size: 16px;
    font-weight: 600;
}

.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 15px;
}

.badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    text-align: center;
    backdrop-filter: blur(10px);
}

.badge.locked {
    opacity: 0.4;
    filter: grayscale(1);
}

.badge:not(.locked) {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border-color: #f1c40f;
    transform: scale(1.05);
    color: #2c3e50;
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.badge:not(.locked):hover {
    transform: scale(1.1) rotate(2deg);
}

.badge-icon {
    font-size: 28px;
    margin-bottom: 8px;
    display: block;
}

.badge-name {
    font-size: 11px;
    font-weight: 600;
    color: inherit;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bookmark-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    margin-top: 20px;
}

.bookmark-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.bookmark-button.bookmarked {
    background: #ffd700;
    color: #2c3e50;
    border-color: #f1c40f;
}

/* Responsive Design for Progress Widget */
@media (max-width: 768px) {
    .unified-progress-widget {
        padding: 20px;
        margin: 20px 0;
    }
    
    .unified-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .unified-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .badges-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .unified-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .badges-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .badge {
        padding: 10px 5px;
    }
    
    .badge-icon {
        font-size: 24px;
    }
}