/* Premium Article Page Styles - 2025 Modern SaaS UI */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* Global Article Styles */
.article-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Premium Hero Section */
.article-hero {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
    position: relative;
    padding: 48px 0 32px;
}

.article-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #667eea, transparent);
}

.article-hero-glow {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    max-width: 100%;
    height: 200px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    filter: blur(40px);
    pointer-events: none;
}

/* Category Badge */
.category-badge-premium {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    margin-bottom: 20px;
}

/* Article Title */
.article-title-premium {
    font-size: 2.5rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
    margin-bottom: 24px;
    max-width: 900px;
}

@media (min-width: 768px) {
    .article-title-premium {
        font-size: 3rem;
    }
}

@media (min-width: 1024px) {
    .article-title-premium {
        font-size: 3.5rem;
    }
}

/* Meta Row */
.article-meta-premium {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: #6b7280;
}

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

.meta-item svg {
    width: 16px;
    height: 16px;
    color: #9ca3af;
}

/* Featured Image */
.featured-image-premium {
    width: 100%;
    height: auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin: 40px 0;
    background: #f3f4f6;
}

.featured-image-premium img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.image-caption {
    text-align: center;
    font-size: 13px;
    color: #9ca3af;
    margin-top: 12px;
    font-style: italic;
}

/* Article Content - Figma Typography */
.article-content-premium {
    max-width: 820px;
    margin: 0 auto;
    font-size: 17px;
    line-height: 1.7;
    color: #374151;
}

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

.article-content-premium .lead {
    font-size: 1.25rem;
    line-height: 1.6;
    color: #4b5563;
    margin-bottom: 32px;
}

/* Headings with Gradient Bar */
.article-content-premium h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #111827;
    margin-top: 48px;
    margin-bottom: 20px;
    padding-left: 20px;
    border-left: 4px solid;
    border-image: linear-gradient(180deg, #667eea, #764ba2) 1;
    line-height: 1.3;
}

.article-content-premium h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-top: 36px;
    margin-bottom: 16px;
    line-height: 1.3;
}

/* Custom Lists */
.article-content-premium ul {
    list-style: none;
    padding-left: 0;
    margin: 24px 0;
}

.article-content-premium ul li {
    position: relative;
    padding-left: 32px;
    margin-bottom: 12px;
    line-height: 1.7;
}

.article-content-premium ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.article-content-premium ol {
    padding-left: 24px;
    margin: 24px 0;
}

.article-content-premium ol li {
    margin-bottom: 12px;
    line-height: 1.7;
}

/* Quote Boxes */
.article-content-premium blockquote,
.article-content-premium .quote-box {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    border-radius: 12px;
    padding: 20px 24px;
    margin: 32px 0;
    font-style: italic;
    color: #1e40af;
}

/* Code Blocks */
.article-content-premium pre,
.article-content-premium code {
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 14px;
}

.article-content-premium pre {
    background: #1f2937;
    color: #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin: 24px 0;
    overflow-x: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.article-content-premium code {
    background: #f3f4f6;
    color: #dc2626;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.9em;
}

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

/* Highlight Boxes */
.highlight-box {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 24px;
    margin: 32px 0;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.highlight-box h3 {
    margin-top: 0;
    color: #1e40af;
}

/* Share Section */
.share-section {
    border-top: 2px solid #f3f4f6;
    margin-top: 48px;
    padding-top: 32px;
}

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

.share-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

/* Author Section */
.author-section {
    background: white;
    border-radius: 20px;
    padding: 32px;
    margin-top: 48px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #f1f5f9;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.author-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
}

.author-role {
    color: #667eea;
    font-weight: 600;
    margin-bottom: 12px;
}

.author-bio {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 20px;
}

.author-social {
    display: flex;
    gap: 12px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* Related Posts */
.related-posts {
    margin-top: 64px;
    padding-top: 48px;
    border-top: 2px solid #f3f4f6;
}

.related-posts-title {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 32px;
    text-align: center;
}

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

.related-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
}

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

.related-card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #f3f4f6;
    overflow: hidden;
}

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

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

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

.related-card-category {
    font-size: 12px;
    font-weight: 600;
    color: #667eea;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.related-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.related-card:hover .related-card-title {
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.related-card-excerpt {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Sidebar Premium Styles */
/* .sidebar-premium removed as it is no longer used/needed */

.sidebar-card-premium {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #f1f5f9;
    margin-bottom: 24px;
}

.sidebar-title-premium {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f3f4f6;
}

/* Search Box Premium */
.search-box-premium {
    position: relative;
}

.search-icon-premium {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #9ca3af;
}

.search-input-premium {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    background: #f9fafb;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-input-premium:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

/* Tool Links with Dots */
.tool-link-premium {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    font-weight: 500;
    font-size: 14px;
    color: #374151;
    transition: all 0.2s ease;
    margin-bottom: 4px;
}

.tool-link-premium:hover {
    background: #f9fafb;
    color: #667eea;
}

.tool-dot-premium {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Recent Posts with Thumbnails */
.recent-post-premium {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    transition: all 0.2s ease;
    margin-bottom: 8px;
}

.recent-post-premium:hover {
    background: #f9fafb;
}

.recent-post-thumb-premium {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f3f4f6;
}

.recent-post-thumb-premium img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.recent-post-title-premium {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
    margin-bottom: 4px;
}

.recent-post-premium:hover .recent-post-title-premium {
    color: #667eea;
    text-decoration: underline;
}

.recent-post-date-premium {
    font-size: 12px;
    color: #9ca3af;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar-premium {
        position: static;
    }

    .article-title-premium {
        font-size: 2rem;
    }

    .article-content-premium {
        font-size: 16px;
    }
}

/* Mobile Table Fix */
@media (max-width: 768px) {

    /* Make table wrapper scrollable */
    .overflow-x-auto {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        margin: 0 -1rem;
        padding: 0 1rem;
    }

    /* Prevent table from shrinking */
    .overflow-x-auto table {
        min-width: 500px;
    }

    /* Reduce cell padding on mobile */
    .overflow-x-auto th,
    .overflow-x-auto td {
        padding: 8px 12px !important;
        white-space: nowrap;
    }

    /* Keep text from breaking awkwardly */
    .overflow-x-auto th {
        font-size: 10px !important;
    }

    .overflow-x-auto td {
        font-size: 12px !important;
    }

    /* Fix left margins that are too wide on mobile */
    .ml-16 {
        margin-left: 0 !important;
    }

    /* Stack flex items vertically on mobile */
    .flex.items-center.gap-4 {
        flex-wrap: wrap;
    }

    /* Shrink large headings in flex containers */
    .flex.items-center.gap-4 h3 {
        font-size: 1.1rem !important;
        line-height: 1.4 !important;
    }

    /* Make number circles smaller on mobile */
    .flex-shrink-0.w-12.h-12 {
        width: 2.5rem !important;
        height: 2.5rem !important;
        font-size: 1rem !important;
    }

    /* Color swatch boxes - smaller on mobile */
    .w-24.h-24 {
        width: 4rem !important;
        height: 4rem !important;
    }

    /* Article padding reduction */
    .article-content-premium {
        padding: 0 !important;
    }

    article.bg-white.rounded-2xl {
        padding: 1rem !important;
    }

    /* Fix h2 and h3 sizes */
    .article-content-premium h2 {
        font-size: 1.5rem !important;
    }

    .article-content-premium h3 {
        font-size: 1.2rem !important;
    }
}

/* Additional Sidebar Styles (Migrated from Inline) */
.sidebar-box {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #f1f5f9;
}

.category-item-sidebar {
    padding: 12px;
    border-radius: 10px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.category-item-sidebar:hover {
    background: #f9fafb;
}

.category-icon-sidebar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: currentColor;
    opacity: 0.1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.category-icon-sidebar svg {
    position: relative;
    z-index: 1;
    opacity: 1;
}

.post-item-sidebar {
    display: block;
    padding: 12px;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.post-item-sidebar:hover {
    background: #f9fafb;
}

.post-icon-sidebar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 1024px) {
    .lg\:sticky {
        position: static !important;
    }
}

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