/* ==========================================
   TEXTSIGHT.AI BLOG - BLOG-SPECIFIC STYLES
   Requires landing.css to be loaded first
   for base styles, variables, nav, and footer
   ========================================== */

/* ==========================================
   BLOG HERO SECTION
   ========================================== */
.blog-hero {
    position: relative;
    padding: 160px 0 80px;
    background: var(--gradient-bg);
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-hero);
    pointer-events: none;
}

.blog-hero .container {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
}

.hero-badge svg {
    width: 16px;
    height: 16px;
    color: var(--primary-400);
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--space-6);
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto var(--space-10);
    line-height: 1.6;
}

/* Search Bar */
.search-bar {
    display: flex;
    align-items: center;
    max-width: 500px;
    margin: 0 auto var(--space-8);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-1);
    transition: all var(--transition-base);
}

.search-bar:focus-within {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.15);
}

.search-bar input {
    flex: 1;
    padding: var(--space-4) var(--space-5);
    background: transparent;
    border: none;
    font-size: 16px;
    color: var(--text-primary);
    outline: none;
    font-family: inherit;
}

.search-bar input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    padding: var(--space-3) var(--space-5);
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.4);
}

.search-btn svg {
    width: 20px;
    height: 20px;
    color: white;
}

/* Category Filters */
.category-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-3);
}

.filter-btn {
    padding: var(--space-2) var(--space-5);
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.filter-btn:hover {
    border-color: var(--primary-500);
    color: var(--primary-400);
    background: rgba(6, 182, 212, 0.1);
}

.filter-btn.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.4);
}

/* ==========================================
   CATEGORY BADGES
   ========================================== */
.category-badge {
    display: inline-flex;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-ai { background: rgba(6, 182, 212, 0.2); color: #22d3ee; }
.badge-guide { background: rgba(139, 92, 246, 0.2); color: #a78bfa; }
.badge-news { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.badge-product { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.badge-tutorial { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.badge-case-study { background: rgba(236, 72, 153, 0.2); color: #f472b6; }
.badge-tips { background: rgba(99, 102, 241, 0.2); color: #818cf8; }
.badge-research { background: rgba(20, 184, 166, 0.2); color: #2dd4bf; }

/* ==========================================
   FEATURED ARTICLE SECTION
   ========================================== */
.featured-section {
    padding: var(--space-20) 0;
    background: var(--bg-dark);
}

.featured-label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-400);
    margin-bottom: var(--space-6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.featured-label svg {
    width: 18px;
    height: 18px;
}

.featured-card {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 0;
    background: var(--bg-card);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
}

.featured-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
    transform: translateY(-4px);
}

.featured-image {
    position: relative;
    height: 100%;
    min-height: 420px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-darker) 100%);
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.featured-card:hover .featured-image img {
    transform: scale(1.03);
}

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.15) 0%, rgba(15, 23, 42, 0.95) 50%, rgba(34, 211, 238, 0.1) 100%);
    position: relative;
    overflow: hidden;
}

.image-placeholder::before {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.2) 0%, transparent 70%);
    top: -40px;
    right: -40px;
    animation: float-slow 8s ease-in-out infinite;
}

.image-placeholder::after {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.15) 0%, transparent 70%);
    bottom: -30px;
    left: -30px;
    animation: float-slow 8s ease-in-out infinite reverse;
}

@keyframes float-slow {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(10px, -10px) scale(1.1); }
}

/* Category-specific gradient backgrounds */
.badge-ai ~ .image-placeholder,
.article-card[data-category="ai-detection"] .image-placeholder {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2) 0%, var(--bg-darker) 50%, rgba(6, 182, 212, 0.1) 100%);
}

.badge-guide ~ .image-placeholder,
.article-card[data-category="guides"] .image-placeholder {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, var(--bg-darker) 50%, rgba(139, 92, 246, 0.1) 100%);
}

.badge-tips ~ .image-placeholder,
.article-card[data-category="tips"] .image-placeholder {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, var(--bg-darker) 50%, rgba(99, 102, 241, 0.1) 100%);
}

.badge-news ~ .image-placeholder,
.article-card[data-category="news"] .image-placeholder {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, var(--bg-darker) 50%, rgba(245, 158, 11, 0.1) 100%);
}

.badge-tutorial ~ .image-placeholder,
.article-card[data-category="tutorials"] .image-placeholder {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, var(--bg-darker) 50%, rgba(239, 68, 68, 0.1) 100%);
}

.image-placeholder svg {
    width: 48px;
    height: 48px;
    color: var(--primary-400);
    opacity: 0.6;
    margin-bottom: var(--space-2);
    position: relative;
    z-index: 1;
}

.image-placeholder span {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.featured-image .category-badge {
    position: absolute;
    top: var(--space-6);
    left: var(--space-6);
}

.featured-content {
    padding: var(--space-12);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: var(--space-4);
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.featured-title a {
    color: var(--text-primary);
    transition: color var(--transition-fast);
}

.featured-title a:hover {
    color: var(--primary-400);
}

.featured-excerpt {
    font-size: 17px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
}

.featured-meta {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-8);
    flex-wrap: wrap;
}

/* ==========================================
   AUTHOR INFO
   ========================================== */
.author {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: white;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.author-role {
    font-size: 12px;
    color: var(--text-muted);
}

.meta-divider {
    width: 4px;
    height: 4px;
    background: var(--text-muted);
    border-radius: 50%;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 14px;
    color: var(--text-secondary);
}

.meta-item svg {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

/* Read More Button */
.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-6);
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 15px;
    transition: all var(--transition-base);
    align-self: flex-start;
    border: none;
    cursor: pointer;
}

.read-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.5);
}

.read-more-btn svg {
    width: 18px;
    height: 18px;
    transition: transform var(--transition-fast);
}

.read-more-btn:hover svg {
    transform: translateX(4px);
}

/* ==========================================
   ARTICLES GRID SECTION
   ========================================== */
.articles-section {
    padding: var(--space-20) 0;
    background: var(--bg-darker);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-10);
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.article-count {
    font-size: 14px;
    color: var(--text-muted);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-8);
    margin-bottom: var(--space-12);
}

/* ==========================================
   ARTICLE CARD
   ========================================== */
.article-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-500);
    box-shadow: 0 20px 40px rgba(6, 182, 212, 0.2);
}

.article-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-darker) 100%);
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.article-card:hover .article-image img {
    transform: scale(1.08);
}

.article-image .image-placeholder {
    height: 100%;
}

.article-image .image-placeholder svg {
    width: 48px;
    height: 48px;
}

.article-image .category-badge {
    position: absolute;
    top: var(--space-4);
    left: var(--space-4);
}

.article-content {
    padding: var(--space-6);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: var(--space-3);
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.article-title a {
    color: var(--text-primary);
    transition: color var(--transition-fast);
}

.article-title a:hover {
    color: var(--primary-400);
}

.article-excerpt {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: var(--space-5);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: 13px;
    color: var(--text-muted);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-color);
}

.article-meta .separator {
    width: 3px;
    height: 3px;
    background: var(--text-muted);
    border-radius: 50%;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.article-meta svg {
    width: 14px;
    height: 14px;
}

/* ==========================================
   LOAD MORE BUTTON
   ========================================== */
.load-more {
    text-align: center;
}

.load-more-btn {
    padding: var(--space-4) var(--space-10);
    background: transparent;
    border: 2px solid var(--primary-500);
    color: var(--primary-400);
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all var(--transition-base);
    font-family: inherit;
}

.load-more-btn:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.4);
}

.load-more-btn:disabled {
    opacity: 0.5;
    cursor: default;
    transform: none;
}

.load-more-btn .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: var(--space-2);
}

/* ==========================================
   NO RESULTS STATE
   ========================================== */
.no-results {
    text-align: center;
    padding: var(--space-20) var(--space-5);
    grid-column: 1 / -1;
}

.no-results svg {
    width: 64px;
    height: 64px;
    color: var(--text-muted);
    margin-bottom: var(--space-6);
}

.no-results h3 {
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: var(--space-3);
}

.no-results p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
}

.no-results button {
    padding: var(--space-3) var(--space-6);
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.no-results button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.4);
}

/* ==========================================
   BLOG POST - HERO SECTION
   ========================================== */
.post-hero {
    position: relative;
    padding: 160px 0 60px;
    background: var(--gradient-bg);
    overflow: hidden;
}

.post-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-hero);
    pointer-events: none;
}

.post-hero .container {
    position: relative;
    z-index: 1;
    max-width: 900px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: var(--space-6);
}

.breadcrumb a {
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.breadcrumb a:hover {
    color: var(--primary-400);
}

.breadcrumb svg {
    width: 16px;
    height: 16px;
}

.post-hero .category-badge {
    margin-bottom: var(--space-5);
}

.post-title {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: var(--space-6);
    letter-spacing: -0.02em;
}

.post-subtitle {
    font-size: 20px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: var(--space-8);
}

.post-meta {
    display: flex;
    align-items: center;
    gap: var(--space-6);
    flex-wrap: wrap;
}

.post-meta .author {
    gap: var(--space-3);
}

.post-meta .author-avatar {
    width: 48px;
    height: 48px;
}

.post-meta .meta-item {
    font-size: 15px;
}

/* ==========================================
   BLOG POST - FEATURED IMAGE
   ========================================== */
.post-featured-image {
    margin-top: -40px;
    margin-bottom: var(--space-16);
    position: relative;
    z-index: 2;
}

.post-featured-image .container {
    max-width: 1000px;
}

.post-featured-image img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: var(--radius-2xl);
    border: 1px solid var(--border-color);
}

.post-featured-image .image-placeholder {
    height: 400px;
    border-radius: var(--radius-2xl);
    border: 1px solid var(--border-color);
}

/* ==========================================
   BLOG POST - CONTENT AREA
   ========================================== */
.post-content-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 48px;
    padding: 0 var(--space-8) var(--space-20);
    max-width: 1320px;
    margin: 0 auto;
}

/* Table of Contents Sidebar */
.toc-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    z-index: 1;
}

.toc-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 20px;
}

.toc-card h4 {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.toc-list {
    list-style: none;
}

.toc-list li {
    margin-bottom: 2px;
}

.toc-list a {
    display: block;
    padding: 8px 14px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
    border-left: 2px solid transparent;
    transition: all var(--transition-fast);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.toc-list a:hover {
    color: var(--primary-400);
    background: rgba(6, 182, 212, 0.08);
    border-left-color: var(--primary-500);
}

.toc-list a.active {
    color: var(--primary-400);
    background: rgba(6, 182, 212, 0.08);
    border-left-color: var(--primary-500);
    font-weight: 600;
}

.toc-list .toc-h3 {
    padding-left: 28px;
    font-size: 13px;
}

/* Main Article Content */
.post-content {
    max-width: 780px;
    overflow: hidden;
    min-width: 0;
}

.post-content h2 {
    font-size: 28px;
    font-weight: 700;
    margin-top: var(--space-12);
    margin-bottom: var(--space-5);
    padding-top: var(--space-6);
    border-top: 1px solid var(--border-color);
    letter-spacing: -0.02em;
}

.post-content h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.post-content h3 {
    font-size: 22px;
    font-weight: 600;
    margin-top: var(--space-10);
    margin-bottom: var(--space-4);
    letter-spacing: -0.01em;
}

.post-content h4 {
    font-size: 18px;
    font-weight: 600;
    margin-top: var(--space-8);
    margin-bottom: var(--space-3);
}

.post-content p {
    font-size: 17px;
    line-height: 1.8;
    margin-bottom: var(--space-6);
    color: var(--text-secondary);
}

.post-content a {
    color: var(--primary-400);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.post-content a:hover {
    color: var(--primary-300);
}

.post-content ul,
.post-content ol {
    margin-bottom: var(--space-6);
    padding-left: var(--space-6);
}

.post-content li {
    font-size: 17px;
    line-height: 1.8;
    margin-bottom: var(--space-3);
    color: var(--text-secondary);
}

.post-content blockquote {
    margin: var(--space-8) 0;
    padding: var(--space-6) var(--space-8);
    background: rgba(6, 182, 212, 0.1);
    border-left: 4px solid var(--primary-500);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.post-content blockquote p {
    font-size: 18px;
    font-style: italic;
    margin-bottom: 0;
    color: var(--text-primary);
}

.post-content img {
    width: 100%;
    border-radius: var(--radius-lg);
    margin: var(--space-8) 0;
    border: 1px solid var(--border-color);
}

/* Code Blocks */
.post-content pre {
    margin: var(--space-8) 0;
    padding: var(--space-6);
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    position: relative;
}

.post-content pre code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.post-content code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.9em;
    padding: 2px 8px;
    background: var(--bg-card);
    border-radius: 4px;
    color: var(--primary-400);
}

.post-content pre code {
    padding: 0;
    background: none;
}

/* Share Sidebar */
.share-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

.share-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    text-align: center;
}

.share-card h4 {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: var(--space-4);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.share-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.share-btn:hover {
    border-color: var(--primary-500);
    color: var(--primary-400);
    background: rgba(6, 182, 212, 0.1);
}

.share-btn svg {
    width: 18px;
    height: 18px;
}

/* ==========================================
   POST TAGS
   ========================================== */
.post-tags {
    margin-top: var(--space-12);
    padding-top: var(--space-8);
    border-top: 1px solid var(--border-color);
}

.post-tags h4 {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: var(--space-4);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.tag {
    padding: var(--space-2) var(--space-4);
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 13px;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.tag:hover {
    background: rgba(6, 182, 212, 0.1);
    border-color: var(--primary-500);
    color: var(--primary-400);
}

/* ==========================================
   AUTHOR BIO BOX
   ========================================== */
.author-bio {
    margin-top: var(--space-12);
    padding: var(--space-8);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    display: flex;
    gap: var(--space-6);
}

.author-bio .author-avatar {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    font-size: 24px;
}

.author-bio-content h4 {
    font-size: 18px;
    margin-bottom: var(--space-1);
}

.author-bio-content .author-title {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: var(--space-3);
}

.author-bio-content p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
}

.author-social {
    display: flex;
    gap: var(--space-3);
}

.author-social a {
    width: 36px;
    height: 36px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.author-social a:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
}

.author-social svg {
    width: 18px;
    height: 18px;
}

/* ==========================================
   RELATED ARTICLES SECTION
   ========================================== */
.related-section {
    padding: var(--space-20) 0;
    background: var(--bg-darker);
}

.related-section .section-title {
    text-align: center;
    margin-bottom: var(--space-12);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-8);
}

/* ==========================================
   NEWSLETTER SECTION
   ========================================== */
.newsletter-section {
    padding: var(--space-24) 0;
    background: var(--bg-card);
    text-align: center;
}

.newsletter-section h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: var(--space-4);
    letter-spacing: -0.02em;
}

.newsletter-section p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto var(--space-8);
    line-height: 1.6;
}

.newsletter-form {
    display: flex;
    gap: var(--space-3);
    max-width: 480px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: var(--space-4) var(--space-6);
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 16px;
    outline: none;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.newsletter-form input::placeholder {
    color: var(--text-muted);
}

.newsletter-form input:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.15);
}

.newsletter-form button {
    padding: var(--space-4) var(--space-8);
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-lg);
    color: white;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all var(--transition-base);
    font-family: inherit;
}

.newsletter-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.4);
}

.newsletter-success {
    display: none;
    color: var(--success);
    font-size: 14px;
    margin-top: var(--space-3);
}

.newsletter-success.show {
    display: block;
}

/* ==========================================
   INFO BOXES (Blog Post)
   ========================================== */
.info-box {
    display: flex;
    gap: var(--space-4);
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    margin: var(--space-8) 0;
    border: 1px solid;
}

.info-box > svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.info-box-content p {
    margin-bottom: 0;
    font-size: 15px;
    line-height: 1.7;
}

.info-box.tip {
    background: rgba(6, 182, 212, 0.08);
    border-color: rgba(6, 182, 212, 0.3);
}

.info-box.tip > svg {
    color: var(--primary-400);
}

.info-box.tip .info-box-content p {
    color: var(--text-secondary);
}

.info-box.tip strong {
    color: var(--primary-400);
}

.info-box.warning {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.3);
}

.info-box.warning > svg {
    color: #fbbf24;
}

.info-box.warning .info-box-content p {
    color: var(--text-secondary);
}

.info-box.warning strong {
    color: #fbbf24;
}

/* ==========================================
   ANIMATIONS (Blog-specific)
   ========================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.slide-up {
    animation: slideUp 0.5s ease forwards;
}

/* Reading Progress Bar */
.reading-progress {
    position: fixed;
    top: 72px;
    left: 0;
    height: 3px;
    background: var(--gradient-primary);
    z-index: 1001;
    transition: width 0.1s ease;
}

/* C4: Heading Anchor Links */
.heading-anchor {
    opacity: 0;
    margin-left: 8px;
    color: var(--text-muted);
    transition: opacity 0.2s;
    vertical-align: middle;
    display: inline-block;
}
.post-content h2:hover .heading-anchor,
.post-content h3:hover .heading-anchor {
    opacity: 0.6;
}
.heading-anchor:hover {
    opacity: 1 !important;
    color: var(--primary-400);
}

/* C5: Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    background: var(--primary-500);
    color: white;
    border-color: var(--primary-500);
}

/* D1: In-Content CTA Banner */
.blog-cta-banner {
    background: linear-gradient(135deg, rgba(6,182,212,0.08), rgba(34,211,238,0.05));
    border: 1px solid rgba(6,182,212,0.2);
    border-radius: 16px;
    padding: 24px 28px;
    margin: 32px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    position: relative;
    z-index: 0;
    overflow: hidden;
}
.blog-cta-banner p {
    margin: 0;
    font-size: 15px;
    color: var(--text-primary);
}
.blog-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    background: var(--gradient-primary);
    color: white;
    font-weight: 600;
    font-size: 14px;
    border-radius: 10px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
}
.blog-cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(6,182,212,0.3);
}

/* D6: Was This Helpful? */
.helpful-feedback {
    text-align: center;
    padding: 32px;
    margin-top: 40px;
    border-top: 2px solid var(--border-color);
}
.helpful-question {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}
.helpful-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
}
.helpful-btn {
    padding: 10px 28px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
}
.helpful-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.helpful-yes:hover { border-color: #10b981; background: rgba(16,185,129,0.1); }
.helpful-no:hover { border-color: #ef4444; background: rgba(239,68,68,0.1); }
.helpful-thanks {
    font-size: 15px;
    color: #10b981;
    font-weight: 600;
}

/* C9: Blog Pagination */
.blog-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}
.page-btn {
    padding: 10px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
}
.page-btn:hover:not(:disabled) {
    background: rgba(6,182,212,0.1);
    border-color: var(--primary-500);
    color: var(--primary-400);
}
.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.page-info {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
}

/* D2: Exit Intent Popup */
.exit-popup { display: none; }
.exit-popup.visible { display: block; }
.exit-popup-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); z-index: 10000; }
.exit-popup-card {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    background: var(--bg-card, #1e293b); border: 1px solid var(--border-color, #334155);
    border-radius: 20px; padding: 40px; max-width: 420px; width: 90%; text-align: center; z-index: 10001;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.exit-popup-card h3 { font-size: 22px; font-weight: 800; color: var(--text-primary, white); margin-bottom: 12px; }
.exit-popup-card p { font-size: 15px; color: var(--text-secondary, #94a3b8); margin-bottom: 24px; }
.exit-popup-btn {
    display: inline-block; padding: 14px 32px; background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white; font-weight: 700; font-size: 15px; border-radius: 12px; text-decoration: none;
    transition: all 0.2s; margin-bottom: 12px;
}
.exit-popup-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(6,182,212,0.3); }
.exit-popup-close { position: absolute; top: 16px; right: 16px; background: none; border: none; color: var(--text-muted, #64748b); font-size: 18px; cursor: pointer; }
.exit-popup-dismiss { display: block; font-size: 13px; color: var(--text-muted, #64748b); cursor: pointer; }
.exit-popup-dismiss:hover { color: var(--text-secondary, #94a3b8); }

/* D3: Scroll-triggered Newsletter */
.scroll-newsletter {
    position: fixed; bottom: -100px; left: 50%; transform: translateX(-50%);
    width: calc(100% - 48px); max-width: 600px;
    background: var(--bg-card, #1e293b); border: 1px solid var(--border-color, #334155);
    border-radius: 16px; padding: 20px 24px; z-index: 9998;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    transition: bottom 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex; align-items: center; gap: 12px;
}
.scroll-newsletter.visible { bottom: 24px; }
.scroll-newsletter-content { flex: 1; }
.scroll-newsletter-content p { margin: 0 0 10px; font-size: 14px; color: var(--text-primary, white); }
.scroll-newsletter-form { display: flex; gap: 8px; }
.scroll-newsletter-form input {
    flex: 1; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border-color, #334155);
    background: rgba(255,255,255,0.05); color: var(--text-primary, white); font-size: 14px;
}
.scroll-newsletter-form button {
    padding: 8px 20px; border-radius: 8px; border: none;
    background: linear-gradient(135deg, #06b6d4, #0891b2); color: white; font-weight: 600; font-size: 13px; cursor: pointer;
}
.scroll-newsletter-close {
    background: none; border: none; color: var(--text-muted, #64748b); font-size: 18px; cursor: pointer;
    position: absolute; top: 8px; right: 12px;
}

/* D4: Floating Share Sidebar — right side of article */
.floating-share {
    position: fixed; right: calc((100vw - 1320px) / 2 + 16px); top: 50%; transform: translateY(-50%);
    display: flex; flex-direction: column; gap: 8px; z-index: 999;
    opacity: 0; visibility: hidden; transition: all 0.3s;
}
.floating-share.visible { opacity: 1; visibility: visible; }
.floating-share button {
    width: 42px; height: 42px; border-radius: 12px;
    background: var(--bg-card, #1e293b); border: 1px solid var(--border-color, #334155);
    color: var(--text-secondary, #94a3b8); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.floating-share button:hover {
    background: rgba(6,182,212,0.1); border-color: #06b6d4; color: #06b6d4;
    transform: scale(1.05);
}

/* D7: Smart CTA Banner */
.smart-cta-banner {
    display: flex; align-items: center; gap: 16px;
    background: linear-gradient(135deg, rgba(6,182,212,0.12), rgba(34,211,238,0.06));
    border: 1px solid rgba(6,182,212,0.25); border-radius: 16px;
    padding: 20px 28px; margin: 32px 0;
    position: relative; z-index: 0; overflow: hidden;
}
.smart-cta-icon { font-size: 28px; }
.smart-cta-text { flex: 1; font-size: 16px; font-weight: 600; color: var(--text-primary, white); }
.smart-cta-btn {
    padding: 10px 24px; background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white; font-weight: 600; font-size: 14px; border-radius: 10px;
    text-decoration: none; white-space: nowrap; transition: all 0.2s;
}
.smart-cta-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(6,182,212,0.3); }

/* C6: Dark Mode Toggle */
.dark-mode-toggle {
    position: fixed; top: 80px; right: 24px;
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--bg-card, #1e293b); border: 1px solid var(--border-color, #334155);
    font-size: 18px; cursor: pointer; z-index: 999;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.dark-mode-toggle:hover { transform: scale(1.1); }

/* Light mode overrides */
.blog-light-mode {
    --bg-dark: #ffffff !important;
    --bg-darker: #f8fafc !important;
    --bg-card: #ffffff !important;
    --bg-glass: rgba(248,250,252,0.9) !important;
    --text-primary: #0f172a !important;
    --text-secondary: #475569 !important;
    --text-muted: #94a3b8 !important;
    --border-color: #e2e8f0 !important;
    --border-hover: #cbd5e1 !important;
    background: #ffffff !important;
    color: #0f172a !important;
}
.blog-light-mode .navbar { background: rgba(255,255,255,0.95) !important; border-bottom: 1px solid #e2e8f0 !important; }
.blog-light-mode .navbar a, .blog-light-mode .nav-links a { color: #334155 !important; }
.blog-light-mode .navbar .btn-ghost { color: #334155 !important; }
.blog-light-mode .post-hero { background: #f8fafc !important; }
.blog-light-mode .post-title { color: #0f172a !important; }
.blog-light-mode .post-subtitle { color: #475569 !important; }
.blog-light-mode .post-meta, .blog-light-mode .meta-item { color: #64748b !important; }
.blog-light-mode .author-name { color: #0f172a !important; }
.blog-light-mode .author-role { color: #64748b !important; }
.blog-light-mode .author-avatar { background: #06b6d4 !important; color: white !important; }
.blog-light-mode .breadcrumb a, .blog-light-mode .breadcrumb span { color: #64748b !important; }
.blog-light-mode .breadcrumb svg { color: #94a3b8 !important; }
.blog-light-mode .category-badge { background: rgba(6,182,212,0.1) !important; color: #0891b2 !important; }
.blog-light-mode .post-content { color: #1e293b !important; }
.blog-light-mode .post-content h2, .blog-light-mode .post-content h3 { color: #0f172a !important; }
.blog-light-mode .post-content blockquote { border-left-color: #06b6d4; color: #475569; background: #f1f5f9; }
.blog-light-mode .post-content pre { background: #1e293b !important; }
.blog-light-mode .post-content a { color: #0891b2 !important; }
.blog-light-mode .toc-card { background: #ffffff !important; border-color: #e2e8f0 !important; }
.blog-light-mode .toc-card h4 { color: #64748b !important; }
.blog-light-mode .toc-list a { color: #475569 !important; }
.blog-light-mode .toc-list a:hover, .blog-light-mode .toc-list a.active { color: #0891b2 !important; background: rgba(6,182,212,0.06) !important; }
.blog-light-mode .reading-progress { background: linear-gradient(to right, #0891b2, #06b6d4) !important; }
.blog-light-mode .blog-cta-banner { background: linear-gradient(135deg, rgba(6,182,212,0.06), rgba(6,182,212,0.03)) !important; border-color: #e2e8f0 !important; }
.blog-light-mode .blog-cta-banner p { color: #1e293b !important; }
.blog-light-mode .helpful-feedback { border-top-color: #e2e8f0 !important; }
.blog-light-mode .helpful-question { color: #0f172a !important; }
.blog-light-mode .helpful-btn { background: #ffffff !important; border-color: #e2e8f0 !important; color: #334155 !important; }
.blog-light-mode .related-section { background: #f8fafc !important; }
.blog-light-mode .section-title { color: #0f172a !important; }
.blog-light-mode .article-card { background: #ffffff !important; border: 1px solid #e2e8f0 !important; }
.blog-light-mode .article-title a { color: #0f172a !important; }
.blog-light-mode .article-excerpt { color: #475569 !important; }
.blog-light-mode .article-meta { color: #94a3b8 !important; }
.blog-light-mode .newsletter-section { background: #f1f5f9 !important; }
.blog-light-mode .newsletter-section h2 { color: #0f172a !important; }
.blog-light-mode .newsletter-section p { color: #475569 !important; }
/* Footer stays dark in light mode — intentional dark footer */
.blog-light-mode .footer { background: #0f172a !important; color: #94a3b8 !important; }
.blog-light-mode .footer a { color: #94a3b8 !important; }
.blog-light-mode .footer a:hover { color: #06b6d4 !important; }
.blog-light-mode .footer h4 { color: #e2e8f0 !important; }
.blog-light-mode .footer-brand p { color: #64748b !important; }
.blog-light-mode .footer-bottom { color: #64748b !important; }
.blog-light-mode .footer-badge { color: #94a3b8 !important; border-color: #334155 !important; }
/* Footer logo stays dark version (white text on dark bg) */
.blog-light-mode .footer img[src*="textsight-logo-light"] {
    content: url('/textsight-logo-dark.svg');
}
/* Blog hero section */
.blog-light-mode .blog-hero { background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%) !important; }
.blog-light-mode .blog-hero .hero-title { color: #0f172a !important; }
.blog-light-mode .blog-hero .hero-subtitle { color: #475569 !important; }
.blog-light-mode .blog-hero .hero-badge { background: rgba(6,182,212,0.1) !important; color: #0891b2 !important; border-color: rgba(6,182,212,0.2) !important; }
.blog-light-mode .search-bar { background: #ffffff !important; border-color: #e2e8f0 !important; }
.blog-light-mode .search-bar input { color: #0f172a !important; }
.blog-light-mode .filter-btn { background: #ffffff !important; color: #475569 !important; border-color: #e2e8f0 !important; }
.blog-light-mode .filter-btn.active { background: #0891b2 !important; color: white !important; border-color: #0891b2 !important; }
.blog-light-mode .articles-section { background: #ffffff !important; }
.blog-light-mode .featured-article { background: #ffffff !important; border-color: #e2e8f0 !important; }
.blog-light-mode .featured-title a { color: #0f172a !important; }
.blog-light-mode .featured-excerpt { color: #475569 !important; }
.blog-light-mode .read-more-btn { color: #0891b2 !important; }
.blog-light-mode .mobile-nav { background: #ffffff !important; }
.blog-light-mode .mobile-nav a { color: #334155 !important; border-bottom-color: #e2e8f0 !important; }
.blog-light-mode .back-to-top { background: #ffffff !important; border-color: #e2e8f0 !important; color: #334155 !important; }
.blog-light-mode .exit-popup-card, .blog-light-mode .scroll-newsletter { background: #fff !important; border-color: #e2e8f0 !important; }
.blog-light-mode .scroll-newsletter-content p { color: #0f172a !important; }
.blog-light-mode .scroll-newsletter-form input { background: #f8fafc !important; border-color: #e2e8f0 !important; color: #0f172a !important; }
.blog-light-mode .post-featured-image img { border-radius: 16px; }

/* ==========================================
   ANIMATIONS & DESIGN POLISH
   ========================================== */

/* 1. Scroll Reveal — elements fade/slide up when entering viewport */
.scroll-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.scroll-reveal-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.scroll-reveal-stagger.revealed > *:nth-child(1) { transition-delay: 0s; }
.scroll-reveal-stagger.revealed > *:nth-child(2) { transition-delay: 0.1s; }
.scroll-reveal-stagger.revealed > *:nth-child(3) { transition-delay: 0.2s; }
.scroll-reveal-stagger.revealed > *:nth-child(4) { transition-delay: 0.3s; }
.scroll-reveal-stagger.revealed > *:nth-child(5) { transition-delay: 0.4s; }
.scroll-reveal-stagger.revealed > *:nth-child(6) { transition-delay: 0.5s; }
.scroll-reveal-stagger.revealed > * {
    opacity: 1;
    transform: translateY(0);
}

/* 2. Dark Mode Smooth Transition */
body, .navbar, .post-hero, .post-content, .post-content-wrapper,
.toc-card, .toc-list a, .article-card, .footer, .related-section,
.newsletter-section, .blog-cta-banner, .helpful-feedback, .helpful-btn,
.back-to-top, .mobile-nav, .scroll-newsletter, .exit-popup-card,
.category-badge, .breadcrumb a, .breadcrumb span, .post-title,
.post-subtitle, .author-name, .author-role, .meta-item,
.section-title, .article-title a, .article-excerpt, .article-meta,
.post-content h2, .post-content h3, .post-content p, .post-content li,
.post-content blockquote, .post-content a, img[src*="textsight-logo"] {
    transition: background 0.35s ease, color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

/* 3. Article Card Hover Effects */
.article-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.article-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(6, 182, 212, 0.12), 0 4px 12px rgba(0,0,0,0.15);
    border-color: rgba(6, 182, 212, 0.3);
}
.article-card .article-image img,
.article-card .image-placeholder {
    transition: transform 0.4s ease;
}
.article-card:hover .article-image img,
.article-card:hover .image-placeholder {
    transform: scale(1.04);
}
.article-card .article-title a {
    transition: color 0.2s ease;
}
.article-card:hover .article-title a {
    color: var(--primary-400) !important;
}

/* Featured article hover */
.featured-article {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.featured-article:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(6, 182, 212, 0.1), 0 6px 16px rgba(0,0,0,0.12);
}

/* 4. TOC Active Indicator — animated sliding bar */
.toc-card {
    position: relative;
}
.toc-list {
    position: relative;
}
.toc-indicator {
    position: absolute;
    left: 0;
    width: 3px;
    height: 36px;
    background: linear-gradient(180deg, #06b6d4, #22d3ee);
    border-radius: 0 4px 4px 0;
    transition: top 0.3s cubic-bezier(0.4, 0, 0.2, 1), height 0.2s ease;
    z-index: 1;
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.4);
}

/* Related articles grid stagger */
.related-grid {
    overflow: hidden;
}

/* C2: Read Time Progress */
.read-time-progress {
    position: fixed;
    top: 76px;
    right: 24px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted, #94a3b8);
    background: var(--bg-card, #1e293b);
    border: 1px solid var(--border-color, #334155);
    border-radius: 20px;
    padding: 6px 14px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}
.read-time-progress.visible { opacity: 1; visibility: visible; }

/* C7: Print CSS */
@media print {
    nav, footer, .share-sidebar, .share-card, .floating-share,
    .newsletter-section, .newsletter-form, .toc-sidebar,
    .related-section, .blog-cta-banner, .smart-cta-banner,
    .helpful-feedback, .back-to-top, .dark-mode-toggle,
    .reading-progress, .read-time-progress, .scroll-newsletter,
    .exit-popup, .cookie-consent, .heading-anchor,
    .category-badge, .breadcrumb, .post-meta { display: none !important; }
    .post-content-wrapper { display: block !important; }
    .post-content { max-width: 100% !important; font-size: 12pt; color: #000 !important; }
    .post-content h2, .post-content h3 { color: #000 !important; }
    .post-hero { padding: 20px 0 !important; background: none !important; }
    .post-title { font-size: 24pt !important; color: #000 !important; }
    body { background: white !important; color: #000 !important; }
}

/* C7: Print Button */
.print-btn {
    padding: 10px 28px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border-color, #334155);
    background: var(--bg-card, #1e293b);
    color: var(--text-secondary, #94a3b8);
}
.print-btn:hover { background: rgba(6,182,212,0.1); border-color: var(--primary-500); }

@media (max-width: 768px) {
    .blog-cta-banner, .smart-cta-banner {
        flex-direction: column;
        text-align: center;
    }
    .back-to-top {
        bottom: 76px;
        right: 16px;
    }
    .floating-share { display: none !important; }
    .dark-mode-toggle { top: auto; bottom: 140px; right: 16px; }
    .scroll-newsletter { width: calc(100% - 32px); }
    .scroll-newsletter-form { flex-direction: column; }
    .read-time-progress { display: none; }
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */
@media (max-width: 1400px) {
    .floating-share {
        right: 16px;
    }
}

@media (max-width: 1200px) {
    .post-content-wrapper {
        grid-template-columns: 240px 1fr;
        gap: 32px;
        max-width: 100%;
    }
    .floating-share {
        display: none !important;
    }
}

@media (max-width: 1024px) {
    .articles-grid,
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .featured-card {
        grid-template-columns: 1fr;
    }

    .featured-image {
        min-height: 300px;
    }

    .featured-content {
        padding: var(--space-8);
    }

    .post-content-wrapper {
        grid-template-columns: 1fr;
        max-width: 100%;
        padding: 0 var(--space-5);
    }

    .toc-sidebar {
        position: static;
        max-height: none;
        margin-bottom: var(--space-6);
    }

    .toc-card {
        padding: var(--space-4);
    }

    .toc-list a {
        padding: 6px 10px;
        font-size: 13px;
    }

    .hero-title {
        font-size: 42px;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 36px;
    }

    .post-title {
        font-size: 32px;
    }

    .hero-subtitle,
    .post-subtitle {
        font-size: 17px;
    }

    .articles-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .featured-title {
        font-size: 24px;
    }

    .section-header {
        flex-direction: column;
        gap: var(--space-3);
        align-items: flex-start;
    }

    .section-title {
        font-size: 28px;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-section h2 {
        font-size: 28px;
    }

    .post-content h2 {
        font-size: 24px;
    }

    .post-content h3 {
        font-size: 20px;
    }

    .post-content p,
    .post-content li {
        font-size: 16px;
    }

    .author-bio {
        flex-direction: column;
        text-align: center;
    }

    .author-social {
        justify-content: center;
    }

    .post-meta {
        justify-content: center;
        flex-wrap: wrap;
        gap: var(--space-3);
    }

    .meta-divider {
        display: none;
    }

    .post-hero .container {
        text-align: center;
    }

    .breadcrumb {
        justify-content: center;
    }

    .post-featured-image img {
        border-radius: 12px;
    }

    .post-content img {
        border-radius: 8px;
        margin-left: calc(-1 * var(--space-4));
        margin-right: calc(-1 * var(--space-4));
        width: calc(100% + var(--space-8));
        max-width: none;
    }

    .toc-sidebar {
        display: none;
    }
}

@media (max-width: 480px) {
    .blog-hero,
    .post-hero {
        padding: 120px 0 60px;
    }

    .hero-title {
        font-size: 28px;
    }

    .post-title {
        font-size: 26px;
    }

    .category-filters {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: var(--space-2);
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .filter-btn {
        flex-shrink: 0;
    }

    .featured-content {
        padding: var(--space-6);
    }

    .article-content {
        padding: var(--space-5);
    }

    .article-title {
        font-size: 18px;
    }

    .search-bar {
        flex-direction: column;
        padding: var(--space-2);
    }

    .search-bar input {
        width: 100%;
        padding: var(--space-3) var(--space-4);
    }

    .search-btn {
        width: 100%;
        padding: var(--space-3);
    }

    .post-content-wrapper {
        padding: 0 var(--space-3) var(--space-12);
        gap: 0;
    }

    .post-content {
        font-size: 15px;
    }

    .post-content blockquote {
        padding: var(--space-4);
        margin-left: 0;
        margin-right: 0;
    }

    .post-content pre {
        padding: var(--space-3);
        margin-left: calc(-1 * var(--space-3));
        margin-right: calc(-1 * var(--space-3));
        border-radius: 0;
        font-size: 13px;
    }

    .post-content ul, .post-content ol {
        padding-left: var(--space-5);
    }

    .helpful-feedback {
        padding: var(--space-6) var(--space-4);
    }

    .smart-cta-banner {
        padding: var(--space-5);
        gap: var(--space-3);
    }

    .smart-cta-icon { font-size: 22px; }
    .smart-cta-text { font-size: 14px; }

    .blog-cta-banner {
        padding: var(--space-5);
        gap: var(--space-3);
    }

    .blog-cta-banner p { font-size: 14px; }

    .blog-pagination {
        gap: var(--space-3);
    }

    .page-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .author-bio {
        padding: var(--space-5);
    }

    .related-grid {
        gap: var(--space-4);
    }
}

/* ==========================================
   PRINT STYLES
   ========================================== */
@media print {
    .navbar,
    .footer,
    .newsletter-section,
    .share-sidebar,
    .toc-sidebar,
    .related-section,
    .reading-progress {
        display: none;
    }

    .post-content-wrapper {
        display: block;
    }

    .post-content {
        max-width: 100%;
    }

    .post-hero {
        padding-top: 0;
    }

    body {
        background: white;
        color: black;
    }

    .post-content p,
    .post-content li {
        color: black;
    }
}
