/*
Theme Name: Universal Simple Theme
Theme URI: https://example.com
Description: Простой универсальный минималистичный шаблон WordPress на Bootstrap с интеграцией плагинов. Вывод постов в 2 колонки, богатое оформление контента.
Version: 1.2.7
Author: Developer
Author URI: https://example.com
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: universal-simple
Requires PHP: 5.6
*/

/* Основные стили */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
}

/* Шапка сайта */
.site-header {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.site-header .contact-info {
    font-size: 0.9rem;
    color: #6c757d;
}

.site-header .contact-info a {
    color: #0d6efd;
    text-decoration: none;
}

.site-header .contact-info a:hover {
    text-decoration: underline;
}

/* Навигация */
.navbar {
    padding: 0.5rem 0;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.5rem;
}

/* Контент */
.content-wrapper {
    min-height: calc(100vh - 200px);
}

/* Посты */
.post-item {
    background: #fff;
    border-radius: 12px;
    padding: 0;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.post-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.post-item-inner {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Закрепленный пост */
.post-item.sticky {
    border: 2px solid #0d6efd;
    background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 100%);
    position: relative;
}

.post-item.sticky::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #0d6efd, #0dcaf0);
}

.sticky-badge {
    display: inline-block;
    background: linear-gradient(135deg, #0d6efd, #0dcaf0);
    color: #fff;
    padding: 0.35rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(13, 110, 253, 0.3);
}

.post-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.post-title a {
    color: #212529;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: #0d6efd;
}

.post-meta {
    color: #6c757d;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.post-meta span {
    margin-right: 1rem;
    display: inline-flex;
    align-items: center;
}

.post-meta span:last-child {
    margin-right: 0;
}

.post-excerpt {
    color: #495057;
    line-height: 1.8;
    font-size: 0.95rem;
    flex: 1;
}

.read-more {
    display: inline-flex;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    color: #0d6efd;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.read-more:hover {
    color: #0a58ca;
    padding-left: 5px;
}

.read-more::after {
    content: '→';
    margin-left: 0.5rem;
    transition: margin-left 0.3s ease;
}

.read-more:hover::after {
    margin-left: 1rem;
}

/* Миниатюра поста */
.post-thumbnail {
    margin: 0;
    overflow: hidden;
    position: relative;
    background: #f8f9fa;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 соотношение сторон */
    border-bottom: 1px solid #e9ecef;
}

.post-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.5s ease;
}

.post-item:hover .post-thumbnail img {
    transform: scale(1.05);
}

/* Пагинация */
.pagination-wrapper {
    margin: 3rem 0;
    text-align: center;
}

/* Скрываем заголовок пагинации если он есть */
.pagination-wrapper h2,
.pagination-wrapper .screen-reader-text {
    display: none;
}

.pagination {
    display: inline-flex;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.pagination .page-item {
    margin: 0;
}

.pagination .page-item .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0.5rem 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: #fff;
    color: #495057;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.pagination .page-item .page-link:hover {
    background: #f8f9fa;
    border-color: #0d6efd;
    color: #0d6efd;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13,110,253,0.2);
}

.pagination .page-item.active .page-link,
.pagination .page-item .page-link.current {
    background: linear-gradient(135deg, #0d6efd 0%, #0dcaf0 100%);
    border-color: #0d6efd;
    color: #fff;
    box-shadow: 0 4px 12px rgba(13,110,253,0.3);
    transform: translateY(-2px);
    pointer-events: none;
}

.pagination .page-item.disabled .page-link {
    opacity: 0.5;
    pointer-events: none;
    background: #f8f9fa;
    color: #6c757d;
}

/* Кнопки "Назад" и "Вперёд" */
.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link {
    padding: 0.5rem 1rem;
}

/* Адаптивность пагинации */
@media (max-width: 576px) {
    .pagination {
        gap: 0.35rem;
    }
    
    .pagination .page-item .page-link {
        min-width: 2.25rem;
        height: 2.25rem;
        padding: 0.4rem 0.6rem;
        font-size: 0.875rem;
    }
    
    .pagination .page-item:first-child .page-link,
    .pagination .page-item:last-child .page-link {
        padding: 0.4rem 0.75rem;
    }
}

/* Футер */
.site-footer {
    background: #343a40;
    color: #adb5bd;
    padding: 2rem 0;
    margin-top: 3rem;
}

.site-footer a {
    color: #adb5bd;
    text-decoration: none;
}

.site-footer a:hover {
    color: #fff;
}

/* Страница отдельного поста */
.single-post {
    background: #fff;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.single-post .post-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.single-post .post-content {
    font-size: 1.1rem;
    line-height: 1.9;
    color: #2c3e50;
}

/* Стили для контента поста */

/* Параграфы */
.single-post .post-content p,
.post-content p {
    margin-bottom: 1.5rem;
}

/* Заголовки в контенте */
.single-post .post-content h1,
.post-content h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin: 2.5rem 0 1.5rem;
    color: #212529;
    line-height: 1.3;
}

.single-post .post-content h2,
.post-content h2 {
    font-size: 1.95rem;
    font-weight: 700;
    margin: 2.25rem 0 1.25rem;
    color: #212529;
    line-height: 1.3;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.single-post .post-content h3,
.post-content h3 {
    font-size: 1.65rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    color: #343a40;
}

.single-post .post-content h4,
.post-content h4 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 1.75rem 0 0.75rem;
    color: #495057;
}

.single-post .post-content h5,
.post-content h5 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 1.5rem 0 0.5rem;
    color: #6c757d;
}

.single-post .post-content h6,
.post-content h6 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 1.25rem 0 0.5rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Изображения в контенте */
.single-post .post-content img,
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2rem auto;
    display: block;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.single-post .post-content figure,
.post-content figure {
    margin: 2rem 0;
}

.single-post .post-content figcaption,
.post-content figcaption {
    text-align: center;
    font-size: 0.9rem;
    color: #6c757d;
    font-style: italic;
    margin-top: 0.75rem;
}

/* Списки */
.single-post .post-content ul,
.single-post .post-content ol,
.post-content ul,
.post-content ol {
    margin: 1.5rem 0;
    padding-left: 0;
    list-style: none;
}

/* Ненумерованный список */
.single-post .post-content ul li,
.post-content ul li {
    margin-bottom: 0.75rem;
    line-height: 1.8;
    position: relative;
    padding-left: 2rem;
}

.single-post .post-content ul li::before,
.post-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #0d6efd, #0dcaf0);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(13, 110, 253, 0.3);
}

/* Нумерованный список */
.single-post .post-content ol,
.post-content ol {
    counter-reset: custom-counter;
}

.single-post .post-content ol li,
.post-content ol li {
    margin-bottom: 0.75rem;
    line-height: 1.8;
    position: relative;
    padding-left: 2.5rem;
    counter-increment: custom-counter;
}

.single-post .post-content ol li::before,
.post-content ol li::before {
    content: counter(custom-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 1.75rem;
    height: 1.75rem;
    background: linear-gradient(135deg, #0d6efd, #0dcaf0);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(13, 110, 253, 0.25);
}

/* Вложенные списки */
.single-post .post-content ul ul,
.single-post .post-content ol ol,
.single-post .post-content ul ol,
.single-post .post-content ol ul,
.post-content ul ul,
.post-content ol ol,
.post-content ul ol,
.post-content ol ul {
    margin: 0.5rem 0 0.75rem;
}

.single-post .post-content ul ul li::before,
.post-content ul ul li::before {
    width: 6px;
    height: 6px;
    background: #6c757d;
    box-shadow: none;
}

.single-post .post-content ol ol li::before,
.post-content ol ol li::before {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.75rem;
    background: #6c757d;
}

/* Цитаты */
.single-post .post-content blockquote,
.post-content blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 5px solid #0d6efd;
    border-radius: 8px;
    font-size: 1.15rem;
    font-style: italic;
    color: #495057;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.single-post .post-content blockquote::before,
.post-content blockquote::before {
    content: '"';
    font-size: 4rem;
    color: #0d6efd;
    opacity: 0.2;
    position: absolute;
    top: -10px;
    left: 15px;
    font-family: Georgia, serif;
    line-height: 1;
}

.single-post .post-content blockquote p,
.post-content blockquote p {
    margin-bottom: 0.5rem;
}

.single-post .post-content blockquote p:last-child,
.post-content blockquote p:last-child {
    margin-bottom: 0;
}

.single-post .post-content blockquote cite,
.post-content blockquote cite {
    display: block;
    margin-top: 1rem;
    font-size: 0.95rem;
    color: #6c757d;
    font-style: normal;
}

.single-post .post-content blockquote cite::before,
.post-content blockquote cite::before {
    content: '— ';
}

/* Таблицы - сброс всех HTML атрибутов */
.single-post .post-content table,
.post-content table {
    width: 100%;
    margin: 2rem 0;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: none !important;
    font-size: 0.95rem;
}

/* Убираем все старые HTML атрибуты границ */
.single-post .post-content table[border],
.post-content table[border] {
    border: none !important;
}

.single-post .post-content table[cellpadding],
.post-content table[cellpadding] {
    padding: 0 !important;
}

.single-post .post-content table[cellspacing],
.post-content table[cellspacing] {
    border-spacing: 0 !important;
}

.single-post .post-content table thead,
.post-content table thead {
    background: linear-gradient(135deg, #0d6efd 0%, #0dcaf0 100%);
    color: #fff;
}

.single-post .post-content table thead th,
.post-content table thead th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border: none !important;
    border-bottom: 3px solid rgba(255,255,255,0.2) !important;
}

.single-post .post-content table thead th:first-child,
.post-content table thead th:first-child {
    padding-left: 1.5rem;
}

.single-post .post-content table thead th:last-child,
.post-content table thead th:last-child {
    padding-right: 1.5rem;
}

.single-post .post-content table tbody tr,
.post-content table tbody tr {
    border: none !important;
    border-bottom: 1px solid #e9ecef !important;
    transition: all 0.2s ease;
}

.single-post .post-content table tbody tr:nth-child(even),
.post-content table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.single-post .post-content table tbody tr:hover,
.post-content table tbody tr:hover {
    background-color: #e7f3ff;
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.1);
}

.single-post .post-content table tbody tr:last-child,
.post-content table tbody tr:last-child {
    border-bottom: none !important;
}

.single-post .post-content table td,
.single-post .post-content table th,
.post-content table td,
.post-content table th {
    padding: 1rem 1.25rem;
    vertical-align: middle;
    border: none !important;
}

.single-post .post-content table tbody td:first-child,
.post-content table tbody td:first-child {
    padding-left: 1.5rem;
    font-weight: 600;
    color: #212529;
}

.single-post .post-content table tbody td:last-child,
.post-content table tbody td:last-child {
    padding-right: 1.5rem;
}

.single-post .post-content table tbody td,
.post-content table tbody td {
    color: #495057;
    line-height: 1.6;
}

/* Адаптивные таблицы */
@media (max-width: 768px) {
    .single-post .post-content table,
    .post-content table {
        font-size: 0.85rem;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .single-post .post-content table thead th,
    .post-content table thead th,
    .single-post .post-content table tbody td,
    .post-content table tbody td {
        padding: 0.75rem 1rem;
    }
}

/* Код */
.single-post .post-content code,
.post-content code {
    background: #f8f9fa;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    color: #e83e8c;
    border: 1px solid #e9ecef;
}

.single-post .post-content pre,
.post-content pre {
    background: #2d3748;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.single-post .post-content pre code,
.post-content pre code {
    background: none;
    padding: 0;
    border: none;
    color: inherit;
}

/* Горизонтальная линия */
.single-post .post-content hr,
.post-content hr {
    margin: 3rem 0;
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, #0d6efd, transparent);
}

/* Ссылки в контенте */
.single-post .post-content a,
.post-content a {
    color: #0d6efd;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.single-post .post-content a:hover,
.post-content a:hover {
    color: #0a58ca;
    border-bottom-color: #0a58ca;
}

/* Выделение текста */
.single-post .post-content strong,
.single-post .post-content b,
.post-content strong,
.post-content b {
    font-weight: 700;
    color: #212529;
}

.single-post .post-content em,
.single-post .post-content i,
.post-content em,
.post-content i {
    font-style: italic;
}

.single-post .post-content mark,
.post-content mark {
    background: #fff3cd;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
}

/* Отступы для первого элемента */
.single-post .post-content > *:first-child,
.post-content > *:first-child {
    margin-top: 0;
}

/* ========================================
   КАСТОМНЫЕ СТИЛИ ДЛЯ ТАБЛИЦ И ПАГИНАЦИИ
   ======================================== */

/* ТАБЛИЦЫ - Глобальные принудительные стили с максимальной специфичностью */

/* Сброс всех HTML-атрибутов таблиц */
body table[border],
body table[cellpadding],
body table[cellspacing],
body table[width],
body table[bgcolor],
body table[align] {
    border: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

body table[border] *,
body table[cellpadding] *,
body table[cellspacing] * {
    border: 0 !important;
}

/* Базовые стили для всех таблиц на сайте */
html body table,
html body .post-content table,
html body .single-post table,
html body article table,
html body main table,
html body .entry-content table,
html body div table {
    border: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 2rem auto !important;
    background: #ffffff !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 6px 16px rgba(0,0,0,0.1) !important;
    font-size: 0.95rem !important;
    display: table !important;
}

/* Стили заголовка таблицы */
html body table thead,
html body table thead tr {
    background: linear-gradient(135deg, #0d6efd 0%, #0dcaf0 100%) !important;
    border: 0 !important;
}

html body table thead th,
html body table th {
    padding: 1.1rem 1.5rem !important;
    color: #ffffff !important;
    background: transparent !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 0.88rem !important;
    letter-spacing: 1px !important;
    border: 0 !important;
    text-align: left !important;
    vertical-align: middle !important;
    border-bottom: 3px solid rgba(255,255,255,0.25) !important;
}

/* Стили для первой строки таблицы без thead (заголовок) */
html body table > tr:first-child,
html body table > tbody > tr:first-child,
html body .post-content table > tr:first-child,
html body .single-post table > tr:first-child,
html body article table > tr:first-child {
    background: linear-gradient(135deg, #0d6efd 0%, #0dcaf0 100%) !important;
}

html body table > tr:first-child > td,
html body table > tbody > tr:first-child > td,
html body .post-content table > tr:first-child > td,
html body .single-post table > tr:first-child > td,
html body article table > tr:first-child > td {
    padding: 1.1rem 1.5rem !important;
    color: #ffffff !important;
    background: transparent !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 0.88rem !important;
    letter-spacing: 1px !important;
    border: 0 !important;
    text-align: left !important;
    vertical-align: middle !important;
    border-bottom: 3px solid rgba(255,255,255,0.25) !important;
}

/* Стили тела таблицы */
html body table tbody,
html body table tbody tr,
html body table tr {
    background: transparent !important;
}

html body table tbody tr,
html body table > tr:not(:first-child) {
    border: 0 !important;
    border-bottom: 1px solid #e9ecef !important;
    transition: all 0.25s ease !important;
}

html body table tbody tr:nth-child(odd),
html body table > tr:nth-child(odd):not(:first-child) {
    background-color: #ffffff !important;
}

html body table tbody tr:nth-child(even),
html body table > tr:nth-child(even) {
    background-color: #f8f9fa !important;
}

html body table tbody tr:hover,
html body table > tr:not(:first-child):hover {
    background-color: #e7f3ff !important;
    transform: scale(1.005) !important;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.15) inset !important;
}

html body table tbody tr:last-child,
html body table > tr:last-child {
    border-bottom: 0 !important;
}

/* Стили ячеек */
html body table td,
html body table tbody td,
html body table tbody th,
html body table > tr > td {
    padding: 1rem 1.5rem !important;
    border: 0 !important;
    color: #495057 !important;
    background: transparent !important;
    vertical-align: middle !important;
    line-height: 1.6 !important;
}

html body table tbody td:first-child,
html body table tbody th:first-child,
html body table > tr:not(:first-child) > td:first-child {
    padding-left: 1.75rem !important;
    font-weight: 600 !important;
    color: #212529 !important;
}

html body table tbody td:last-child,
html body table tbody th:last-child,
html body table > tr > td:last-child {
    padding-right: 1.75rem !important;
}

/* Адаптивность таблиц */
@media (max-width: 768px) {
    body table {
        font-size: 0.85rem !important;
        display: block !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        border-radius: 8px !important;
    }
    
    body table thead th,
    body table th,
    body table tbody td,
    body table td {
        padding: 0.75rem 1rem !important;
        font-size: 0.85rem !important;
    }
    
    body table tbody td:first-child,
    body table tbody th:first-child {
        padding-left: 1.25rem !important;
    }
    
    body table tbody td:last-child,
    body table tbody th:last-child {
        padding-right: 1.25rem !important;
    }
}

/* ПАГИНАЦИЯ - Новая кастомная разметка */

/* Основной контейнер пагинации */
.pagination-wrapper,
nav.pagination-wrapper,
.navigation.pagination {
    margin: 3.5rem auto 3rem !important;
    padding: 1.5rem 0 !important;
    text-align: center !important;
    clear: both !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 1rem !important;
}

/* Скрываем заголовки */
.pagination-wrapper h2,
.pagination-wrapper .screen-reader-text,
.navigation h2 {
    display: none !important;
}

/* Информация о страницах */
.pagination-info {
    font-size: 0.9rem !important;
    color: #6c757d !important;
    font-weight: 500 !important;
    margin: 0 !important;
    padding: 0.5rem 1rem !important;
    background: #f8f9fa !important;
    border-radius: 20px !important;
    display: inline-block !important;
}

/* Контейнер кнопок пагинации */
.pagination,
.pagination-links,
.nav-links {
    display: inline-flex !important;
    gap: 0.6rem !important;
    padding: 0 !important;
    margin: 0 auto !important;
    list-style: none !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
}

/* Элементы пагинации */
.pagination .page-item,
.pagination li,
.pagination-links > *,
.nav-links > * {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

/* Кнопки и ссылки пагинации */
.pagination .page-link,
.pagination a,
.pagination span,
.pagination-links a,
.pagination-links span,
.nav-links a,
.nav-links span {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 2.75rem !important;
    height: 2.75rem !important;
    padding: 0.6rem 1rem !important;
    border: 2px solid #dee2e6 !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    color: #495057 !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06) !important;
    cursor: pointer !important;
}

/* Ховер эффект */
.pagination .page-link:hover,
.pagination a:hover,
.pagination-links a:hover,
.nav-links a:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    border-color: #0d6efd !important;
    color: #0d6efd !important;
    transform: translateY(-3px) scale(1.05) !important;
    box-shadow: 0 6px 16px rgba(13,110,253,0.25) !important;
}

/* Активная страница */
.pagination .page-item.active .page-link,
.pagination .current,
.pagination-links .current,
.nav-links .current {
    background: linear-gradient(135deg, #0d6efd 0%, #0dcaf0 100%) !important;
    border-color: #0d6efd !important;
    color: #ffffff !important;
    box-shadow: 0 6px 16px rgba(13,110,253,0.35) !important;
    transform: translateY(-3px) scale(1.08) !important;
    pointer-events: none !important;
    font-weight: 700 !important;
}

/* Неактивные/отключенные элементы */
.pagination .page-item.disabled .page-link,
.pagination .disabled,
.pagination-links .disabled,
.nav-links .disabled {
    opacity: 0.4 !important;
    pointer-events: none !important;
    background: #f8f9fa !important;
    color: #adb5bd !important;
    border-color: #e9ecef !important;
    cursor: not-allowed !important;
}

/* Точки (многоточие) */
.pagination .dots,
.pagination-links .dots,
.nav-links .dots {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 0.75rem !important;
    color: #adb5bd !important;
    font-weight: 700 !important;
    min-width: auto !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Кнопки "Назад" и "Вперёд" */
.pagination .prev,
.pagination .next,
.pagination-links .prev,
.pagination-links .next {
    padding: 0.6rem 1.25rem !important;
    font-weight: 700 !important;
    gap: 0.5rem !important;
}

/* Адаптивность пагинации */
@media (max-width: 576px) {
    .pagination-wrapper {
        margin: 2.5rem auto 2rem !important;
        padding: 1rem 0 !important;
    }
    
    .pagination,
    .pagination-links,
    .nav-links {
        gap: 0.4rem !important;
    }
    
    .pagination .page-link,
    .pagination a,
    .pagination span,
    .pagination-links a,
    .pagination-links span,
    .nav-links a,
    .nav-links span {
        min-width: 2.25rem !important;
        height: 2.25rem !important;
        padding: 0.5rem 0.75rem !important;
        font-size: 0.875rem !important;
        border-radius: 8px !important;
    }
    
    .pagination .prev,
    .pagination .next,
    .pagination-links .prev,
    .pagination-links .next {
        padding: 0.5rem 0.9rem !important;
    }
    
    .pagination-info {
        font-size: 0.8rem !important;
        padding: 0.4rem 0.8rem !important;
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .post-thumbnail {
        padding-bottom: 60%; /* немного выше на мобильных */
    }
    
    .post-item-inner {
        padding: 1.25rem;
    }
    
    .post-title {
        font-size: 1.3rem;
    }
    
    .single-post {
        padding: 1.5rem;
    }
    
    .single-post .post-title {
        font-size: 1.85rem;
    }
    
    .single-post .post-content h1,
    .post-content h1 {
        font-size: 1.85rem;
    }
    
    .single-post .post-content h2,
    .post-content h2 {
        font-size: 1.6rem;
    }
    
    .single-post .post-content h3,
    .post-content h3 {
        font-size: 1.4rem;
    }
    
    .single-post .post-content h4,
    .post-content h4 {
        font-size: 1.25rem;
    }
    
    .single-post .post-content table,
    .post-content table {
        font-size: 0.9rem;
    }
    
    .single-post .post-content table td,
    .single-post .post-content table th,
    .post-content table td,
    .post-content table th {
        padding: 0.75rem 0.5rem;
    }
    
    .single-post .post-content blockquote,
    .post-content blockquote {
        padding: 1rem 1.5rem;
        font-size: 1.05rem;
    }
    
    .post-meta span {
        display: block;
        margin-bottom: 0.25rem;
    }
    
    .site-header .contact-info .col-md-4 {
        text-align: center !important;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 992px) {
    .post-thumbnail {
        padding-bottom: 58%; /* чуть выше на планшетах */
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1200px;
    }
}

