/* CNPR — unified prev/next navigation across articles + Instagram posts. */

.cnpr-post-nav {
    display: flex;
    gap: 16px;
    align-items: stretch;
    /* Own vertical spacing only. No horizontal auto/max-width: the nav fills its
       parent container (a .layout <main>) and must NOT depend on the theme's
       .layout class, whose `margin: 0 auto` would otherwise zero out this gap. */
    margin: 32px 0 8px;
}

/* On the Instagram single page, align the nav to the ~614px post column above
   it instead of spanning the full page width. */
.ig-post-layout .cnpr-post-nav {
    max-width: 614px;
    margin-left: auto;
    margin-right: auto;
}

.cnpr-post-nav__spacer {
    flex: 1 1 0;
}

.cnpr-post-nav__link {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 18px;
    text-decoration: none;
    color: var(--text, #1a2433);
    background: var(--panel, #fff);
    border: 1px solid var(--panel-strong, #d4dde9);
    border-radius: var(--card-radius, 12px);
    box-shadow: var(--shadow, 0 8px 18px rgba(16, 32, 53, 0.08));
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.cnpr-post-nav__link:hover,
.cnpr-post-nav__link:focus-visible {
    transform: translateY(-2px);
    border-color: var(--accent-2, #2d74a5);
    box-shadow: 0 12px 24px rgba(16, 32, 53, 0.14);
    outline: none;
}

.cnpr-post-nav__link--next {
    text-align: right;
    align-items: flex-end;
}

.cnpr-post-nav__kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--accent-2, #2d74a5);
    text-transform: uppercase;
}

.cnpr-post-nav__badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted, #516278);
}

.cnpr-post-nav__badge svg {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
}

.cnpr-post-nav__badge--instagram {
    color: #c13584; /* Instagram magenta, subtle differentiator. */
}

.cnpr-post-nav__title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text, #1a2433);
    /* Clamp to two lines so long captions don't blow up the button. */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 600px) {
    .cnpr-post-nav {
        flex-direction: column;
    }

    .cnpr-post-nav__spacer {
        display: none;
    }

    .cnpr-post-nav__link--next {
        text-align: left;
        align-items: flex-start;
    }
}
