:root {
    --primary-blue: #0066ff;
    --primary-gradient: linear-gradient(135deg, #0066ff 0%, #00d2ff 100%);
    --bg-light: #f8fbff;
    --text-main: #111827;
    --text-body: #4b5563;
    --text-muted: #9ca3af;
    --border-color: rgba(0, 102, 255, 0.08);
    --surface-white: rgba(255, 255, 255, 0.85);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-premium: 0 30px 60px -12px rgba(0, 0, 0, 0.08), 0 18px 36px -18px rgba(0, 0, 0, 0.05);
}

body.blog-page {
    background-color: #fcfdfe;
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Atmospheric Background Elements */
.bg-atmosphere {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.blur-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.12;
    z-index: -1;
}

.blur-shape-1 { width: 600px; height: 600px; background: #0066ff; top: -100px; right: -100px; }
.blur-shape-2 { width: 500px; height: 500px; background: #00d2ff; bottom: 10%; left: -100px; }
.blur-shape-3 { width: 400px; height: 400px; background: #8b5cf6; top: 40%; right: 10%; opacity: 0.06; }

/* Reading Progress Bar */
#reading-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 9999;
}

#reading-progress-bar {
    height: 100%;
    background: var(--primary-gradient);
    width: 0%;
    box-shadow: 0 0 10px rgba(0, 102, 255, 0.5);
    transition: width 0.1s ease;
}

/* Typography & Content Wrapper (Prose Style) */
.premium-article-content {
    font-family: 'Inter', 'Public Sans', system-ui, -apple-system, sans-serif;
    font-size: 18px;
    line-height: 1.9;
    color: var(--text-body);
    max-width: 1100px;
    margin: 0 auto;
    word-wrap: break-word;
    background: var(--surface-white);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: var(--shadow-premium);
    padding: 60px 80px;
    border-radius: 40px;
    margin-bottom: 60px;
}

/* Base Formatting Preservation */
.premium-article-content p {
    margin-bottom: 32px;
}

.premium-article-content strong, 
.premium-article-content b {
    font-weight: 700;
    color: var(--text-main);
}

.premium-article-content em, 
.premium-article-content i {
    font-style: italic;
}

.premium-article-content u {
    text-decoration: underline;
}

/* Semantic Heading Hierarchy */
.premium-article-content h1,
.premium-article-content h2, 
.premium-article-content h3, 
.premium-article-content h4,
.premium-article-content h5,
.premium-article-content h6 {
    color: var(--text-main);
    font-weight: 800;
    margin-top: 60px;
    margin-bottom: 24px;
    line-height: 1.3;
    letter-spacing: -0.02em;
    clear: both;
}

.premium-article-content h1 { font-size: 2.5rem; }
.premium-article-content h2 { font-size: 2.1rem; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; }
.premium-article-content h3 { font-size: 1.7rem; margin-top: 45px; }
.premium-article-content h4 { font-size: 1.4rem; margin-top: 35px; }
.premium-article-content h5 { font-size: 1.2rem; }
.premium-article-content h6 { font-size: 1.1rem; text-transform: uppercase; letter-spacing: 1px; }

/* Blockquotes Refined */
.premium-article-content blockquote {
    border-left: 4px solid var(--primary-blue);
    background: #f9fafb;
    padding: 35px 40px;
    margin: 48px 0;
    border-radius: 4px 16px 16px 4px;
    font-style: italic;
    font-size: 1.25rem;
    line-height: 1.7;
    color: #4b5563;
}

/* Professional Lists (TinyMCE Compatible) */
.premium-article-content ul, 
.premium-article-content ol {
    margin-bottom: 32px;
    padding-left: 28px;
}

.premium-article-content ul {
    list-style-type: disc;
}

.premium-article-content ol {
    list-style-type: decimal;
}

.premium-article-content li {
    margin-bottom: 12px;
}

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

/* Tables Styling */
.premium-article-content table {
    width: 100% !important;
    border-collapse: collapse;
    margin: 40px 0;
    font-size: 1rem;
    line-height: 1.5;
}

.premium-article-content th,
.premium-article-content td {
    padding: 15px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.premium-article-content th {
    background: #f9fafb;
    font-weight: 700;
}

/* Images & Media */
.premium-article-content img {
    max-width: 100%;
    height: auto !important;
    border-radius: 12px;
    margin: 32px auto;
    display: block;
}

.premium-article-content figure {
    margin: 40px 0;
    text-align: center;
}

.premium-article-content figcaption {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 12px;
}


/* Tables Refinement */
.premium-article-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 48px 0;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
}

.premium-article-content th {
    background: #f9fafb;
    padding: 20px;
    text-align: left;
    font-weight: 700;
    color: var(--text-main);
    border-bottom: 2px solid var(--border-color);
}

.premium-article-content td {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
}

/* Sidebar & Cards Refinement */
.premium-sidebar-card {
    background: var(--surface-white);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 24px;
    padding: 32px;
    box-shadow: var(--shadow-md);
    margin-bottom: 32px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-sidebar-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-blue);
}

/* TOC Links Refinement */
.toc-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.925rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    padding: 6px 0;
}

.toc-link:hover {
    color: var(--primary-blue);
    padding-left: 4px;
}

.toc-link.active {
    color: var(--primary-blue);
    font-weight: 700;
    border-left: 2px solid var(--primary-blue);
    padding-left: 16px;
    margin-left: -24px;
}

/* CTA Footer Refinement */
.big-cta-footer {
    background: var(--primary-gradient);
    border-radius: 40px;
    margin: 80px 0;
    padding: 100px 60px;
    position: relative;
    overflow: hidden;
    color: white;
    box-shadow: 0 20px 40px rgba(0, 102, 255, 0.15);
}

.btn-white-premium {
    background: white;
    color: var(--primary-blue);
    padding: 18px 45px;
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: none;
}

.btn-white-premium:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    background: #ffffff;
}

/* Responsive Micro-refinements */
@media (max-width: 991px) {
    .premium-article-content {
        padding: 40px 32px;
        border-radius: 24px;
        margin-bottom: 40px;
    }
    .author-box-premium {
        padding: 32px !important;
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .premium-article-content {
        font-size: 17px;
        line-height: 1.8;
        padding: 32px 20px;
    }
    .premium-article-content h2 { font-size: 1.85rem; }
    .premium-article-content h3 { font-size: 1.5rem; }
}


/* Images */
.premium-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    margin: 40px 0;
    box-shadow: var(--premium-shadow);
}

/* Links */
.premium-article-content a {
    color: var(--primary-blue);
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: all 0.2s;
}

.premium-article-content a:hover {
    color: #004ecc;
    text-decoration-thickness: 2px;
}

/* Table of Contents Sticky */
.toc-sidebar {
    position: sticky;
    top: 100px;
}

.toc-card {
    background: white;
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(0,0,0,0.03);
}

.toc-title {
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-item {
    margin-bottom: 10px;
}

.toc-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s;
    display: block;
    line-height: 1.4;
    padding: 4px 0;
}

.toc-link:hover, .toc-link.active {
    color: var(--primary-blue);
    transform: translateX(5px);
}

.toc-link.active {
    font-weight: 700;
    border-left: 3px solid var(--primary-blue);
    padding-left: 12px;
    margin-left: -15px;
}

/* Sidebar Improvements */
.premium-sidebar-card {
    background: white;
    border-radius: 20px;
    padding: 28px;
    box-shadow: var(--card-shadow);
    margin-bottom: 30px;
    border: 1px solid rgba(0,0,0,0.02);
}

.sidebar-title {
    font-weight: 800;
    margin-bottom: 24px;
    font-size: 1.2rem;
    color: var(--text-main);
}

/* Styled Content Blocks */
.info-box {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    padding: 24px;
    border-radius: 0 12px 12px 0;
    margin: 32px 0;
}

.warning-box {
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
    padding: 24px;
    border-radius: 0 12px 12px 0;
    margin: 32px 0;
}

.tip-box {
    background: #f0fdf4;
    border-left: 4px solid #10b981;
    padding: 24px;
    border-radius: 0 12px 12px 0;
    margin: 32px 0;
}

/* Related Articles Grid */
.related-article-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.related-article-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--premium-shadow);
}

/* FAQ Accordion */
.premium-faq-item {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
}

.faq-question {
    padding: 20px 24px;
    background: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
}

.faq-answer {
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.premium-faq-item.active .faq-answer {
    padding: 20px 24px;
    max-height: 500px;
}

.premium-faq-item.active .faq-question {
    background: #f0f7ff;
    color: var(--primary-blue);
}

/* Share Bar Sticky Mobile */
@media (max-width: 991px) {
    .toc-sidebar { display: none; }
    .premium-article-content { font-size: 17px; }
}
