/* ===== ЖЕСТКАЯ СЕТКА ДЛЯ БЛОГА (перебивает Bootstrap) ===== */
.blog-page-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 4vw;
}

.blog-grid-layout {
    display: grid !important;
    grid-template-columns: 1fr 380px !important; /* Левая часть гибкая, правая фиксированная */
    gap: 3rem !important;
    align-items: start !important;
    width: 100%;
}

/* Адаптивность: на планшетах и телефонах всё в одну колонку */
@media (max-width: 992px) {
    .blog-grid-layout {
        grid-template-columns: 1fr !important;
    }
}

/* Заголовок и поиск */
.blog-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}
.page-heading {
    font-family: 'Cinzel', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--text-primary);
    margin: 0;
}
.blog-search .search-input-wrap {
    display: flex;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition-smooth);
}
.blog-search .search-input-wrap:focus-within {
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(201, 169, 97, 0.15);
}
.blog-search input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.8rem 1.2rem;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    outline: none;
}
.blog-search input::placeholder { color: var(--text-muted); }
.blog-search button {
    background: rgba(201, 169, 97, 0.1);
    border: none;
    border-left: 1px solid var(--glass-border);
    color: var(--gold);
    padding: 0 1.2rem;
    cursor: pointer;
    transition: 0.3s;
    font-size: 1.1rem;
}
.blog-search button:hover { background: rgba(201, 169, 97, 0.2); }

/* Кнопка добавления */
.btn-accent {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, rgba(201, 169, 97, 0.15), rgba(107, 63, 160, 0.1));
    border: 1px solid rgba(201, 169, 97, 0.4);
    border-radius: 8px;
    color: var(--gold);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-smooth);
}
.btn-accent:hover {
    background: linear-gradient(135deg, rgba(201, 169, 97, 0.25), rgba(107, 63, 160, 0.15));
    box-shadow: 0 0 25px rgba(201, 169, 97, 0.2);
    transform: translateY(-2px);
    color: var(--text-primary);
}

/* ===== КАРТОЧКА СТАТЬИ ===== */
.th-blog {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 2rem;
    transition: var(--transition-smooth);
    position: relative;
}
.th-blog:hover {
    transform: translateY(-5px);
    border-color: rgba(201, 169, 97, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(201, 169, 97, 0.1);
}
.blog-img {
    position: relative;
    height: 480px;
    overflow: hidden;
}
.blog-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.th-blog:hover .blog-img img { transform: scale(1.05); }

.content-type-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 2;
}
.content-type-badge span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.badge-youtube { background: rgba(255, 0, 0, 0.15); border: 1px solid rgba(255, 0, 0, 0.3); color: #ff6b6b; }
.badge-telegram { background: rgba(45, 212, 191, 0.15); border: 1px solid rgba(45, 212, 191, 0.3); color: var(--teal); }
.badge-blog { background: rgba(201, 169, 97, 0.15); border: 1px solid rgba(201, 169, 97, 0.3); color: var(--gold); }

.blog-content { padding: 2rem; }
.blog-meta {
    display: flex;
    gap: 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
}
.blog-meta i { color: var(--gold); margin-right: 0.3rem; }
.blog-title {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}
.blog-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: 0.3s;
}
.blog-title a:hover { color: var(--gold); }
.blog-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.th-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-smooth);
}
.th-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(201, 169, 97, 0.05);
}

/* ===== ПАГИНАЦИЯ ===== */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}
.pg-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.8rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}
.pg-link:hover { border-color: var(--gold); color: var(--gold); }
.pg-link.active {
    background: linear-gradient(135deg, rgba(201, 169, 97, 0.2), rgba(107, 63, 160, 0.1));
    border-color: var(--gold);
    color: var(--gold);
    font-weight: 600;
    box-shadow: 0 0 15px rgba(201, 169, 97, 0.15);
}

/* ===== БОКОВАЯ ПАНЕЛЬ (САЙДБАР) ===== */
.sidebar-widget {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}
.widget-title {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--glass-border);
    position: relative;
}
.widget-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--gold);
    box-shadow: 0 0 10px var(--gold);
}

.recent-post {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.2rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.recent-post:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.media-img {
    width: 70px;
    height: 70px;
    min-width: 70px;
    border-radius: 8px;
    overflow: hidden;
}
.media-img img { width: 100%; height: 100%; object-fit: cover; transition: 0.3s; }
.recent-post:hover .media-img img { transform: scale(1.1); }
.post-title {
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 0.4rem;
}
.post-title a { color: var(--text-primary); text-decoration: none; transition: 0.3s; }
.post-title a:hover { color: var(--gold); }
.recent-post-meta { font-size: 0.8rem; color: var(--text-muted); }
.recent-post-meta a { color: var(--text-muted); text-decoration: none; display: flex; align-items: center; }
.recent-post-meta a:hover { color: var(--gold); }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.tag-cloud a {
    padding: 0.4rem 0.9rem;
    background: rgba(107, 63, 160, 0.1);
    border: 1px solid rgba(107, 63, 160, 0.2);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-decoration: none;
    transition: 0.3s;
}
.tag-cloud a:hover {
    background: rgba(201, 169, 97, 0.1);
    border-color: var(--gold);
    color: var(--gold);
}

.channel-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 0, 0, 0.05);
    border: 1px solid rgba(255, 0, 0, 0.15);
    border-radius: 12px;
}
.channel-avatar {
    width: 50px; height: 50px; min-width: 50px;
    background: linear-gradient(135deg, #ff0000, #cc0000);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.5rem;
}
.channel-info { flex: 1; }
.channel-name { font-size: 1rem; color: var(--text-primary); margin-bottom: 0.2rem; }
.channel-desc { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.5rem; line-height: 1.3; }
.channel-link {
    display: inline-flex; align-items: center; gap: 0.4rem;
    color: #ff4d4d; font-size: 0.85rem; font-weight: 600; text-decoration: none;
    transition: 0.3s;
}
.channel-link:hover { color: #ff6b6b; text-decoration: underline; }

@media (max-width: 992px) {
    .blog-header-row { flex-direction: column; align-items: stretch; text-align: center; }
    .blog-search .search-input-wrap { max-width: 400px; margin: 0 auto; }
}
@media (max-width: 600px) {
    .blog-page-wrapper { padding: 2rem 1.5rem; }
    .blog-content { padding: 1.5rem; }
    .blog-title { font-size: 1.3rem; }
}