/* =========================================================
 * RankwellPress — Post Navigation (Previous / Next)
 * Flat Edition with Bottom Border
 * ========================================================= */

.post-navigation {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1rem 0;
    
    /* Top and Bottom Lines */
    border-top: 1px solid var(--rw-border-light, #e5e7eb);
    border-bottom: 1px solid var(--rw-border-light, #e5e7eb);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem; /* Added padding so text doesn't touch the bottom line */
}

@media (min-width: 600px) {
    .post-navigation {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
    }
}

.nav-previous,
.nav-next {
    flex: 1;
    min-width: 0; 
}

.nav-next {
    text-align: right;
}

.nav-previous a,
.nav-next a {
    display: inline-flex; 
    align-items: center;
    gap: 0.4rem; 
    color: var(--rw-text-heading, #111827);
    font-weight: 500;
    font-size: 0.82rem;
    line-height: 1.3;
    text-decoration: none;
    transition: color var(--rw-transition-fast, 0.15s ease);
    width: 100%;
}

.nav-previous a:hover,
.nav-next a:hover {
    color: var(--rw-color-primary, #0d7c3e);
}

.nav-previous a {
    justify-content: flex-start;
}

.nav-next a {
    justify-content: flex-end;
}

/* ── Direction Label ─────────────────────────── */

.nav-direction {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--rw-text-muted, #6b7280);
    line-height: 1;
    white-space: nowrap; 
    flex-shrink: 0;      
    display: inline-block; 
}

.nav-previous a:hover .nav-direction,
.nav-next a:hover .nav-direction {
    color: var(--rw-color-primary, #0d7c3e);
}

/* ── Post Title ──────────────────────────────── */

.nav-title {
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap; 
}

/* ── Mobile Adjustments ──────────────────────── */

@media (max-width: 599px) {
    .post-navigation {
        gap: 0.75rem; 
    }

    .nav-previous a,
    .nav-next a {
        font-size: 0.78rem;
        gap: 0.35rem;
    }
}