/* ═══════════════════════════════════════════════════════════════════
   ТЕМА «STUDIO» — стили для контентных страниц
   (архивы блога, одиночные статьи, страницы)
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Хлебные крошки ─── */
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--c-text-muted);
    padding: 24px 0 0;
}
.breadcrumbs a { color: var(--c-text-muted); }
.breadcrumbs a:hover { color: var(--c-primary); }
.breadcrumbs .sep { opacity: .5; }
.breadcrumbs .current { color: var(--c-text); font-weight: 500; }

/* ─── Заголовок страницы (page-hero) ─── */
.page-hero {
    padding: 32px 0 56px;
}
.page-hero h1 {
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    margin-bottom: 16px;
    max-width: 800px;
}
.page-hero .lead {
    font-size: 18px;
    color: var(--c-text-muted);
    max-width: 640px;
    line-height: 1.6;
}

/* ─── Сетка архива ─── */
.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
    padding-bottom: 64px;
}

/* ─── Карточка статьи ─── */
.post-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid rgba(15,23,42,.06);
    border-radius: var(--radius-card, 16px);
    overflow: hidden;
    transition: all .3s ease;
    text-decoration: none;
    color: inherit;
}
.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 48px rgba(15,23,42,.1);
    border-color: rgba(var(--c-primary-rgb), .2);
}
.post-card-cover {
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, rgba(var(--c-primary-rgb), .12), rgba(var(--c-primary-rgb), .04));
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(var(--c-primary-rgb), .35);
    font-size: 44px;
    background-size: cover;
    background-position: center;
}
.post-card-body {
    padding: 24px 26px 26px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.post-card-cat {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--c-primary);
    margin-bottom: 12px;
}
.post-card-title {
    font-size: 20px;
    line-height: 1.3;
    margin-bottom: 12px;
    color: var(--c-text);
    letter-spacing: -0.01em;
}
.post-card-excerpt {
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--c-text-muted);
    flex: 1;
    margin-bottom: 18px;
}
.post-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--c-text-muted);
    padding-top: 16px;
    border-top: 1px solid rgba(15,23,42,.06);
}
.post-card-meta i { color: var(--c-primary); font-size: 12px; }

/* ─── Пагинация ─── */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 32px 0 64px;
    flex-wrap: wrap;
}
.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border-radius: var(--radius-btn, 10px);
    border: 1px solid rgba(15,23,42,.1);
    background: #fff;
    font-size: 14px;
    font-weight: 500;
    color: var(--c-text);
    transition: all .2s;
}
.pagination a:hover {
    border-color: var(--c-primary);
    color: var(--c-primary);
}
.pagination .current {
    background: var(--c-primary);
    color: #fff;
    border-color: var(--c-primary);
}

/* ─── Поиск (архив) ─── */
.archive-search {
    display: flex;
    gap: 10px;
    max-width: 480px;
    margin-bottom: 32px;
}
.archive-search input {
    flex: 1;
    padding: 12px 18px;
    border: 1.5px solid rgba(15,23,42,.12);
    border-radius: var(--radius-input, 10px);
    font-size: 15px;
    font-family: inherit;
    background: #fff;
}
.archive-search input:focus {
    outline: none;
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(var(--c-primary-rgb), .12);
}

.archive-empty {
    text-align: center;
    padding: 80px 0;
    color: var(--c-text-muted);
}
.archive-empty i {
    font-size: 56px;
    color: rgba(var(--c-primary-rgb), .25);
    margin-bottom: 16px;
    display: block;
}

/* ═══════════════════════════════════════════════════════════════════
   ОДИНОЧНАЯ СТАТЬЯ
   ═══════════════════════════════════════════════════════════════════ */
.article-hero {
    padding: 32px 0 48px;
    max-width: 820px;
}
.article-hero .post-cat {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(var(--c-primary-rgb), .1);
    color: var(--c-primary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 20px;
}
.article-hero h1 {
    font-size: clamp(1.75rem, 4vw, 3rem);
    margin-bottom: 20px;
    letter-spacing: -0.03em;
}
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 14px;
    color: var(--c-text-muted);
}
.article-meta i {
    color: var(--c-primary);
    margin-right: 6px;
}

.article-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 64px;
    padding-bottom: 80px;
    align-items: start;
}

.article-body {
    font-size: 17px;
    line-height: 1.75;
    color: var(--c-text);
    max-width: 720px;
}
.article-body h2 {
    font-size: 26px;
    margin: 40px 0 16px;
    letter-spacing: -0.02em;
}
.article-body h3 {
    font-size: 21px;
    margin: 32px 0 12px;
}
.article-body p { margin-bottom: 20px; color: #334155; }
.article-body ul,
.article-body ol {
    margin: 0 0 20px 24px;
    color: #334155;
}
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { margin-bottom: 8px; line-height: 1.7; }
.article-body a { color: var(--c-primary); text-decoration: underline; text-decoration-color: rgba(var(--c-primary-rgb), .3); }
.article-body a:hover { text-decoration-color: var(--c-primary); }
.article-body strong { color: var(--c-text); font-weight: 700; }
.article-body code {
    background: rgba(15,23,42,.06);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 14px;
    font-family: ui-monospace, 'SF Mono', monospace;
    color: var(--c-primary-dark, var(--c-primary));
}
.article-body pre {
    background: #0F172A;
    color: #E2E8F0;
    padding: 24px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 24px 0;
    font-size: 14px;
    line-height: 1.6;
}
.article-body pre code {
    background: none;
    color: inherit;
    padding: 0;
}
.article-body blockquote {
    border-left: 4px solid var(--c-primary);
    padding: 4px 0 4px 20px;
    margin: 24px 0;
    font-style: italic;
    color: var(--c-text-muted);
}
.article-body img {
    border-radius: 12px;
    margin: 24px 0;
}

/* Сайдбар */
.article-sidebar {
    position: sticky;
    top: 96px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.sidebar-block {
    background: #fff;
    border: 1px solid rgba(15,23,42,.06);
    border-radius: var(--radius-card, 16px);
    padding: 24px;
}
.sidebar-block h3 {
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--c-text-muted);
    margin-bottom: 16px;
    font-weight: 700;
}
.sidebar-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.sidebar-tags a {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(var(--c-primary-rgb), .08);
    color: var(--c-primary);
    font-size: 13px;
    font-weight: 500;
    transition: all .2s;
}
.sidebar-tags a:hover {
    background: rgba(var(--c-primary-rgb), .15);
}
.sidebar-cta {
    background: linear-gradient(135deg, #0F172A, #1E293B);
    color: #fff;
}
.sidebar-cta h3 { color: rgba(255,255,255,.6); }
.sidebar-cta p {
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 18px;
    color: rgba(255,255,255,.8);
}
.sidebar-cta .btn {
    width: 100%;
}

/* ─── Похожие ─── */
.related-section {
    padding: 64px 0;
    background: var(--c-bg-alt);
}
.related-section h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 28px;
}

/* ═══════════════════════════════════════════════════════════════════
   СТРАНИЦА (page.php)
   ═══════════════════════════════════════════════════════════════════ */
.page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 0 80px;
    font-size: 17px;
    line-height: 1.75;
}
.page-content h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 24px;
    letter-spacing: -0.03em;
}
.page-content h2 {
    font-size: 26px;
    margin: 40px 0 16px;
    letter-spacing: -0.02em;
}
.page-content h3 {
    font-size: 20px;
    margin: 28px 0 12px;
}
.page-content p { margin-bottom: 20px; color: #334155; }
.page-content ul,
.page-content ol {
    margin: 0 0 20px 24px;
    color: #334155;
}
.page-content ul { list-style: disc; }
.page-content ol { list-style: decimal; }
.page-content li { margin-bottom: 8px; }
.page-content a { color: var(--c-primary); text-decoration: underline; text-decoration-color: rgba(var(--c-primary-rgb), .3); }
.page-content strong { color: var(--c-text); }
.page-content code {
    background: rgba(15,23,42,.06);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 14px;
    font-family: ui-monospace, monospace;
}

/* ─── Документация ─── */
.docs-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 56px;
    padding-bottom: 80px;
    align-items: start;
}
.docs-sidebar {
    position: sticky;
    top: 96px;
}
.docs-sidebar h3 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--c-text-muted);
    margin-bottom: 16px;
    font-weight: 700;
}
.docs-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.docs-nav a {
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 14.5px;
    color: var(--c-text-muted);
    transition: all .2s;
}
.docs-nav a:hover {
    background: rgba(var(--c-primary-rgb), .06);
    color: var(--c-primary);
}
.docs-nav a.active {
    background: rgba(var(--c-primary-rgb), .1);
    color: var(--c-primary);
    font-weight: 600;
}
.docs-body {
    font-size: 16px;
    line-height: 1.7;
    max-width: 720px;
}
.docs-body h1 {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}
.docs-body h2 {
    font-size: 22px;
    margin: 36px 0 14px;
}
.docs-body p { margin-bottom: 18px; color: #334155; }
.docs-body ul,
.docs-body ol {
    margin: 0 0 18px 22px;
    color: #334155;
}
.docs-body ul { list-style: disc; }
.docs-body ol { list-style: decimal; }
.docs-body pre {
    background: #0F172A;
    color: #E2E8F0;
    padding: 20px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 20px 0;
    font-size: 13.5px;
    line-height: 1.6;
}
.docs-body code {
    background: rgba(15,23,42,.06);
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 13.5px;
    font-family: ui-monospace, monospace;
}
.docs-body pre code { background: none; padding: 0; }

/* ═══════════════════════════════════════════════════════════════════
   АДАПТИВ
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    .article-layout { grid-template-columns: 1fr; gap: 40px; }
    .article-sidebar { position: static; }
    .docs-layout { grid-template-columns: 1fr; gap: 32px; }
    .docs-sidebar { position: static; }
    .docs-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }
    .docs-nav a { padding: 7px 12px; font-size: 13px; }
}

@media (max-width: 540px) {
    .page-hero { padding: 20px 0 40px; }
    .archive-grid { gap: 20px; }
    .post-card-body { padding: 20px; }
    .post-card-title { font-size: 18px; }
    .article-hero { padding: 20px 0 36px; }
    .article-body { font-size: 16px; }
    .article-body h2 { font-size: 22px; }
    .page-content { font-size: 16px; }
}