/* =============================================================================
   BLOG SINGLE POST — DESIGN TOKENS
   ============================================================================= */

:root {
    --bsp-primary:        #4F46E5;
    --bsp-primary-hover:  #4338CA;
    --bsp-surface:        #FFFFFF;
    --bsp-surface-2:      #F8FAFC;
    --bsp-border:         #E2E8F0;
    --bsp-text-primary:   #0F172A;
    --bsp-text-secondary: #475569;
    --bsp-text-muted:     #94A3B8;
    --bsp-shadow-sm:      0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --bsp-shadow-md:      0 4px 6px -1px rgba(0,0,0,.08), 0 2px 4px -2px rgba(0,0,0,.06);
    --bsp-radius-sm:      8px;
    --bsp-radius-md:      12px;
    --bsp-font:           -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
    --bsp-hero-min-height: 460px;
}

/* =============================================================================
   GLOBAL RESET (scoped)
   ============================================================================= */

.bsp-hero *,
.bsp-hero *::before,
.bsp-hero *::after,
.bsp-article *,
.bsp-article *::before,
.bsp-article *::after {
    box-sizing: border-box;
}

/* =============================================================================
   HERO BANNER
   ============================================================================= */

.bsp-hero {
    position: relative;
    width: 100%;
    min-height: var(--bsp-hero-min-height);
    display: flex;
    align-items: flex-end;
    overflow: hidden;

    /* Fallback gradient when no featured image */
    background: linear-gradient(135deg, #1E1B4B 0%, #312E81 50%, #4C1D95 100%);
}

/* Featured image background */
.bsp-hero--has-image {
    background-image: var(--bsp-hero-bg);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* Dark gradient overlay for text readability */
.bsp-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.15) 0%,
        rgba(0, 0, 0, 0.35) 40%,
        rgba(0, 0, 0, 0.75) 100%
    );
    z-index: 1;
}

/* Inner content wrapper */
.bsp-hero__inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 24px 52px;
}

/* Category badges */
.bsp-hero__cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.bsp-hero__cat-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    background: var(--bsp-primary);
    color: #fff !important;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    border-radius: 100px;
    text-decoration: none;
    transition: background .2s ease;
}

.bsp-hero__cat-badge:hover {
    background: var(--bsp-primary-hover);
    text-decoration: none;
    color: #fff !important;
}

/* Post title */
.bsp-hero__title {
    font-family: var(--bsp-font);
    font-size: clamp(1.75rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.2;
    color: #ffffff !important;
    margin: 0 0 24px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
    letter-spacing: -0.02em;
}

/* Meta row */
.bsp-hero__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, .85);
    font-size: 14px;
    font-weight: 500;
}

.bsp-hero__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.bsp-hero__meta-item svg {
    flex-shrink: 0;
    opacity: .8;
}

.bsp-hero__meta-sep {
    opacity: .5;
    font-size: 18px;
    line-height: 1;
}

/* =============================================================================
   ARTICLE BODY
   ============================================================================= */

.bsp-article {
    background: var(--bsp-surface);
}

.bsp-article__container {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    padding: 0px 24px 0px;
}

/* Content typography */
.bsp-article__body {
    font-family: var(--bsp-font);
    font-size: 17px;
    line-height: 1.8;
    color: var(--bsp-text-primary);
}

.bsp-article__body h2,
.bsp-article__body h3,
.bsp-article__body h4 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--bsp-text-primary);
    margin: 2em 0 .6em;
}

.bsp-article__body h2 { font-size: 1.6rem; }
.bsp-article__body h3 { font-size: 1.3rem; }
.bsp-article__body h4 { font-size: 1.1rem; }

.bsp-article__body p {
    margin: 0 0 1.4em;
}

.bsp-article__body a {
    color: var(--bsp-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.bsp-article__body a:hover {
    color: var(--bsp-primary-hover);
}

.bsp-article__body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--bsp-radius-md);
    margin: 1.5em 0;
}

.bsp-article__body blockquote {
    margin: 2em 0;
    padding: 20px 28px;
    border-left: 4px solid var(--bsp-primary);
    background: var(--bsp-surface-2);
    border-radius: 0 var(--bsp-radius-sm) var(--bsp-radius-sm) 0;
    color: var(--bsp-text-secondary);
    font-style: italic;
    font-size: 1.05em;
}

.bsp-article__body blockquote p:last-child {
    margin-bottom: 0;
}

.bsp-article__body ul,
.bsp-article__body ol {
    padding-left: 1.5em;
    margin: 0 0 1.4em;
}

.bsp-article__body li {
    margin-bottom: .5em;
}

.bsp-article__body pre {
    background: #1E293B;
    color: #E2E8F0;
    padding: 20px 24px;
    border-radius: var(--bsp-radius-sm);
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.6;
    margin: 1.5em 0;
}

.bsp-article__body code {
    background: #F1F5F9;
    color: #7C3AED;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: .9em;
}

.bsp-article__body pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.bsp-article__body hr {
    border: none;
    border-top: 1px solid var(--bsp-border);
    margin: 2.5em 0;
}

/* Tags */
.bsp-article__tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 48px;
    padding-top: 28px;
    border-top: 1px solid var(--bsp-border);
    font-size: 14px;
    color: var(--bsp-text-secondary);
}

.bsp-article__tag-label {
    font-weight: 600;
    color: var(--bsp-text-primary);
    margin-right: 4px;
}

.bsp-article__tags a {
    display: inline-flex;
    align-items: center;
    padding: 4px 14px;
    background: var(--bsp-surface-2);
    border: 1px solid var(--bsp-border);
    border-radius: 100px;
    color: var(--bsp-text-secondary) !important;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all .2s ease;
}

.bsp-article__tags a:hover {
    background: var(--bsp-primary);
    border-color: var(--bsp-primary);
    color: #fff !important;
}

/* Back to blog link */
.bsp-article__back {
    margin-top: 48px;
}

.bsp-article__back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--bsp-text-secondary) !important;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .02em;
    transition: color .2s ease, gap .2s ease;
}

.bsp-article__back-link:hover {
    color: var(--bsp-primary) !important;
    gap: 12px;
    text-decoration: none;
}

.bsp-article__back-link svg {
    flex-shrink: 0;
    transition: transform .2s ease;
}

.bsp-article__back-link:hover svg {
    transform: translateX(-3px);
}

/* =============================================================================
   ELEMENTOR PAGE TITLE — HIDE DEFAULT (we render our own in the banner)
   ============================================================================= */

.single .page-header {
    display: none !important;
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

@media (max-width: 768px) {
    :root {
        --bsp-hero-min-height: 360px;
    }

    .bsp-hero__inner {
        padding: 48px 20px 40px;
    }

    .bsp-hero__title {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    .bsp-article__container {
        padding: 40px 20px 60px;
    }

    .bsp-article__body {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    :root {
        --bsp-hero-min-height: 300px;
    }

    .bsp-hero__inner {
        padding: 36px 16px 32px;
    }

    .bsp-hero__meta {
        font-size: 13px;
        gap: 6px;
    }

    .bsp-article__container {
        padding: 32px 16px 48px;
    }
}
