/* ==========================================
   IconTech Studio Blog Stylesheet (Phase 2)
   ========================================== */

:root {
    --blogs-section-gap: clamp(4rem, 6vw, 7rem);
    --cta-padding-top: 0;
    --cta-padding-bottom: var(--blogs-section-gap);
}

.blogs-section-gap {
    width: 100%;
    height: var(--blogs-section-gap);
    flex-shrink: 0;
}

/* Blog Layout Base */
.blog-hero-section,
.blog-hero,
.post-detail-hero {
    padding-top: var(--hero-padding-top, clamp(6.5rem, 10vw, 9.5rem));
    background-color: #05010a;
}

.blog-hero-section {
    padding-bottom: 0;
}

.blog-hero {
    padding-bottom: calc(var(--blog-section-gap) / 2);
}

.blog-grid-section {
    padding-top: 0;
    padding-bottom: 0;
    background-color: #05010a;
}

.blog-header-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--section-header-mb);
}

.blog-header-content > *,
.blog-categories-nav,
.blog-card {
    opacity: 0;
}

.blog-header-content .heading-tag{
    justify-content: center;
}

/* Category Filter Bar */
.blog-categories-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: clamp(24px, 4vw, 40px);
    list-style: none;
}

.blog-cat-link {
    display: inline-block;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-gray);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.blog-cat-link:hover,
.blog-cat-link:focus,
.blog-cat-link:active,
.blog-cat-link.active {
    color: #000;
    background: var(--btn-grad);
    border-color: transparent;
    text-decoration: none;
}

/* Grid Layout */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 32px;
    width: 100%;
    margin-bottom: 60px;
}

/* Blog Card */
.blog-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease, box-shadow 0.4s ease;
    height: 100%;
}

.blog-page .blog-card {
    transform: translateY(0);
}

.blog-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
}

.blog-card-image-wrapper {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    position: relative;
    background: #0d0d0d;
}

.blog-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.blog-card-category-tag {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--purple-light);
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}

.blog-card-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-white);
    margin-bottom: 12px;
    transition: color 0.3s ease;
}

.blog-card-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-gray);
    margin-bottom: 24px;
    flex-grow: 1;
}

.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 16px;
    margin-top: auto;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

.blog-read-more {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-white);
    transition: color 0.3s ease;
}

/* Card Hover Animations */
@media (hover: hover) {
    .blog-card:hover {
        transform: translateY(-6px);
        border-color: rgba(165, 148, 253, 0.35);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    }
    
    .blog-card:hover .blog-card-img {
        transform: scale(1.04);
    }
    
    .blog-card:hover .blog-card-title {
        color: var(--purple-light);
    }
}

/* Pagination Section */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
}

.blog-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-gray);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.blog-page-btn:hover,
.blog-page-btn.active {
    color: #000;
    background: var(--btn-grad);
    border-color: transparent;
}

/* ------------------------------------------
   Single Post Detail Layout
   ------------------------------------------ */
.post-detail-hero {
    padding: var(--section-padding-xl) 0 var(--section-padding-md);
    background-color: #05010a;
}

.post-detail-header {
    max-width: 900px;
    margin: 0 auto 40px;
    text-align: center;
}

.post-detail-cat {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--purple-light);
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.post-detail-title {
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.25;
    color: var(--text-white);
    margin-bottom: 24px;
    letter-spacing: -0.5px;
}

.post-detail-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    font-size: 14px;
    color: var(--text-gray);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 24px;
}

.post-detail-featured-image-wrapper {
    max-width: 1000px;
    margin: 0 auto 60px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.08);
    background: #090909;
}

.post-detail-featured-image {
    display: block;
    width: 100%;
    height: auto;
}

.post-detail-layout {
    display: grid;
    grid-template-columns: 1fr;
    max-width: 760px;
    margin: 0 auto var(--section-padding-xl);
    padding: 0 16px;
}

/* Rich Text Formatting inside Content */
.post-rich-content {
    font-family: var(--nav-font);
    font-size: 18px;
    line-height: 1.85;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: -0.1px;
}

.post-rich-content ::selection {
    background: rgba(165, 148, 253, 0.25);
    color: #fff;
}

/* Headings and Anchors */
.post-rich-content h1,
.post-rich-content h2,
.post-rich-content h3,
.post-rich-content h4 {
    color: var(--text-white);
    line-height: 1.3;
    position: relative;
    scroll-margin-top: 120px;
    letter-spacing: -0.025em;
}

.post-rich-content h1 {
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    font-weight: 800;
    margin: 80px 0 32px;
}

.post-rich-content h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.4rem);
    font-weight: 800;
    margin: 84px 0 28px;
    letter-spacing: -0.02em;
}

.post-rich-content h2::after {
    content: "";
    display: block;
    width: 48px;
    height: 3px;
    margin-top: 18px;
    border-radius: 2px;
    background: var(--btn-grad);
}

.post-rich-content h3 {
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    font-weight: 700;
    margin: 56px 0 20px;
    letter-spacing: -0.015em;
}

.post-rich-content h4 {
    font-size: clamp(1.15rem, 1.8vw, 1.35rem);
    font-weight: 700;
    margin: 44px 0 18px;
}

.heading-anchor {
    position: absolute;
    left: -28px;
    opacity: 0;
    color: var(--purple-light) !important;
    text-decoration: none !important;
    border-bottom: none !important;
    font-weight: 400;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform: translateX(5px);
    display: inline-block;
    padding: 0 4px;
}

.post-rich-content h2:hover .heading-anchor,
.post-rich-content h3:hover .heading-anchor,
.post-rich-content h4:hover .heading-anchor {
    opacity: 0.6;
    transform: translateX(0);
}

.heading-anchor:hover {
    opacity: 1 !important;
}

/* Paragraphs, Bold, Italic */
.post-rich-content p {
    margin: 0 0 32px;
    font-size: 18px;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.78);
    letter-spacing: -0.05px;
}

.post-rich-content strong {
    color: #fff;
    font-weight: 700;
}

.post-rich-content em {
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
}

/* Links */
.post-rich-content a {
    color: var(--purple-light);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px dashed rgba(165, 148, 253, 0.4);
    transition: all 0.2s ease;
}

.post-rich-content a:hover {
    color: #fff;
    border-bottom-color: #fff;
}

/* Lists and Nested Lists */
.post-rich-content ul.blog-unordered-list,
.post-rich-content ol.blog-ordered-list {
    margin: 0 0 36px;
}

.post-rich-content ul.blog-unordered-list {
    list-style: none;
    padding-left: 0;
}

.post-rich-content ul.blog-unordered-list > li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 16px;
    font-size: 17.5px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
}

.post-rich-content ul.blog-unordered-list > li::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--purple-light);
    box-shadow: 0 0 8px var(--purple-light);
}

.post-rich-content ol.blog-ordered-list {
    padding-left: 20px;
    list-style-type: decimal;
}

.post-rich-content ol.blog-ordered-list > li {
    margin-bottom: 16px;
    padding-left: 8px;
    font-size: 17.5px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
}

.post-rich-content .blog-nested-list {
    margin: 12px 0 12px 20px;
    padding-left: 20px;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.post-rich-content ul.blog-nested-list {
    list-style-type: circle;
}

.post-rich-content ol.blog-nested-list {
    list-style-type: lower-alpha;
}

/* Blockquotes & Callouts */
.post-rich-content blockquote {
    margin: 56px 0;
    padding: 26px 32px;
    border-left: 4px solid var(--purple-light);
    border-radius: 0 16px 16px 0;
    background: rgba(99, 44, 155, 0.04);
    backdrop-filter: blur(10px);
    font-size: 20px;
    line-height: 1.75;
    font-style: italic;
    color: #fff;
    border-top: 1px solid rgba(255, 255, 255, 0.02);
    border-right: 1px solid rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.post-rich-content blockquote p {
    margin-bottom: 0;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    font-style: inherit;
}

/* Callout Boxes */
.blog-callout {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px 28px;
    border-radius: 12px;
    margin: 44px 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.01);
    backdrop-filter: blur(10px);
}

.blog-callout.callout-note {
    background: rgba(165, 148, 253, 0.03);
    border-left: 4px solid var(--purple-light);
}

.blog-callout.callout-note .callout-title {
    color: var(--purple-light);
}

.blog-callout.callout-tip {
    background: rgba(0, 214, 143, 0.03);
    border-left: 4px solid #00d68f;
}

.blog-callout.callout-tip .callout-title {
    color: #00d68f;
}

.blog-callout.callout-warning {
    background: rgba(255, 170, 0, 0.03);
    border-left: 4px solid #ffaa00;
}

.blog-callout.callout-warning .callout-title {
    color: #ffaa00;
}

.blog-callout.callout-info {
    background: rgba(51, 153, 255, 0.03);
    border-left: 4px solid #3399ff;
}

.blog-callout.callout-info .callout-title {
    color: #3399ff;
}

.callout-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.callout-icon {
    flex-shrink: 0;
}

.callout-content {
    font-size: 16px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
}

.callout-content p {
    margin-bottom: 0;
    font-size: 16px;
    line-height: 1.7;
    color: inherit;
}

/* Figures, Images & Lightbox */
.blog-figure {
    margin: 48px auto;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.blog-figure img {
    margin: 0 !important;
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4);
}

.blog-figcaption {
    margin-top: 16px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.45);
    text-align: center;
    font-style: italic;
}

.post-rich-content img {
    border-radius: 16px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4);
    margin: 48px auto;
    display: block;
    max-width: 100%;
    height: auto;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.lightbox-trigger {
    cursor: zoom-in;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.lightbox-trigger:hover {
    transform: scale(1.008);
    filter: brightness(1.04);
}

/* Lightbox Modal Structure */
#blog-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#blog-lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 1, 10, 0.9);
    backdrop-filter: blur(16px);
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 85%;
    z-index: 1;
    transform: scale(0.95);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#blog-lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: -45px;
    right: 0;
    font-size: 36px;
    color: #fff;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.lightbox-close:hover {
    opacity: 1;
}

/* Code Blocks and macOS Headers */
.blog-code-block-wrapper {
    position: relative;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #09050f;
    margin: 36px 0;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
}

.blog-code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.blog-code-dots {
    display: flex;
    gap: 6px;
}

.blog-code-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.blog-code-dots .dot.red { background-color: #ff5f56; }
.blog-code-dots .dot.yellow { background-color: #ffbd2e; }
.blog-code-dots .dot.green { background-color: #27c93f; }

.blog-code-lang {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255, 255, 255, 0.4);
}

.blog-code-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.2s ease;
}

.blog-code-copy-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.blog-code-copy-btn.copied {
    background: rgba(0, 214, 143, 0.1);
    border-color: rgba(0, 214, 143, 0.3);
    color: #00d68f;
}

.post-rich-content pre {
    margin: 0 !important;
    padding: 22px 24px !important;
    border: none !important;
    background: transparent !important;
    overflow-x: auto;
}

.post-rich-content pre code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 14.5px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    display: block;
    padding: 0;
    background: transparent;
}

.post-rich-content :not(pre) > code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    background: rgba(165, 148, 253, 0.08);
    border: 1px solid rgba(165, 148, 253, 0.15);
    color: var(--purple-light);
    padding: 3px 6px;
    border-radius: 6px;
    font-size: 14.5px;
    font-weight: 500;
}

/* Horizontal Rules */
.post-rich-content hr {
    margin: 60px auto;
    width: 100px;
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

/* Responsive and Comparison Tables */
.blog-table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.01);
    margin: 40px 0;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
    -webkit-overflow-scrolling: touch;
}

.blog-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
    text-align: left;
    min-width: 500px;
}

.blog-table th {
    background: rgba(255, 255, 255, 0.03);
    padding: 18px 24px;
    font-weight: 700;
    color: #fff;
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.08);
    letter-spacing: 0.5px;
    font-size: 15px;
}

.blog-table td {
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.75);
    transition: background-color 0.2s ease;
}

.blog-table tr:hover td {
    background-color: rgba(255, 255, 255, 0.015);
}

.blog-table tr:nth-child(even) td {
    background-color: rgba(255, 255, 255, 0.004);
}

/* Comparison Badges */
.comp-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.comp-badge.comp-yes {
    background: rgba(0, 214, 143, 0.12);
    color: #00d68f;
}

.comp-badge.comp-no {
    background: rgba(255, 95, 86, 0.12);
    color: #ff5f56;
}

/* Details & FAQ Accordions */
.post-rich-content details {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    margin: 16px 0;
    padding: 20px 24px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.post-rich-content details[open] {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(165, 148, 253, 0.25);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.post-rich-content summary {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    list-style: none;
    position: relative;
    padding-right: 35px;
    outline: none;
    user-select: none;
}

.post-rich-content summary::-webkit-details-marker {
    display: none;
}

.post-rich-content summary::after {
    content: "+";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    font-weight: 400;
    color: var(--purple-light);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.post-rich-content details[open] summary::after {
    content: "−";
    transform: translateY(-50%) rotate(180deg);
}

.post-rich-content details p {
    margin-top: 14px;
    margin-bottom: 0;
    font-size: 16px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.75);
}

/* Call-to-Action Buttons */
.post-rich-content .btn,
.post-rich-content .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--btn-grad);
    color: #000 !important;
    font-weight: 700;
    font-size: 14px;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 15px rgba(184, 146, 255, 0.15);
    margin: 20px 0;
}

.post-rich-content .btn:hover,
.post-rich-content .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(184, 146, 255, 0.3);
}

/* Video Embed Responsive Wrapper */
.blog-video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    margin: 48px 0;
}

.blog-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Post tags listing */
.post-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.post-tag-item {
    font-size: 13px;
    font-weight: 500;
    color: var(--purple-light);
    background: rgba(165, 148, 253, 0.08);
    border: 1px solid rgba(165, 148, 253, 0.15);
    padding: 4px 12px;
    border-radius: 15px;
}

/* Related Posts Section */
.related-posts-section {
    padding: 80px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: #05010a;
}

.related-title {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 50px;
}

/* Two-Column Sidebar & Grid Layout */
.post-detail-layout {
    display: grid;
    grid-template-columns: 1fr;
    max-width: 760px;
    margin: 0 auto 120px;
}

@media (min-width: 1100px) {
    .post-detail-layout {
        grid-template-columns: 240px 1fr;
        gap: 64px;
        max-width: 1120px;
        align-items: start;
    }
    .post-detail-layout.no-sidebar {
        grid-template-columns: 1fr;
        max-width: 760px;
    }
}

.post-sidebar {
    display: none;
}

@media (min-width: 1100px) {
    .post-sidebar {
        display: block;
        position: relative;
    }
    .post-toc-container {
        position: sticky;
        top: 130px;
        max-height: calc(100vh - 180px);
        overflow-y: auto;
        padding-right: 15px;
        scrollbar-width: none;
    }
    .post-toc-container::-webkit-scrollbar {
        display: none;
    }
}

.post-toc-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 1.5px;
    margin-bottom: 18px;
}

.toc-list {
    list-style: none !important;
    padding-left: 0 !important;
    margin: 0 !important;
}

.toc-item {
    margin-bottom: 12px;
    line-height: 1.4;
}

.toc-h2 {
    padding-left: 0;
}

.toc-h3 {
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    margin-left: 4px;
}

.post-toc-link {
    font-size: 13.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none !important;
    border-bottom: none !important;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: inline-block;
}

.post-toc-link:hover,
.post-toc-link.active {
    color: var(--purple-light);
    transform: translateX(3px);
}

/* Reading Progress Bar */
.reading-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 10002;
    background: rgba(255, 255, 255, 0.02);
}

.reading-progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--purple-main), var(--purple-light));
    box-shadow: 0 0 10px rgba(165, 148, 253, 0.5);
    transition: width 0.1s ease-out;
}

/* Chapter Separators */
.chapter-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin: 80px 0;
}

.chapter-line {
    flex-grow: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.08) 50%, transparent 100%);
}

.chapter-badge {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 5px 14px;
    border-radius: 20px;
    text-transform: uppercase;
}

/* Pull Quotes */
.blog-pull-quote {
    position: relative;
    margin: 64px 0;
    padding: 30px 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.blog-pull-quote .quote-icon {
    font-size: 72px;
    line-height: 0.1;
    color: rgba(165, 148, 253, 0.12);
    font-family: Georgia, serif;
    user-select: none;
}

.blog-pull-quote .quote-icon.open {
    margin-bottom: 20px;
}

.blog-pull-quote .quote-icon.close {
    margin-top: 40px;
}

.blog-pull-quote .quote-text {
    font-size: clamp(20px, 3.2vw, 26px);
    line-height: 1.55;
    color: #fff;
    font-weight: 700;
    letter-spacing: -0.5px;
    max-width: 640px;
}

/* Lead Generation Inline CTA Banner */
.blog-inline-cta {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 36px;
    border-radius: 16px;
    margin: 60px 0;
    background: radial-gradient(100% 100% at 0% 0%, rgba(165, 148, 253, 0.06) 0%, transparent 100%), rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(165, 148, 253, 0.18);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
    align-items: flex-start;
}

@media (min-width: 640px) {
    .blog-inline-cta {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.blog-inline-cta .cta-content {
    max-width: 480px;
}

.blog-inline-cta .cta-title {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.blog-inline-cta .cta-desc {
    font-size: 15px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 0 !important;
}

.blog-inline-cta .cta-btn {
    flex-shrink: 0;
    margin: 0 !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--btn-grad);
    color: #000 !important;
    font-weight: 700;
    font-size: 13px;
    padding: 14px 24px;
    border-radius: 8px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(184, 146, 255, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-inline-cta .cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(184, 146, 255, 0.35);
}

/* Checklist Task Items */
.blog-task-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    font-size: 17px;
    color: rgba(255, 255, 255, 0.8);
    list-style: none !important;
}

.task-checkbox {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    margin-top: 4px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.task-checkbox.checked {
    background: var(--purple-light);
    border-color: var(--purple-light);
    color: #000;
    box-shadow: 0 0 8px rgba(165, 148, 253, 0.4);
}

.task-text {
    line-height: 1.6;
}

/* Highlighted Statistics Cards */
.blog-stat-card {
    flex: 1 1 200px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 28px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.005) 100%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.blog-stat-card .stat-value {
    font-size: clamp(36px, 5vw, 46px);
    font-weight: 800;
    color: #fff;
    background: linear-gradient(to right, #fff, var(--purple-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.blog-stat-card .stat-label {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.5px;
    line-height: 1.4;
}

.blog-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 48px 0;
    width: 100%;
}

.blog-stat-wrapper {
    display: flex;
    justify-content: center;
    margin: 48px 0;
    width: 100%;
}

/* Author Profile Bio Card */
.post-author-section {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 36px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.01);
    margin: 80px 0 40px;
    backdrop-filter: blur(10px);
}

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

.author-avatar-wrapper {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple-main), var(--purple-light));
    padding: 2.5px;
}

.author-avatar-initials {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #05010a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.5px;
}

.author-avatar-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.author-details {
    flex-grow: 1;
}

.author-written-by {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--purple-light);
    letter-spacing: 1.5px;
    display: block;
    margin-bottom: 6px;
}

.author-card-name {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.author-card-bio {
    font-size: 14.5px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 !important;
}

/* Hero Summary Lead Block */
.post-rich-content > p:first-of-type,
.post-rich-content p.lead {
    font-size: clamp(20px, 2.5vw, 22px) !important;
    line-height: 1.65 !important;
    color: #fff !important;
    font-weight: 500 !important;
    margin-bottom: 40px !important;
    border-left: 4px solid var(--purple-light);
    padding-left: 22px;
}

/* Key Takeaways Card Layout (aside element) */
.post-rich-content aside {
    padding: 32px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(165, 148, 253, 0.05) 0%, rgba(99, 44, 155, 0.02) 100%);
    border: 1px solid rgba(165, 148, 253, 0.15);
    margin: 48px 0;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.post-rich-content aside h4 {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 22px;
    margin-top: 0 !important;
}

.post-rich-content aside ul {
    list-style: none !important;
    padding-left: 0 !important;
    margin: 0 !important;
}

.post-rich-content aside ul li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    font-size: 16.5px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
}

.post-rich-content aside ul li:last-child {
    margin-bottom: 0;
}

.post-rich-content aside ul li::before {
    content: "✓";
    color: var(--purple-light);
    font-weight: 700;
    flex-shrink: 0;
}

/* Process Timeline Section (ol.timeline) */
.post-rich-content ol.timeline {
    position: relative;
    padding-left: 32px;
    margin: 48px 0;
    list-style: none !important;
}

.post-rich-content ol.timeline::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 8px;
    width: 2px;
    height: calc(100% - 16px);
    background: linear-gradient(180deg, var(--purple-light), rgba(255, 255, 255, 0.05));
}

.post-rich-content ol.timeline > li {
    position: relative;
    margin-bottom: 36px;
    padding-left: 0 !important;
}

.post-rich-content ol.timeline > li:last-child {
    margin-bottom: 0;
}

.post-rich-content ol.timeline > li::before {
    content: "";
    position: absolute;
    left: -28px;
    top: 8px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--purple-light);
    box-shadow: 0 0 10px var(--purple-light);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 2;
}

.post-rich-content ol.timeline > li:hover::before {
    transform: scale(1.35);
}

.post-rich-content ol.timeline > li > strong {
    display: block;
    font-size: 16.5px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

/* Numbered Process Step Cards Grid (ol.steps) */
.post-rich-content ol.steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin: 48px 0;
    list-style: none !important;
    padding-left: 0 !important;
    counter-reset: steps-counter;
}

@media (min-width: 600px) {
    .post-rich-content ol.steps {
        grid-template-columns: repeat(2, 1fr);
    }
}

.post-rich-content ol.steps > li {
    counter-increment: steps-counter;
    padding: 32px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.post-rich-content ol.steps > li:hover {
    transform: translateY(-4px);
    border-color: rgba(165, 148, 253, 0.22);
    background: rgba(255, 255, 255, 0.02);
}

.post-rich-content ol.steps > li::before {
    content: "0" counter(steps-counter);
    font-size: 11px;
    font-weight: 800;
    color: var(--purple-light);
    background: rgba(165, 148, 253, 0.1);
    border: 1px solid rgba(165, 148, 253, 0.18);
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 20px;
    letter-spacing: 0.8px;
}

.post-rich-content ol.steps > li > strong {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
}

/* Highlighted Statistics Cards (dl / definition lists) */
.post-rich-content dl {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 48px 0;
    width: 100%;
}

.post-rich-content dl > div {
    flex: 1 1 200px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 28px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.005) 100%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.post-rich-content dl dt {
    font-size: clamp(36px, 5vw, 46px);
    font-weight: 800;
    color: #fff;
    background: linear-gradient(to right, #fff, var(--purple-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.post-rich-content dl dd {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.5px;
    line-height: 1.4;
    margin-left: 0;
}

/* Side-by-Side Responsive Image Grids (.images-grid) */
.post-rich-content .images-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 48px 0;
}

@media (min-width: 600px) {
    .post-rich-content .images-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.post-rich-content .images-grid figure {
    margin: 0 !important;
}

/* Pull Quotes (blockquote.pullquote) */
.post-rich-content blockquote.pullquote {
    position: relative;
    margin: 64px 0;
    padding: 30px 10px;
    text-align: center;
    border-left: none !important;
    background: transparent !important;
    border-top: none;
    border-right: none;
    border-bottom: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    backdrop-filter: none !important;
    border-radius: 0 !important;
}

.post-rich-content blockquote.pullquote::before {
    content: "“";
    font-size: 72px;
    line-height: 0.1;
    color: rgba(165, 148, 253, 0.12);
    font-family: Georgia, serif;
    user-select: none;
    margin-bottom: 20px;
}

.post-rich-content blockquote.pullquote::after {
    content: "”";
    font-size: 72px;
    line-height: 0.1;
    color: rgba(165, 148, 253, 0.12);
    font-family: Georgia, serif;
    user-select: none;
    margin-top: 40px;
}

.post-rich-content blockquote.pullquote p {
    font-size: clamp(20px, 3.2vw, 26px) !important;
    line-height: 1.55 !important;
    color: #fff !important;
    font-weight: 700 !important;
    max-width: 640px;
    margin: 0 auto !important;
    font-style: italic;
}

/* Lead Generation Inline CTA Banner (.cta-banner) */
.post-rich-content .cta-banner {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 36px;
    border-radius: 16px;
    margin: 60px 0;
    background: radial-gradient(100% 100% at 0% 0%, rgba(165, 148, 253, 0.06) 0%, transparent 100%), rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(165, 148, 253, 0.18);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
    align-items: flex-start;
    width: 100%;
}

@media (min-width: 640px) {
    .post-rich-content .cta-banner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.post-rich-content .cta-banner h4 {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
    margin-top: 0 !important;
}

.post-rich-content .cta-banner p {
    font-size: 15px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 0 !important;
}

.post-rich-content .cta-banner a {
    flex-shrink: 0;
    margin: 0 !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--btn-grad);
    color: #000 !important;
    font-weight: 700;
    font-size: 13px;
    padding: 14px 24px;
    border-radius: 8px;
    text-decoration: none;
    border-bottom: none !important;
    box-shadow: 0 4px 15px rgba(184, 146, 255, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-rich-content .cta-banner a:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(184, 146, 255, 0.35);
}

/* Accordion Smooth Height container */
.details-content-wrapper {
    overflow: hidden;
}

/* Post Content Container (Width constraints) */
.post-content-container {
    max-width: 760px;
    width: 100%;
}

/* Responsive Rules */
@media (max-width: 900px) {
    .blog-hero-section, .blog-hero, .post-detail-hero {
        padding-top: var(--hero-padding-top-tablet, clamp(5.5rem, 8.5vw, 7.5rem));
    }
    
    .blog-header-content, .post-detail-header {
        margin-bottom: 50px;
    }
    
    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
        gap: 24px;
    }
}

/* Floating Back-to-Top Button */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(12, 8, 19, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 999;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

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

.back-to-top-btn:hover {
    background: var(--purple-light);
    color: #000;
    border-color: var(--purple-light);
    box-shadow: 0 12px 30px rgba(165, 148, 253, 0.4);
    transform: translateY(-4px);
}

/* Heading Anchor Copied Tooltip */
.anchor-copied-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translate(-50%, -8px);
    background: rgba(12, 8, 19, 0.95);
    border: 1px solid rgba(165, 148, 253, 0.3);
    color: var(--purple-light);
    font-size: 11px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 6px;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    animation: tooltip-fade-in 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    letter-spacing: 0;
}

.anchor-copied-tooltip.fade-out {
    animation: tooltip-fade-out 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes tooltip-fade-in {
    from { opacity: 0; transform: translate(-50%, 0); }
    to { opacity: 1; transform: translate(-50%, -8px); }
}

@keyframes tooltip-fade-out {
    from { opacity: 1; transform: translate(-50%, -8px); }
    to { opacity: 0; transform: translate(-50%, 0); }
}

/* ==========================================================================
   BLOG SPECIFIC PAGE OVERRIDES FOR DYNAMIC SHELL & FINAL CTA
   ========================================================================== */
.blog-page .blog-grid {
    margin-bottom: 0;
}

.blog-page .blog-pagination {
    margin-top: 30px;
    margin-bottom: 0;
}

