/* ==========================================================================
 * KIFC Newsletter — single-newsletter editorial layer
 * Theme-owned layout and accessibility overrides. The plugin keeps CPT/meta.
 * ========================================================================== */

body.single-newsletter {
    --fnc-nl-ink: var(--wp--preset--color--on-surface, #171b19);
    --fnc-nl-muted: var(--wp--preset--color--on-surface-variant, #4a524d);
    --fnc-nl-primary: var(--wp--preset--color--primary, #17463f);
    --fnc-nl-line: var(--wp--preset--color--outline-variant, #c7cec7);
    background: var(--wp--preset--color--surface, #f8f7f3);
}

body.single-newsletter .fnc-nl-shell,
body.single-newsletter .fnc-nl-stage,
body.single-newsletter .fnc-nl-cta-stage {
    box-sizing: border-box;
    padding-right: clamp(1rem, 5vw, 4rem) !important;
    padding-left: clamp(1rem, 5vw, 4rem) !important;
}

body.single-newsletter .fnc-nl-shell--breadcrumb {
    padding-top: clamp(1.5rem, 4vw, 3rem) !important;
}

body.single-newsletter .fnc-article-breadcrumbs a {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
}

body.single-newsletter .fnc-nl-hero-card {
    min-height: clamp(18rem, 34vw, 22rem);
    overflow: hidden;
    border: 1px solid rgba(23, 70, 63, 0.12);
    border-radius: 1.25rem;
    box-shadow: 0 24px 60px rgba(23, 70, 63, 0.15);
}

body.single-newsletter .fnc-nl-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.single-newsletter .fnc-nl-hero-overlay {
    background:
        linear-gradient(90deg, rgba(9, 31, 27, 0.76) 0%, rgba(9, 31, 27, 0.25) 70%),
        linear-gradient(0deg, rgba(9, 31, 27, 0.64) 0%, transparent 62%);
}

body.single-newsletter .fnc-nl-hero-content {
    gap: 0.875rem;
    padding: clamp(2rem, 6vw, 4rem);
}

body.single-newsletter .fnc-nl-hero-brand {
    font-family: var(--wp--preset--font-family--label, "Public Sans", sans-serif);
}

body.single-newsletter .fnc-nl-hero-title {
    max-width: 18ch;
    margin: 0 !important;
    padding: 0 !important;
    color: #fff !important;
    font-family: var(--wp--preset--font-family--headline, Manrope, sans-serif);
    font-size: clamp(2rem, 4.5vw, 3.25rem) !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    letter-spacing: -0.04em;
    text-align: left !important;
}

body.single-newsletter .fnc-nl-hero-date-wrap {
    font-family: var(--wp--preset--font-family--label, "Public Sans", sans-serif);
    font-size: 0.875rem;
    font-weight: 650;
}

body.single-newsletter .fnc-nl-stage {
    padding-top: clamp(2rem, 5vw, 4rem) !important;
    padding-bottom: clamp(1.5rem, 4vw, 3rem) !important;
    background:
        radial-gradient(circle at 14% 8%, rgba(47, 111, 98, 0.08), transparent 24rem),
        var(--wp--preset--color--surface-container-low, #f3f5f2) !important;
}

body.single-newsletter .fnc-nl-single-body {
    box-sizing: border-box;
    width: min(100%, 820px);
    padding: clamp(2rem, 6vw, 4.5rem) !important;
    overflow: hidden;
    border: 1px solid rgba(23, 70, 63, 0.1);
    border-radius: 1.25rem;
    background: #fff;
    box-shadow: 0 20px 56px rgba(23, 70, 63, 0.1);
}

body.single-newsletter .fnc-nl-single-body .wp-block-post-content,
body.single-newsletter .fnc-nl-single-body .entry-content {
    box-sizing: border-box;
    width: 100%;
    max-width: 680px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    color: var(--fnc-nl-ink);
    background: transparent;
    box-shadow: none;
    font-size: 1.0625rem;
    line-height: 1.82;
}

body.single-newsletter .fnc-nl-single-body .wp-block-post-content > p:first-of-type,
body.single-newsletter .fnc-nl-single-body .entry-content > p:first-of-type {
    margin: 0 0 2.5rem;
    padding: 0 0 2rem;
    border-bottom: 1px solid var(--fnc-nl-line);
    color: var(--fnc-nl-ink);
    font-size: clamp(1.0625rem, 2vw, 1.1875rem);
    font-weight: 550;
    line-height: 1.78;
}

body.single-newsletter .fnc-nl-single-body h2 {
    margin: 3rem 0 1.25rem;
    padding: 0;
    border: 0;
    color: var(--fnc-nl-ink);
    font-family: var(--wp--preset--font-family--headline, Manrope, sans-serif);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.025em;
}

body.single-newsletter .fnc-nl-single-body .fnc-card {
    box-sizing: border-box;
    margin: 1rem 0 !important;
    padding: clamp(1.25rem, 4vw, 1.75rem) !important;
    border: 1px solid rgba(23, 70, 63, 0.14) !important;
    border-radius: 1rem;
    background: var(--wp--preset--color--surface-container-lowest, #fff);
    box-shadow: 0 10px 28px rgba(23, 70, 63, 0.06);
}

body.single-newsletter .fnc-nl-single-body .fnc-card:first-of-type {
    padding-top: clamp(1.25rem, 4vw, 1.75rem) !important;
}

body.single-newsletter .fnc-nl-single-body .fnc-card-label {
    display: inline-flex;
    width: fit-content;
    margin: 0 0 0.875rem;
    padding: 0.3rem 0.65rem;
    border: 1px solid rgba(47, 111, 98, 0.2);
    border-radius: 999px;
    color: var(--fnc-nl-primary);
    background: rgba(47, 111, 98, 0.09);
    font-family: var(--wp--preset--font-family--label, "Public Sans", sans-serif);
    font-size: 0.75rem;
    font-weight: 750;
    letter-spacing: 0.05em;
}

body.single-newsletter .fnc-nl-single-body .fnc-card h3 {
    margin: 0 0 0.75rem;
    color: var(--fnc-nl-ink);
    font-size: clamp(1.15rem, 2.4vw, 1.4rem);
    line-height: 1.45;
}

body.single-newsletter .fnc-nl-single-body .fnc-card h3 a {
    color: inherit;
    text-decoration: none;
}

body.single-newsletter .fnc-nl-single-body .fnc-card > p:not(.fnc-card-label, .fnc-card-more) {
    margin-bottom: 1rem;
    color: var(--fnc-nl-muted);
    font-size: 0.975rem;
    line-height: 1.75;
}

body.single-newsletter .fnc-nl-single-body .fnc-card-more {
    margin: 0;
    text-align: left;
}

body.single-newsletter .fnc-nl-single-body .fnc-card-more a {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    color: var(--fnc-nl-primary);
    font-weight: 750;
    text-decoration: underline;
    text-decoration-color: rgba(23, 70, 63, 0.35);
    text-underline-offset: 0.22em;
}

body.single-newsletter .fnc-nl-cta-stage {
    padding-top: 0 !important;
    padding-bottom: clamp(3rem, 7vw, 6rem) !important;
    background: var(--wp--preset--color--surface-container-low, #f3f5f2);
}

body.single-newsletter .fnc-nl-single-cta {
    box-sizing: border-box;
    width: min(100%, 820px);
    padding: clamp(2.5rem, 6vw, 4rem) !important;
    overflow: hidden;
    position: relative;
    isolation: isolate;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 1.25rem;
    background:
        radial-gradient(circle at 18% 14%, rgba(255, 255, 255, 0.14), transparent 18rem),
        radial-gradient(circle at 88% 82%, rgba(95, 168, 130, 0.18), transparent 20rem),
        linear-gradient(135deg, #0e2f2a, var(--fnc-nl-primary));
    box-shadow: 0 20px 50px rgba(23, 70, 63, 0.18);
    text-align: center;
}

body.single-newsletter .fnc-nl-single-cta::after {
    content: "mail";
    position: absolute;
    right: -1.5rem;
    bottom: -2.75rem;
    z-index: -1;
    color: rgba(255, 255, 255, 0.065);
    font-family: "Material Symbols Outlined";
    font-size: clamp(10rem, 25vw, 14rem);
    font-variation-settings: "FILL" 0, "wght" 200;
    line-height: 1;
    pointer-events: none;
}

body.single-newsletter .fnc-nl-single-cta-title {
    max-width: 22ch;
    margin: 0 auto !important;
    color: #fff;
    font-family: var(--wp--preset--font-family--headline, Manrope, sans-serif);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.025em;
    text-wrap: balance;
}

body.single-newsletter .fnc-nl-single-cta-copy {
    max-width: 34rem;
    margin: 0.75rem auto 0 !important;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1rem;
    line-height: 1.7;
    word-break: keep-all;
}

body.single-newsletter .fnc-nl-single-cta .wp-block-buttons {
    width: 100%;
    gap: 0.75rem;
    margin: 1.75rem 0 0 !important;
    justify-content: flex-start;
}

body.single-newsletter .fnc-nl-single-cta .wp-block-button__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.7rem 1.25rem;
    border: 1px solid transparent;
    border-radius: 0.625rem;
    font-weight: 750;
    text-decoration: none;
}

body.single-newsletter .fnc-nl-cta-button--primary .wp-block-button__link {
    color: var(--fnc-nl-primary);
    background: #fff;
}

body.single-newsletter .fnc-nl-cta-button--primary .wp-block-button__link:hover {
    color: var(--fnc-nl-primary);
    background: var(--wp--preset--color--surface, #f8f7f3);
}

body.single-newsletter .fnc-nl-cta-button--secondary .wp-block-button__link {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.1);
}

body.single-newsletter .fnc-nl-cta-button--secondary .wp-block-button__link:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.18);
}

body.single-newsletter .fnc-nl-cta-button--donate {
    margin-left: auto;
}

body.single-newsletter .fnc-nl-cta-button--donate .wp-block-button__link {
    color: var(--wp--preset--color--on-tertiary, #fff);
    border-color: var(--wp--preset--color--tertiary, #9a6a2b);
    background: var(--wp--preset--color--tertiary, #9a6a2b);
}

body.single-newsletter .fnc-nl-cta-button--donate .wp-block-button__link:hover {
    color: var(--wp--preset--color--on-tertiary, #fff);
    border-color: #7d531f;
    background: #7d531f;
}

body.single-newsletter a:focus-visible {
    outline: 3px solid var(--wp--preset--color--primary-container, #2f6f62);
    outline-offset: 3px;
    border-radius: 0.25rem;
}

@media (max-width: 720px) {
    body.single-newsletter .fnc-nl-shell,
    body.single-newsletter .fnc-nl-stage,
    body.single-newsletter .fnc-nl-cta-stage {
        padding-right: 1rem !important;
        padding-left: 1rem !important;
    }

    body.single-newsletter .fnc-nl-shell--hero {
        padding-top: 1rem !important;
        padding-bottom: 2rem !important;
    }

    body.single-newsletter .fnc-nl-hero-card {
        min-height: 17rem;
        border-radius: 1rem;
    }

    body.single-newsletter .fnc-nl-hero-content {
        padding: 1.5rem;
    }

    body.single-newsletter .fnc-nl-hero-title {
        max-width: 12ch;
        font-size: clamp(1.75rem, 9vw, 2.25rem) !important;
    }

    body.single-newsletter .fnc-nl-single-body {
        width: 100%;
        padding: 2rem 1.25rem !important;
        border-radius: 1rem;
    }

    body.single-newsletter .fnc-nl-single-body .wp-block-post-content,
    body.single-newsletter .fnc-nl-single-body .entry-content {
        min-width: 0;
        font-size: 1rem;
        line-height: 1.75;
        word-break: keep-all;
        overflow-wrap: anywhere;
    }

    body.single-newsletter .fnc-nl-single-body .fnc-card {
        padding: 1.25rem !important;
    }

    body.single-newsletter .fnc-nl-single-cta {
        width: 100%;
        padding: 2.5rem 1.25rem !important;
        border-radius: 1rem;
    }

    body.single-newsletter .fnc-nl-single-cta .wp-block-buttons {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    body.single-newsletter .fnc-nl-single-cta .wp-block-button,
    body.single-newsletter .fnc-nl-single-cta .wp-block-button__link {
        width: 100%;
        box-sizing: border-box;
    }

    body.single-newsletter .fnc-nl-cta-button--donate {
        margin-left: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.single-newsletter *,
    body.single-newsletter *::before,
    body.single-newsletter *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
