/*
 * Blog post detail.
 *
 * The old view was an unstyled dump: a run-on meta line, no featured image, and body copy inheriting
 * whatever the theme happened to give it. This gives the article a readable measure, a real
 * hierarchy, and the house language — 3px radius, 1px borders, brand red as the only accent.
 */
.bp-post {
    --bp-accent: var(--color-1st, #9b2321);
    --bp-text: #3a4152;
    --bp-heading: #1d2433;
    --bp-muted: #8b93a3;
    --bp-border: #e7e9ee;
}

/* ===== Meta ================================================================ */
.bp-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
    color: var(--bp-muted);
    font-size: 13px;
}

.bp-cat {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 3px;
    background: color-mix(in srgb, var(--bp-accent) 8%, transparent);
    color: var(--bp-accent);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .15s ease;
}

.bp-cat:hover {
    background: var(--bp-accent);
    color: #fff;
    text-decoration: none;
}

.bp-meta__dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #cfd4dc;
}

@supports not (background: color-mix(in srgb, red 8%, transparent)) {
    .bp-cat { background: #f7eeee; }
}

/* ===== Hero image ========================================================== */
.bp-hero {
    margin: 0 0 30px;
}

.bp-hero img {
    display: block;
    width: 100%;
    max-height: 440px;
    object-fit: cover;
    border-radius: 3px;
}

/* ===== Body ================================================================ */
/* The lead sits between the headline and the body: bigger, quieter, sets up the piece. */
.bp-lead {
    margin: 0 0 26px;
    padding-left: 16px;
    border-left: 2px solid var(--bp-accent);
    color: var(--bp-heading);
    font-size: 17px;
    font-weight: 500;
    line-height: 1.65;
}

.bp-content {
    /* ~70 characters a line — past that the eye loses the next line's start. */
    max-width: 68ch;
    color: var(--bp-text);
    font-size: 16px;
    line-height: 1.8;
}

.bp-content p {
    margin: 0 0 20px;
}

.bp-content h2 {
    margin: 40px 0 16px;
    color: var(--bp-heading);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
}

/* A short accent rule instead of a heavier font size — the old h2 was enormous. */
.bp-content h2::after {
    content: '';
    display: block;
    width: 34px;
    height: 2px;
    margin-top: 10px;
    border-radius: 3px;
    background: var(--bp-accent);
}

.bp-content h3 {
    margin: 30px 0 12px;
    color: var(--bp-heading);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
}

.bp-content strong {
    color: var(--bp-heading);
    font-weight: 700;
}

.bp-content a {
    color: var(--bp-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.bp-content ul,
.bp-content ol {
    margin: 0 0 20px;
    padding-left: 20px;
}

.bp-content li {
    margin-bottom: 8px;
}

.bp-content img {
    max-width: 100%;
    height: auto;
    border-radius: 3px;
}

/* ===== Footer: tags + share ================================================ */
.bp-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 36px;
    padding-top: 22px;
    border-top: 1px solid var(--bp-border);
}

.bp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bp-tags a {
    display: inline-flex;
    padding: 4px 10px;
    border: 1px solid var(--bp-border);
    border-radius: 3px;
    color: #5a6273;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .15s ease, color .15s ease;
}

.bp-tags a:hover {
    border-color: var(--bp-accent);
    color: var(--bp-accent);
    text-decoration: none;
}

.bp-share {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.bp-share__label {
    color: var(--bp-muted);
    font-size: 12px;
    font-weight: 600;
}

.bp-share__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--bp-border);
    border-radius: 3px;
    color: #5a6273;
    transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

.bp-share__btn:hover {
    border-color: var(--bp-accent);
    background: var(--bp-accent);
    color: #fff;
}

/* ===== Related posts ======================================================= */
.bp-related {
    margin-top: 44px;
    padding-top: 28px;
    border-top: 1px solid var(--bp-border);
}

.bp-related__title {
    margin: 0 0 20px;
    color: var(--bp-heading);
    font-size: 19px;
    font-weight: 700;
}

.bp-related__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.bp-card {
    display: flex;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--bp-border);
    border-radius: 3px;
    background: #fff;
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.bp-card:hover {
    border-color: var(--bp-accent);
    box-shadow: 0 2px 10px rgba(16, 25, 43, .06);
    text-decoration: none;
}

.bp-card__thumb {
    flex: none;
    width: 92px;
    height: 92px;
    overflow: hidden;
    border-radius: 3px;
    background: #f4f5f7;
}

.bp-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bp-card__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 0;
}

.bp-card__cat {
    color: var(--bp-accent);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.bp-card__title {
    color: var(--bp-heading);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
}

.bp-card__date {
    color: var(--bp-muted);
    font-size: 12px;
}

/* ===== Mobile ============================================================== */
@media (max-width: 767px) {
    .bp-content { font-size: 15px; }
    .bp-content h2 { margin-top: 32px; font-size: 21px; }
    .bp-content h3 { font-size: 17px; }
    .bp-lead { font-size: 16px; }
    .bp-hero img { max-height: 240px; }
    .bp-related__grid { grid-template-columns: 1fr; }
    .bp-footer { flex-direction: column; align-items: flex-start; }
    .bp-share { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .bp-cat, .bp-tags a, .bp-share__btn, .bp-card { transition: none; }
}

/* ===== Page headline =======================================================
 * The layout prints the post title as a giant display heading — fine for a one-word section
 * title like "Patarimai", but an article headline is a full sentence and it dominated the page,
 * pushing the article itself below the fold.
 *
 * Scoped to .ps-page--blog and only loaded on the post view, so the blog listing keeps its own
 * heading untouched.
 */
.ps-page--blog .ps-page__header h1 {
    /* Wide enough that a normal headline lands on two lines; 22ch was breaking it into three. */
    max-width: 34ch;
    margin: 0 auto 6px;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

@media (max-width: 991px) {
    .ps-page--blog .ps-page__header h1 { font-size: 25px; }
}

@media (max-width: 575px) {
    .ps-page--blog .ps-page__header h1 { font-size: 21px; max-width: none; }
}
