/* ===================================
   ШАБЛОН 5 — SPLIT LAYOUT
   Lora + Poppins
   Левая фиксированная панель зелёная
   Правый скроллящийся контент белый
   Акцент #2d4a22 (тёмно-зелёный)
=================================== */

:root {
    --green:       #2d4a22;
    --green2:      #1a2e14;
    --green3:      #0f1f0a;
    --green-light: #e8f5e0;
    --bg:          #f9f7f4;
    --white:       #ffffff;
    --text:        #2c2c2c;
    --text-muted:  #777777;
    --border:      #e8e4de;
    --shadow-sm:   0 1px 4px rgba(0,0,0,.07);
    --shadow-md:   0 4px 16px rgba(0,0,0,.10);
    --radius:      10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }

body {
    font-family: 'Poppins', 'Arial', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    display: flex;
    flex-direction: column;
}

a { text-decoration: none; color: inherit; transition: all .2s; }
img { max-width: 100%; height: auto; display: block; }

/* ===== MOBILE TOP ===== */
.bacfamobile-top {
    display: none;
    background: var(--green);
    padding: 14px 20px;
    align-items: center;
    justify-content: space-between;
}
.bacfam-logo {
    color: #fff;
    font-family: 'Lora', serif;
    font-weight: 700;
    font-size: 17px;
}
.bacfam-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

/* ===== SPLIT WRAP ===== */
.bacfawrap {
    display: flex;
    flex: 1;
    min-height: 100vh;
}

/* ===== LEFT PANEL ===== */
.bacfapanel {
    width: 300px;
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--green) 0%, var(--green2) 60%, var(--green3) 100%);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 36px 28px;
}

.bacfapanel-logo { margin-bottom: 32px; }
.bacfalogo-title {
    display: block;
    font-family: 'Lora', serif;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 6px;
}
.bacfalogo-sub {
    display: block;
    font-size: 12px;
    color: rgba(255,255,255,.45);
    font-weight: 300;
    line-height: 1.5;
}

.bacfapanel-nav { margin-bottom: 32px; }
.bacfapanel-nav ul { list-style: none; }
.bacfapanel-nav li { margin-bottom: 2px; }
.bacfapanel-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    color: rgba(255,255,255,.7);
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    transition: all .2s;
}
.bacfapanel-nav a:hover,
.bacfapanel-nav a.active {
    background: rgba(255,255,255,.12);
    color: #fff;
}
.bacfapanel-nav a i { width: 16px; text-align: center; opacity: .7; }

.bacfacats-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,.35);
    margin-bottom: 10px;
    padding: 0 12px;
}

.bacfapanel-cats { margin-bottom: 32px; }
.bacfapanel-cats ul { list-style: none; }
.bacfapanel-cats li { margin-bottom: 2px; }
.bacfapanel-cats a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 12px;
    color: rgba(255,255,255,.6);
    font-size: 12px;
    border-radius: 6px;
    transition: all .2s;
}
.bacfapanel-cats a:hover { background: rgba(255,255,255,.08); color: #fff; }
.bacfapanel-cats a span {
    background: rgba(255,255,255,.15);
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 11px;
}

.bacfapanel-footer {
    margin-top: auto;
    font-size: 11px;
    color: rgba(255,255,255,.3);
    line-height: 1.6;
}
.bacfapanel-footer a { color: rgba(255,255,255,.3); }
.bacfapanel-footer a:hover { color: rgba(255,255,255,.6); }

/* ===== RIGHT CONTENT ===== */
.bacfacontent { flex: 1; overflow-y: auto; }

/* ===== TOPBAR ===== */
.bacfatopbar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 14px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 10;
}
.bacfacrumbs {
    font-size: 13px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 8px;
}
.bacfacrumbs a { color: var(--green); }
.bacfasearch-inp {
    background: #f5f3ef;
    border: none;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 13px;
    outline: none;
    width: 180px;
    font-family: inherit;
    cursor: pointer;
}

/* ===== MAIN ===== */
.bacfamain { padding: 48px; }

/* ===== CARDS ===== */
.bacfasection-title {
    font-family: 'Lora', serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--green2);
    margin-bottom: 20px;
}

.bacfacards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}
.bacfacard {
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s, transform .2s;
    display: block;
    color: var(--text);
}
.bacfacard:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.bacfacard-img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    background: #ede9e3;
}
.bacfacard-body { padding: 16px; }
.bacfacard-cat {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--green);
    margin-bottom: 6px;
}
.bacfacard-title {
    font-family: 'Lora', serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--green2);
    line-height: 1.45;
    margin-bottom: 8px;
}
.bacfacard-meta { font-size: 12px; color: var(--text-muted); }

/* ===== FEATURED ===== */
.bacfafeatured {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 32px;
    text-decoration: none;
    color: var(--text);
    transition: box-shadow .2s;
}
.bacfafeatured:hover { box-shadow: var(--shadow-md); }
.bacfafeatured-img { width: 100%; height: 280px; object-fit: cover; background: #ede9e3; }
.bacfafeatured-body { padding: 32px; display: flex; flex-direction: column; justify-content: center; }
.bacfafeatured-cat { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--green); margin-bottom: 10px; }
.bacfafeatured-title { font-family: 'Lora', serif; font-size: 22px; font-weight: 700; color: var(--green2); line-height: 1.35; margin-bottom: 10px; }
.bacfafeatured-date { font-size: 12px; color: var(--text-muted); }

/* ===== PAGINATION ===== */
.bacfapagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 32px 0;
}
.bacfapagination a,
.bacfapagination span {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--green);
}
.bacfapagination a:hover { background: var(--green); color: #fff; border-color: var(--green); }
.bacfapagination span.active { background: var(--green); color: #fff; border-color: var(--green); }

@media (max-width: 1400px) {
    .bacfacards { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
    .bacfapanel { display: none; }
    .bacfawrap { flex-direction: column; min-height: auto; }
    .bacfacontent { overflow-y: visible; }
    .bacfaart-content { overflow-y: visible; }
    .bacfamobile-top { display: flex; }
    .bacfamain { padding: 24px 16px; }
    .bacfatopbar { padding: 10px 16px; flex-wrap: wrap; gap: 8px; }
    .bacfacrumbs { font-size: 12px; gap: 5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; flex: 1; min-width: 0; }
    .bacfasearch-inp { width: 120px; font-size: 12px; padding: 6px 12px; }
    .bacfafeatured { grid-template-columns: 1fr; }
    .bacfafeatured-img { height: 200px; }
    .bacfafeatured-body { padding: 20px; }
    .bacfacards { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .bacfaart-layout { flex-direction: column; }
    .bacfaart-sidebar { position: static !important; width: 100%; }
    .bacfaart-main { padding: 20px 16px; }
    .bacfaart-topbar { padding: 10px 16px; flex-wrap: wrap; gap: 8px; }
}

@media (max-width: 500px) {
    .bacfacards { grid-template-columns: 1fr; }
}

/* ===== MOBILE MENU ===== */
.bacfamobile-menu {
    display: none;
    flex-direction: column;
    background: var(--green2);
    padding: 8px 0;
}
.bacfamobile-menu a {
    color: rgba(255,255,255,.8);
    padding: 10px 20px;
    font-size: 14px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    gap: 10px;
}
.bacfamobile-menu a:hover { background: rgba(255,255,255,.1); color: #fff; }

/* ===== FOOTER ===== */
.bacfafooter {
    background: var(--green2);
    color: rgba(255,255,255,.5);
    text-align: center;
    padding: 20px;
    font-size: 12px;
}
.bacfafooter a { color: rgba(255,255,255,.5); }
.bacfafooter a:hover { color: #fff; }


/* ===== 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(--primary-color, #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;
    }
}