/* =============================================================================
 * Blog CTA hero banner  (Add/Edit Blog add-on)
 * Rendered in-body on blog posts by blog_render_cta(). All selectors are
 * namespaced .blog-cta-banner* so nothing here can touch existing blog styles.
 * Brand system: Poppins, soft-peach card, #FFB940->#FF1EA4 gradient, #7F1EFF accents.
 * ========================================================================== */

.blog-cta-banner {
    --bcb-grad: linear-gradient(90deg, #ffb940, #ff1ea4);
    --bcb-purple: #7f1eff;
    --bcb-ink: #14133b;
    --bcb-muted: #6b6b83;
    font-family: Poppins, -apple-system, "Segoe UI", Roboto, sans-serif;
    display: block;
    margin: 2.5rem 0;
    padding: clamp(1.5rem, 3vw, 3rem);
    border-radius: 24px;
    background-image: linear-gradient(135deg, #fff6f2 0%, #ffeef4 55%, #ffe7ef 100%);
    box-shadow: 0 24px 48px rgba(255, 30, 164, 0.12);
    color: var(--bcb-ink);
    box-sizing: border-box;
}

.blog-cta-banner *,
.blog-cta-banner *::before,
.blog-cta-banner *::after {
    box-sizing: border-box;
}

.blog-cta-banner__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: clamp(1.5rem, 3vw, 3rem);
}

/* ---- Left: copy + actions ------------------------------------------------ */
.blog-cta-banner__content {
    flex: 1 1 320px;
    min-width: 0;
}

.blog-cta-banner__headline {
    margin: 0 0 0.85rem;
    font-size: clamp(1.5rem, 2.6vw, 2.25rem);
    line-height: 1.15;
    font-weight: 700;
    color: var(--bcb-ink);
}

.blog-cta-banner__desc {
    margin: 0 0 1.5rem;
    font-size: clamp(0.95rem, 1.2vw, 1.05rem);
    line-height: 1.6;
    color: var(--bcb-muted);
}

.blog-cta-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.blog-cta-banner__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.6rem;
    border-radius: 99px;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.blog-cta-banner__btn:hover {
    transform: translateY(-2px);
    text-decoration: none;
}

/* The banner sits inside .swi-blog-content-container, whose `a { color:#7f1eff }`
   rule (main.css) would otherwise tint the button text. Scope with the anchor to
   win on specificity and keep the label white. */
.blog-cta-banner a.blog-cta-banner__btn--primary,
.blog-cta-banner a.blog-cta-banner__btn--primary:hover {
    color: #fff;
}

.blog-cta-banner__btn--primary {
    background-image: var(--bcb-grad);
    box-shadow: 0 10px 22px rgba(255, 30, 164, 0.28);
}

.blog-cta-banner__btn--primary:hover {
    box-shadow: 0 14px 26px rgba(255, 30, 164, 0.36);
}

.blog-cta-banner a.blog-cta-banner__btn--secondary,
.blog-cta-banner a.blog-cta-banner__btn--secondary:hover {
    color: var(--bcb-purple);
}

.blog-cta-banner__btn--secondary {
    background: #fff;
    border: 1px solid rgba(127, 30, 255, 0.35);
}

.blog-cta-banner__btn--secondary:hover {
    border-color: var(--bcb-purple);
}

/* ---- Right: visual (webp image when provided, else the HTML/CSS mock) ----- */
.blog-cta-banner__visual {
    flex: 1 1 340px;
    min-width: 0;
}

/* Image variant: the tagged *-blog-cta.webp (mobile <source> swaps in <768px). */
.blog-cta-banner__visual--image {
    display: block;
    line-height: 0; /* trim inline-image whitespace */
}

.blog-cta-banner__visual-img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
}

/* Mock fallback (used by any category without an image, e.g. payroll). */
.blog-cta-banner__visual--mock {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 0;
    padding-bottom: 1.75rem; /* room for the overlapping footer chip */
}

.blog-cta-banner__steps {
    flex: 0 1 44%;
    align-self: center;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 16px 34px rgba(20, 19, 59, 0.10);
    padding: 1.4rem 1.1rem;
    position: relative;
    z-index: 2;
    margin-right: -1.25rem; /* tuck under the panel like the design */
}

.blog-cta-banner__steps-list {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: none;
}

.blog-cta-banner__step {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.5rem 0;
}

/* dashed connector between the numbered dots */
.blog-cta-banner__step:not(:last-child) .blog-cta-banner__step-num::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1rem;
    border-left: 2px dashed rgba(255, 30, 164, 0.4);
}

.blog-cta-banner__step-num {
    position: relative;
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
}

.blog-cta-banner__step:nth-child(1) .blog-cta-banner__step-num { background: #ffb940; }
.blog-cta-banner__step:nth-child(2) .blog-cta-banner__step-num { background: #ff6b73; }
.blog-cta-banner__step:nth-child(3) .blog-cta-banner__step-num { background: #ff1ea4; }

.blog-cta-banner__step-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--bcb-ink);
}

.blog-cta-banner__panel {
    flex: 1 1 56%;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 20px 44px rgba(20, 19, 59, 0.14);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.blog-cta-banner__panel-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid #f0eef5;
}

.blog-cta-banner__panel-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--bcb-ink);
}

.blog-cta-banner__panel-brand-mark {
    width: 16px;
    height: 16px;
    border-radius: 5px;
    background-image: var(--bcb-grad);
}

.blog-cta-banner__panel-pill {
    width: 34px;
    height: 6px;
    border-radius: 99px;
    background: #e7e5ef;
}

.blog-cta-banner__panel-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem 1.25rem 1.75rem;
}

.blog-cta-banner__panel-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(127, 30, 255, 0.12);
    color: var(--bcb-purple);
    margin-bottom: 0.9rem;
}

.blog-cta-banner__panel-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--bcb-ink);
    line-height: 1.2;
}

.blog-cta-banner__panel-sub {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--bcb-purple);
    margin-bottom: 1rem;
}

.blog-cta-banner__skeleton {
    width: 100%;
    height: 8px;
    border-radius: 99px;
    background: #eeecf3;
    margin-top: 0.55rem;
}

.blog-cta-banner__skeleton--short {
    width: 62%;
}

.blog-cta-banner__chip {
    position: absolute;
    right: 0.5rem;
    bottom: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 14px 30px rgba(20, 19, 59, 0.16);
    padding: 0.6rem 0.9rem;
    z-index: 3;
}

.blog-cta-banner__chip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(127, 30, 255, 0.12);
    color: var(--bcb-purple);
}

.blog-cta-banner__chip-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--bcb-ink);
}

/* ---- Tablet: keep two columns, ease the overlap -------------------------- */
@media (max-width: 991px) {
    .blog-cta-banner__steps {
        margin-right: -0.75rem;
        padding: 1.1rem 0.85rem;
    }
    .blog-cta-banner__panel-title { font-size: 1.15rem; }
}

/* ---- Mobile: stack; content leads, visual simplifies -------------------- */
@media (max-width: 767px) {
    .blog-cta-banner__inner {
        flex-direction: column;
        align-items: stretch;
    }
    .blog-cta-banner__visual--mock {
        flex-direction: column;
        align-items: center;
        padding-bottom: 0;
    }
    /* The numbered-steps card is decorative reinforcement of the panel; drop it
       on small screens per the mobile design so the panel + chip read cleanly. */
    .blog-cta-banner__steps {
        display: none;
    }
    .blog-cta-banner__panel {
        width: 100%;
        max-width: 340px;
    }
    .blog-cta-banner__chip {
        position: static;
        margin-top: 1rem;
        align-self: center;
    }
    .blog-cta-banner__actions {
        justify-content: flex-start;
    }
}

/* =============================================================================
 * Sticky CTA footer  — fixed pill bar at the bottom of a category-tagged post.
 * Separate from the in-body banner; shares the brand tokens.
 * ========================================================================== */
.blog-cta-footer {
    --bcb-grad: linear-gradient(90deg, #ffb940, #ff1ea4);
    --bcb-purple: #7f1eff;
    position: fixed;
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%);
    z-index: 1000;
    max-width: calc(100% - 1.5rem);
    font-family: Poppins, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.blog-cta-footer__inner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff;
    border-radius: 99px;
    box-shadow: 0 12px 34px rgba(20, 19, 59, 0.22);
    padding: 0.5rem 0.55rem;
}

.blog-cta-footer__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    padding: 0.65rem 1.4rem;
    border-radius: 99px;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.blog-cta-footer__btn:hover {
    transform: translateY(-2px);
    text-decoration: none;
}

.blog-cta-footer__btn--action {
    color: #fff;
    background: var(--bcb-purple);
    box-shadow: 0 8px 18px rgba(127, 30, 255, 0.30);
}

.blog-cta-footer__btn--action:hover {
    color: #fff;
    box-shadow: 0 12px 22px rgba(127, 30, 255, 0.38);
}

.blog-cta-footer__btn--pricing {
    color: var(--bcb-purple);
    background: rgba(127, 30, 255, 0.10);
}

.blog-cta-footer__btn--pricing:hover {
    color: var(--bcb-purple);
    background: rgba(127, 30, 255, 0.16);
}

@media (max-width: 767px) {
    .blog-cta-footer {
        left: 0.75rem;
        right: 0.75rem;
        bottom: 0.75rem;
        transform: none;
        max-width: none;
    }
    .blog-cta-footer__inner {
        justify-content: center;
    }
    .blog-cta-footer__btn {
        flex: 1 1 auto;
        padding: 0.65rem 0.75rem;
        font-size: 0.88rem;
    }
}
