/*
 * Article navigation ("Попередня стаття / Усі статті / Наступна стаття")
 * and the "Читайте також" related-articles block, for the single blog
 * post page (themes/inglot/modules/ybc_blog/views/templates/hook/singlepost.tpl).
 *
 * Loaded via a single <link> tag from that template - kept as a separate
 * tracked file rather than an inline <style> block by design.
 *
 * Style: premium minimalism matching the rest of the theme - white
 * background, black text, thin hairline dividers, no filled/colored
 * buttons, understated arrows, visible hover/focus states.
 */

/* ---------- Читайте також ---------- */

.ybc-blog-related-articles {
    margin: 48px 0 0;
    padding-top: 32px;
    border-top: 1px solid #e5e5e5;
}

.ybc-blog-related-articles-title {
    margin: 0 0 20px;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #111;
}

.ybc-blog-related-articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.ybc-blog-related-articles-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.ybc-blog-related-articles-card:hover .ybc-blog-related-articles-heading,
.ybc-blog-related-articles-card:focus-visible .ybc-blog-related-articles-heading {
    text-decoration: underline;
}

.ybc-blog-related-articles-card:focus-visible {
    outline: 2px solid #111;
    outline-offset: 3px;
}

.ybc-blog-related-articles-image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 11;
    overflow: hidden;
    background: #f5f5f5;
}

.ybc-blog-related-articles-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ybc-blog-related-articles-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding-top: 14px;
}

.ybc-blog-related-articles-category {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #767676;
    margin-bottom: 6px;
}

.ybc-blog-related-articles-heading {
    font-size: 15px;
    line-height: 1.4;
    font-weight: 500;
    color: #111;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- Попередня / Усі статті / Наступна ---------- */

.ybc-blog-post-navigation {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: stretch;
    gap: 16px;
    margin: 48px 0 0;
    padding-top: 32px;
    border-top: 1px solid #e5e5e5;
}

.ybc-blog-post-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 8px 4px;
    text-decoration: none;
    color: #111;
}

.ybc-blog-post-nav-link:hover .ybc-blog-post-nav-title,
.ybc-blog-post-nav-link:focus-visible .ybc-blog-post-nav-title {
    text-decoration: underline;
}

.ybc-blog-post-nav-link:focus-visible {
    outline: 2px solid #111;
    outline-offset: 2px;
}

.ybc-blog-post-nav-empty {
    min-height: 44px;
}

.ybc-blog-post-nav-next {
    justify-content: flex-end;
    text-align: right;
}

.ybc-blog-post-nav-arrow {
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
    color: #111;
}

.ybc-blog-post-nav-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.ybc-blog-post-nav-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #767676;
}

.ybc-blog-post-nav-title {
    font-size: 14px;
    line-height: 1.35;
    font-weight: 500;
    color: #111;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ybc-blog-post-nav-all {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #111;
    text-decoration: none;
    border-left: 1px solid #e5e5e5;
    border-right: 1px solid #e5e5e5;
    white-space: nowrap;
}

.ybc-blog-post-nav-all:hover,
.ybc-blog-post-nav-all:focus-visible {
    text-decoration: underline;
}

.ybc-blog-post-nav-all:focus-visible {
    outline: 2px solid #111;
    outline-offset: 2px;
}

/* ---------- Tablet ---------- */

@media (max-width: 991px) {
    .ybc-blog-related-articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ---------- Mobile ---------- */

@media (max-width: 767px) {
    .ybc-blog-related-articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .ybc-blog-post-navigation {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .ybc-blog-post-nav-all {
        order: -1;
        border-left: none;
        border-right: none;
        border-top: 1px solid #e5e5e5;
        border-bottom: 1px solid #e5e5e5;
        padding: 14px 20px;
        font-size: 14px;
    }

    .ybc-blog-post-nav-link,
    .ybc-blog-post-nav-empty {
        border-bottom: 1px solid #e5e5e5;
        padding: 14px 4px;
    }

    .ybc-blog-post-nav-next {
        justify-content: flex-start;
        text-align: left;
        flex-direction: row-reverse;
    }

    .ybc-blog-post-nav-next .ybc-blog-post-nav-text {
        text-align: left;
    }
}
