/* TRIAGE Ops Blog Styles - Complete Styling System */

/* ===========================
   CSS VARIABLES
   =========================== */
:root {
    --primary: #0B1929;
    --primary-dark: #05101D;
    --secondary: #00B4D8;
    --accent: #0077B6;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #DC2626;
    --dark: #0B1929;
    --gray: #6B7280;
    --light-gray: #F9FAFB;
    --white: #FFFFFF;
    --red: #DC2626;
    --green: #10B981;
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'Fira Code', 'Courier New', monospace;
    
    /* Spacing */
    --container-width: 1200px;
    --article-width: 800px;
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 5px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
}

/* ===========================
   BASE STYLES
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.8;
    color: #111827;
    background: #FFFFFF;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===========================
   NAVIGATION
   =========================== */
.blog-nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    padding: 20px 0;
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.logo-ops {
    background: linear-gradient(135deg, var(--accent) 0%, var(--secondary) 100%);
    color: white;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 12px;
    vertical-align: super;
    -webkit-text-fill-color: white;
}

.nav-links {
    display: flex;
    gap: 40px;
    align-items: center;
}

.nav-links a {
    color: var(--gray);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--secondary);
}

.nav-cta {
    background: linear-gradient(135deg, var(--accent) 0%, var(--secondary) 100%);
    color: white !important;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.3s;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 180, 216, 0.4);
}

/* ===========================
   ARTICLE HEADER & CONTAINER
   =========================== */
/* Special styling for article page container */
article.article-container,
.article-page-container {
    max-width: 800px;
    margin: 100px auto 0;
    padding: 0 20px 60px;
}

/* Regular article containers within sections */
.article-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Article header without background */
header {
    margin-bottom: 60px;
}

/* Breadcrumbs */
.breadcrumbs {
    margin-bottom: 20px;
}

.breadcrumbs ol {
    list-style: none;
    display: flex;
    gap: 10px;
    font-size: 14px;
}

.breadcrumbs li:not(:last-child)::after {
    content: '›';
    margin-left: 10px;
    color: var(--gray);
}

.breadcrumbs a {
    color: var(--gray);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumbs a:hover {
    color: var(--secondary);
}

/* Article Meta */
.article-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--gray);
}

.article-category {
    background: var(--secondary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
}

/* Article Title */
.article-title {
    font-size: 48px;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--primary);
}

/* Article Summary */
.article-summary {
    font-size: 20px;
    line-height: 1.6;
    color: var(--gray);
    margin-bottom: 30px;
}

/* Author Info */
.author-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.author-name {
    font-weight: 700;
    color: var(--primary);
}

.author-title {
    font-size: 14px;
    color: var(--gray);
}

/* ===========================
   HERO IMAGE
   =========================== */
.article-hero {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 40px 20px;
}

.hero-image {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.image-caption {
    text-align: center;
    font-size: 14px;
    color: var(--gray);
    margin-top: 10px;
    font-style: italic;
}

/* ===========================
   TABLE OF CONTENTS
   =========================== */
.table-of-contents {
    background: var(--light-gray);
    padding: 30px 0;
    margin-bottom: 40px;
    border-radius: 10px;
}

.toc-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--primary);
}

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

.toc-list li {
    counter-increment: toc-counter;
    margin-bottom: 10px;
}

.toc-list li::before {
    content: counter(toc-counter) ". ";
    font-weight: 600;
    color: var(--secondary);
}

.toc-list a {
    color: var(--dark);
    text-decoration: none;
    transition: color 0.3s;
}

.toc-list a:hover {
    color: var(--secondary);
}

/* ===========================
   ARTICLE CONTENT
   =========================== */
.article-content {
    padding: 40px 0 80px;
}

.article-content section {
    margin-bottom: 60px;
}

/* Ensure footer is not affected by article styles */
footer, footer * {
    -webkit-font-smoothing: auto !important;
    -moz-osx-font-smoothing: auto !important;
}

/* Typography */
article h2, .article-content h2, .blog-content h2, main h2, section:not(footer) h2 {
    font-size: 36px;
    font-weight: 800;
    margin: 50px 0 25px;
    color: var(--primary);
    line-height: 1.3;
    position: relative;
    padding-bottom: 15px;
}

.article-content h2:after,
h2.with-underline:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary) 0%, transparent 100%);
}

article h3, .article-content h3, .blog-content h3, main h3, section:not(footer) h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 35px 0 20px;
    color: #1F2937;
}

article h4, .article-content h4, .blog-content h4, main h4, section:not(footer) h4 {
    font-size: 22px;
    font-weight: 600;
    margin: 25px 0 15px;
    color: var(--primary);
}

article p, .article-content p, .blog-content p, main p, section:not(footer) p {
    font-size: 18px;
    line-height: 1.8;
    margin: 20px 0;
    color: #374151;
}

.article-content p.lead,
p.lead {
    font-size: 22px;
    line-height: 1.6;
    color: #4B5563;
    font-weight: 400;
    border-left: 4px solid var(--secondary);
    padding-left: 20px;
    margin: 30px 0;
}

/* Links */
.article-content a {
    color: var(--secondary);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.3s;
}

.article-content a:hover {
    color: var(--accent);
}

/* Lists */
.article-list,
.article-list-numbered {
    margin: 20px 0 30px 20px;
    font-size: 18px;
    line-height: 1.8;
}

.article-list li,
.article-list-numbered li {
    margin-bottom: 12px;
    padding-left: 10px;
}

.article-list li::marker {
    color: var(--secondary);
}

.article-list-numbered li::marker {
    font-weight: 700;
    color: var(--secondary);
}

/* ===========================
   CONTENT BLOCKS
   =========================== */

/* Highlight Box */
.highlight-box {
    background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
    border-left: 4px solid var(--secondary);
    padding: 25px;
    margin: 30px 0;
    border-radius: 8px;
}

.highlight-box h3 {
    margin-top: 0;
    color: var(--accent);
}

/* Case Study Box */
.case-study {
    background: var(--light-gray);
    border-radius: 16px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: var(--shadow-md);
}

.case-study-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.case-study-stats .stat {
    text-align: center;
}

.stat-value {
    font-size: 32px;
    font-weight: 900;
    color: var(--secondary);
}

.stat-label {
    font-size: 14px;
    color: var(--gray);
    text-transform: uppercase;
}

/* Quote Block */
.article-quote {
    position: relative;
    padding: 30px 40px;
    margin: 40px 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    border-radius: 12px;
    font-size: 20px;
    font-style: italic;
}

.article-quote::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 80px;
    opacity: 0.3;
}

.article-quote cite {
    display: block;
    margin-top: 15px;
    font-size: 16px;
    font-style: normal;
    opacity: 0.9;
}

/* Code Block */
.code-block {
    background: #1F2937;
    color: #E5E7EB;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 30px 0;
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.6;
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
    margin: 30px 0;
}

.article-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: var(--shadow-md);
    border-radius: 8px;
    overflow: hidden;
}

.article-table caption {
    padding: 15px;
    font-weight: 700;
    background: var(--light-gray);
}

.article-table th {
    background: var(--primary);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.article-table td {
    padding: 15px;
    border-bottom: 1px solid #E5E7EB;
}

.article-table tbody tr:hover {
    background: var(--light-gray);
}

/* Images */
.article-image {
    margin: 40px 0;
}

.article-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.article-image figcaption {
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
    color: var(--gray);
    font-style: italic;
}

/* Key Takeaways */
.key-takeaways {
    background: #DCFCE7;
    border: 2px solid var(--success);
    border-radius: 12px;
    padding: 25px;
    margin: 30px 0;
}

.key-takeaways h3 {
    color: #166534;
    margin-top: 0;
}

.key-takeaways ul {
    list-style: none;
    margin-left: 0;
}

.key-takeaways li::before {
    content: '✓ ';
    color: var(--success);
    font-weight: 700;
    margin-right: 10px;
}

/* CTA Box */
.article-cta {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    margin: 40px 0;
}

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

.cta-button {
    display: inline-block;
    background: white;
    color: var(--primary);
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s;
    margin-top: 20px;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* ===========================
   FAQ SECTION
   =========================== */
.article-faq {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid #E5E7EB;
}

.faq-item {
    margin-bottom: 25px;
    padding: 20px;
    background: var(--light-gray);
    border-radius: 8px;
}

.faq-question {
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 20px;
}

.faq-answer {
    color: #333;
    line-height: 1.7;
}

/* ===========================
   RELATED ARTICLES
   =========================== */
.related-articles {
    background: var(--light-gray);
    padding: 60px 0;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.related-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.related-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.related-card h3 {
    padding: 20px 20px 10px;
    font-size: 20px;
}

.related-card h3 a {
    color: var(--primary);
    text-decoration: none;
}

.related-card h3 a:hover {
    color: var(--secondary);
}

.related-card p {
    padding: 0 20px 20px;
    color: var(--gray);
    font-size: 16px;
}

/* ===========================
   NEWSLETTER
   =========================== */
.newsletter-signup {
    background: linear-gradient(135deg, var(--accent) 0%, var(--secondary) 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.newsletter-signup h2 {
    color: white;
    margin-bottom: 10px;
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 30px auto 0;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
}

.newsletter-form button {
    padding: 15px 30px;
    background: white;
    color: var(--primary);
    border: none;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.newsletter-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* ===========================
   FOOTER
   =========================== */
.blog-footer {
    background: var(--primary);
    color: white;
    padding: 40px 0;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
}

.footer-links a {
    color: #9CA3AF;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--secondary);
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */
@media (max-width: 768px) {
    .article-title {
        font-size: 32px;
    }
    
    .article-content h2 {
        font-size: 28px;
    }
    
    .article-content h3 {
        font-size: 24px;
    }
    
    .article-content p {
        font-size: 16px;
    }
    
    .nav-links {
        display: none;
    }
    
    .case-study-stats {
        grid-template-columns: 1fr;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .article-meta {
        flex-wrap: wrap;
    }
}

/* ===========================
   ANIMATIONS
   =========================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* ===========================
   SPECIAL CONTENT BLOCKS
   =========================== */

/* Highlighted Statistics Block */
.highlight-stat {
    background: linear-gradient(135deg, var(--danger) 0%, #EF4444 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    margin: 40px 0;
}

.highlight-stat p {
    color: white !important;
    font-size: 24px;
    font-weight: 800;
    margin: 0;
}

.highlight-stat cite {
    color: rgba(255, 255, 255, 0.9);
    display: block;
    margin-top: 15px;
    font-size: 14px;
    font-style: normal;
}

/* Data Tables */
.data-table {
    margin: 40px 0;
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    overflow: hidden;
}

.data-table th {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    padding: 20px;
    text-align: left;
    font-weight: 700;
    font-size: 16px;
}

.data-table td {
    padding: 18px 20px;
    border-bottom: 1px solid #E5E7EB;
    font-size: 16px;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover {
    background: var(--light-gray);
}

/* Key Insight Box */
.key-insight {
    background: linear-gradient(135deg, #DBEAFE 0%, #E0E7FF 100%);
    border: 2px solid var(--secondary);
    border-radius: 16px;
    padding: 30px;
    margin: 40px 0;
}

.key-insight h3 {
    color: var(--primary);
    margin-top: 0;
}

.key-insight ul {
    margin-left: 0;
    list-style: none;
}

.key-insight li {
    padding-left: 30px;
    position: relative;
    margin: 15px 0;
}

.key-insight li:before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--secondary);
    font-weight: bold;
    font-size: 20px;
}

/* Statistics Box */
.statistics-box {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    border-radius: 16px;
    padding: 30px;
    margin: 40px 0;
}

.statistics-box h3 {
    color: #92400E;
    margin-top: 0;
}

/* Cost Breakdown */
.cost-breakdown {
    background: var(--light-gray);
    border-radius: 16px;
    padding: 30px;
    margin: 40px 0;
}

/* Framework Overview */
.framework-overview {
    background: linear-gradient(135deg, #E0F2FE 0%, #DBEAFE 100%);
    border-radius: 16px;
    padding: 30px;
    margin: 40px 0;
}

.framework-overview dl {
    margin: 20px 0;
}

.framework-overview dt {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    margin: 20px 0 10px;
}

.framework-overview dd {
    margin: 0 0 20px 30px;
    color: #4B5563;
    font-size: 17px;
}

/* Guarantee Box */
.guarantee-box {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    margin: 40px 0;
    font-size: 20px;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

.guarantee-box strong {
    color: white;
}

/* Action Steps */
.action-steps {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    border-radius: 16px;
    padding: 30px;
    margin: 40px 0;
}

.action-steps h3 {
    color: #92400E;
    margin-top: 0;
}

.action-steps ol {
    margin-left: 20px;
}

/* Final Thought Quote */
.final-thought {
    background: linear-gradient(135deg, #FEF3C7 0%, #FED7AA 100%);
    border-left: 4px solid #F59E0B;
    padding: 30px;
    margin: 40px 0;
    border-radius: 8px;
}

.final-thought p {
    color: #92400E;
    font-style: italic;
}

/* Comparison Table */
.comparison-table {
    margin: 40px 0;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: var(--shadow-md);
    border-radius: 12px;
    overflow: hidden;
}

.comparison-table th {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    padding: 20px;
    text-align: left;
    font-weight: 700;
}

.comparison-table td {
    padding: 18px 20px;
    border-bottom: 1px solid #E5E7EB;
}

.comparison-table tr:hover {
    background: var(--light-gray);
}

/* Author Bio Section */
.author-bio {
    background: var(--light-gray);
    border-radius: 16px;
    padding: 40px;
    margin-top: 60px;
}

.author-bio h2 {
    margin-top: 0;
}

.author-bio a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
}

.author-bio a:hover {
    text-decoration: underline;
}

/* Urgency Note */
.urgency-note {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 16px;
}

/* Article Hero Banner */
.article-hero-banner {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    margin-bottom: 40px;
}

/* Article Header Styles */
.article-header-with-banner {
    margin-top: 80px; /* Account for fixed nav */
    margin-bottom: 40px;
}

.article-header-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===========================
   UTILITY CLASSES
   =========================== */
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-accent { color: var(--accent); }
.text-gray { color: var(--gray); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

.bg-primary { background-color: var(--primary); }
.bg-secondary { background-color: var(--secondary); }
.bg-light { background-color: var(--light-gray); }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }
.mb-4 { margin-bottom: var(--spacing-xl); }

.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }
.mt-4 { margin-top: var(--spacing-xl); }

/* ===========================
   PRINT STYLES
   =========================== */
@media print {
    .blog-nav,
    .newsletter-signup,
    .related-articles,
    .blog-footer,
    .article-cta,
    .nav-cta {
        display: none;
    }
    
    .article-content {
        font-size: 12pt;
    }
    
    .article-title {
        font-size: 24pt;
    }
}