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

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

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

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

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

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

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

/* ===== TITLE ===== */
.deaccart-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 ===== */
.deaccart-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 ===== */
.deaccart-cover {
    margin: 24px 0 0;
    overflow: hidden;
}

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

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

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

.deaccart-body h2 {
    font-family: 'Source Sans 3', 'Georgia', 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);
}

.deaccart-body h3 {
    font-family: 'Source Sans 3', 'Georgia', serif;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--accent);
    margin: 1.6em 0 0.5em;
}

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

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

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

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

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

.deaccart-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 ===== */
.deaccart-share {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 36px 28px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

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

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

.deaccshare-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: 'Source Sans 3', 'Georgia', serif;
    box-sizing: border-box;
    cursor: pointer;
}

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

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

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

.deaccwidget-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 ===== */
.deacccat-list { padding: 8px 0; }

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

.deacccat-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;
}

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

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

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

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

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

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

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

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

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

.deaccrec-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;
}

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

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

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

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

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

.deaccrelated-title {
    font-family: 'Source Sans 3', 'Georgia', serif;
    font-size: 1.15rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: 18px;
    color: var(--text);
}

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

.deaccrelated-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;
}

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

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

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

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

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

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

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

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

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

/* ===================================
   ПОИСК
=================================== */
.deaccsearch-form-wrap {
    margin-bottom: 28px;
}
.deaccsearch-form {
    display: flex;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.deaccsearch-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;
}
.deaccsearch-input:focus { border-color: var(--primary-color, #2563eb); }
.deaccsearch-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;
}
.deaccsearch-submit:hover { background: var(--primary-dark, #1d4ed8); }
.deaccsearch-hint { color: #6b7280; font-size: 0.95rem; }
.deaccsearch-empty {
    text-align: center;
    padding: 48px 20px;
    color: #6b7280;
}
.deaccsearch-empty i { font-size: 3rem; margin-bottom: 16px; display: block; opacity: 0.3; }
.deaccsearch-empty p { font-size: 1rem; margin-bottom: 20px; }

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

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

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

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

}

/* Nav горизонтальный скролл на десктопе */
@media (min-width: 769px) {
    .deaccnav-list {
        cursor: grab;
    }
    .deaccnav-list.deaccis-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;
    }
}