/* ============================================================
   BLOG POST — PREMIUM MAGAZINE DESIGN (v6 — all issues fixed)
   A professional, immersive reading experience
   ============================================================ */

/* ===== Keyframes ===== */
@keyframes bp-gradient-line {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes bp-glow {
    0%, 100% { box-shadow: 0 0 8px rgba(34,211,238,.12); }
    50%      { box-shadow: 0 0 24px rgba(34,211,238,.25); }
}

@keyframes bp-fade-up {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== Reveal animations ===== */
.blog-post-page .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .7s cubic-bezier(.23,1,.32,1), transform .7s cubic-bezier(.23,1,.32,1);
}

.blog-post-page .reveal.visible,
.blog-post-page .reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   READING PROGRESS BAR — fixed at top
   ============================================================ */
.bp-reading-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    z-index: 10000;
    pointer-events: none;
}

.bp-reading-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue), var(--accent-violet));
    transition: width .15s ease-out;
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 10px rgba(34,211,238,.4);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.bp-hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    padding: 160px 0 64px;
}

.bp-hero-bg {
    position: absolute;
    inset: 0;
}

.bp-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(.22) saturate(1.2) contrast(1.05);
    transition: transform 8s ease-out;
}

.bp-hero:hover .bp-hero-bg img {
    transform: scale(1.03);
}

.bp-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(11,15,26,.55) 0%,
        rgba(11,15,26,.7) 35%,
        rgba(11,15,26,.88) 65%,
        rgba(11,15,26,.97) 85%,
        var(--bg-primary) 100%
    );
}

.bp-hero-grain {
    position: absolute;
    inset: 0;
    opacity: .03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 2;
}

.bp-hero-line {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), var(--accent-violet), var(--accent-cyan), transparent);
    background-size: 200% 100%;
    animation: bp-gradient-line 4s ease infinite;
    z-index: 3;
}

.bp-hero-inner {
    position: relative;
    z-index: 4;
    max-width: 860px;
    width: 100%;
    animation: bp-fade-up .8s cubic-bezier(.23,1,.32,1) both;
}

/* Breadcrumb */
.bp-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
    font-size: .8rem;
    gap: 0;
}

.bp-breadcrumb a {
    color: rgba(255,255,255,.4);
    text-decoration: none;
    transition: color .25s;
    font-weight: 400;
}

.bp-breadcrumb a:hover { color: var(--accent-cyan); }

.bp-bc-sep {
    margin: 0 10px;
    font-size: .4rem;
    color: rgba(255,255,255,.15);
}

.bp-bc-current {
    color: var(--accent-cyan);
    font-weight: 500;
}

#bread-service {
    color: rgba(255,255,255,.4);
}

/* Title */
.bp-hero-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.12;
    margin-bottom: 16px;
    color: #fff;
    letter-spacing: -.03em;
    max-width: 840px;
}

.bp-hero-sub {
    font-size: 1.08rem;
    color: rgba(255,255,255,.5);
    line-height: 1.7;
    max-width: 640px;
    font-weight: 300;
    letter-spacing: .01em;
}

/* ============================================================
   AUTHOR + META BAR (FIX #1: avatar sizing, alignment)
   ============================================================ */
.bp-hero-meta-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 32px;
    padding: 12px 20px 12px 12px;
    background: rgba(255,255,255,.04);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 16px;
    gap: 16px;
    flex-wrap: wrap;
}

.bp-author {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

/* FIX: Force avatar to exact size, prevent SVG from expanding */
.bp-author-img {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px;
    max-width: 44px;
    min-height: 44px;
    max-height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(34,211,238,.25);
    flex-shrink: 0;
    display: block;
    background: rgba(34,211,238,.1);
}

.bp-author-info {
    min-width: 0;
}

.bp-author-name {
    font-weight: 600;
    font-size: .9rem;
    color: #fff;
    display: block;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.author-role {
    display: block;
    font-size: .7rem;
    font-weight: 400;
    color: rgba(255,255,255,.3);
    margin-top: 1px;
}

.bp-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 3px;
    font-size: .76rem;
    color: rgba(255,255,255,.35);
}

.bp-meta i {
    font-size: .6rem;
    color: var(--accent-cyan);
    opacity: .7;
    margin-right: 3px;
}

.bp-meta-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    margin: 0 8px;
}

/* Hero Share */
.bp-hero-share {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.bp-hero-share a,
.bp-hero-share button {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.08);
    color: rgba(255,255,255,.4);
    cursor: pointer;
    transition: all .3s cubic-bezier(.23,1,.32,1);
    text-decoration: none;
    font-size: .82rem;
}

.bp-hero-share a:hover,
.bp-hero-share button:hover {
    color: var(--accent-cyan);
    border-color: rgba(34,211,238,.25);
    background: rgba(34,211,238,.08);
    transform: translateY(-2px);
}

/* ============================================================
   LAYOUT (FIX #5: ensure sidebar shows on desktop)
   ============================================================ */
.bp-main {
    position: relative;
    padding: 0 24px 100px;
}

/* Ambient background blobs */
.bp-main::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 45% 30% at 8% 10%, rgba(34,211,238,.04) 0%, transparent 50%),
        radial-gradient(ellipse 40% 35% at 92% 35%, rgba(139,92,246,.04) 0%, transparent 50%),
        radial-gradient(ellipse 35% 25% at 45% 70%, rgba(59,130,246,.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.bp-layout {
    max-width: 1260px;
    margin: 0 auto;
    padding-top: 48px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 48px;
    align-items: start;
    position: relative;
    z-index: 1;
}

.bp-article {
    min-width: 0;
    overflow: hidden; /* prevent content from stretching grid */
}

.bp-body {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ============================================================
   GLASS CARD — blog section container
   (FIX #3: empty sections get hidden)
   ============================================================ */
.blog-section {
    padding: 36px 32px;
    background: rgba(25,33,58,.6);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 18px;
    position: relative;
    overflow: hidden;
    transition: border-color .4s cubic-bezier(.23,1,.32,1), box-shadow .4s cubic-bezier(.23,1,.32,1);
}

/* Hide empty sections that render with padding but no visible content */
.blog-section:empty {
    display: none;
    padding: 0;
    margin: 0;
}

/* Subtle top shine */
.blog-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 10%, rgba(34,211,238,.2) 50%, transparent 90%);
    pointer-events: none;
}

.blog-section:hover {
    border-color: rgba(34,211,238,.12);
    box-shadow: 0 8px 40px rgba(0,0,0,.15), 0 0 0 1px rgba(34,211,238,.05);
}

/* ---- Heading ---- */
.blog-section h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 20px 0;
    padding: 0;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -.015em;
}

.blog-section h2::before {
    content: '';
    width: 4px;
    align-self: stretch;
    min-height: 22px;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--accent-cyan), var(--accent-violet));
    flex-shrink: 0;
}

/* When heading has an icon child, hide the bar */
.blog-section h2 > i {
    color: var(--accent-cyan);
    font-size: 1.1rem;
    flex-shrink: 0;
    width: 1.1rem;
    text-align: center;
}

.blog-section h2:has(> i)::before { display: none; }

.blog-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #E5E7EB;
    margin: 20px 0 10px;
    letter-spacing: -.01em;
}

/* ---- Body text ---- */
.blog-section p {
    font-size: 1.02rem;
    line-height: 1.85;
    color: rgba(200,210,224,.88);
    margin-bottom: 14px;
    letter-spacing: .005em;
}

.blog-section li {
    font-size: .98rem;
    line-height: 1.8;
    color: rgba(200,210,224,.88);
    margin-bottom: 6px;
}

.blog-section strong { color: #E5E7EB; }

.blog-section a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: color .2s;
    border-bottom: 1px solid rgba(34,211,238,.2);
}

.blog-section a:hover {
    color: #fff;
    border-bottom-color: var(--accent-cyan);
}

.blog-section ul, .blog-section ol { padding-left: 22px; margin: 12px 0; }

/* Style variants */
.blog-section.style-gradient {
    background: linear-gradient(135deg, rgba(34,211,238,.04), rgba(25,33,58,.6) 50%, rgba(139,92,246,.04));
    border-color: rgba(34,211,238,.1);
}

.blog-section.style-dark {
    background: rgba(6,10,20,.75);
    border-color: rgba(255,255,255,.08);
}

/* ============================================================
   SECTION TYPES
   ============================================================ */

/* FIX #2: Intro paragraph — drop cap with proper containment */
.section-intro {
    font-size: 1.08rem;
    line-height: 1.9;
    color: rgba(200,210,224,.9);
    overflow: hidden; /* contain the float */
}

.section-intro p:first-child::first-letter {
    float: left;
    font-size: 3.2rem;
    line-height: 1;
    font-family: 'Playfair Display', var(--font-heading), serif;
    font-weight: 700;
    color: var(--accent-cyan);
    margin: 4px 12px 0 0;
    padding: 0;
}

/* Clear float after intro content so it doesn't bleed into next elements */
.section-intro::after {
    content: '';
    display: table;
    clear: both;
}

/* Conclusion */
.section-conclusion {
    color: rgba(200,210,224,.9);
    line-height: 1.85;
}

/* FIX #11: Conclusion text size */
.section-conclusion p {
    font-size: 1.02rem;
    line-height: 1.85;
    color: rgba(200,210,224,.88);
}

.section-conclusion.blog-section {
    border-left: 3px solid var(--accent-cyan);
    border-radius: 0 18px 18px 0;
    background: linear-gradient(90deg, rgba(34,211,238,.04), rgba(25,33,58,.6));
}

/* Text + Image */
.section-text-image {
    display: flex;
    align-items: center;
    gap: 28px;
}

.section-text-image.reverse { flex-direction: row-reverse; }
.section-text-image .content { flex: 1; min-width: 0; }
.section-text-image .media { flex: 0 0 42%; }

.section-text-image img {
    width: 100%;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.06);
    transition: transform .5s cubic-bezier(.23,1,.32,1), box-shadow .5s;
}

.section-text-image img:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 40px rgba(0,0,0,.2);
}

/* ============================================================
   FIX #4: Feature Cards — scoped grid to avoid global .grid-2/.grid-3 conflict
   ============================================================ */
.blog-section .card-grid {
    display: grid !important;
    gap: 16px !important;
}

.blog-section .card-grid.grid-3 {
    grid-template-columns: repeat(3, 1fr) !important;
}

.blog-section .card-grid.grid-2 {
    grid-template-columns: repeat(2, 1fr) !important;
}

.feature-card {
    background: rgba(25,33,58,.7);
    border: 1px solid rgba(255,255,255,.07);
    padding: 28px 24px;
    border-radius: 16px;
    transition: all .4s cubic-bezier(.23,1,.32,1);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
    opacity: 0;
    transition: opacity .4s;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(34,211,238,.15);
    box-shadow: 0 12px 40px rgba(0,0,0,.2);
}

.feature-card:hover::before { opacity: 1; }

.feature-card .icon {
    font-size: 1.8rem;
    margin-bottom: 14px;
    color: var(--accent-cyan);
    display: block;
    height: 2.2rem;
    line-height: 2.2rem;
}

.feature-card .icon i { font-size: inherit; }
.feature-card h3 { font-size: 1rem; font-weight: 600; margin: 0 0 8px; color: #fff; }
.feature-card p { font-size: .88rem; color: rgba(200,210,224,.65); line-height: 1.7; margin: 0; }

/* Quote / Testimonial */
.section-quote {
    position: relative;
    padding: 28px 32px 28px 36px;
    background: rgba(25,33,58,.7);
    border: 1px solid rgba(255,255,255,.06);
    border-left: 4px solid var(--accent-cyan);
    border-radius: 0 14px 14px 0;
}

.section-quote::after {
    content: '\201C';
    position: absolute;
    top: 12px;
    left: 18px;
    font-size: 5rem;
    color: var(--accent-cyan);
    opacity: .08;
    font-family: 'Playfair Display', Georgia, serif;
    line-height: 1;
    pointer-events: none;
}

.quote-text {
    font-size: 1.05rem;
    font-style: italic;
    line-height: 1.8;
    color: #E5E7EB;
    position: relative;
    z-index: 1;
}

.quote-author {
    margin-top: 14px;
    font-size: .85rem;
    color: var(--text-muted);
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.quote-author span { font-weight: 400; }

/* Code Block */
.code-block-wrapper {
    border-radius: 14px;
    overflow: hidden;
    background: #0d1117;
    border: 1px solid rgba(255,255,255,.06);
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 18px;
    background: rgba(22,27,34,.95);
    border-bottom: 1px solid rgba(255,255,255,.05);
}

.lang-tab {
    font-family: var(--font-mono);
    font-size: .72rem;
    text-transform: uppercase;
    color: var(--accent-cyan);
    letter-spacing: .6px;
    font-weight: 500;
}

.copy-btn {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    color: rgba(200,210,224,.5);
    cursor: pointer;
    font-size: .72rem;
    padding: 5px 14px;
    border-radius: 8px;
    transition: all .25s;
    font-family: var(--font-mono);
}

.copy-btn:hover {
    background: rgba(34,211,238,.08);
    color: var(--accent-cyan);
    border-color: rgba(34,211,238,.2);
}

pre {
    padding: 18px 20px;
    margin: 0;
    overflow-x: auto;
}

code {
    font-family: var(--font-mono);
    font-size: .86rem;
    line-height: 1.75;
    color: #C8D2E0;
}

/* ============================================================
   FIX #6: Stats — prevent text overflow on long stat values
   ============================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
}

.stat-item {
    padding: 24px 16px;
    background: rgba(25,33,58,.7);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 14px;
    text-align: center;
    transition: all .4s cubic-bezier(.23,1,.32,1);
    position: relative;
    overflow: hidden;
}

.stat-item:hover {
    transform: translateY(-3px);
    border-color: rgba(34,211,238,.15);
    box-shadow: 0 8px 28px rgba(0,0,0,.2);
}

.stat-item .number {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 800;
    color: var(--accent-cyan);
    line-height: 1.3;
    margin-bottom: 8px;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    font-family: var(--font-heading);
}

.stat-item .label {
    font-size: .78rem;
    color: rgba(200,210,224,.6);
    line-height: 1.5;
}

/* Comparison Table */
.comparison-container {
    overflow-x: auto;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.07);
    margin-top: 12px;
}

.blog-table {
    width: 100%;
    border-collapse: collapse;
}

.blog-table th {
    padding: 14px 18px;
    background: rgba(34,211,238,.06);
    color: var(--accent-cyan);
    font-weight: 700;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    text-align: left;
    border-bottom: 2px solid rgba(34,211,238,.12);
}

.blog-table td {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255,255,255,.04);
    color: rgba(200,210,224,.85);
    font-size: .92rem;
    line-height: 1.55;
}

.blog-table td:first-child { font-weight: 600; color: #E5E7EB; }
.blog-table tbody tr:last-child td { border-bottom: none; }
.blog-table tbody tr { transition: background .2s; }
.blog-table tbody tr:hover td { background: rgba(34,211,238,.02); }

/* ============================================================
   FIX #8: Accordion / FAQ — better contrast and readability
   ============================================================ */
.accordion-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.accordion-item {
    background: rgba(25,33,58,.65);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color .3s, box-shadow .3s;
}

.accordion-item:hover {
    border-color: rgba(34,211,238,.15);
}

.accordion-header {
    width: 100%;
    padding: 18px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    border: none;
    color: #E5E7EB;
    font-weight: 600;
    font-size: .95rem;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    line-height: 1.5;
    transition: color .2s;
    gap: 16px;
}

.accordion-header:hover { color: var(--accent-cyan); }

.accordion-header .icon {
    width: 28px;
    height: 28px;
    min-width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    font-weight: 400;
    color: var(--accent-cyan);
    background: rgba(34,211,238,.06);
    border: 1px solid rgba(34,211,238,.12);
    border-radius: 50%;
    flex-shrink: 0;
    transition: all .35s cubic-bezier(.23,1,.32,1);
    line-height: 1;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height .45s cubic-bezier(.23,1,.32,1);
}

.accordion-content .inner {
    padding: 0 22px 20px;
    color: rgba(200,210,224,.85);
    line-height: 1.85;
    font-size: .94rem;
}

.accordion-content.open { max-height: 2000px; }

.accordion-item:has(.accordion-content.open) .accordion-header .icon {
    transform: rotate(45deg);
    background: rgba(34,211,238,.12);
    border-color: rgba(34,211,238,.25);
}

/* Timeline */
.timeline-list { position: relative; padding-left: 34px; }

.timeline-list::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 2px;
    height: calc(100% - 16px);
    background: linear-gradient(180deg, var(--accent-cyan), var(--accent-violet));
    border-radius: 2px;
}

.timeline-item { position: relative; padding-bottom: 24px; }
.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
    position: absolute;
    left: -39px;
    top: 6px;
    width: 10px;
    height: 10px;
    background: var(--accent-cyan);
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(34,211,238,.35);
    border: 2px solid var(--bg-primary);
}

.timeline-item h4 { font-size: .98rem; color: #E5E7EB; margin-bottom: 4px; }
.timeline-item p { font-size: .88rem; color: var(--text-muted); line-height: 1.65; margin: 0; }

/* ============================================================
   FIX #10: CTA Banner — consistent background
   ============================================================ */
.blog-cta {
    position: relative;
    padding: 48px 36px;
    border-radius: 20px;
    text-align: center;
    overflow: hidden;
    background: rgba(25,33,58,.8);
    border: 1px solid rgba(34,211,238,.12);
}

.blog-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(34,211,238,.05), rgba(139,92,246,.03), rgba(34,211,238,.05));
    background-size: 300% 300%;
    animation: bp-gradient-line 8s ease infinite;
}

.blog-cta::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue), var(--accent-violet));
}

.blog-cta h2 {
    color: #fff !important;
    justify-content: center;
    position: relative;
    z-index: 1;
    font-size: 1.45rem;
}

.blog-cta h2::before { display: none; }

.blog-cta p {
    color: rgba(200,210,224,.75) !important;
    position: relative;
    z-index: 1;
    max-width: 500px;
    margin: 0 auto 24px;
    font-size: 1rem;
}

.btn-accent {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 36px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    color: #0b0f1a;
    font-weight: 700;
    font-size: .95rem;
    border-radius: 12px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all .35s cubic-bezier(.23,1,.32,1);
    position: relative;
    z-index: 1;
    letter-spacing: .01em;
}

.btn-accent:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(34,211,238,.3);
}

/* When CTA is inside a blog-section, remove the double background */
.blog-section > .blog-cta {
    margin: -36px -32px;
    border: none;
    border-radius: 18px;
}

/* Checklist / Key Takeaways */
.checklist-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checklist-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px 20px;
    background: rgba(34,211,238,.03);
    border: 1px solid rgba(34,211,238,.08);
    border-radius: 12px;
    font-size: .95rem;
    color: rgba(200,210,224,.88);
    line-height: 1.7;
    transition: all .35s cubic-bezier(.23,1,.32,1);
}

.checklist-item:hover {
    background: rgba(34,211,238,.06);
    transform: translateX(4px);
    border-color: rgba(34,211,238,.15);
}

.check-icon {
    width: 22px;
    height: 22px;
    min-width: 22px;
    color: var(--accent-cyan);
    font-size: .7rem;
    margin-top: 2px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(34,211,238,.1);
    border-radius: 50%;
}

/* Numbered List */
.custom-numbered-list { counter-reset: num; list-style: none !important; padding: 0 !important; margin: 0; }

.custom-numbered-list li {
    counter-increment: num;
    position: relative;
    padding: 16px 0 16px 52px;
    border-bottom: 1px solid rgba(255,255,255,.05);
    font-size: .98rem;
    line-height: 1.7;
}

.custom-numbered-list li:last-child { border-bottom: none; }

.custom-numbered-list li::before {
    content: counter(num);
    position: absolute;
    left: 0;
    top: 16px;
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .85rem;
    color: #0b0f1a;
    font-family: var(--font-heading);
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.gallery-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 12px;
    cursor: zoom-in;
    border: 1px solid rgba(255,255,255,.06);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s cubic-bezier(.23,1,.32,1);
}

.gallery-item:hover img { transform: scale(1.06); }

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.06);
}

.video-container iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* ============================================================
   SIDEBAR (FIX #5: always visible on desktop)
   ============================================================ */
.bp-sidebar {
    position: relative;
    z-index: 1;
}

.bp-sidebar-sticky {
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* TOC Widget */
.bp-toc {
    background: rgba(25,33,58,.7);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 16px;
    overflow: hidden;
    transition: border-color .3s;
}

.bp-toc:hover {
    border-color: rgba(34,211,238,.1);
}

.bp-toc-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    font-weight: 600;
    font-size: .88rem;
    color: #E5E7EB;
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.bp-toc-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(34,211,238,.08);
    color: var(--accent-cyan);
    font-size: .72rem;
}

.bp-toc-body {
    max-height: 300px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(34,211,238,.2) transparent;
}

.bp-toc-body::-webkit-scrollbar { width: 4px; }
.bp-toc-body::-webkit-scrollbar-track { background: transparent; }
.bp-toc-body::-webkit-scrollbar-thumb {
    background: rgba(34,211,238,.2);
    border-radius: 4px;
}

.toc-list {
    list-style: none;
    padding: 12px 20px;
    margin: 0;
}

.toc-link {
    display: block;
    padding: 6px 0 6px 14px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: .82rem;
    line-height: 1.4;
    border-left: 2px solid rgba(255,255,255,.06);
    transition: all .25s cubic-bezier(.23,1,.32,1);
}

.toc-link:hover {
    color: #E5E7EB;
    border-left-color: rgba(34,211,238,.25);
    padding-left: 18px;
}

.toc-link.active {
    color: var(--accent-cyan);
    border-left-color: var(--accent-cyan);
    font-weight: 500;
    background: rgba(34,211,238,.03);
    border-radius: 0 8px 8px 0;
    padding-left: 18px;
}

.bp-toc-footer {
    border-top: 1px solid rgba(255,255,255,.05);
}

.bp-toc-progress {
    height: 3px;
    background: rgba(255,255,255,.03);
}

.bp-toc-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
    transition: width .2s ease-out;
}

.bp-toc-stats {
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
    font-size: .72rem;
    color: var(--text-muted);
}

.bp-toc-stats i {
    color: var(--accent-cyan);
    margin-right: 4px;
    font-size: .6rem;
}

/* Sidebar Card */
.bp-sb-card {
    background: rgba(25,33,58,.7);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 16px;
    padding: 18px 20px;
    transition: border-color .3s;
}

.bp-sb-card:hover { border-color: rgba(34,211,238,.1); }

.bp-sb-label {
    font-size: .74rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.bp-sb-label i {
    color: var(--accent-cyan);
    font-size: .65rem;
}

/* Tags */
.bp-tags, .blog-sidebar-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bp-tags span, .blog-sidebar-tags span {
    padding: 5px 12px;
    border-radius: 8px;
    font-size: .75rem;
    background: rgba(25,33,58,.6);
    border: 1px solid rgba(255,255,255,.07);
    color: rgba(200,210,224,.65);
    transition: all .3s cubic-bezier(.23,1,.32,1);
    cursor: default;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.bp-tags span::before, .blog-sidebar-tags span::before {
    content: '#';
    color: var(--accent-cyan);
    opacity: .5;
    font-weight: 700;
}

.bp-tags span:hover, .blog-sidebar-tags span:hover {
    border-color: rgba(34,211,238,.2);
    color: var(--accent-cyan);
    background: rgba(34,211,238,.05);
}

/* Share buttons sidebar */
.bp-share-buttons {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bp-share-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(25,33,58,.6);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 10px;
    color: rgba(200,210,224,.7);
    text-decoration: none;
    font-size: .82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .3s cubic-bezier(.23,1,.32,1);
    font-family: inherit;
}

.bp-share-btn i {
    font-size: .85rem;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.bp-share-btn:hover {
    background: rgba(34,211,238,.06);
    border-color: rgba(34,211,238,.15);
    color: var(--accent-cyan);
    transform: translateX(3px);
}

.bp-share-twitter:hover { color: #1DA1F2; border-color: rgba(29,161,242,.2); }
.bp-share-linkedin:hover { color: #0A66C2; border-color: rgba(10,102,194,.2); }

/* Newsletter CTA */
.bp-sb-cta {
    position: relative;
    background: rgba(25,33,58,.7);
    border: 1px solid rgba(34,211,238,.12);
    border-radius: 16px;
    padding: 24px 20px;
    text-align: center;
    overflow: hidden;
}

.bp-sb-cta-glow {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(34,211,238,.1), transparent 70%);
    pointer-events: none;
}

.bp-sb-cta-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(34,211,238,.08);
    border: 1px solid rgba(34,211,238,.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    color: var(--accent-cyan);
    font-size: 1.1rem;
    position: relative;
    animation: bp-glow 3s ease infinite;
}

.bp-sb-cta h4 {
    font-size: .92rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
    position: relative;
}

.bp-sb-cta p {
    font-size: .78rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 14px;
    position: relative;
}

.bp-sb-cta form {
    display: flex;
    gap: 6px;
    position: relative;
}

.bp-sb-input {
    flex: 1;
    padding: 10px 14px;
    background: rgba(8,12,24,.5);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 8px;
    color: #E5E7EB;
    font-size: .82rem;
    outline: none;
    transition: border-color .3s, box-shadow .3s;
    min-width: 0;
    font-family: inherit;
}

.bp-sb-input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(34,211,238,.08);
}

.bp-sb-input::placeholder { color: var(--text-muted); }

.bp-sb-btn {
    width: 40px;
    min-width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    color: #0b0f1a;
    border: none;
    border-radius: 8px;
    font-size: .85rem;
    cursor: pointer;
    transition: all .3s cubic-bezier(.23,1,.32,1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bp-sb-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(34,211,238,.3);
}

/* ============================================================
   EXTRAS — snippet, howto, entities, trust, definitions
   ============================================================ */

/* Snippet box */
.snippet-box {
    position: relative;
    background: rgba(34,211,238,.03);
    border: 1px solid rgba(34,211,238,.12);
    border-radius: 14px;
    padding: 24px 28px;
    overflow: hidden;
}

.snippet-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
    border-radius: 14px 14px 0 0;
}

.snippet-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .7px;
    color: var(--accent-cyan);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.snippet-label i { font-size: .72rem; }
.snippet-box p { font-size: 1rem; line-height: 1.75; color: #E5E7EB; margin: 0; }

/* HowTo Steps */
.howto-steps { display: flex; flex-direction: column; }

.howto-step {
    display: flex;
    gap: 20px;
    padding: 22px 0;
    border-bottom: 1px solid rgba(255,255,255,.05);
    align-items: flex-start;
}

.howto-step:last-child { border-bottom: none; }

.howto-step-num {
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .95rem;
    color: #0b0f1a;
    flex-shrink: 0;
    transition: all .35s cubic-bezier(.23,1,.32,1);
    box-shadow: 0 4px 16px rgba(34,211,238,.15);
}

.howto-step:hover .howto-step-num {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(34,211,238,.3);
}

.howto-step-content { flex: 1; min-width: 0; }
.howto-step-content h3 { font-size: 1.05rem; font-weight: 600; color: #fff; margin: 2px 0 6px; }
.howto-step-content p { font-size: .92rem; color: rgba(200,210,224,.78); line-height: 1.7; margin: 0; }

/* ============================================================
   FIX #7: Entity chips — larger, more readable
   ============================================================ */
.entity-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.entity-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(25,33,58,.7);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 999px;
    transition: all .3s cubic-bezier(.23,1,.32,1);
    cursor: default;
}

.entity-chip:hover {
    border-color: rgba(34,211,238,.2);
    background: rgba(34,211,238,.05);
    transform: translateY(-2px);
}

.entity-name {
    font-size: .9rem;
    font-weight: 600;
    color: #E5E7EB;
    transition: color .25s;
}

.entity-chip:hover .entity-name { color: var(--accent-cyan); }

.entity-type {
    font-size: .66rem;
    color: rgba(34,211,238,.8);
    text-transform: uppercase;
    letter-spacing: .3px;
    padding: 3px 8px;
    background: rgba(34,211,238,.08);
    border-radius: 6px;
    font-weight: 500;
}

/* Trust bar */
.trust-bar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.trust-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: rgba(25,33,58,.7);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 12px;
    transition: border-color .3s;
}

.trust-item:hover { border-color: rgba(34,211,238,.1); }

.trust-item > i {
    color: var(--accent-cyan);
    font-size: 1rem;
    margin-top: 2px;
    width: 1rem;
    text-align: center;
}

.trust-label {
    display: block;
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .3px;
    color: var(--text-muted);
    margin-bottom: 3px;
}

.trust-value {
    display: block;
    font-size: .88rem;
    font-weight: 600;
    color: #E5E7EB;
    line-height: 1.3;
}

/* Author role */
.author-role {
    display: block;
    font-size: .72rem;
    font-weight: 400;
    color: rgba(255,255,255,.3);
}

/* ============================================================
   FIX #9: Definitions — better spacing between dt/dd
   ============================================================ */
.blog-definitions { margin: 0; }

.blog-definitions dt {
    font-weight: 700;
    color: var(--accent-cyan);
    font-size: .96rem;
    margin-top: 24px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(34,211,238,.1);
}

.blog-definitions dt:first-child { margin-top: 0; }

.blog-definitions dd {
    color: rgba(200,210,224,.85);
    line-height: 1.8;
    margin: 8px 0 0;
    padding: 10px 0 10px 18px;
    border-left: 3px solid rgba(34,211,238,.12);
    font-size: .94rem;
}

/* Related links */
.blog-related-links { list-style: none !important; padding: 0 !important; margin: 0; }

.blog-related-links li {
    border-bottom: 1px solid rgba(255,255,255,.04);
}

.blog-related-links li:last-child { border-bottom: none; }

.blog-related-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    color: rgba(200,210,224,.82);
    text-decoration: none !important;
    font-size: .92rem;
    transition: all .25s cubic-bezier(.23,1,.32,1);
    border-bottom: none !important;
}

.blog-related-links a:hover {
    color: var(--accent-cyan);
    padding-left: 6px;
}

.blog-related-links a i {
    font-size: .65rem;
    color: var(--accent-cyan);
    transition: transform .25s;
    flex-shrink: 0;
}

.blog-related-links a:hover i { transform: translateX(3px); }

/* Citations */
.blog-citations { padding-left: 20px; margin: 0; }

.blog-citations li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,.04);
    font-size: .9rem;
    color: rgba(200,210,224,.78);
    line-height: 1.65;
}

.blog-citations li:last-child { border-bottom: none; }
.blog-citations a { color: var(--accent-cyan); text-decoration: none; }
.blog-citations a:hover { text-decoration: underline; }

/* ============================================================
   FIX #12: Related Posts — consistent card layout
   ============================================================ */
.bp-related {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid rgba(255,255,255,.06);
}

.bp-related-header {
    margin-bottom: 24px;
}

.bp-related-label {
    display: block;
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--accent-cyan);
    margin-bottom: 6px;
}

.bp-related-header h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.bp-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* ============================================================
   BACK TO TOP
   ============================================================ */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 42px;
    height: 42px;
    background: rgba(25,33,58,.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(34,211,238,.15);
    color: var(--accent-cyan);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all .35s cubic-bezier(.23,1,.32,1);
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(34,211,238,.15);
    border-color: rgba(34,211,238,.3);
}

/* ============================================================
   PROGRESS BAR (old selectors for backward compat)
   ============================================================ */
.progress-bar-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 10000;
    background: transparent;
    pointer-events: none;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
    width: 0%;
    transition: width .1s;
}

/* ============================================================
   LIGHT THEME SUPPORT
   ============================================================ */
[data-theme="light"] .bp-hero-overlay {
    background: linear-gradient(180deg,
        rgba(255,255,255,.3) 0%,
        rgba(255,255,255,.5) 35%,
        rgba(255,255,255,.85) 65%,
        rgba(255,255,255,.97) 85%,
        var(--bg-primary) 100%);
}

[data-theme="light"] .blog-section {
    background: rgba(255,255,255,.7);
    border-color: rgba(0,0,0,.06);
    backdrop-filter: blur(20px);
}

[data-theme="light"] .blog-section:hover {
    border-color: rgba(34,211,238,.15);
    box-shadow: 0 8px 32px rgba(0,0,0,.06);
}

[data-theme="light"] .blog-section h2 { color: var(--text-primary); }
[data-theme="light"] .blog-section p { color: var(--text-secondary); }
[data-theme="light"] .blog-section li { color: var(--text-secondary); }
[data-theme="light"] .blog-section strong { color: var(--text-primary); }

[data-theme="light"] .bp-hero-title { color: var(--text-primary); text-shadow: none; }

[data-theme="light"] .feature-card,
[data-theme="light"] .stat-item,
[data-theme="light"] .accordion-item {
    background: rgba(255,255,255,.6);
    border-color: rgba(0,0,0,.06);
}

[data-theme="light"] .bp-toc,
[data-theme="light"] .bp-sb-card,
[data-theme="light"] .bp-sb-cta {
    background: rgba(255,255,255,.7);
    border-color: rgba(0,0,0,.06);
}

[data-theme="light"] .bp-hero-meta-bar {
    background: rgba(0,0,0,.04);
    border-color: rgba(0,0,0,.06);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
    .bp-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .bp-sidebar-sticky { position: static; }
    .bp-sidebar { order: -1; }
    .bp-toc { display: none; }

    /* Show share + tags on mobile at top */
    .bp-sb-card,
    .bp-sb-cta {
        display: block;
    }
}

@media (max-width: 768px) {
    .bp-hero {
        min-height: 55vh;
        padding: 120px 0 48px;
    }

    .bp-hero-title { font-size: clamp(1.5rem, 6vw, 2.1rem); }

    .bp-main { padding: 0 16px 60px; }
    .bp-layout { padding-top: 24px; }

    .bp-related-grid { grid-template-columns: 1fr; }

    .section-text-image { flex-direction: column !important; gap: 20px; }
    .section-text-image .media { flex: 1; }

    .blog-section .card-grid.grid-3,
    .blog-section .card-grid.grid-2 {
        grid-template-columns: 1fr !important;
    }

    .blog-cta { padding: 36px 24px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }

    .bp-hero-share { display: none; }
    .bp-hero-meta-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .blog-section {
        padding: 28px 22px;
        border-radius: 14px;
    }

    .blog-section > .blog-cta {
        margin: -28px -22px;
    }

    .trust-bar { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .bp-hero {
        min-height: 45vh;
        padding: 100px 0 36px;
    }

    .bp-author { gap: 10px; }
    .bp-author-img {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px;
        max-width: 36px;
        min-height: 36px;
        max-height: 36px;
    }
    .bp-breadcrumb { font-size: .74rem; }
    .blog-section h2 { font-size: 1.2rem; }
    .trust-bar { grid-template-columns: 1fr; }
    .blog-section {
        padding: 22px 16px;
        border-radius: 12px;
    }
    .blog-section > .blog-cta {
        margin: -22px -16px;
    }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .bp-hero-meta-bar { padding: 10px 12px; border-radius: 12px; }
    .entity-chip { padding: 8px 14px; }
    .entity-name { font-size: .82rem; }
}

@media (prefers-reduced-motion: reduce) {
    .blog-post-page .reveal { opacity: 1; transform: none; transition: none; }
    .bp-hero-line, .blog-cta::before { animation: none !important; }
    .bp-sb-cta-icon { animation: none !important; }
    .bp-hero-bg img { transition: none; }
    .bp-hero-inner { animation: none; }
}
