/* ==========================================
   SCloud Blog Styles - Advanced Design
   ========================================== */

/* Global Fixes */
html, body {
    max-width: 100%;
}

* {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

img {
    max-width: 100%;
    height: auto;
}

/* Blog Hero Section */
.blog-hero {
    padding: 160px 0 80px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(147, 51, 234, 0.05) 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 40%;
    height: 100%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
    z-index: 0;
}

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

.blog-hero h1 {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 900;
    color: var(--gray-900);
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.blog-hero p {
    font-size: 1.125rem;
    color: var(--gray-600);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Featured Post Section */
.featured-post-section {
    margin-top: -60px;
    margin-bottom: 80px;
    position: relative;
    z-index: 10;
}

.featured-card {
    display: grid;
    grid-template-columns: 1fr;
    background: #fff;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--gray-100);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.featured-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 50px 100px rgba(37, 99, 235, 0.1);
}

@media (min-width: 992px) {
    .featured-card {
        grid-template-columns: 1.3fr 1fr;
        min-height: 500px;
    }
}

.featured-image {
    height: 350px;
    overflow: hidden;
    position: relative;
}

@media (min-width: 992px) {
    .featured-image {
        height: auto;
    }
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

.featured-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(135deg, #ffffff 0%, #fbfcfe 100%);
}

@media (min-width: 1200px) {
    .featured-content {
        padding: 60px;
    }
}

/* Main Blog Feed & Sidebar Layout */
.blog-main {
    padding-bottom: 100px;
    background-color: #fff;
}

.blog-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
}

@media (min-width: 1200px) {
    .blog-layout {
        grid-template-columns: 1fr 350px;
    }
}

/* Category Badge Enhancement */
.category-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    color: var(--primary-blue);
    border-radius: 100px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.blog-card:hover .category-badge,
.featured-card:hover .category-badge {
    background: var(--primary-blue);
    color: #fff;
    border-color: var(--primary-blue);
}

/* Blog Grid Styles */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 40px;
}

.blog-card {
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--gray-100);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.2);
}

.blog-card-image {
    width: 100%;
    height: 240px;
    overflow: hidden;
    position: relative;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

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

.blog-card-content {
    padding: 32px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-content .category-badge {
    margin-bottom: 20px;
}

.blog-meta {
    font-size: 13px;
    color: var(--gray-600);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.blog-card-title {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 12px;
}

.blog-card-title a {
    text-decoration: none;
    color: var(--gray-900);
    transition: color 0.3s ease;
}

.blog-card-title a:hover {
    color: var(--primary-blue);
}

.blog-excerpt {
    font-size: 15px;
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-read-more {
    font-weight: 700;
    color: var(--primary-blue);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    margin-top: auto;
}

.blog-read-more svg {
    transition: transform 0.3s ease;
}

.blog-read-more:hover svg {
    transform: translateX(5px);
}

/* Sidebar Styling */
.sidebar-widget {
    background: #fff;
    padding: 0;
    border-radius: 0;
    margin-bottom: 50px;
    border: none;
}

.widget-title {
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--gray-900);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--gray-100);
    padding-bottom: 10px;
}

.recent-posts {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.recent-post-item {
    display: flex;
    gap: 15px;
    align-items: center;
    text-decoration: none;
}

.recent-post-img {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

.recent-post-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-post-info h4 {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 5px;
}

.recent-post-info h4 a {
    text-decoration: none;
    color: var(--gray-900);
    transition: color 0.3s ease;
}

.recent-post-info h4 a:hover {
    color: var(--primary-blue);
}

.recent-post-date {
    font-size: 12px;
    color: var(--gray-500);
}

.search-form {
    display: flex;
    background: #fff;
    border-radius: 12px;
    padding: 6px;
    border: 1px solid var(--gray-200);
}

.search-input {
    border: none;
    padding: 10px 15px;
    flex-grow: 1;
    outline: none;
    font-size: 14px;
}

.search-btn {
    background: var(--primary-blue);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
}

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

.category-list li {
    margin-bottom: 4px;
}

.category-list li a {
    display: flex;
    justify-content: space-between;
    text-decoration: none;
    color: var(--gray-700);
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
}

.category-list li a:hover {
    color: var(--primary-blue);
    background: var(--gray-50);
}

.category-list li span {
    color: var(--gray-400);
    font-size: 12px;
}

/* Single Post Specifics - Redesign */
.post-breadcrumbs {
    padding: 120px 0 20px;
    background: #fff;
    font-size: 14px;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
}

.post-breadcrumbs a {
    color: var(--gray-500);
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.post-breadcrumbs a:hover {
    color: var(--primary-blue);
}

.post-breadcrumbs span {
    color: var(--gray-300);
}

.single-post-header {
    padding: 0 0 30px;
    text-align: left;
}

.post-categories {
    display: flex;
    justify-content: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.post-categories a {
    color: var(--primary-blue);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-categories a:hover {
    text-decoration: underline;
}

.single-post-title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--gray-900);
    letter-spacing: -1px;
}

.single-post-subtitle {
    font-size: 1.125rem;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 0;
    font-weight: 400;
}

.post-featured-image {
    width: 100%;
    margin: 0 0 30px;
    border-radius: 20px;
    overflow: hidden;
}

.post-featured-image img {
    width: 100%;
    height: auto;
    max-height: 550px;
    object-fit: cover;
}

/* Post Author & Share Bar */
.post-meta-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    border-top: 1px solid var(--gray-100);
    border-bottom: 1px solid var(--gray-100);
    margin: 0 0 40px;
    gap: 20px;
}

.post-author-box {
    display: flex;
    align-items: center;
    gap: 30px;
}

.author-block {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.meta-label {
    display: block;
    font-size: 10px;
    color: var(--gray-500);
    margin-bottom: 2px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.meta-value {
    display: block;
    font-weight: 600;
    color: var(--gray-900);
    font-size: 13px;
}

.post-share {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-copy-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-copy-link:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
}

.share-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gray-200);
    border-radius: 50%;
    color: var(--gray-600);
    text-decoration: none;
    transition: all 0.3s ease;
}

.share-btn:hover {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: #fff;
}

/* Post Layout (Content + Sidebar) */
.single-post-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
}

@media (min-width: 1024px) {
    .single-post-layout {
        grid-template-columns: 2.8fr 1fr;
    }
}

.single-post-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--gray-800);
}

.single-post-content h2 {
    font-size: 28px;
    font-weight: 800;
    margin: 50px 0 24px;
    color: var(--gray-900);
    letter-spacing: -0.5px;
}

.single-post-content h3 {
    font-size: 22px;
    font-weight: 800;
    margin: 40px 0 20px;
    color: var(--gray-900);
}

.single-post-content p {
    margin-bottom: 24px;
}

.single-post-content strong {
    color: var(--gray-900);
}

.single-post-content blockquote {
    font-size: 20px;
    font-style: italic;
    border-left: 6px solid var(--primary-blue);
    padding: 24px 32px;
    margin: 40px 0;
    background: var(--gray-50);
    color: var(--gray-900);
    font-weight: 400;
    line-height: 1.5;
    border-radius: 0 12px 12px 0;
}

/* Post Sidebar (Sticky) */
.post-sidebar {
    height: 100%;
}

.post-sidebar-inner {
    position: -webkit-sticky;
    position: sticky;
    top: 100px; /* Offset for the fixed header */
    z-index: 10;
    height: fit-content;
}

/* Mobile Sidebar Toggle Button */
.mobile-category-toggle {
    display: none;
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 56px;
    height: 56px;
    background: var(--primary-blue);
    color: #fff;
    border-radius: 50%;
    border: none;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
    z-index: 1000;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.mobile-category-toggle:hover {
    transform: scale(1.1);
}

.mobile-category-toggle svg {
    width: 24px;
    height: 24px;
}

@media (max-width: 1024px) {
    .mobile-category-toggle {
        display: flex;
    }

    .post-sidebar {
        position: fixed;
        right: -320px; /* Hidden by default */
        top: 0;
        width: 300px;
        height: 100vh;
        background: #fff;
        z-index: 1001;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
        padding-top: 80px;
        overflow-y: auto;
    }

    .post-sidebar.active {
        right: 0;
    }

    .post-sidebar-inner {
        position: static;
        padding: 20px;
    }

    /* Overlay when sidebar is active */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
        backdrop-filter: blur(4px);
    }

    .sidebar-overlay.active {
        display: block;
    }
}

.newsletter-widget {
    background: var(--gray-50);
    padding: 32px;
    border-radius: 20px;
    margin-bottom: 40px;
    border: 1px solid var(--gray-100);
}

.newsletter-widget h3 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 12px;
}

.newsletter-widget p {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 20px;
    line-height: 1.5;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.newsletter-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.newsletter-input:focus {
    border-color: var(--primary-blue);
}

.newsletter-btn {
    width: 100%;
    padding: 12px;
    background: var(--gray-900);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.newsletter-btn:hover {
    background: #000;
}

.newsletter-disclaimer {
    font-size: 12px;
    color: var(--gray-500);
    text-align: center;
    margin-top: 12px;
}

/* Sidebar CTA Card (compact, replaces the newsletter box) */
.sidebar-cta {
    background: #fff;
    border: 1px solid var(--gray-100);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 40px;
    box-shadow: 0 24px 48px -28px rgba(15, 23, 42, 0.35);
}

.sidebar-cta-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.sidebar-cta-icon {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #6366f1 0%, #2563eb 100%);
    color: #fff;
    box-shadow: 0 10px 18px -6px rgba(37, 99, 235, 0.55);
}

.sidebar-cta-titles {
    display: flex;
    flex-direction: column;
}

.sidebar-cta-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1.2;
}

.sidebar-cta-sub {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
}

.sidebar-cta-text {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.6;
    margin: 0 0 20px;
}

.sidebar-cta-btn {
    display: block;
    text-align: center;
    padding: 13px 20px;
    background: linear-gradient(135deg, #6366f1 0%, #2563eb 100%);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 12px 22px -8px rgba(37, 99, 235, 0.6);
    transition: all 0.3s ease;
}

.sidebar-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px -8px rgba(37, 99, 235, 0.7);
}

.toc-widget h3 {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--gray-900);
}

.toc-list {
    list-style: none;
    border-left: 2px solid var(--gray-200);
}

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

.toc-list a {
    display: block;
    padding-left: 16px;
    color: var(--gray-600);
    text-decoration: none;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    transition: color 0.3s ease;
}

.toc-list a::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 0;
    height: 100%;
    width: 2px;
    background: var(--primary-blue);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.3s ease;
}

.toc-list a:hover,
.toc-list a.active {
    color: var(--primary-blue);
    font-weight: 600;
}

.toc-list a:hover::before,
.toc-list a.active::before {
    transform: scaleY(1);
}

/* Improved Author Bio */
.post-author-bio {
    display: flex;
    gap: 30px;
    padding: 40px;
    background: var(--gray-50);
    border-radius: 24px;
    margin: 60px 0;
    border: 1px solid var(--gray-100);
    align-items: center;
}

@media (max-width: 768px) {
    .post-author-bio {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }
}

.author-bio-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 4px solid #fff;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.author-bio-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-bio-content h4 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--gray-900);
}

.author-bio-content p {
    font-size: 16px;
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 20px;
}

.author-bio-social {
    display: flex;
    gap: 15px;
}

@media (max-width: 768px) {
    .author-bio-social {
        justify-content: center;
    }
}

.author-bio-social a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 50%;
    color: var(--gray-600);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--gray-200);
}

.author-bio-social a:hover {
    background: var(--primary-blue);
    color: #fff;
    border-color: var(--primary-blue);
    transform: translateY(-3px);
}

/* Post Navigation - Premium card style */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 50px 0 20px;
    border-top: 1px solid var(--gray-100);
    margin-top: 60px;
}

@media (max-width: 600px) {
    .post-navigation {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.nav-btn.next {
    justify-content: flex-end;
    text-align: right;
}

.nav-btn:hover {
    border-color: var(--primary-blue);
    transform: translateY(-3px);
    box-shadow: 0 16px 30px -12px rgba(37, 99, 235, 0.35);
}

.nav-btn-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--gray-50);
    color: var(--gray-500);
    transition: all 0.3s ease;
}

.nav-btn:hover .nav-btn-icon {
    background: var(--primary-blue);
    color: #fff;
}

.nav-btn.prev:hover .nav-btn-icon {
    transform: translateX(-3px);
}

.nav-btn.next:hover .nav-btn-icon {
    transform: translateX(3px);
}

.nav-btn-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.nav-btn-text small {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--gray-400);
    margin-bottom: 5px;
}

.nav-btn-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.35;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nav-btn:hover .nav-btn-title {
    color: var(--primary-blue);
}

.nav-btn.disabled {
    visibility: hidden;
}

/* Related Posts Section */
.related-posts {
    padding: 80px 0 0;
    border-top: 1px solid var(--gray-200);
}

.related-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 40px;
    text-align: center;
    color: var(--gray-900);
}

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

.related-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--gray-100);
    transition: all 0.3s ease;
}

.related-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.related-image {
    height: 200px;
    overflow: hidden;
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-card:hover .related-image img {
    transform: scale(1.1);
}

.related-content {
    padding: 24px;
}

.related-category {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    color: var(--primary-blue);
    text-transform: uppercase;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.related-content h4 {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 12px;
}

.related-content h4 a {
    color: var(--gray-900);
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-content h4 a:hover {
    color: var(--primary-blue);
}

.related-date {
    font-size: 13px;
    color: var(--gray-500);
}

/* Call to Action in Post - Premium */
.post-cta {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 55%, #1e40af 100%);
    padding: 56px 48px;
    border-radius: 28px;
    color: #fff;
    text-align: center;
    margin: 60px 0;
    box-shadow: 0 30px 60px -25px rgba(37, 99, 235, 0.6);
}

/* Soft decorative glow orbs */
.post-cta::before,
.post-cta::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.post-cta::before {
    width: 340px;
    height: 340px;
    top: -170px;
    right: -90px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, transparent 70%);
}

.post-cta::after {
    width: 320px;
    height: 320px;
    bottom: -180px;
    left: -70px;
    background: radial-gradient(circle, rgba(129, 140, 248, 0.4) 0%, transparent 70%);
}

.post-cta > * {
    position: relative;
    z-index: 1;
}

.post-cta-eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 16px;
    padding: 7px 16px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50px;
    backdrop-filter: blur(4px);
}

.post-cta h3 {
    color: #fff !important;
    margin: 0 0 14px !important;
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.post-cta p {
    color: rgba(255, 255, 255, 0.88);
    margin: 0 auto 30px;
    max-width: 520px;
    font-size: 16px;
    line-height: 1.6;
}

.post-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: var(--primary-blue);
    padding: 15px 32px;
    font-weight: 700;
    font-size: 15px;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    transition: all 0.3s ease;
}

.post-cta-btn svg {
    transition: transform 0.3s ease;
}

.post-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.25);
}

.post-cta-btn:hover svg {
    transform: translateX(4px);
}

/* ==========================================================
   Blog Components (injected via js/blog-components.js)
   ========================================================== */

/* Post Tags */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 50px 0 10px;
    padding-top: 30px;
    border-top: 1px solid var(--gray-100);
}

.post-tags-label {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--gray-400);
    margin-right: 4px;
}

.post-tag {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
    text-decoration: none;
    transition: all 0.25s ease;
}

.post-tag:hover {
    background: rgba(37, 99, 235, 0.06);
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    transform: translateY(-2px);
}

/* Nested headings in the auto Table of Contents */
.toc-list li.toc-h3 a {
    padding-left: 32px;
    font-size: 13px;
}

/* Reading Progress Bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    width: 0;
    background: linear-gradient(90deg, var(--primary-blue), #9333ea);
    z-index: 2000;
    transition: width 0.1s linear;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 88px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--primary-blue);
    border: 1px solid var(--gray-200);
    border-radius: 50%;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-blue);
    color: #fff;
    transform: translateY(-3px);
}

@media (max-width: 1024px) {
    .back-to-top {
        bottom: 88px;
        right: 20px;
    }
}

/* ==========================================================
   Premium polish — elevates the whole blog post experience
   ========================================================== */

/* Copy-link success state (inline feedback, no alert) */
.btn-copy-link {
    transition: all 0.25s ease;
}

.btn-copy-link.copied {
    background: #ecfdf5;
    border-color: #6ee7b7;
    color: #059669;
}

.btn-copy-link .copy-icon {
    flex-shrink: 0;
}

/* Category as a refined pill badge */
.post-categories a {
    display: inline-flex;
    align-items: center;
    padding: 7px 16px;
    background: rgba(37, 99, 235, 0.08);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.6px;
    transition: all 0.3s ease;
}

.post-categories a:hover {
    background: var(--primary-blue);
    color: #fff;
    text-decoration: none;
}

/* Larger, tighter, more confident headline */
.single-post-title {
    font-size: clamp(32px, 4.5vw, 46px);
    letter-spacing: -1.2px;
}

/* Lead paragraph — the first line should feel editorial */
.single-post-content > p:first-of-type {
    font-size: 1.2rem;
    line-height: 1.7;
    color: var(--gray-700);
}

/* Inline links read as real links */
.single-post-content a {
    color: var(--primary-blue);
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.single-post-content a:hover {
    opacity: 0.7;
}

/* Branded list markers instead of default bullets */
.single-post-content ul {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

.single-post-content ul li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 14px;
}

.single-post-content ul li::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-blue);
}

.single-post-content ol {
    padding-left: 22px;
    margin-bottom: 24px;
}

.single-post-content ol li {
    margin-bottom: 14px;
    padding-left: 6px;
}

/* Images and figures inside the article */
.single-post-content img {
    border-radius: 16px;
    margin: 36px 0;
}

.single-post-content figure {
    margin: 36px 0;
}

.single-post-content figure img {
    margin: 0;
}

.single-post-content figcaption {
    text-align: center;
    font-size: 14px;
    color: var(--gray-500);
    margin-top: 14px;
}

/* Editorial blockquote with a soft decorative quote mark */
.single-post-content blockquote {
    position: relative;
    overflow: hidden;
}

.single-post-content blockquote::before {
    content: '\201C';
    position: absolute;
    top: -18px;
    right: 18px;
    font-size: 120px;
    line-height: 1;
    font-family: Georgia, 'Times New Roman', serif;
    color: var(--primary-blue);
    opacity: 0.1;
    pointer-events: none;
}

/* ==========================================================
   Rich content blocks — tables, callouts, key-takeaways, FAQ
   (clean editorial elements for long-form posts)
   ========================================================== */

/* Comparison / data tables */
.single-post-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 36px 0;
    font-size: 15px;
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    overflow: hidden;
}

.single-post-content th,
.single-post-content td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--gray-100);
    line-height: 1.5;
}

.single-post-content thead th {
    background: var(--gray-900);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.single-post-content tbody tr:nth-child(even) {
    background: var(--gray-50);
}

.single-post-content tbody tr:last-child td {
    border-bottom: none;
}

.single-post-content tbody tr:hover {
    background: rgba(37, 99, 235, 0.04);
}

/* Callout / NOTE boxes */
.callout {
    display: flex;
    gap: 16px;
    padding: 20px 24px;
    margin: 32px 0;
    border-radius: 14px;
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-left: 4px solid var(--gray-400);
    line-height: 1.7;
    font-size: 15px;
}

.callout-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin-top: 2px;
}

.callout-body {
    min-width: 0;
}

.callout-title {
    display: block;
    font-weight: 800;
    margin-bottom: 4px;
}

.callout p {
    margin: 0 !important;
}

.callout.note {
    background: #eff6ff;
    border-color: #bfdbfe;
    border-left-color: #2563eb;
    color: #1e3a8a;
}

.callout.tip {
    background: #ecfdf5;
    border-color: #a7f3d0;
    border-left-color: #059669;
    color: #065f46;
}

.callout.warning {
    background: #fffbeb;
    border-color: #fde68a;
    border-left-color: #d97706;
    color: #92400e;
}

/* Key-takeaways summary box */
.key-takeaways {
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
    border: 1px solid var(--gray-100);
    border-radius: 18px;
    padding: 28px 32px;
    margin: 36px 0 40px;
}

.key-takeaways h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-blue);
}

.key-takeaways ul {
    margin-bottom: 0;
}

/* FAQ accordion (native <details>, no JS needed) */
.post-faq {
    margin: 50px 0;
}

.post-faq-title {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--gray-900);
    letter-spacing: -0.5px;
}

.faq-item {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    margin-bottom: 14px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.faq-item[open] {
    border-color: var(--primary-blue);
    box-shadow: 0 12px 28px -16px rgba(37, 99, 235, 0.45);
}

.faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 20px 24px;
    font-weight: 700;
    font-size: 16px;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '';
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat center;
    transition: transform 0.3s ease;
}

.faq-item[open] summary::after {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 24px 22px;
    color: var(--gray-600);
    font-size: 15px;
    line-height: 1.7;
}

.faq-answer p {
    margin: 0;
}

/* Empty state for the blog feed (shown when no extra posts exist yet) */
.blog-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 30px;
    border: 1px dashed var(--gray-200);
    border-radius: 20px;
    color: var(--gray-500);
    background: var(--gray-50);
}

.blog-empty svg {
    color: var(--gray-300);
    margin-bottom: 16px;
}

.blog-empty h3 {
    font-size: 20px;
    font-weight: 800;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.blog-empty p {
    font-size: 15px;
    max-width: 420px;
    margin: 0 auto;
    line-height: 1.6;
}
