/* Blog Articles CSS - tfLink */

/* Base Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #333;
    background-color: #fff;
}

/* Header */
header {
    background-color: #0a68ff;
    color: white;
    padding: 1em 2em;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .logo {
    font-size: 1.5em;
    font-weight: bold;
}

/* Main Content */
.article-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2em 3em;
    line-height: 1.7;
    flex-grow: 1;
}

/* Breadcrumb Navigation */
.breadcrumb {
    color: white;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: white;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb a:visited {
    color: white;
}

/* Article Header */
.article-header {
    margin-bottom: 3em;
    padding-bottom: 2em;
    border-bottom: 2px solid #e5e7eb;
    display: block;
}

.article-header h1 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 20px;
    line-height: 1.2;
    font-weight: 700;
}

.article-meta {
    color: white;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    display: block;
    width: 100%;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 0;
    width: 100%;
}

.tag {
    display: inline-block;
    background: #f0f9ff;
    color: #0a68ff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    margin-right: 8px;
    font-weight: 500;
}

/* Article Content */
.article-content {
    margin-top: 2rem;
}

.lead {
    font-size: 1.125rem;
    color: #4b5563;
    margin-bottom: 30px;
    font-weight: 400;
}

/* Table of Contents */
.table-of-contents {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
}

.table-of-contents h2 {
    margin-top: 0;
    font-size: 1.1rem;
}

.table-of-contents ul {
    margin: 0;
    padding-left: 20px;
}

.table-of-contents a {
    color: #0a68ff;
    text-decoration: none;
}

/* Content Sections */
.workflow-diagram {
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.workflow-diagram h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #1f2937;
    font-size: 1.2rem;
}

.flow-steps {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.step {
    background: #0a68ff;
    color: white;
    padding: 10px 15px;
    border-radius: 6px;
    font-weight: 500;
    white-space: nowrap;
    font-size: 0.9rem;
    text-align: center;
    min-width: 140px;
}

.arrow {
    font-size: 1.5rem;
    color: #0a68ff;
    font-weight: bold;
    margin: 0 5px;
}

/* Responsive flow diagram */
@media (max-width: 768px) {
    .flow-steps {
        flex-direction: column;
        gap: 15px;
    }
    
    .arrow {
        transform: rotate(90deg);
        font-size: 1.2rem;
    }
}

.best-practice-box {
    background: #f0fdf4;
    border: 1px solid #22c55e;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.security-note {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.code-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

/* Blog-specific code blocks - unique naming to avoid conflicts */
.blog-code-block {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid #e5e7eb;
}

.blog-code-block h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #1f2937;
    font-size: 1rem;
}

.blog-code-block pre {
    background: #1f2937;
    color: #f9fafb;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.blog-code-block pre code {
    background: none;
    color: #f9fafb;
    padding: 0;
    font-size: 0.9rem;
    font-family: inherit;
}

.blog-code-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.blog-inline-code {
    background: #f1f3f4;
    color: #d73a49;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
}

/* Regular pre elements for non-code content */
pre {
    background: #f8f9fa;
    padding: 1em;
    border-radius: 8px;
    overflow-x: auto;
}

/* CTA Box */
.cta-box {
    background: linear-gradient(135deg, #0a68ff 0%, #667eea 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    margin: 40px 0;
}

.cta-box a {
    color: white;
    text-decoration: none;
    font-size: 1.2em;
    font-weight: bold;
}

.cta-box a:visited {
    color: white;
}

.cta-box h3 {
    margin-top: 0;
    color: white;
}

.cta-box .cta-button {
    display: inline-block;
    background: white;
    color: #0a68ff !important;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 10px;
    transition: all 0.2s ease;
}

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

/* Blog List Page Styles */
.blog-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2em 3em;
    line-height: 1.7;
    flex-grow: 1;
}

.blog-intro {
    background-color: #0a68ff;
    color: white;
    text-align: center;
    margin: 0 -3em 3em -3em;
    padding: 3em;
}

.blog-intro h2 {
    color: white;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.blog-intro p {
    color: white;
    font-size: 1.1rem;
    max-width: 900px;
    margin: 0 auto;
}

/* Blog Post Cards Grid */
.blog-posts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.blog-post-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.blog-post-card h3 {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    line-height: 1.4;
}

.blog-post-card h3 a {
    color: #1f2937;
    text-decoration: none;
    font-weight: 600;
}

.blog-post-card h3 a:hover {
    color: #0a68ff;
}

.blog-post-card .post-meta {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 0 0 1rem 0;
}

.blog-post-card > p:not(.post-meta) {
    color: #4b5563;
    margin: 0 0 1.5rem 0;
    line-height: 1.6;
}

/* Post Tags */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.post-tags .tag {
    background: #f0f9ff;
    color: #0a68ff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid #e0f2fe;
}

/* Footer */
footer {
    background-color: #f9f9f9;
    padding: 2em 3em;
    text-align: center;
    color: #6b7280;
}

footer a {
    color: #1f2937;
    text-decoration: none;
}

/* Article Navigation */
.article-navigation {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px 3em;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    text-align: center;
}

.article-navigation h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #1f2937;
}

.article-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.article-navigation li {
    padding: 10px 15px;
    border-radius: 6px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.article-navigation a {
    color: #0a68ff;
    text-decoration: none;
    display: block;
    font-weight: 500;
}

.article-navigation a:hover {
    text-decoration: underline;
}

/* Feature Comparison Table */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #fff;
}

table thead {
    background: #0a68ff;
    color: white;
}

table thead th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
}

table tbody tr {
    border-bottom: 1px solid #e5e7eb;
}

table tbody tr:hover {
    background: #f8f9fa;
}

table tbody tr:last-child {
    border-bottom: none;
}

table tbody td {
    padding: 14px 20px;
    vertical-align: top;
    border: none;
}

table tbody td:first-child {
    font-weight: 600;
    color: #1f2937;
    background: #f9fafb;
    border-right: 1px solid #e5e7eb;
}

/* Responsive table */
@media (max-width: 768px) {
    table {
        font-size: 0.9rem;
    }
    
    table thead th,
    table tbody td {
        padding: 12px 16px;
    }
    
    table tbody td:first-child {
        min-width: 120px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .article-main {
        padding: 1em 1.5em;
    }
    
    .blog-main {
        padding: 1em 1.5em;
    }
    
    /* Blog grid responsive */
    .blog-posts {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .blog-post-card {
        padding: 1.5rem;
    }
    
    .blog-intro h2 {
        font-size: 1.5rem;
    }
    
    .article-header h1 {
        font-size: 2rem;
    }
    
    header {
        padding: 0.8em 1.5em;
    }
    
    .article-navigation {
        padding: 20px 1.5em;
    }
    
    .article-navigation ul {
        grid-template-columns: 1fr;
    }
}

/* New Workflow Styles for Case Study Articles - Higher Specificity */
.article-content .new-workflow {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 20px !important;
    margin: 30px 0 !important;
    padding: 20px 0 !important;
    background: none !important;
    border: none !important;
}

.article-content .workflow-step {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%) !important;
    border: 2px solid #0ea5e9 !important;
    border-radius: 12px !important;
    padding: 30px 20px 20px 20px !important;
    text-align: center !important;
    position: relative !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    min-height: 200px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    color: inherit !important;
}

.article-content .workflow-step:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(10, 104, 255, 0.15) !important;
}

.article-content .workflow-step .step-number {
    background: #0a68ff !important;
    color: white !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.2rem !important;
    font-weight: bold !important;
    margin: 0 auto 15px auto !important;
    position: absolute !important;
    top: -20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    box-shadow: 0 4px 12px rgba(10, 104, 255, 0.3) !important;
}

.article-content .workflow-step h4 {
    color: #1f2937 !important;
    font-size: 1.3rem !important;
    margin: 20px 0 10px 0 !important;
    font-weight: 600 !important;
}

.article-content .workflow-step p {
    color: #4b5563 !important;
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
    margin: 0 0 15px 0 !important;
    flex-grow: 1 !important;
}

.article-content .workflow-step .time-saved {
    background: #10b981 !important;
    color: white !important;
    padding: 8px 16px !important;
    border-radius: 20px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    display: inline-block !important;
    margin-top: auto !important;
}

/* Responsive adjustments for new workflow */
@media (max-width: 768px) {
    .article-content .new-workflow {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }
    
    .article-content .workflow-step {
        padding: 30px 20px 20px 20px !important;
    }
}

/* Stats Grid and Results Comparison Styles - Higher Specificity */
.article-content .stats-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    gap: 20px !important;
    margin: 25px 0 !important;
}

.article-content .stat-item {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 20px !important;
    text-align: center !important;
}

.article-content .stat-item h4 {
    color: #0a68ff !important;
    font-size: 2rem !important;
    font-weight: bold !important;
    margin: 0 0 10px 0 !important;
}

.article-content .stat-item p {
    color: #64748b !important;
    font-size: 0.9rem !important;
    margin: 0 !important;
    line-height: 1.4 !important;
}

.article-content .results-comparison {
    background: #f9fafb !important;
    border-radius: 12px !important;
    padding: 30px !important;
    margin: 25px 0 !important;
}

.article-content .before-after {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 30px !important;
    margin-top: 20px !important;
}

.article-content .before, .article-content .after {
    background: white !important;
    border-radius: 8px !important;
    padding: 25px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.article-content .before h4 {
    color: #dc2626 !important;
    border-bottom: 2px solid #fecaca !important;
    padding-bottom: 10px !important;
    margin-bottom: 15px !important;
}

.article-content .after h4 {
    color: #16a34a !important;
    border-bottom: 2px solid #bbf7d0 !important;
    padding-bottom: 10px !important;
    margin-bottom: 15px !important;
}

.article-content .before ul, .article-content .after ul {
    margin: 0 !important;
    padding-left: 20px !important;
}

.article-content .before li, .article-content .after li {
    margin-bottom: 8px !important;
    line-height: 1.5 !important;
}

/* Old Workflow Steps Styles - For "The Multi-Step Hassle" section */
.article-content .workflow-steps {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
    margin: 25px 0 !important;
    background: none !important;
    padding: 0 !important;
}

.article-content .workflow-steps .step {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%) !important;
    border: 2px solid #f87171 !important;
    border-radius: 8px !important;
    padding: 20px !important;
    position: relative !important;
    margin: 0 !important;
}

.article-content .workflow-steps .step h4 {
    color: #dc2626 !important;
    font-size: 1.2rem !important;
    font-weight: 600 !important;
    margin: 0 0 10px 0 !important;
    border: none !important;
    padding: 0 !important;
}

.article-content .workflow-steps .step p {
    color: #374151 !important;
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
    margin: 0 0 10px 0 !important;
}

.article-content .workflow-steps .step .time-indicator {
    background: #dc2626 !important;
    color: white !important;
    padding: 6px 12px !important;
    border-radius: 15px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    display: inline-block !important;
    position: absolute !important;
    top: 20px !important;
    right: 20px !important;
}

@media (max-width: 768px) {
    .article-content .workflow-steps .step .time-indicator {
        position: static !important;
        margin-top: 10px !important;
    }
    
    .article-content .before-after {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    .article-content .stats-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Special Case Study Card Styles */
.case-study-card {
    position: relative;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #f0fdf4 100%) !important;
    border: 2px solid transparent !important;
    background-clip: padding-box !important;
    transition: all 0.3s ease !important;
    overflow: hidden;
}

.case-study-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0ea5e9, #10b981, #f59e0b);
    margin: -2px;
    border-radius: inherit;
    z-index: -1;
}

.case-study-card:hover {
    transform: translateY(-5px) scale(1.02) !important;
    box-shadow: 0 20px 40px rgba(10, 104, 255, 0.15), 
                0 0 0 1px rgba(16, 185, 129, 0.1) !important;
}

.case-study-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    animation: pulse-badge 2s infinite;
    z-index: 10;
}

.badge-icon {
    font-size: 0.9rem;
}

.badge-text {
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.impact-highlight {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
    margin: 15px auto 20px auto;
    max-width: fit-content;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.impact-highlight::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shine 3s infinite;
}

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

.case-study-card h3 {
    position: relative;
    z-index: 5;
}

.case-study-card h3 a {
    background: linear-gradient(135deg, #1f2937, #0ea5e9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.case-study-card h3 a:hover {
    background: linear-gradient(135deg, #0ea5e9, #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.case-study-tag {
    background: linear-gradient(135deg, #8b5cf6, #a855f7) !important;
    color: white !important;
    font-weight: 600 !important;
    position: relative;
    overflow: hidden;
}

.case-study-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: tag-shine 4s infinite;
}

@keyframes tag-shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Add subtle animation on scroll into view */
@media (prefers-reduced-motion: no-preference) {
    .case-study-card {
        animation: fadeInUp 0.6s ease-out;
    }
}

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

/* Mobile responsive adjustments for case study cards */
@media (max-width: 768px) {
    .case-study-card:hover {
        transform: translateY(-3px) scale(1.01) !important;
    }
    
    .case-study-badge {
        top: 5px;
        right: 5px;
        font-size: 0.7rem;
        padding: 4px 8px;
    }
    
    .impact-highlight {
        font-size: 0.75rem;
        padding: 6px 12px;
        margin: 10px auto 15px auto;
    }
}