/* ===================================
   ШАБЛОН 3 — ARTICLE STYLES
==================================== */

/* ===== LAYOUT ===== */
.bcfcfart-main {
    padding: 32px 0 64px;
    background: var(--bg2);
}

.bcfcfart-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: start;
}

/* ===== ARTICLE ===== */
.bcfcfarticle {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

/* ===== TOP META ===== */
.bcfcfart-top-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 28px 36px 0;
}

.bcfcfart-date,
.bcfcfart-author {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
}

.bcfcfart-date i,
.bcfcfart-author i { margin-right: 4px; color: var(--accent); }

/* ===== TITLE ===== */
.bcfcfart-title {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text);
    padding: 18px 36px 0;
}

/* ===== LEAD ===== */
.bcfcfart-lead {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.7;
    padding: 14px 36px 0;
    font-style: italic;
    font-family: 'PT Serif', Georgia, serif;
    border-left: 3px solid var(--accent);
    margin: 0 36px 0;
}

/* ===== COVER ===== */
.bcfcfart-cover {
    margin: 24px 0 0;
    overflow: hidden;
}

.bcfcfart-cover img {
    width: 100%;
    height: 440px;
    object-fit: cover;
}

/* ===== BODY ===== */
.bcfcfart-body {
    padding: 36px 36px 32px;
    font-family: 'PT Serif', Georgia, serif;
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--text);
}

.bcfcfart-body p { margin-bottom: 1.4em; }

.bcfcfart-body h2 {
    font-family: 'Nunito', sans-serif;
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: var(--text);
    margin: 2em 0 0.7em;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}

.bcfcfart-body h3 {
    font-family: 'Nunito', sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--accent);
    margin: 1.6em 0 0.5em;
}

.bcfcfart-body ul,
.bcfcfart-body ol {
    margin: 0 0 1.4em 0;
    padding: 0;
    list-style: none;
}

.bcfcfart-body ul li,
.bcfcfart-body ol li {
    padding: 8px 0 8px 20px;
    position: relative;
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
}

.bcfcfart-body ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
}

.bcfcfart-body strong {
    font-weight: 700;
    color: var(--text);
}

.bcfcfart-body a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.bcfcfart-body blockquote {
    border-left: 4px solid var(--accent);
    margin: 2em 0;
    padding: 18px 24px;
    background: var(--accent-light);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: var(--text);
}

/* ===== SHARE ===== */
.bcfcfart-share {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 36px 28px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.bcfcfshare-title {
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
    white-space: nowrap;
}

.bcfcfshare-btns { display: flex; gap: 10px; flex-wrap: wrap; }

.bcfcfshare-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 16px;
    min-width: 130px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 700;
    transition: all 0.2s;
    font-family: 'Nunito', sans-serif;
    box-sizing: border-box;
    cursor: pointer;
}

.bcfcfs-vk { background: #e8f0fb; color: #4680c2; }
.bcfcfs-vk:hover { background: #4680c2; color: white; }
.bcfcfs-tg { background: #e8f5fd; color: #29a8eb; }
.bcfcfs-tg:hover { background: #29a8eb; color: white; }

/* ===== SIDEBAR ===== */
.bcfcfart-sidebar {
    position: sticky;
    top: 60px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bcfcfwidget {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.bcfcfwidget-title {
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text);
    padding: 14px 18px;
    border-bottom: 2px solid var(--accent);
    background: var(--bg2);
}

/* ===== CAT LIST ===== */
.bcfcfcat-list { padding: 8px 0; }

.bcfcfcat-list li { border-bottom: 1px solid var(--border); }
.bcfcfcat-list li:last-child { border-bottom: none; }

.bcfcfcat-list li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.2s;
}

.bcfcfcat-list li a:hover,
.bcfcfcat-list li.active a {
    color: var(--accent);
    background: var(--accent-light);
}

.bcfcfcat-list li a span {
    font-size: 0.75rem;
    background: var(--bg3);
    color: var(--text-muted);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
}

.bcfcfcat-list li.active a span,
.bcfcfcat-list li a:hover span {
    background: var(--accent);
    color: white;
}

/* ===== REC LIST ===== */
.bcfcfrec-list { display: flex; flex-direction: column; }

.bcfcfrec-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    grid-auto-rows: 72px;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    transition: background 0.2s;
}

.bcfcfrec-item:last-child { border-bottom: none; }
.bcfcfrec-item:hover { background: var(--bg2); }

.bcfcfrec-img {
    overflow: hidden;
    height: 72px;
}

.bcfcfrec-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
    display: block;
}

.bcfcfrec-item:hover .bcfcfrec-img img { transform: scale(1.06); }

.bcfcfrec-item span {
    padding: 8px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
    align-self: center;
    transition: color 0.2s;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.bcfcfrec-item:hover span { color: var(--accent); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .bcfcfart-layout { grid-template-columns: 1fr 260px; gap: 28px; }
    .bcfcfart-cover img { height: 340px; }
    .bcfcfart-title,
    .bcfcfart-top-meta,
    .bcfcfart-lead,
    .bcfcfart-body,
    .bcfcfart-share { padding-left: 28px; padding-right: 28px; }
    .bcfcfart-lead { margin: 0 28px 0; }
}

@media (max-width: 768px) {
    .bcfcfart-layout { grid-template-columns: 1fr; }
    .bcfcfart-sidebar { position: static; }
    .bcfcfart-cover img { height: 240px; }
    .bcfcfart-title,
    .bcfcfart-top-meta,
    .bcfcfart-lead,
    .bcfcfart-body,
    .bcfcfart-share { padding-left: 20px; padding-right: 20px; }
    .bcfcfart-lead { margin: 0 20px 0; }
    .bcfcfart-share { flex-direction: column; align-items: flex-start; }
    .bcfcfart-title { padding-top: 14px; }
}

@media (max-width: 480px) {
    .bcfcfart-cover img { height: 200px; }
    .bcfcfshare-btn { width: 100%; justify-content: center; }
    .bcfcfshare-btns { width: 100%; }
}

/* ===== ПОХОЖИЕ СТАТЬИ ===== */
.bcfcfrelated {
    margin-top: 0;
    padding: 28px 36px 32px;
    background: var(--bg2);
    border-top: 1px solid var(--border);
}

.bcfcfrelated-title {
    font-family: 'Nunito', sans-serif;
    font-size: 1.15rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: 18px;
    color: var(--text);
}

.bcfcfrelated-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.bcfcfrelated-item {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--white);
    transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
    text-decoration: none;
}

.bcfcfrelated-item:hover {
    box-shadow: 0 6px 18px rgba(0,0,0,0.09);
    transform: translateY(-4px);
    border-color: var(--accent);
}

.bcfcfrelated-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.bcfcfrelated-item span {
    display: block;
    padding: 12px 14px 14px;
    font-family: 'Nunito', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text);
    transition: color 0.2s;
}

.bcfcfrelated-item:hover span { color: var(--accent); }

/* Время чтения и просмотры */
.bcfcfart-read,
.bcfcfart-views {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

@media (max-width: 1024px) {
    .bcfcfrelated { padding: 24px 28px; }
}

@media (max-width: 768px) {
    .bcfcfrelated { padding: 20px; }
    .bcfcfrelated-grid { grid-template-columns: 1fr; gap: 12px; }
    .bcfcfrelated-item { flex-direction: row !important; align-items: center; }
    .bcfcfrelated-item img { width: 90px; height: 70px; flex-shrink: 0; flex-grow: 0; }
    .bcfcfrelated-item span { padding: 10px 14px; }
}

@media (max-width: 480px) {
    .bcfcfrelated { padding: 16px; }
}

.bcfcfshare-btn.bcfcfs-ok { background: #fff3e0; color: #ee8208; }
.bcfcfshare-btn.bcfcfs-ok:hover { background: #ee8208; color: white; }
.bcfcfshare-btn.bcfcfs-copy {
    background: var(--bg3, #f0f2f5);
    color: var(--text-muted, #6b7280);
    border: none;
}
.bcfcfshare-btn.bcfcfs-copy:hover { background: #e5e7eb; color: var(--text, #1a1a2e); }
.bcfcfshare-btn.bcfcfs-copy.copied { background: #dcfce7; color: #16a34a; }

/* ===================================
   ПОИСК
=================================== */
.bcfcfsearch-form-wrap {
    margin-bottom: 28px;
}
.bcfcfsearch-form {
    display: flex;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.bcfcfsearch-input {
    flex: 1;
    padding: 13px 18px;
    border: 1px solid #e2e8f0;
    border-right: none;
    border-radius: 8px 0 0 8px;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    background: #fff;
}
.bcfcfsearch-input:focus { border-color: var(--primary-color, #2563eb); }
.bcfcfsearch-submit {
    padding: 13px 20px;
    background: var(--primary-color, #2563eb);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 0 8px 8px 0;
    transition: background 0.2s;
}
.bcfcfsearch-submit:hover { background: var(--primary-dark, #1d4ed8); }
.bcfcfsearch-hint { color: #6b7280; font-size: 0.95rem; }
.bcfcfsearch-empty {
    text-align: center;
    padding: 48px 20px;
    color: #6b7280;
}
.bcfcfsearch-empty i { font-size: 3rem; margin-bottom: 16px; display: block; opacity: 0.3; }
.bcfcfsearch-empty p { font-size: 1rem; margin-bottom: 20px; }

/* ===================================
   ПОИСК
=================================== */
.bcfcfsearch-form-wrap {
    margin-bottom: 28px;
    background: var(--bg2, #f8fafc);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: var(--radius, 12px);
    padding: 20px;
}
.bcfcfsearch-heading {
    font-size: 1.4rem;
    font-weight: 800;
    font-family: 'Nunito', sans-serif;
    color: var(--accent);
    margin-bottom: 14px;
}
.bcfcfsearch-form {
    display: flex;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.bcfcfsearch-input {
    flex: 1;
    padding: 11px 16px;
    font-size: 0.95rem;
    border: none;
    outline: none;
    font-family: 'Nunito', sans-serif;
    background: var(--bg2);
}
.bcfcfsearch-btn {
    padding: 11px 18px;
    background: var(--accent);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
    transition: background 0.2s;
}
.bcfcfsearch-btn:hover { filter: brightness(1.1); }
.bcfcfsearch-results-header { margin-bottom: 18px; color: var(--text-muted); }

/* Сетка результатов поиска */
.bcfcfcards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}
@media (max-width: 600px) {
    .bcfcfcards-grid { grid-template-columns: 1fr; }
}

/* Padding для страницы поиска */
.bcfcfarticle.bcfcfsearch-page {
    padding: 20px;
}
.bcfcfarticle > .bcfcfpagination {
    margin-bottom: 20px;
}

/* Мобильная версия - скрыть текст кнопки поиска */
@media (max-width: 600px) {
    .bcfcfsearch-btn .bcfcfbtn-text,
    .bcfcfsearch-btn span {
        display: none;
    }
}

}

/* Nav горизонтальный скролл на десктопе */
@media (min-width: 769px) {
    .bcfcfnav-list {
        cursor: grab;
    }
    .bcfcfnav-list.bcfcfis-dragging {
        cursor: grabbing;
        user-select: none;
    }
}



/* ===== ARTICLE TABLE ===== */
.article-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    margin: 20px 0;
}
.article-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.article-table thead tr {
    background: var(--accent, #1a1a2e);
}
.article-table thead th {
    padding: 11px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #fff !important;
}
.article-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    vertical-align: top;
    line-height: 1.5;
    color: var(--text-dark, #222);
}
.article-table tbody tr:nth-child(even) {
    background: var(--bg-light, #f8f9fa);
}
.article-table tbody tr:hover {
    background: var(--bg-hover, #f0f4ff);
}
.article-table tbody th {
    padding: 10px 14px;
    font-weight: 600;
    color: var(--text-dark, #222);
    background: var(--bg-light, #f8f9fa);
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    white-space: nowrap;
}
@media (max-width: 768px) {
    .article-table-wrap {
        margin: 20px 0;
    }
    .article-table {
        font-size: 12px;
    }
    .article-table thead th {
        font-size: 11px;
        padding: 8px 10px;
        white-space: nowrap;
    }
    .article-table td,
    .article-table tbody th {
        padding: 7px 10px;
        font-size: 12px;
    }
}