/* ==========================================================================
   Partnigram blog
   --------------------------------------------------------------------------
   Page-specific layer for /blog and /blog/{slug}, following the same approach as
   shopnodes-go.css: it adds only components the existing Partnigram stylesheets
   do not already provide, and reuses the --pn-* tokens from
   partnigram-public.css so the blog cannot drift from the site palette.

   Mobile-first: base rules describe the small screen, media queries enhance it.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Index: article card grid
   -------------------------------------------------------------------------- */
.article-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.article-card {
    display: flex;
    margin: 0;
    background: var(--pn-surface, #fff);
    border: 1px solid var(--pn-line, #dcece7);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(16, 49, 107, .06);
    overflow: hidden;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.article-card:hover {
    border-color: #9ed9c2;
    box-shadow: 0 14px 34px rgba(16, 49, 107, .1);
}

/* One anchor wraps the whole card: a single unambiguous tap target with no
   nested interactive elements. */
.article-card__link {
    display: flex;
    flex-direction: column;
    width: 100%;
    color: inherit;
    text-decoration: none;
}

.article-card__media {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--pn-mist, #f3fafc);
}

.article-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 22px 22px 24px;
}

.article-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-bottom: 10px;
    color: var(--pn-green-dark, #05694a);
    font-size: 12px;
    font-weight: 650;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.article-card__title {
    margin: 0 0 10px;
    color: var(--pn-navy, #10316b);
    font-size: 1.32rem;
    line-height: 1.22;
    letter-spacing: -.02em;
}

.article-card__link:hover .article-card__title,
.article-card__link:focus-visible .article-card__title {
    color: var(--pn-green-dark, #05694a);
}

.article-card__excerpt {
    flex: 1;
    color: var(--pn-copy, #354f78);
    font-size: 15px;
    line-height: 1.6;
}

.article-card__cue {
    margin-top: 16px;
    color: var(--pn-green-dark, #05694a);
    font-size: 14px;
    font-weight: 700;
}

.blog-index .empty-state {
    margin-top: 0;
}

/* --------------------------------------------------------------------------
   Article page
   -------------------------------------------------------------------------- */
.article__header {
    padding: clamp(38px, 5vw, 68px) 0 clamp(26px, 3vw, 40px);
    background: linear-gradient(180deg, #fff 0%, #f8fdfe 55%, var(--pn-mist, #f3fafc) 100%);
}

.article__header-inner {
    max-width: 860px;
}

.article__title {
    margin: 12px 0 18px;
    color: var(--pn-navy, #10316b);
    font-size: clamp(30px, 4.4vw, 50px);
    line-height: 1.1;
    letter-spacing: -.035em;
    text-wrap: balance;
}

.article__standfirst {
    max-width: 720px;
    margin: 0;
    color: var(--pn-copy, #354f78);
    font-size: clamp(17px, 2vw, 20px);
    line-height: 1.6;
}

.article__byline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--pn-line, #dcece7);
    color: var(--pn-muted, #5d7799);
    font-size: 14px;
}

.article__author {
    color: var(--pn-navy, #10316b);
    font-weight: 700;
}

.article__figure {
    margin-top: 34px;
}

.article__figure img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--pn-line, #dcece7);
    border-radius: 16px;
}

/* Editorial reading column: capped so line length stays comfortable. */
.article__body {
    max-width: 760px;
    padding-top: 40px;
    padding-bottom: 12px;
    font-size: 17px;
    line-height: 1.75;
    color: var(--pn-copy, #354f78);
}

.article__body > *:first-child {
    margin-top: 0;
}

.article__body h2 {
    margin: 2em 0 .6em;
    color: var(--pn-navy, #10316b);
    font-size: clamp(22px, 2.6vw, 28px);
    line-height: 1.25;
    letter-spacing: -.02em;
}

.article__body h3 {
    margin: 1.7em 0 .5em;
    color: var(--pn-navy, #10316b);
    font-size: 1.25rem;
    line-height: 1.3;
}

.article__body h4 {
    margin: 1.5em 0 .4em;
    color: var(--pn-navy, #10316b);
    font-size: 1.05rem;
}

.article__body p {
    margin: 0 0 1.15em;
}

.article__body ul,
.article__body ol {
    margin: 0 0 1.3em;
    padding-left: 1.35em;
}

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

.article__body a {
    color: var(--pn-green-dark, #05694a);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.article__body blockquote {
    margin: 1.6em 0;
    padding: 4px 0 4px 22px;
    border-left: 3px solid var(--pn-green, #008b5c);
    font-style: italic;
}

.article__body code {
    padding: .15em .4em;
    background: var(--pn-mist, #f3fafc);
    border: 1px solid var(--pn-line, #dcece7);
    border-radius: 5px;
    font-size: .92em;
}

.article__body pre {
    margin: 1.6em 0;
    padding: 18px;
    overflow-x: auto;
    background: #071630;
    border-radius: 12px;
}

.article__body pre code {
    padding: 0;
    background: none;
    border: 0;
    color: #e6f0ff;
}

.article__body img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.8em 0;
    border: 1px solid var(--pn-line, #dcece7);
    border-radius: 12px;
}

.article__body figcaption {
    margin-top: .6em;
    color: var(--pn-muted, #5d7799);
    font-size: 14px;
    text-align: center;
}

.article__body table {
    width: 100%;
    margin: 1.6em 0;
    border-collapse: collapse;
    font-size: 15px;
}

.article__body th,
.article__body td {
    padding: 11px 13px;
    border: 1px solid var(--pn-line, #dcece7);
    text-align: left;
}

.article__body th {
    background: var(--pn-mist, #f3fafc);
    color: var(--pn-navy, #10316b);
    font-weight: 700;
}

.article__body hr {
    margin: 2.4em 0;
    border: 0;
    border-top: 1px solid var(--pn-line, #dcece7);
}

.article__footer {
    max-width: 760px;
    padding-top: 10px;
    padding-bottom: 74px;
}

.article__cta {
    margin-top: 40px;
    padding: clamp(24px, 3vw, 34px);
    background: var(--pn-mist, #f3fafc);
    border: 1px solid var(--pn-line, #dcece7);
    border-radius: 16px;
}

.article__cta h2 {
    margin: 0 0 10px;
    color: var(--pn-navy, #10316b);
    font-size: clamp(20px, 2.4vw, 25px);
    letter-spacing: -.02em;
}

.article__cta p {
    margin: 0;
    line-height: 1.65;
}

.article__cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

/* --------------------------------------------------------------------------
   Wider screens
   -------------------------------------------------------------------------- */
@media (min-width: 640px) {
    .article-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Two-up: media beside the text, so grid rows stay even when one article
       has a much longer excerpt. */
    .article-card__link {
        flex-direction: row;
    }

    .article-card__media {
        flex: 0 0 42%;
        aspect-ratio: auto;
    }
}

@media (min-width: 1024px) {
    .article-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 28px;
    }

    /* Three-up is tall enough that a consistent media-above-text layout reads
       better than the side-by-side treatment used at two-up. */
    .article-card__link {
        flex-direction: column;
    }

    .article-card__media {
        flex: none;
        aspect-ratio: 16 / 9;
    }
}

@media (prefers-reduced-motion: reduce) {
    .article-card {
        transition: none;
    }
}