/*
Theme Name: KaksDelat2
Theme URI: https://kaksdelat2.ru
Author: Ваше Имя
Author URI: https://kaksdelat2.ru
Description: Суперлегкая и быстрая тема для сайта инструкций "Как сделать".
Version: 1.0.0
License: GPL v2 or later
Text Domain: kaksdelat2
*/

/* Базовый сброс стилей и шрифты */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Трендовые цвета (можно поменять) */
    --color-primary: #4361ee; /* Яркий, но не кричащий синий */
    --color-secondary: #f72585; /* Акцентный розовый */
    --color-dark: #22223b; /* Глубокий темный для текста */
    --color-light: #f8f9fa; /* Светлый фон */
    --color-gray: #adb5bd; /* Серый для второстепенного текста */
    --color-success: #4cc9f0; /* Светло-голубой для ссылок/акцентов */

    /* Трендовые шрифты (подключим через functions.php) */
    --font-heading: 'Inter', 'Segoe UI', sans-serif;
    --font-body: 'Manrope', 'Open Sans', sans-serif;

    /* Максимальная ширина контента */
    --container-width: 1200px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 18px; /* Современный, достаточно крупный текст */
    line-height: 1.7;
    color: var(--color-dark);
    background-color: var(--color-light);
    overflow-x: hidden;
}

/* Контейнер для центрирования контента */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Базовые стили для ссылок */
a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover {
    color: var(--color-secondary);
}

/* Заголовки */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--color-dark);
}
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    body { font-size: 16px; }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    .container { padding: 0 15px; }
}
/* ===== Шапка ===== */
.site-header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo a {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-dark);
}

.site-logo img {
    max-height: 50px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--color-dark);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.nav-menu a:hover:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-primary);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--color-dark);
    transition: 0.3s;
}

/* ===== Основной контент ===== */
.site-main {
    min-height: 60vh;
    padding: 3rem 0;
}

.posts-list article,
.archive-item {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.posts-list article:hover,
.archive-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.entry-title {
    margin-bottom: 1rem;
}

.entry-title a {
    color: var(--color-dark);
}

.entry-title a:hover {
    color: var(--color-primary);
}

.post-thumbnail {
    margin: 1.5rem 0;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.entry-meta {
    font-size: 0.9rem;
    color: var(--color-gray);
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
}

/* ===== Подвал ===== */
.site-footer {
    background-color: var(--color-dark);
    color: white;
    padding: 3rem 0 2rem;
    margin-top: 3rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-nav {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.footer-nav a {
    color: rgba(255,255,255,0.7);
}

.footer-nav a:hover {
    color: white;
}

/* ===== Комментарии ===== */
.comment-list {
    list-style: none;
    padding: 0;
}

.comment {
    background: var(--color-light);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
}

.comment-form {
    margin-top: 2rem;
}

.comment-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-family: inherit;
}

/* ===== Кнопки ===== */
.button {
    display: inline-block;
    background-color: var(--color-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.button:hover {
    background-color: var(--color-secondary);
    color: white;
}

/* ===== Пагинация ===== */
.navigation.pagination {
    display: flex;
    justify-content: center;
    margin: 3rem 0;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
}

.page-numbers {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.page-numbers.current {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* ===== Адаптивность ===== */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }
    
    .nav-menu.is-open {
        display: flex;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .posts-list article,
    .archive-item {
        padding: 1.5rem;
    }
}
/* ===== Главная страница ===== */

/* Герой секция */
.hero-section {
    background: linear-gradient(135deg, var(--color-primary) 0%, #3a0ca3 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 3rem;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: white;
}

.hero-subtitle {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    opacity: 0.9;
}

.hero-search {
    max-width: 500px;
    margin: 2rem auto;
}

.hero-search input[type="search"] {
    width: 100%;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Секция категорий */
.categories-section {
    padding: 3rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    display: block;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.category-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.category-name {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--color-dark);
}

.category-count {
    font-size: 0.9rem;
    color: var(--color-gray);
}

/* Сетка постов на главной */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.post-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.post-thumbnail-link {
    display: block;
    height: 200px;
    overflow: hidden;
}

.post-thumbnail-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .post-thumbnail-link img {
    transform: scale(1.05);
}

.post-card-content {
    padding: 1.5rem;
}

.post-categories {
    margin-bottom: 0.5rem;
}

.post-categories a {
    font-size: 0.8rem;
    color: var(--color-primary);
    font-weight: 500;
}

.post-title {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.post-title a {
    color: var(--color-dark);
}

.post-excerpt {
    font-size: 0.95rem;
    color: var(--color-gray);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--color-gray);
}

.reading-time {
    color: var(--color-success);
    font-weight: 500;
}

.view-all-container {
    text-align: center;
    margin-top: 3rem;
}

.button-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* CTA секция */
.cta-section {
    background: var(--color-light);
    padding: 4rem 0;
    margin-top: 4rem;
    text-align: center;
}

.cta-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-text {
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
    color: var(--color-gray);
}

/* Адаптивность главной */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
}
/* ===== Дополнительные стили для главной ===== */

.no-posts-message {
    text-align: center;
    padding: 60px 20px;
    background: var(--color-light);
    border-radius: 12px;
    margin: 2rem 0;
}

.no-posts-message h3 {
    color: var(--color-dark);
    margin-bottom: 1rem;
}

.no-posts-message p {
    color: var(--color-gray);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.cta-search {
    max-width: 500px;
    margin: 2rem auto 0;
}

.cta-search input[type="search"] {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 50px;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 1rem;
}

.cta-search input[type="search"]::placeholder {
    color: rgba(255,255,255,0.7);
}

.cta-search input[type="search"]:focus {
    outline: none;
    border-color: white;
    background: rgba(255,255,255,0.15);
}

/* Анимации */
.category-card, .post-card {
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px) scale(1.02);
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

/* Загрузка изображений */
.post-thumbnail-link img {
    transition: transform 0.5s ease;
}

.post-card:hover .post-thumbnail-link img {
    transform: scale(1.05);
}

/* Адаптивность для времени чтения */
@media (max-width: 480px) {
    .post-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .reading-time {
        font-size: 0.8rem;
    }
}

/* Стили для пустого состояния */
.hero-section:has(+ .no-posts-message) {
    margin-bottom: 0;
}

.cta-section:has(.no-posts-message + &) {
    margin-top: 2rem;
}
/* ===== Стили для форм поиска ===== */

/* Общие стили для всех полей поиска */
.search-form {
    position: relative;
    display: flex;
}

.search-form .search-field {
    flex: 1;
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 50px 0 0 50px;
    background: white;
    font-family: var(--font-body);
    transition: all 0.3s ease;
}

.search-form .search-field:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.search-form .search-submit {
    padding: 15px 30px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 0 50px 50px 0;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.3s ease;
}

.search-form .search-submit:hover {
    background: var(--color-secondary);
}

.search-form .search-submit:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.3);
}

/* Специфичные стили для hero-search */
.hero-search .search-form .search-field {
    padding: 18px 25px;
    font-size: 18px;
    border-radius: 50px 0 0 50px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.hero-search .search-form .search-field::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.hero-search .search-form .search-field:focus {
    border-color: white;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.hero-search .search-form .search-submit {
    padding: 18px 35px;
    font-size: 18px;
    background: white;
    color: var(--color-primary);
    border-radius: 0 50px 50px 0;
}

.hero-search .search-form .search-submit:hover {
    background: var(--color-light);
    color: var(--color-secondary);
}

/* Стили для CTA search */
.cta-search .search-form .search-field {
    padding: 15px 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50px 0 0 50px;
}

.cta-search .search-form .search-field::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.cta-search .search-form .search-field:focus {
    border-color: white;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.cta-search .search-form .search-submit {
    padding: 15px 25px;
    background: white;
    color: var(--color-primary);
    border-radius: 0 50px 50px 0;
}

.cta-search .search-form .search-submit:hover {
    background: var(--color-light);
    color: var(--color-secondary);
}

/* Адаптивность для форм поиска */
@media (max-width: 768px) {
    .search-form {
        flex-direction: column;
    }
    
    .search-form .search-field {
        border-radius: 50px;
        margin-bottom: 10px;
        text-align: center;
    }
    
    .search-form .search-submit {
        border-radius: 50px;
        width: 100%;
    }
    
    /* Отменяем специфичные стили для мобильных */
    .hero-search .search-form .search-field,
    .hero-search .search-form .search-submit,
    .cta-search .search-form .search-field,
    .cta-search .search-form .search-submit {
        border-radius: 50px;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .search-form .search-field {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .search-form .search-submit {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .hero-search .search-form .search-field,
    .hero-search .search-form .search-submit {
        padding: 14px 20px;
        font-size: 16px;
    }
}
/* ===== Улучшенные стили для формы поиска ===== */

/* Базовая форма */
.search-form {
    position: relative;
    display: flex;
    max-width: 600px;
    margin: 0 auto;
}

.search-field {
    flex: 1;
    padding: 16px 24px;
    font-size: 16px;
    line-height: 1.5;
    border: 2px solid #e0e0e0;
    border-right: none;
    border-radius: 50px 0 0 50px;
    background: white;
    font-family: var(--font-body);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--color-dark);
}

.search-field:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.15);
}

.search-field::placeholder {
    color: var(--color-gray);
    opacity: 0.8;
}

/* Кнопка поиска с иконкой */
.search-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 28px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 0 50px 50px 0;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 8px;
}

.search-submit:hover {
    background: var(--color-secondary);
    transform: translateX(2px);
}

.search-submit:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.3);
}

.search-submit:active {
    transform: translateY(1px);
}

/* Иконка поиска */
.search-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.2s ease;
}

.search-submit:hover .search-icon {
    transform: scale(1.1);
}

.search-text {
    display: inline-block;
}

/* ===== Специфичные стили для hero-search ===== */
.hero-search .search-form {
    max-width: 700px;
}

.hero-search .search-field {
    padding: 20px 30px;
    font-size: 18px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-right: none;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: var(--color-dark);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.hero-search .search-field:focus {
    background: white;
    border-color: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 0 0 4px rgba(255, 255, 255, 0.2);
}

.hero-search .search-field::placeholder {
    color: var(--color-gray);
}

.hero-search .search-submit {
    padding: 0 35px;
    font-size: 18px;
    background: var(--color-secondary);
    border: 2px solid var(--color-secondary);
    border-left: none;
}

.hero-search .search-submit:hover {
    background: #e11570;
    border-color: #e11570;
}

/* ===== Стили для CTA search ===== */
.cta-search .search-form {
    max-width: 500px;
}

.cta-search .search-field {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-right: none;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    backdrop-filter: blur(5px);
}

.cta-search .search-field:focus {
    background: rgba(255, 255, 255, 0.25);
    border-color: white;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
}

.cta-search .search-field::placeholder {
    color: rgba(255, 255, 255, 0.8);
}

.cta-search .search-submit {
    background: white;
    color: var(--color-primary);
    border: 2px solid white;
    border-left: none;
}

.cta-search .search-submit:hover {
    background: var(--color-light);
    color: var(--color-secondary);
    border-color: var(--color-light);
}

/* ===== Адаптивность ===== */
@media (max-width: 768px) {
    .search-form {
        flex-direction: column;
        gap: 12px;
    }
    
    .search-field {
        border-radius: 50px;
        border: 2px solid #e0e0e0;
        text-align: center;
        padding: 18px 20px;
    }
    
    .search-submit {
        border-radius: 50px;
        padding: 16px 24px;
        width: 100%;
        justify-content: center;
    }
    
    .search-text {
        display: inline-block;
    }
    
    /* Специфичные для героя */
    .hero-search .search-field,
    .hero-search .search-submit,
    .cta-search .search-field,
    .cta-search .search-submit {
        border-radius: 50px;
        border-width: 2px;
    }
    
    .hero-search .search-field {
        border: 2px solid rgba(255, 255, 255, 0.3);
    }
    
    .cta-search .search-field {
        border: 2px solid rgba(255, 255, 255, 0.3);
    }
}

@media (max-width: 480px) {
    .search-field {
        padding: 16px 20px;
        font-size: 16px;
    }
    
    .search-submit {
        padding: 14px 20px;
        font-size: 16px;
    }
    
    .hero-search .search-field,
    .hero-search .search-submit {
        padding: 18px 20px;
        font-size: 16px;
    }
    
    /* Скрываем текст на очень маленьких экранах, оставляем только иконку */
    @media (max-width: 360px) {
        .search-text {
            display: none;
        }
        
        .search-submit {
            padding: 14px;
            min-width: 56px;
        }
        
        .search-icon {
            width: 24px;
            height: 24px;
        }
    }
}

/* ===== Анимация фокуса ===== */
@keyframes searchPulse {
    0% { box-shadow: 0 0 0 0 rgba(67, 97, 238, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(67, 97, 238, 0); }
    100% { box-shadow: 0 0 0 0 rgba(67, 97, 238, 0); }
}

.search-field:focus {
    animation: searchPulse 1.5s infinite;
}

/* ===== Микро-интеракции ===== */
.search-submit {
    position: relative;
    overflow: hidden;
}

.search-submit::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.search-submit:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}
/* ===== Стили для страницы результатов поиска ===== */

.search-results-page {
    padding: 2rem 0 4rem;
}

.search-results-header {
    background: var(--color-light);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 3rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.search-form-container {
    max-width: 800px;
    margin: 0 auto;
}

.search-form-wrapper {
    margin-bottom: 1.5rem;
}

.search-stats {
    text-align: center;
    font-size: 1.1rem;
    color: var(--color-dark);
}

.search-query-display {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.search-query {
    color: var(--color-primary);
    font-weight: 600;
    background: rgba(67, 97, 238, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    margin-left: 0.5rem;
}

.results-count {
    font-size: 1rem;
    color: var(--color-gray);
}

.count-number {
    color: var(--color-secondary);
    font-weight: 700;
    font-size: 1.2em;
}

/* Сетка результатов */
.search-results-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.search-result-card {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.search-result-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.result-thumbnail {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    height: 180px;
}

.result-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.search-result-card:hover .result-thumbnail img {
    transform: scale(1.05);
}

.result-content {
    display: flex;
    flex-direction: column;
}

.result-category {
    margin-bottom: 0.75rem;
}

.result-category a {
    display: inline-block;
    background: var(--color-light);
    color: var(--color-primary);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.result-category a:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-1px);
}

.result-title {
    font-size: 1.5rem;
    margin: 0 0 1rem 0;
    line-height: 1.3;
}

.result-title a {
    color: var(--color-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.result-title a:hover {
    color: var(--color-primary);
}

.result-excerpt {
    color: var(--color-gray);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* Подсветка найденных слов */
.search-highlight {
    background-color: rgba(255, 215, 0, 0.3);
    padding: 0 2px;
    border-radius: 2px;
    font-weight: 600;
}

.result-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--color-gray);
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.result-url {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--color-success);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

/* Пагинация на странице поиска */
.search-pagination {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Сообщение "ничего не найдено" */
.no-results-found {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--color-light);
    border-radius: 16px;
    margin-top: 2rem;
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.no-results-found h2 {
    color: var(--color-dark);
    margin-bottom: 1rem;
}

.no-results-found p {
    color: var(--color-gray);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.suggestions {
    max-width: 600px;
    margin: 2rem auto;
    text-align: left;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.suggestions h3 {
    color: var(--color-dark);
    margin-bottom: 1rem;
    text-align: center;
}

.suggested-categories {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.75rem;
}

.suggested-categories li a {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--color-light);
    border-radius: 8px;
    color: var(--color-dark);
    text-decoration: none;
    transition: all 0.3s ease;
}

.suggested-categories li a:hover {
    background: var(--color-primary);
    color: white;
    transform: translateX(5px);
}

.category-count {
    color: var(--color-gray);
    font-size: 0.9rem;
}

.suggested-categories li a:hover .category-count {
    color: rgba(255, 255, 255, 0.8);
}

.back-to-home {
    margin-top: 2.5rem;
}

/* Адаптивность для страницы поиска */
@media (max-width: 992px) {
    .search-result-card {
        grid-template-columns: 200px 1fr;
        gap: 1.5rem;
        padding: 1.5rem;
    }
    
    .result-thumbnail {
        height: 150px;
    }
}

@media (max-width: 768px) {
    .search-results-header {
        padding: 1.5rem;
    }
    
    .search-result-card {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .result-thumbnail {
        height: 200px;
    }
    
    .suggested-categories {
        grid-template-columns: 1fr;
    }
    
    .result-meta {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .result-url {
        max-width: 100%;
        order: 3;
        flex-basis: 100%;
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px dashed rgba(0, 0, 0, 0.1);
    }
}

@media (max-width: 480px) {
    .search-results-header {
        padding: 1.25rem;
    }
    
    .search-result-card {
        padding: 1.25rem;
    }
    
    .result-title {
        font-size: 1.3rem;
    }
    
    .no-results-found {
        padding: 2rem 1rem;
    }
}
/* ===== Стили для страницы записи (single.php) ===== */

/* Хлебные крошки */
.breadcrumbs-container {
    background: var(--color-light);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.breadcrumbs a {
    color: var(--color-gray);
    transition: color 0.3s ease;
}

.breadcrumbs a:hover {
    color: var(--color-primary);
}

.breadcrumb-separator {
    color: var(--color-gray);
    opacity: 0.5;
}

.breadcrumbs .current {
    color: var(--color-dark);
    font-weight: 500;
}

/* Заголовок статьи */
.single-post-header {
    padding: 2.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.post-category-badge {
    display: inline-block;
    margin-bottom: 1.5rem;
}

.post-category-badge a {
    background: var(--color-primary);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.post-category-badge a:hover {
    background: var(--color-secondary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(247, 37, 133, 0.3);
}

.single-post-title {
    font-size: 2.8rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--color-dark);
}

@media (max-width: 768px) {
    .single-post-title {
        font-size: 2.2rem;
    }
}

/* Мета-информация */
.post-meta-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-gray);
    font-size: 0.95rem;
}

.meta-icon {
    color: var(--color-primary);
    flex-shrink: 0;
}

.meta-item a {
    color: var(--color-dark);
    transition: color 0.3s ease;
}

.meta-item a:hover {
    color: var(--color-primary);
}

.updated-badge {
    background: rgba(247, 37, 133, 0.1);
    color: var(--color-secondary);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

/* Социальные кнопки в шапке */
.social-share {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.share-label {
    color: var(--color-gray);
    font-size: 0.9rem;
}

.share-buttons {
    display: flex;
    gap: 0.5rem;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--color-light);
    color: var(--color-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.vk-btn:hover {
    background: #4C75A3;
    color: white;
}

.telegram-btn:hover {
    background: #2AABEE;
    color: white;
}

/* Изображение записи */
.single-post-thumbnail {
    margin: 2.5rem 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.single-post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.thumbnail-caption {
    text-align: center;
    font-size: 0.9rem;
    color: var(--color-gray);
    padding: 1rem;
    background: var(--color-light);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Оглавление */
.toc-container {
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.05) 0%, rgba(76, 201, 240, 0.05) 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    border: 1px solid rgba(67, 97, 238, 0.1);
}

.toc-toggle {
    margin-bottom: 1rem;
}

.toc-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toc-toggle-btn:hover {
    background: var(--color-secondary);
    transform: translateX(5px);
}

/* Контент статьи */
.single-post-content {
    margin: 3rem 0;
    line-height: 1.8;
    font-size: 1.1rem;
}

.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

/* Стили для заголовков внутри статьи */
.single-post-content h2 {
    font-size: 1.8rem;
    margin: 2.5rem 0 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(67, 97, 238, 0.1);
}

.single-post-content h3 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
}

.single-post-content h4 {
    font-size: 1.2rem;
    margin: 1.5rem 0 0.75rem;
}

/* Списки в статье */
.single-post-content ul,
.single-post-content ol {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.single-post-content li {
    margin-bottom: 0.75rem;
}

/* Блок материалов и инструментов */
.materials-tools-section {
    background: linear-gradient(135deg, rgba(76, 201, 240, 0.1) 0%, rgba(67, 97, 238, 0.1) 100%);
    border-radius: 12px;
    padding: 2rem;
    margin: 2.5rem 0;
    border: 1px solid rgba(76, 201, 240, 0.2);
    position: relative;
}

.materials-tools-section .section-icon {
    position: absolute;
    top: -15px;
    left: 20px;
    background: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.materials-tools-section h3 {
    color: var(--color-primary);
    margin-top: 0;
    margin-bottom: 1rem;
}

.materials-list ul {
    columns: 2;
    gap: 2rem;
    margin: 0;
}

@media (max-width: 768px) {
    .materials-list ul {
        columns: 1;
    }
}

/* Блок полезных советов */
.tips-section {
    background: linear-gradient(135deg, rgba(247, 37, 133, 0.05) 0%, rgba(255, 109, 0, 0.05) 100%);
    border-radius: 12px;
    padding: 2rem;
    margin: 2.5rem 0;
    border: 1px solid rgba(247, 37, 133, 0.1);
}

.tips-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tips-header svg {
    color: var(--color-secondary);
}

.tips-header h3 {
    color: var(--color-secondary);
    margin: 0;
}

.tips-content ul {
    list-style: none;
    padding-left: 0;
}

.tips-content li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.tips-content li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--color-secondary);
    font-weight: bold;
}

/* Футер статьи */
.single-post-footer {
    margin: 3rem 0;
    padding: 2.5rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.post-tags-section {
    margin-bottom: 2rem;
}

.section-subtitle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    color: var(--color-dark);
    margin-bottom: 1rem;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag-item {
    background: var(--color-light);
    color: var(--color-dark);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.tag-item:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-2px);
}

.no-tags {
    color: var(--color-gray);
    font-style: italic;
}

.post-meta-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.95rem;
}

.meta-footer-item {
    display: flex;
    gap: 0.5rem;
}

.meta-label {
    color: var(--color-gray);
    font-weight: 500;
}

.meta-footer-item a {
    color: var(--color-primary);
}


.social-cta-content {
    background: linear-gradient(135deg, var(--color-primary) 0%, #3a0ca3 100%);
    color: white;
    border-radius: 16px;
    padding: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    box-shadow: 0 10px 40px rgba(67, 97, 238, 0.3);
}

.cta-icon {
    font-size: 3rem;
}

.cta-text h3 {
    color: white;
    margin-bottom: 0.5rem;
}

.cta-text p {
    opacity: 0.9;
    margin: 0;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.save-btn,
.share-cta-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: white;
    color: var(--color-primary);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.save-btn:hover,
.share-cta-btn:hover {
    background: var(--color-light);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-title {
    font-size: 2rem;
    color: var(--color-dark);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--color-gray);
    font-size: 1.1rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.related-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.related-thumbnail {
    display: block;
    height: 200px;
    overflow: hidden;
}

.related-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-card:hover .related-thumbnail img {
    transform: scale(1.05);
}

.placeholder-thumbnail {
    width: 100%;
    height: 100%;
    background: var(--color-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-gray);
}

.related-content {
    padding: 1.5rem;
}

.related-title {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.related-title a {
    color: var(--color-dark);
    transition: color 0.3s ease;
}

.related-title a:hover {
    color: var(--color-primary);
}

.related-excerpt {
    color: var(--color-gray);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.related-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--color-gray);
}

.related-reading-time {
    color: var(--color-success);
    font-weight: 500;
}

.comments-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.comments-container {
    background: var(--color-light);
    border-radius: 16px;
    padding: 2.5rem;
}

.comments-closed {
    text-align: center;
    padding: 2rem;
    color: var(--color-gray);
}

.comments-closed a {
    color: var(--color-primary);
}

/* Кнопка "Наверх" */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--color-primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: var(--color-secondary);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(247, 37, 133, 0.3);
}

/* Адаптивность */
@media (max-width: 992px) {
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .social-cta-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cta-buttons {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .post-meta-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .social-share {
        align-self: stretch;
        justify-content: space-between;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .post-meta-footer {
        flex-direction: column;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .single-post-header {
        padding: 1.5rem 0;
    }
    
    .comments-container {
        padding: 1.5rem;
    }
    
    .scroll-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
}
.single-post {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
}

/* Обновляем контейнер для социального баннера */
.social-cta.container {
    margin-top: 4rem;
    margin-bottom: 4rem;
}

/* Для похожих статей */
.related-posts.container {
    margin-top: 0;
    margin-bottom: 4rem;
}

/* Для секции комментариев */
.comments-section.container {
    margin-top: 0;
    margin-bottom: 4rem;
}