/* ====================================================
   QARAMEDIA — POST PAGE
   site/post.css
   ==================================================== */

.post-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 48px;
    padding-top: 16px;
    margin-bottom: 56px;
}

/* ============ ЛЕВАЯ КОЛОНКА ============ */
.post-main { min-width: 0; }

.post-cat-badge {
    display: inline-block;
    font-family: var(--font-head);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #fff;
    background: var(--red);
    padding: 5px 12px;
    border-radius: 4px;
    margin-bottom: 16px;
    transition: background .15s ease;
}
.post-cat-badge:hover { background: var(--red-dark); }

.post-title {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 34px;
    line-height: 1.18;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin: 0 0 20px;
}

/* мета: автор + дата */
.post-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding-bottom: 20px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
}
.post-author { display: flex; align-items: center; gap: 11px; }
.post-author-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--warm-2);
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
.post-author-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-author-letter {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 16px;
    color: var(--red);
}
.post-author-info { display: flex; flex-direction: column; gap: 1px; }
.post-author-name {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 14.5px;
    color: var(--ink);
    line-height: 1.3;
}
.post-author-position {
    font-family: var(--font-head);
    font-size: 12px;
    color: var(--muted);
    line-height: 1.3;
}
.post-date {
    font-family: var(--font-head);
    font-size: 13.5px;
    color: var(--muted);
}

/* обложка */
.post-cover {
    margin: 0 0 28px;
}
.post-cover img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
    border-radius: var(--radius-lg);
}
.post-cover-sign {
    display: block;
    font-family: var(--font-body);
    font-style: italic;
    font-size: 12.5px;
    color: var(--muted);
    padding: 9px 4px 0;
    line-height: 1.4;
}

/* контент статьи */
.post-content {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.75;
    color: var(--text);
}
.post-content p { margin: 0 0 1.2em; }
.post-content h2 {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 25px;
    line-height: 1.25;
    color: var(--ink);
    margin: 1.6em 0 .6em;
}
.post-content h3 {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 21px;
    color: var(--ink);
    margin: 1.4em 0 .5em;
}
.post-content a { color: var(--red); text-decoration: underline; }
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 1em 0;
}
.post-content blockquote {
    border-left: 4px solid var(--red);
    margin: 1.4em 0;
    padding: 4px 0 4px 20px;
    color: var(--secondary);
    font-style: italic;
}
.post-content .img-caption-text {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 14px;
    color: var(--muted);
    margin-top: -0.6em;
}
.post-content .embed-block { margin: 1.4em 0; }
.post-content iframe { max-width: 100%; border-radius: var(--radius); }

/* теги */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 32px 0 0;
}
.post-tag {
    font-family: var(--font-head);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--red);
    transition: opacity .15s ease;
}
.post-tag:hover { opacity: .65; }

/* действия: лайк слева + поделиться справа */
.post-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}
.post-like-btn, .post-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-head);
    font-size: 14px;
    font-weight: 500;
    color: var(--secondary);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 9px 18px;
    cursor: pointer;
    transition: all .15s ease;
}
.post-like-btn svg, .post-share-btn svg { width: 19px; height: 19px; }
.post-like-btn:hover { border-color: var(--red); color: var(--red); }
.post-like-btn.is-liked {
    background: var(--highlight);
    border-color: var(--red);
    color: var(--red);
}
.post-like-btn.is-liked svg { fill: var(--red); }
.post-share-btn:hover { border-color: var(--ink); color: var(--ink); }
.post-like-count { font-weight: 600; }

/* ============ ПРАВАЯ КОЛОНКА (сайдбар) ============ */
.post-sidebar {
    align-self: start;
    border-left: 1px solid var(--border);
    padding-left: 48px;
}
.sidebar-block { margin-bottom: 36px; }
.sidebar-title {
    display: block;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 18px;
    color: var(--ink);
    padding-left: 13px;
    margin-bottom: 16px;
    position: relative;
    transition: color .15s ease;
}
.sidebar-title::before {
    content: '';
    position: absolute;
    left: 0; top: 2px; bottom: 2px;
    width: 4px; border-radius: 3px;
    background: var(--red);
}
a.sidebar-title:hover { color: var(--red); }

.sidebar-list { display: flex; flex-direction: column; }
.sidebar-item {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}
.sidebar-item:first-child { padding-top: 0; }
.sidebar-item:last-child { border-bottom: none; }
.sidebar-item-img {
    flex-shrink: 0;
    width: 88px;
    aspect-ratio: 4/3;
    border-radius: 6px;
    overflow: hidden;
    background: var(--warm-2);
}
.sidebar-item-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.sidebar-item:hover .sidebar-item-img img { transform: scale(1.06); }
.sidebar-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.sidebar-item-title {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 14px;
    line-height: 1.34;
    color: var(--ink);
    margin-bottom: 6px;
    transition: color .15s ease;
}
.sidebar-item:hover .sidebar-item-title { color: var(--red); }
.sidebar-item-date {
    font-family: var(--font-head);
    font-size: 12px;
    color: var(--muted);
}

.sidebar-title-plain { cursor: default; }

/* спецпроект в сайдбаре */
.sidebar-special { display: block; }
.sidebar-special-img {
    aspect-ratio: 16/10;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--warm-2);
    margin-bottom: 10px;
}
.sidebar-special-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.sidebar-special:hover .sidebar-special-img img { transform: scale(1.05); }
.sidebar-special-cat {
    display: block;
    font-family: var(--font-head);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--red);
    margin-bottom: 5px;
}
.sidebar-special-title {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 16px;
    line-height: 1.3;
    color: var(--ink);
    transition: color .15s ease;
}
.sidebar-special:hover .sidebar-special-title { color: var(--red); }

/* ============ ЕЩЁ СПЕЦПРОЕКТЫ ВНИЗУ ============ */
.post-more { margin-bottom: 48px; }
.post-more-head {
    border-bottom: 1px solid var(--border);
    padding-bottom: 11px;
    padding-left: 14px;
    margin-bottom: 24px;
    position: relative;
}
.post-more-head::before {
    content: '';
    position: absolute;
    left: 0; top: 1px; bottom: 12px;
    width: 4px;
    border-radius: 3px;
    background: var(--red);
}
.post-more-title {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 24px;
    color: var(--ink);
    margin: 0;
    letter-spacing: -0.015em;
}
.post-more-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.more-card { display: flex; flex-direction: column; }
.more-card-media {
    aspect-ratio: 16/10;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--warm-2);
    margin-bottom: 12px;
}
.more-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .45s ease; }
.more-card:hover .more-card-media img { transform: scale(1.05); }
.badge {
    display: inline-block;
    font-family: var(--font-head);
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--red);
    margin-bottom: 7px;
}
.more-card-title {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 16px;
    line-height: 1.32;
    color: var(--ink);
    margin: 0 0 8px;
    transition: color .15s ease;
}
.more-card:hover .more-card-title { color: var(--red); }
.more-card-date {
    font-family: var(--font-head);
    font-size: 12px;
    color: var(--muted);
}

/* ============ КНОПКА НАВЕРХ ============ */
.to-top-btn {
    position: fixed;
    right: 28px; bottom: 28px;
    width: 46px; height: 46px;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden;
    transform: translateY(10px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s ease, background .15s ease;
    z-index: 50;
    box-shadow: 0 4px 14px rgba(196,26,24,.35);
}
.to-top-btn svg { width: 22px; height: 22px; }
.to-top-btn.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top-btn:hover { background: var(--red-dark); }

/* ============ АДАПТИВ ============ */
@media (max-width: 980px) {
    .post-page {
        padding-top: 8px;
        grid-template-columns: 1fr;
        gap: 44px;
    }
    .post-sidebar {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid var(--border);
        padding-top: 32px;
    }
    .post-title { font-size: 28px; }
    .post-content { font-size: 17px; }
    .post-more-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
    .post-title { font-size: 24px; }
    .post-content { font-size: 16.5px; }
    .post-more-grid { grid-template-columns: 1fr; }
    .to-top-btn { right: 16px; bottom: 16px; }
}
/* public/assets/site/css/post.css */