/**
 * Branwell CTA — plugin styles
 * Handle: bw-styles-cta
 *
 * Option D long-form layout: narrow reading column for body prose, inline
 * full-column 16:9 images, soft palette-tinted CTA card at the bottom.
 * Scoped under #bw-cta-panel so nothing leaks.
 *
 * Plugin owns:
 *   - reading-column width + inline image styling
 *   - paragraph rhythm WITHIN the article
 *   - the footer CTA card
 *   - the stats credit line
 *
 * Plugin does NOT own:
 *   - body font, body colour, container max-width  (theme owns)
 *   - heading defaults                              (theme owns)
 *   - the section header at the top                 (theme partial)
 *
 * Palette: all colours via var(--color-*) tokens.
 */

#bw-cta-panel {
    box-sizing: border-box;
    width: 100%;
    /* No horizontal padding or margin on root — theme content wrapper
       controls width. The article + CTA band manage their own internal
       constraints below. */
    margin: 0;
    padding: 0;
    background: transparent;
}
#bw-cta-panel *,
#bw-cta-panel *::before,
#bw-cta-panel *::after {
    box-sizing: border-box;
}

/* ============================================================
   Credit line — replaces the legacy 3-stat-box grid
   ============================================================ */
#bw-cta-panel .bw-cta__credit {
    margin: 4px 0 28px;
    font-size: 0.85rem;
    line-height: 1.5;
    color: inherit;
    opacity: 0.7;
    /* No horizontal padding — sits flush with the section header above */
}
#bw-cta-panel .bw-cta__credit-strong {
    font-weight: 600;
    color: inherit;
    opacity: 1;
}
#bw-cta-panel .bw-cta__credit-sep {
    margin: 0 8px;
    opacity: 0.4;
}

/* ============================================================
   Article — flush left, no horizontal centering
   ============================================================ */
#bw-cta-panel .bw-cta__article {
    /* No max-width, no auto-centering. Theme container controls width.
       Removing this was the cause of the giant left gutter — centering
       a narrow column inside a wide parent visually behaves like a
       huge left margin. */
    margin: 0;
    padding: 0;
}

/* Paragraph rhythm inside the article. Sized in rem so the theme's
   root font-size still controls scale. Left-aligned (not justified
   like the legacy plugin) — justified text creates ragged "rivers"
   on narrow columns and is dated. */
#bw-cta-panel .bw-cta__article p {
    margin: 0 0 1.1em;
    font-size: 1rem;
    line-height: 1.75;
    text-align: left;
    color: inherit;
}
#bw-cta-panel .bw-cta__article p:last-child {
    margin-bottom: 0;
}

/* Strong / inline links inside the body */
#bw-cta-panel .bw-cta__article strong {
    font-weight: 600;
    color: inherit;
}
#bw-cta-panel .bw-cta__article a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.15s ease;
}
#bw-cta-panel .bw-cta__article a:hover,
#bw-cta-panel .bw-cta__article a:focus-visible {
    text-decoration: underline;
    text-underline-offset: 3px;
    outline: none;
}

/* Section subheadings inside the article */
#bw-cta-panel .bw-cta__h3 {
    margin: 1.75em 0 0.6em;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
    color: inherit;
}

/* ============================================================
   Inline images — 16:9, full reading-column width
   ============================================================ */
#bw-cta-panel .bw-cta__figure {
    margin: 1.75em 0;
    padding: 0;
}
#bw-cta-panel .bw-cta__figure img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center;
    border-radius: 16px;
    /* If source isn't 16:9, object-fit crops to fill the rounded box */
}

/* ============================================================
   Footer CTA card — soft palette-tinted, no starfield, no gradient
   ============================================================ */
#bw-cta-panel .bw-cta__band {
    margin: 2.5rem 0 0;
    padding: 32px 32px;
    background: var(--color-background-info);
    border-radius: 18px;
    text-align: center;
}
#bw-cta-panel .bw-cta__band-title {
    margin: 0 0 10px;
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.25;
    color: inherit;
}
#bw-cta-panel .bw-cta__band-lede {
    margin: 0 0 22px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: inherit;
    opacity: 0.8;
}
#bw-cta-panel .bw-cta__band-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    background: var(--color-primary);
    color: var(--color-background-primary, #ffffff);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 999px;
    transition: opacity 0.15s ease, transform 0.15s ease;
}
#bw-cta-panel .bw-cta__band-btn:hover,
#bw-cta-panel .bw-cta__band-btn:focus-visible {
    opacity: 0.9;
    transform: translateY(-1px);
    outline: none;
    text-decoration: none;
    color: var(--color-background-primary, #ffffff);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
    #bw-cta-panel .bw-cta__credit {
        font-size: 0.78rem;
    }
    #bw-cta-panel .bw-cta__article p {
        font-size: 0.95rem;
        line-height: 1.7;
    }
    #bw-cta-panel .bw-cta__h3 {
        font-size: 1.12rem;
        margin-top: 1.5em;
    }
    #bw-cta-panel .bw-cta__figure {
        margin: 1.4em 0;
    }
    #bw-cta-panel .bw-cta__band {
        padding: 26px 22px;
    }
    #bw-cta-panel .bw-cta__band-title {
        font-size: 1.2rem;
    }
}
@media (max-width: 480px) {
    /* Stats credit line wraps on narrow screens — separators get
       awkward, so swap them for line breaks visually by hiding the
       middle dots and letting natural wrap take over. */
    #bw-cta-panel .bw-cta__credit-sep {
        margin: 0 6px;
        opacity: 0.3;
    }
    #bw-cta-panel .bw-cta__figure img {
        border-radius: 12px;
    }
    #bw-cta-panel .bw-cta__band {
        border-radius: 14px;
    }
}
