/* 
   PREMIUM BLOG POST ARCHITECTURE
   Leon Consulting | High-Fidelity Executive Briefings 
*/

/* 1. Global Article Smoothing */
article {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* 2. Intelligence Checkpoint (Redesigned for Premium Depth) */
.checkpoint {
    background: linear-gradient(135deg, #F6F4FF 0%, #FFFFFF 100%);
    border-left: 5px solid #C41230;
    padding: 2.5rem;
    border-radius: 0 2rem 2rem 0;
    margin: 4rem 0;
    position: relative;
    box-shadow:
        0 10px 30px -10px rgba(17, 24, 39, 0.05),
        0 4px 10px -2px rgba(17, 24, 39, 0.02);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.checkpoint:hover {
    transform: translateX(4px);
}

.checkpoint::before {
    content: "INTEL CHECKPOINT";
    position: absolute;
    top: -0.85rem;
    left: 2rem;
    background: #C41230;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 9px;
    font-weight: 700;
    padding: 0.35rem 1rem;
    border-radius: 6px;
    letter-spacing: 0.15em;
    box-shadow: 0 4px 12px rgba(196, 18, 48, 0.2);
}

/* 3. Analyst Note (Sleek Dark Mode Gradient) */
.analyst-note {
    background: linear-gradient(135deg, #111827 0%, #1e293b 100%);
    color: rgba(255, 255, 255, 0.85);
    padding: 2rem 2.5rem;
    border-radius: 2rem;
    margin: 3.5rem 0;
    font-size: 1.05rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-left: 3px solid #C41230;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.3);
}

.analyst-note strong {
    color: #ffffff !important;
    display: block;
    margin-bottom: 0.75rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.9;
}

/* 4. Sidebar Sticky CTA (Premium Elevation) */
.sidebar-cta {
    background: linear-gradient(135deg, #111827 0%, #2D3748 100%);
    padding: 2.5rem;
    border-radius: 2.5rem;
    color: white;
    position: relative;
    overflow: hidden;
    margin-top: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.sidebar-cta::after {
    content: "";
    position: absolute;
    top: -2rem;
    right: -2rem;
    width: 8rem;
    height: 8rem;
    background: radial-gradient(circle, #C41230 0%, transparent 70%);
    opacity: 0.15;
    filter: blur(20px);
}

/* 5. Fluid Typography & Prose Rhythm */
.prose {
    color: #111827;
    font-family: 'Merriweather', serif;
    line-height: 1.85;
    /* Increased for premium readability */
}

.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose strong {
    color: #111827 !important;
    font-weight: 600;
    letter-spacing: -0.025em;
    font-family: 'Poppins', sans-serif;
}

.prose h2 {
    font-size: 2rem;
    margin-top: 4.5rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.prose h2::after {
    content: "";
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 2.5rem;
    height: 3px;
    background: #C41230;
    border-radius: 2px;
}

.prose h3 {
    font-size: 1.5rem;
    margin-top: 3.5rem;
    margin-bottom: 1rem;
}

.prose p {
    margin-bottom: 2.25rem;
    font-size: 1.125rem;
    opacity: 0.9;
}

/* Mobile font scale for prose */
@media (max-width: 767px) {
    .prose p {
        font-size: 1.05rem;
        line-height: 1.8;
    }

    .prose h2 {
        font-size: 1.5rem;
        margin-top: 3.5rem;
    }

    .prose h3 {
        font-size: 1.25rem;
    }

    .checkpoint,
    .analyst-note {
        padding: 1.5rem;
        margin: 3rem 0;
    }
}

/* Desktop font scale (Polish) */
@media (min-width: 1024px) {
    .prose h2 {
        font-size: 2.25rem;
        /* 36px */
    }

    .prose h3 {
        font-size: 1.75rem;
        /* 28px */
    }
}

/* 6. Lists Refinement */
.prose ul,
.prose ol {
    margin-bottom: 2.5rem;
    padding-left: 1.5rem;
}

.prose li {
    margin-bottom: 1rem;
    padding-left: 0.5rem;
}

.prose li::marker {
    color: #C41230 !important;
}

/* 7. Blockquote (Bento Box / Editorial Style) */
.prose blockquote {
    background: #F9FAFB;
    border: none;
    border-top: 4px solid #C41230;
    color: #111827;
    font-style: italic;
    font-weight: 400;
    padding: 2rem 2.5rem;
    border-radius: 0.5rem 0.5rem 2rem 2rem;
    margin: 3.5rem 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
    position: relative;
}

.prose blockquote::before {
    content: '"';
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-family: 'Poppins', sans-serif;
    font-size: 5rem;
    color: #C41230;
    opacity: 0.05;
    line-height: 1;
}

/* 8. Modern Link & Interaction Architecture */
.prose a {
    color: #111827;
    text-decoration: none;
    background-image: linear-gradient(transparent 70%, rgba(196, 18, 48, 0.1) 0%);
    background-size: 0% 100%;
    background-repeat: no-repeat;
    transition: background-size 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 2px solid rgba(196, 18, 48, 0.3);
    font-weight: 500;
}

.prose a:hover {
    background-size: 100% 100%;
    border-bottom-color: #C41230;
}

/* 9. Premium Image Treatments */
.prose img {
    border-radius: 2.5rem;
    box-shadow:
        0 30px 60px -12px rgba(17, 24, 39, 0.15),
        0 18px 36px -18px rgba(17, 24, 39, 0.1);
    margin: 5rem 0;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.prose img:hover {
    transform: scale(1.01);
}

/* 10. Related Post Cards (Clean Bento) */
.related-card {
    background: #ffffff;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    border: 1px solid rgba(17, 24, 39, 0.05);
    border-radius: 2.5rem;
    overflow: hidden;
}

.related-card:hover {
    box-shadow: 0 40px 80px -20px rgba(17, 24, 39, 0.12);
    transform: translateY(-8px);
    border-color: rgba(196, 18, 48, 0.1);
}

/* 11. Code & Pre Enhancement */
.prose code {
    background-color: #F3F4F6;
    padding: 0.3em 0.5em;
    border-radius: 8px;
    font-family: 'Source Code Pro', monospace;
    font-size: 0.85em;
    color: #C41230;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

/* Reset code styles within pre to avoid the "patchy" look */
.prose pre code {
    background-color: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    color: inherit !important;
    border: none !important;
    font-size: 1em !important;
}

.prose pre {
    background: #0f141e;
    /* Slightly deeper navy for better contrast */
    padding: 3rem 2.5rem 2.5rem;
    border-radius: 2rem;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.4),
        0 10px 20px -5px rgba(0, 0, 0, 0.2);
    margin: 4rem 0;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
    overflow-x: auto;
}

/* Premium "Snippet" Label */
.prose pre::before {
    content: "DOCUMENT SNIPPET";
    position: absolute;
    top: 0;
    right: 2.5rem;
    background: #C41230;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 8px;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 0 0 8px 8px;
    letter-spacing: 0.15em;
    opacity: 0.9;
}

/* Subtle gradient overlay to simulate depth */
.prose pre::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

/* 12. Tables (Clean Data Protocol) */
.prose table {
    display: block;
    width: 100%;
    overflow-x: auto;
    border-spacing: 0;
    margin: 4rem 0;
    border-radius: 1.5rem;
    border: 1px solid rgba(17, 24, 39, 0.05);
    -webkit-overflow-scrolling: touch;
}

/* Premium Scrollbar for Tables */
.prose table::-webkit-scrollbar {
    height: 6px;
}

.prose table::-webkit-scrollbar-track {
    background: rgba(17, 24, 39, 0.03);
    border-radius: 10px;
}

.prose table::-webkit-scrollbar-thumb {
    background: rgba(196, 18, 48, 0.2);
    border-radius: 10px;
}

.prose table::-webkit-scrollbar-thumb:hover {
    background: rgba(196, 18, 48, 0.5);
}

.prose th {
    background-color: #F9FAFB;
    color: #111827;
    padding: 1.25rem 1.5rem;
    text-align: left;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid rgba(17, 24, 39, 0.1);
}

.prose td {
    padding: 1.25rem 1.5rem;
    color: rgba(17, 24, 39, 0.8);
    background: #fff;
    border-bottom: 1px solid rgba(17, 24, 39, 0.05);
}

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

/* 13. Final Luxury Polish */

/* Branded Selection */
::selection {
    background: rgba(196, 18, 48, 0.9);
    color: #fff;
}

/* Premium Scrollbar for Code Blocks */
.prose pre::-webkit-scrollbar {
    height: 6px;
}

.prose pre::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.prose pre::-webkit-scrollbar-thumb {
    background: rgba(196, 18, 48, 0.5);
    border-radius: 10px;
}

.prose pre::-webkit-scrollbar-thumb:hover {
    background: #C41230;
}

/* 14. Print Optimization (Briefing Protocol) */
@media print {

    .sidebar-cta,
    #toc-container,
    header,
    footer,
    #back-to-top,
    .adsense-lazy {
        display: none !important;
    }

    .prose {
        font-size: 11pt;
        line-height: 1.6;
        color: #000;
    }

    .prose a {
        border: none;
        text-decoration: underline;
        color: #000;
    }

    .checkpoint,
    .analyst-note {
        break-inside: avoid;
        border-color: #eee !important;
        background: #f9f9f9 !important;
        box-shadow: none !important;
        color: #000 !important;
    }

    .prose h1,
    .prose h2,
    .prose h3 {
        break-after: avoid;
    }
}