/* ================================================================
   Blog post page (Jaunumi → one post)
   .ps-hero     — reuses .dp-hero from policy-block.css, adds date and
                  reading time
   .ps-article  — white card with the post text (typography for any
                  editor content), cover image, back link and sharing
   .ps-aside    — sticky contact card, reuses .bl-contact from
                  blog-block.css
   .ps-more     — other posts, reuses .bl-list / .bl-post
   ================================================================ */

.ps-section *,
.ps-section *::before,
.ps-section *::after {
    box-sizing: border-box;
}

.ps-hero .dp-hero__inner {
    padding-bottom: 8px;
}

.ps-hero__title {
    max-width: 900px;
    margin-bottom: 22px;
}

.ps-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ps-meta li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid #ecdde1;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, .85);
    font-size: 14px;
    color: var(--pub-ink, #33282b);
}

.ps-meta svg {
    width: 17px;
    height: 17px;
    color: var(--pub-red, #8d0b2c);
}

/* ================= layout ================= */

.ps-section {
    position: relative;
    padding: 24px 0 88px;
}

.ps-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: start;
    gap: 32px;
}

.ps-article {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--pub-line, #e7dcdf);
    border-radius: 20px;
    background-color: #fff;
    box-shadow: var(--pub-shadow-m, 0 14px 34px rgba(88, 20, 40, .11));
}

.ps-cover {
    margin: 0;
    border-bottom: 1px solid #f1e6e9;
}

.ps-cover img {
    display: block;
    width: 100%;
    max-height: 480px;
    object-fit: cover;
}

.ps-aside {
    position: sticky;
    top: 82px;
}

/* ================= post text ================= */

.ps-content {
    padding: 44px 52px 12px;
    font-size: 17px;
    line-height: 1.8;
    color: var(--pub-ink, #33282b);
    overflow-wrap: anywhere;
}

/* the first paragraph reads as the lead */
.ps-content > p:first-child {
    font-size: 19px;
    line-height: 1.7;
    color: #3d2a30;
}

.ps-content > :first-child {
    margin-top: 0;
}

.ps-content p {
    margin: 0 0 18px;
}

.ps-content h2,
.ps-content h3,
.ps-content h4 {
    margin: 34px 0 14px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--pub-bordo, #6b0c26);
}

.ps-content h2 {
    font-size: 28px;
}

.ps-content h3 {
    position: relative;
    padding-left: 18px;
    font-size: 22px;
}

.ps-content h3::before {
    content: '';
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 0;
    width: 4px;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--pub-red, #8d0b2c), var(--pub-bordo, #6b0c26));
}

.ps-content h4 {
    font-size: 19px;
}

.ps-content strong,
.ps-content b {
    font-weight: 700;
    color: #2a1d21;
}

.ps-content a {
    color: var(--pub-red, #8d0b2c);
    text-decoration: underline;
    text-decoration-color: rgba(141, 11, 44, .35);
    text-underline-offset: 3px;
    transition: text-decoration-color .2s ease, color .2s ease;
}

.ps-content a:hover {
    color: var(--pub-bordo, #6b0c26);
    text-decoration-color: currentColor;
}

.ps-content a strong,
.ps-content strong a {
    color: inherit;
}

.ps-content ul,
.ps-content ol {
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
}

.ps-content li {
    position: relative;
    margin: 0 0 10px;
    padding-left: 28px;
}

.ps-content ul > li::before {
    content: '';
    position: absolute;
    top: 11px;
    left: 6px;
    width: 9px;
    height: 9px;
    border: 2px solid var(--pub-red, #8d0b2c);
    border-radius: 50%;
}

.ps-content ol {
    counter-reset: ps-ol;
}

.ps-content ol > li {
    counter-increment: ps-ol;
}

.ps-content ol > li::before {
    content: counter(ps-ol);
    position: absolute;
    top: 3px;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: var(--pub-card, #faf2f3);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    color: var(--pub-bordo, #6b0c26);
}

.ps-content blockquote {
    margin: 26px 0;
    padding: 20px 24px;
    border-left: 4px solid var(--pub-red, #8d0b2c);
    border-radius: 0 14px 14px 0;
    background-color: var(--pub-card, #faf2f3);
    font-size: 19px;
    font-style: italic;
    color: #4a3037;
}

.ps-content blockquote p:last-child {
    margin-bottom: 0;
}

.ps-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 24px auto;
    border-radius: 14px;
}

.ps-content figure {
    margin: 24px 0;
}

.ps-content figcaption {
    margin-top: 8px;
    font-size: 14px;
    text-align: center;
    color: var(--pub-muted, #7d6a70);
}

.ps-content hr {
    height: 1px;
    margin: 32px 0;
    border: 0;
    background-color: var(--pub-line, #e7dcdf);
}

.ps-content table {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0 0 22px;
    overflow-x: auto;
    border-collapse: collapse;
    font-size: 15px;
}

.ps-content th,
.ps-content td {
    padding: 10px 14px;
    border: 1px solid var(--pub-line, #e7dcdf);
    text-align: left;
    vertical-align: top;
}

.ps-content th {
    background-color: #f8eff1;
    font-weight: 500;
    color: var(--pub-bordo, #6b0c26);
}

/* ================= article footer ================= */

.ps-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
    margin: 20px 52px 0;
    padding: 24px 0 32px;
    border-top: 1px solid #f1e6e9;
}

.ps-back {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 20px;
    border: 1px solid var(--pub-line, #e7dcdf);
    border-radius: 999px;
    background-color: #fff;
    font-size: 15px;
    font-weight: 500;
    color: var(--pub-bordo, #6b0c26);
    text-decoration: none;
    transition: border-color .2s ease, background-color .2s ease;
}

.ps-back svg {
    width: 18px;
    height: 18px;
    transition: transform .2s ease;
}

.ps-back:hover {
    border-color: var(--pub-bordo, #6b0c26);
    background-color: var(--pub-card, #faf2f3);
    color: var(--pub-bordo, #6b0c26);
}

.ps-foot .ps-back:hover svg {
    transform: translateX(-3px);
}

.ps-more .ps-back:hover svg {
    transform: translateX(3px);
}

.ps-share {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ps-share__label {
    margin-right: 6px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--pub-bordo-soft, #9b4a61);
}

.ps-share__btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--pub-line, #e7dcdf);
    border-radius: 50%;
    background-color: #fff;
    color: var(--pub-bordo, #6b0c26);
    cursor: pointer;
    transition: border-color .2s ease, background-color .2s ease, color .2s ease, transform .2s ease;
}

.ps-share__btn svg {
    width: 18px;
    height: 18px;
}

.ps-share__btn:hover {
    border-color: var(--pub-bordo, #6b0c26);
    background-color: var(--pub-bordo, #6b0c26);
    color: #fff;
    transform: translateY(-2px);
}

.ps-share__done {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    padding: 6px 10px;
    border-radius: 8px;
    background-color: #33282b;
    font-size: 12px;
    white-space: nowrap;
    color: #fff;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 4px);
    transition: opacity .2s ease, transform .2s ease;
}

.ps-share__btn.is-done .ps-share__done {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ================= other posts ================= */

.ps-more {
    margin-top: 64px;
}

.ps-more__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px 24px;
    margin-bottom: 24px;
}

.ps-more__head .bl-head__title {
    margin-bottom: 0;
}

/* ================= adaptive ================= */

@media (max-width: 1200px) {
    .ps-layout {
        grid-template-columns: minmax(0, 1fr) 300px;
        gap: 24px;
    }

    .ps-content {
        padding: 38px 40px 8px;
    }

    .ps-foot {
        margin-right: 40px;
        margin-left: 40px;
    }
}

@media (max-width: 1024px) {
    .ps-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .ps-aside {
        position: static;
    }
}

@media (max-width: 768px) {
    .ps-section {
        padding-bottom: 64px;
    }

    .ps-content {
        padding: 30px 26px 4px;
        font-size: 16px;
    }

    .ps-content > p:first-child {
        font-size: 17px;
    }

    .ps-content h2 {
        font-size: 24px;
    }

    .ps-content h3 {
        font-size: 20px;
    }

    .ps-foot {
        margin-right: 26px;
        margin-left: 26px;
        padding-bottom: 26px;
    }

    .ps-more {
        margin-top: 48px;
    }
}

@media (max-width: 576px) {
    .ps-meta li {
        padding: 6px 12px;
        font-size: 13px;
    }

    .ps-article {
        border-radius: 16px;
    }

    .ps-content {
        padding: 24px 18px 2px;
    }

    .ps-foot {
        flex-direction: column;
        align-items: stretch;
        margin-right: 18px;
        margin-left: 18px;
        padding-bottom: 22px;
    }

    .ps-back {
        justify-content: center;
    }

    .ps-share {
        justify-content: center;
    }

    .ps-more__head .ps-back {
        width: 100%;
    }
}