/*
Theme Name: Neurosetkin
Theme URI: https://neurosetkin.site/
Author: Neurosetkin
Author URI: https://neurosetkin.site/
Description: Тема о нейросетях простым языком
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: neurosetkin
*/

/* ============================================
   ПЕРЕМЕННЫЕ И СБРОС
   ============================================ */

:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #818cf8;
    --secondary: #7c3aed;
    --accent: #06b6d4;
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --bg-dark: #0f172a;
    --text: #1e293b;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.3s ease;
    --max-width: 1200px;
    --header-height: 70px;
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

/* ============================================
   ЛОАДЕР
   ============================================ */

.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   ШАПКА
   ============================================ */

.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    height: var(--header-height);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 24px;
}

/* Логотип */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-icon {
    font-size: 28px;
    line-height: 1;
}

.logo-text span {
    font-size: 1.3rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Навигация */
.main-nav {
    flex: 1;
}

.main-nav ul {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav ul li {
    list-style: none;
}

.main-nav ul li a {
    display: block;
    padding: 8px 16px;
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.main-nav ul li a:hover,
.main-nav ul li.current-menu-item a,
.main-nav ul li.current_page_item a {
    color: var(--primary);
    background: rgba(79, 70, 229, 0.08);
}

/* Подменю */
.main-nav ul li ul.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    min-width: 200px;
    z-index: 100;
}

.main-nav ul li:hover > ul.sub-menu {
    display: block;
}

.main-nav ul li {
    position: relative;
}

.main-nav ul li ul.sub-menu li a {
    padding: 8px 14px;
    font-size: 0.9rem;
}

/* Поиск в шапке */
.header-search {
    flex-shrink: 0;
}

.header-search form {
    display: flex;
}

.header-search input {
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.9rem;
    width: 200px;
    background: var(--bg);
    transition: all var(--transition);
    outline: none;
    font-family: inherit;
}

.header-search input:focus {
    width: 260px;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.header-search input::placeholder {
    color: var(--text-muted);
}

/* Кнопка мобильного меню */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    color: var(--text);
    line-height: 1;
}

/* ============================================
   ОСНОВНОЙ КОНТЕЙНЕР
   ============================================ */

.main-container {
    max-width: var(--max-width);
    margin: 30px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    flex: 1;
}

.content {
    min-width: 0;
}

/* ============================================
   HERO СЕКЦИЯ
   ============================================ */

.hero-section {
    background: var(--gradient);
    border-radius: var(--radius);
    padding: 60px 40px;
    color: white;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
}

.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero-desc {
    font-size: 1.15rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ============================================
   СЕКЦИИ
   ============================================ */

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title-icon {
    font-size: 1.3rem;
}

.section-link {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.section-link:hover {
    gap: 8px;
}

/* ============================================
   СЕТКА СТАТЕЙ
   ============================================ */

.articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

/* ============================================
   КАРТОЧКА СТАТЬИ
   ============================================ */

.article-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.article-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.article-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: var(--gradient);
    text-decoration: none;
}

.article-image-icon {
    font-size: 3rem;
}

.article-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-category {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(79, 70, 229, 0.08);
    padding: 4px 10px;
    border-radius: 50px;
    margin-bottom: 10px;
    text-decoration: none;
    width: fit-content;
}

.article-category:hover {
    background: rgba(79, 70, 229, 0.15);
}

.article-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
}

.article-title a {
    color: var(--text);
    text-decoration: none;
}

.article-title a:hover {
    color: var(--primary);
}

.article-excerpt {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 12px;
    flex: 1;
}

.article-meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
    padding-top: 12px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

/* ============================================
   FEATURED (ГЛАВНАЯ БОЛЬШАЯ СТАТЬЯ)
   ============================================ */

.featured-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 40px;
}

.featured-card {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all var(--transition);
}

.featured-card:hover {
    box-shadow: var(--shadow-lg);
}

.featured-card .article-image {
    aspect-ratio: auto;
    min-height: 300px;
}

.featured-card .article-content {
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-card .article-title {
    font-size: 1.5rem;
}

/* ============================================
   САЙДБАР
   ============================================ */

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.widget {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
    color: var(--text);
}

/* Категории в сайдбаре */
.categories-list,
.widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.categories-list li,
.widget ul li {
    list-style: none;
}

.categories-list li a,
.widget ul li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.95rem;
    transition: all var(--transition);
    text-decoration: none;
}

.categories-list li a:hover,
.widget ul li a:hover {
    background: rgba(79, 70, 229, 0.06);
    color: var(--primary);
}

.cat-icon {
    margin-right: 8px;
}

.cat-count {
    background: var(--bg);
    padding: 2px 8px;
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Популярные записи */
.popular-posts {
    list-style: none;
    margin: 0;
    padding: 0;
}

.popular-posts li {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    list-style: none;
}

.popular-posts li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.popular-posts li:first-child {
    padding-top: 0;
}

.popular-post-image {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.popular-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-post-content {
    flex: 1;
    min-width: 0;
}

.popular-post-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none;
    line-height: 1.4;
}

.popular-post-title:hover {
    color: var(--primary);
}

.popular-post-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Облако тегов */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tags-cloud a {
    display: inline-block;
    padding: 5px 12px;
    background: var(--bg);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--text-light);
    transition: all var(--transition);
    text-decoration: none;
}

.tags-cloud a:hover {
    background: var(--primary);
    color: white;
}

/* Виджет подписки */
.subscribe-widget {
    background: var(--gradient);
    color: white;
}

.subscribe-widget .widget-title {
    color: white;
    border-bottom-color: rgba(255,255,255,0.2);
}

.subscribe-text {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 16px;
}

.subscribe-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.subscribe-form input[type="email"] {
    padding: 12px 16px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    outline: none;
    font-family: inherit;
    width: 100%;
}

.subscribe-form button {
    padding: 12px;
    background: white;
    color: var(--primary);
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all var(--transition);
    font-family: inherit;
}

.subscribe-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* ============================================
   ОДИНОЧНАЯ ЗАПИСЬ
   ============================================ */

.single-post {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 32px;
}

.single-post-header {
    padding: 32px 32px 0;
}

.single-post-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.3;
    margin: 12px 0 16px;
    color: var(--text);
}

.single-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.9rem;
    color: var(--text-muted);
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.single-post-image {
    margin: 0;
}

.single-post-image img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

.single-post-content {
    padding: 32px;
    font-size: 1.05rem;
    line-height: 1.8;
}

.single-post-content h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 32px 0 16px;
    color: var(--text);
}

.single-post-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 24px 0 12px;
    color: var(--text);
}

.single-post-content p {
    margin-bottom: 16px;
}

.single-post-content ul,
.single-post-content ol {
    margin: 0 0 16px 24px;
    list-style: disc;
}

.single-post-content ol {
    list-style: decimal;
}

.single-post-content li {
    margin-bottom: 8px;
    list-style: inherit;
}

.single-post-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 16px 24px;
    margin: 24px 0;
    background: rgba(79, 70, 229, 0.04);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: var(--text-light);
}

.single-post-content pre {
    background: var(--bg-dark);
    color: #e2e8f0;
    padding: 20px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin: 24px 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.single-post-content code {
    background: rgba(79, 70, 229, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--primary-dark);
}

.single-post-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.single-post-content img {
    border-radius: var(--radius-sm);
    margin: 16px 0;
}

.single-post-content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.single-post-content a:hover {
    color: var(--primary-dark);
}

/* Теги записи */
.single-post-tags {
    padding: 20px 32px 32px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.single-post-tags a {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--text-light);
    text-decoration: none;
    transition: all var(--transition);
}

.single-post-tags a:hover {
    background: var(--primary);
    color: white;
}

/* ============================================
   НАВИГАЦИЯ МЕЖДУ ЗАПИСЯМИ
   ============================================ */

.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 32px;
}

.post-nav-link {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    text-decoration: none;
}

.post-nav-link:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.post-nav-link.next {
    text-align: right;
}

.post-nav-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.post-nav-title {
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.4;
}

.post-nav-link:hover .post-nav-title {
    color: var(--primary);
}

/* ============================================
   КОММЕНТАРИИ
   ============================================ */

.comments-section {
    margin-bottom: 32px;
}

.comments-area {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
}

.comments-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border);
}

.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment-list .comment {
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    list-style: none;
}

.comment-list .comment:last-child {
    border-bottom: none;
}

.comment-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.comment-avatar {
    flex-shrink: 0;
}

.comment-avatar img {
    border-radius: 50%;
}

.comment-author-name {
    font-weight: 700;
    font-size: 0.95rem;
}

.comment-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.comment-content {
    font-size: 0.95rem;
    line-height: 1.6;
}

.comment-content p {
    margin-bottom: 8px;
}

.reply a {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
}

/* Вложенные комментарии */
.comment-list .children {
    list-style: none;
    margin: 0;
    padding-left: 40px;
}

.comment-list .children .comment {
    list-style: none;
}

/* Форма комментариев */
.comment-form {
    margin-top: 24px;
}

.comment-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color var(--transition);
    outline: none;
    margin-bottom: 16px;
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.comment-form textarea {
    resize: vertical;
    min-height: 120px;
}

.comment-form .submit-btn,
.comment-form input[type="submit"] {
    display: inline-block;
    padding: 12px 32px;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}

.comment-form .submit-btn:hover,
.comment-form input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.comment-awaiting-moderation {
    background: #fef3c7;
    color: #92400e;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.no-comments {
    color: var(--text-muted);
    font-style: italic;
}

/* ============================================
   ПАГИНАЦИЯ
   ============================================ */

.pagination {
    margin: 32px 0;
    text-align: center;
}

.pagination .nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
    box-shadow: var(--shadow);
    transition: all var(--transition);
    text-decoration: none;
}

.pagination .page-numbers:hover {
    background: var(--primary);
    color: white;
}

.pagination .page-numbers.current {
    background: var(--primary);
    color: white;
}

/* ============================================
   404 СТРАНИЦА
   ============================================ */

.error-404 {
    text-align: center;
    padding: 80px 20px;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.error-404-code {
    font-size: 8rem;
    font-weight: 900;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 16px;
}

.error-404 h1 {
    font-size: 1.8rem;
    margin-bottom: 16px;
}

.error-404 p {
    color: var(--text-light);
    max-width: 500px;
    margin: 0 auto 24px;
}

.btn {
    display: inline-block;
    padding: 12px 32px;
    background: var(--gradient);
    color: white;
    border-radius: var(--radius-sm);
    font-weight: 700;
    transition: all var(--transition);
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

/* ============================================
   ПУСТЫЕ РЕЗУЛЬТАТЫ
   ============================================ */

.no-posts {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.no-posts h2 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.no-posts p {
    color: var(--text-light);
    max-width: 500px;
    margin: 0 auto;
}

/* ============================================
   ПОДВАЛ
   ============================================ */

.footer {
    background: var(--bg-dark);
    color: #cbd5e1;
    margin-top: auto;
}

.footer-main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 48px 20px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 32px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-brand .logo-text span {
    color: white;
    -webkit-text-fill-color: white;
}

.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.6;
    opacity: 0.8;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    font-size: 1.2rem;
    text-decoration: none;
    transition: all var(--transition);
}

.footer-social a:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

.footer-column h4 {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
}

.footer-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-column ul li {
    margin-bottom: 10px;
    list-style: none;
    font-size: 0.9rem;
}

.footer-column ul li a {
    color: #94a3b8;
    text-decoration: none;
    transition: color var(--transition);
}

.footer-column ul li a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px;
    text-align: center;
    font-size: 0.85rem;
    color: #64748b;
    max-width: var(--max-width);
    margin: 0 auto;
}

/* ============================================
   КНОПКА "НАВЕРХ"
   ============================================ */

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
}

/* ============================================
   АНИМАЦИИ
   ============================================ */

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   WORDPRESS СТАНДАРТНЫЕ КЛАССЫ
   ============================================ */

.wp-caption {
    max-width: 100%;
    margin-bottom: 16px;
}

.wp-caption img {
    border-radius: var(--radius-sm);
}

.wp-caption-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 8px;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.alignleft {
    float: left;
    margin: 0 20px 12px 0;
}

.alignright {
    float: right;
    margin: 0 0 12px 20px;
}

.alignwide {
    margin-left: -32px;
    margin-right: -32px;
    max-width: calc(100% + 64px);
}

.alignfull {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    max-width: 100vw;
    width: 100vw;
}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    word-wrap: normal !important;
}

.sticky .article-card {
    border-left: 4px solid var(--primary);
}

/* WordPress виджеты стандартные */
.widget select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
}

.widget .search-form {
    display: flex;
    gap: 8px;
}

.widget .search-form .search-field {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
}

.widget .search-form .search-field:focus {
    border-color: var(--primary);
}

.widget .search-form .search-submit {
    padding: 10px 16px;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */

@media (max-width: 1024px) {
    .main-container {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-main {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .main-nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: white;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
        padding: 16px;
    }
    
    .main-nav.active {
        display: block;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 0;
    }
    
    .main-nav ul li a {
        padding: 12px 16px;
    }
    
    .main-nav ul li ul.sub-menu {
        position: static;
        box-shadow: none;
        padding-left: 16px;
        display: none;
    }
    
    .main-nav ul li:hover > ul.sub-menu {
        display: block;
    }
    
    .header-search {
        display: none;
    }
    
    .hero-section {
        padding: 40px 24px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-card {
        grid-template-columns: 1fr;
    }
    
    .featured-card .article-image {
        min-height: 200px;
    }
    
    .sidebar {
        grid-template-columns: 1fr;
    }
    
    .footer-main {
        grid-template-columns: 1fr;
    }
    
    .single-post-header {
        padding: 24px 20px 0;
    }
    
    .single-post-title {
        font-size: 1.5rem;
    }
    
    .single-post-content {
        padding: 24px 20px;
    }
    
    .single-post-tags {
        padding: 16px 20px 24px;
    }
    
    .post-navigation {
        grid-template-columns: 1fr;
    }
    
    .comments-area {
        padding: 24px 20px;
    }
    
    .comment-list .children {
        padding-left: 20px;
    }
    
    .error-404-code {
        font-size: 5rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-desc {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.2rem;
    }
    
    .single-post-meta {
        gap: 8px;
        font-size: 0.8rem;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 42px;
        height: 42px;
    }
}
.single-post .entry-content,
.single .post-content,
article.post {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

body.single-post {
    overflow-y: auto !important;
}
