/*
Theme Name: CookPVP
Theme URI: https://cookpvp.ru
Description: Современная журнальная тема для кулинарного блога с тёплыми аппетитными цветами
Author: CookPVP Team
Version: 1.0
*/

/* ===============================================
   ОСНОВНЫЕ ЦВЕТА И ПЕРЕМЕННЫЕ
   =============================================== */
:root {
    --color-bg: #FAF8F3;
    --color-text: #3E2723;
    --color-accent: #E8734E;
    --color-secondary: #8B7355;
    --color-white: #FFFFFF;
    --color-border: #E8E3DA;
    
    --font-main: 'Georgia', 'Times New Roman', serif;
    --font-heading: 'Arial', 'Helvetica', sans-serif;
    
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --radius: 8px;
}

/* ===============================================
   БАЗОВЫЕ СТИЛИ
   =============================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    font-size: 18px;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-text);
    margin-bottom: 1rem;
    line-height: 1.3;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #d55a35;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===============================================
   КОНТЕЙНЕР И ШАПКА
   =============================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-header {
    background: var(--color-white);
    box-shadow: var(--shadow);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Изображение в шапке */
.header-image {
    width: 100%;
    max-height: 180px;
    overflow: hidden;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.header-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    object-position: center;
}

.site-info {
    text-align: center;
}

.site-title {
    font-size: 2rem;
    color: var(--color-accent);
    font-weight: bold;
    margin: 0 0 0.5rem 0;
}

.site-title a {
    color: var(--color-accent);
}

.site-title a:hover {
    color: #d55a35;
}

.site-description {
    color: var(--color-secondary);
    font-size: 0.9rem;
    font-style: italic;
    margin: 0;
}

/* ===============================================
   НАВИГАЦИЯ С МОБИЛЬНЫМ МЕНЮ
   =============================================== */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: var(--color-accent);
    border: none;
    padding: 10px;
    border-radius: var(--radius);
    cursor: pointer;
    width: 45px;
    height: 45px;
    justify-content: center;
    align-items: center;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--color-white);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background: #d55a35;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.main-navigation {
    margin-top: 1rem;
    border-top: 1px solid var(--color-border);
    padding-top: 1rem;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.main-navigation a {
    color: var(--color-text);
    font-family: var(--font-heading);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.main-navigation a:hover,
.main-navigation .current-menu-item a {
    background: var(--color-accent);
    color: var(--color-white);
}

/* ===============================================
   ОСНОВНОЙ КОНТЕНТ
   =============================================== */
.site-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    margin: 3rem auto;
    max-width: 1200px;
    padding: 0 20px;
}

.content-area {
    min-width: 0;
}

/* ===============================================
   СЕТКА РЕЦЕПТОВ (3 колонки)
   =============================================== */
.recipes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.recipe-card {
    background: var(--color-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.recipe-card-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.recipe-card-content {
    padding: 1.5rem;
}

.recipe-card-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.recipe-card-title:hover {
    color: var(--color-accent);
}

.recipe-card-excerpt {
    color: var(--color-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.recipe-card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--color-secondary);
}

.recipe-card-category {
    background: var(--color-accent);
    color: var(--color-white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    display: inline-block;
    margin-bottom: 0.5rem;
}

/* ===============================================
   БОКОВАЯ ПАНЕЛЬ
   =============================================== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.widget {
    background: var(--color-white);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border-left: 4px solid var(--color-accent);
}

.widget-title {
    font-size: 1.3rem;
    color: var(--color-accent);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--color-border);
    font-weight: 600;
}

.widget ul {
    list-style: none;
}

.widget li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
    transition: all 0.3s ease;
}

.widget li:last-child {
    border-bottom: none;
}

.widget li:hover {
    padding-left: 0.5rem;
    background: rgba(232, 115, 78, 0.05);
}

.widget a {
    color: var(--color-text);
    display: block;
}

.widget a:hover {
    color: var(--color-accent);
}

/* Форма поиска */
.search-form {
    position: relative;
    display: flex;
    align-items: stretch;
}

.search-form label {
    flex: 1;
    display: block;
}

.search-field {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: var(--font-main);
    transition: all 0.3s ease;
    background: var(--color-bg);
}

.search-field:focus {
    outline: none;
    border-color: var(--color-accent);
    background: var(--color-white);
    box-shadow: 0 0 0 3px rgba(232, 115, 78, 0.1);
}

.search-field::placeholder {
    color: var(--color-secondary);
    opacity: 0.7;
}

.search-submit {
    margin-top: 0.75rem;
    width: 100%;
    padding: 0.875rem;
    background: var(--color-accent);
    color: var(--color-white);
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-submit:hover {
    background: #d55a35;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(232, 115, 78, 0.3);
}

.search-submit:active {
    transform: translateY(0);
}

/* Категории с счётчиками */
.widget_categories li {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.widget_categories a {
    flex: 1;
}

.widget_categories .count {
    background: var(--color-accent);
    color: var(--color-white);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}
/* Кнопка поиска Gutenberg */
.wp-block-search__button,
.wp-element-button {
    background: var(--color-accent);
    color: var(--color-white);
    border: none;
    border-radius: var(--radius);
    padding: 0.875rem 1.5rem;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wp-block-search__button:hover,
.wp-element-button:hover {
    background: #d55a35;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(232, 115, 78, 0.3);
}
.wp-block-search__button,
.wp-element-button {
    background: var(--color-accent);
    color: var(--color-white);
    border: none;
    border-radius: var(--radius);
    padding: 0.4rem 0.9rem;   /* меньше отступы */
    font-size: 0.85rem;       /* меньше шрифт */
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
/* ===============================================
   ХЛЕБНЫЕ КРОШКИ (SEO)
   =============================================== */
.breadcrumbs {
    background: var(--color-white);
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
    font-size: 0.9rem;
    box-shadow: var(--shadow);
}

.breadcrumbs a {
    color: var(--color-accent);
    transition: all 0.3s ease;
}

.breadcrumbs a:hover {
    color: #d55a35;
}

.breadcrumbs span {
    color: var(--color-secondary);
}

@media (max-width: 640px) {
    .breadcrumbs {
        font-size: 0.85rem;
        padding: 0.75rem 1rem;
    }
}

/* ===============================================
   СТРАНИЦА ОТДЕЛЬНОГО РЕЦЕПТА
   =============================================== */
.single-recipe {
    background: var(--color-white);
    padding: 3rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.entry-header {
    text-align: center;
    margin-bottom: 2rem;
}

.entry-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.entry-meta {
    color: var(--color-secondary);
    font-size: 0.9rem;
}

.entry-image {
    margin-bottom: 2rem;
    border-radius: var(--radius);
    overflow: hidden;
}

.entry-image img {
    width: 100%;
    height: auto;
}

.entry-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.entry-content > * {
    margin-bottom: 1.5rem;
}

.entry-content > *:last-child {
    margin-bottom: 0;
}

.entry-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--color-accent);
}

.entry-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.entry-content ul,
.entry-content ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.entry-content li {
    margin-bottom: 0.5rem;
}

.entry-content img {
    margin: 2rem 0;
    border-radius: var(--radius);
}

.entry-content blockquote {
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(232, 115, 78, 0.05);
    border-left: 4px solid var(--color-accent);
    border-radius: var(--radius);
}

.entry-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--color-border);
}

.cat-links,
.tags-links {
    margin-bottom: 1rem;
    color: var(--color-secondary);
}

/* Навигация между постами */
.post-navigation {
    margin-top: 3rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.post-navigation a {
    display: block;
    padding: 1.5rem;
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.post-navigation a:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.nav-subtitle {
    display: block;
    font-size: 0.85rem;
    color: var(--color-secondary);
    margin-bottom: 0.5rem;
}

.nav-title {
    display: block;
    font-weight: bold;
    color: var(--color-text);
}

/* ===============================================
   ПАГИНАЦИЯ (НАВИГАЦИЯ ПО СТРАНИЦАМ)
   =============================================== */
.pagination {
    margin: 3rem 0 2rem 0;
    text-align: center;
    clear: both;
}

.pagination ul {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
}

.pagination li {
    display: inline-block;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0 1rem;
    background: var(--color-white);
    color: var(--color-text);
    border: 2px solid var(--color-border);
    border-radius: var(--radius);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.pagination a:hover {
    background: var(--color-accent);
    color: var(--color-white);
    border-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(232, 115, 78, 0.3);
}

.pagination .current {
    background: var(--color-accent);
    color: var(--color-white);
    border-color: var(--color-accent);
    cursor: default;
    box-shadow: 0 2px 8px rgba(232, 115, 78, 0.2);
}

.pagination .dots {
    background: transparent;
    border: none;
    color: var(--color-secondary);
    cursor: default;
}

.pagination .prev,
.pagination .next {
    min-width: auto;
    padding: 0 1.5rem;
    font-size: 0.95rem;
}

.pagination .prev:hover,
.pagination .next:hover {
    background: var(--color-accent);
    color: var(--color-white);
}

/* Адаптивность */
@media (max-width: 640px) {
    .pagination a,
    .pagination span {
        min-width: 40px;
        height: 40px;
        font-size: 0.9rem;
        padding: 0 0.75rem;
    }
    
    .pagination .prev,
    .pagination .next {
        padding: 0 1rem;
        font-size: 0.85rem;
    }
}

/* ===============================================
   КОММЕНТАРИИ
   =============================================== */
.comments-area {
    background: var(--color-white);
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-top: 3rem;
}

.comments-title {
    color: var(--color-accent);
    font-size: 1.8rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--color-border);
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment-body {
    display: flex;
    gap: 1rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--color-border);
}

.comment-body:last-child {
    border-bottom: none;
}

.comment-author-avatar img {
    border-radius: 50%;
    width: 50px;
    height: 50px;
}

.comment-content-wrap {
    flex: 1;
}

.comment-meta {
    margin-bottom: 0.75rem;
}

.comment-author {
    font-weight: bold;
    color: var(--color-text);
    margin-bottom: 0.25rem;
}

.comment-metadata {
    font-size: 0.85rem;
    color: var(--color-secondary);
}

.comment-metadata a {
    color: var(--color-secondary);
}

.comment-content {
    margin: 1rem 0;
    line-height: 1.6;
}

.reply a {
    color: var(--color-accent);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-accent);
    border-radius: var(--radius);
    display: inline-block;
    transition: all 0.3s ease;
}

.reply a:hover {
    background: var(--color-accent);
    color: var(--color-white);
}

/* Форма комментариев */
.comment-respond {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--color-border);
}

.comment-reply-title {
    color: var(--color-accent);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.comment-form p {
    margin-bottom: 1rem;
}

.comment-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(232, 115, 78, 0.1);
}

.comment-form textarea {
    min-height: 150px;
    resize: vertical;
}

.form-submit {
    margin-top: 1rem;
}

.submit {
    background: var(--color-accent);
    color: var(--color-white);
    padding: 0.875rem 2rem;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.submit:hover {
    background: #d55a35;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(232, 115, 78, 0.3);
}

/* Вложенные комментарии */
.children {
    list-style: none;
    padding-left: 3rem;
    margin-top: 1rem;
}

/* Навигация по комментариям */
.comment-navigation {
    display: flex;
    justify-content: space-between;
    margin: 2rem 0;
    padding: 1rem 0;
    border-top: 1px solid var(--color-border);
}

.comment-navigation a {
    color: var(--color-accent);
    font-weight: 600;
}

/* ===============================================
   ФУТЕР
   =============================================== */
.site-footer {
    background: var(--color-text);
    color: var(--color-bg);
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

.site-footer a {
    color: var(--color-accent);
}

/* ===============================================
   АДАПТИВНОСТЬ
   =============================================== */

/* Адаптивность шапки */
@media (max-width: 768px) {
    .header-image {
        max-height: 100px;
        margin-bottom: 1rem;
        border-radius: 0;
    }
    
    .header-image img {
        height: 100px;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .main-navigation {
        display: none;
        margin-top: 1rem;
    }
    
    .main-navigation.active {
        display: block;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 0;
    }
    
    .main-navigation li {
        border-bottom: 1px solid var(--color-border);
    }
    
    .main-navigation li:last-child {
        border-bottom: none;
    }
    
    .main-navigation a {
        display: block;
        padding: 1rem;
        border-radius: 0;
    }
}

@media (max-width: 480px) {
    .header-image {
        max-height: 80px;
    }
    
    .header-image img {
        height: 80px;
    }
}

/* Планшеты */
@media (max-width: 968px) {
    .recipes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .site-content {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
    }
}

/* Мобильные */
@media (max-width: 640px) {
    .recipes-grid {
        grid-template-columns: 1fr;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    
    body {
        font-size: 16px;
    }
    
    .single-recipe {
        padding: 1.5rem;
    }
    
    .entry-title {
        font-size: 1.8rem;
    }
    
    .post-navigation {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .comments-area {
        padding: 1.5rem;
    }
    
    .children {
        padding-left: 1.5rem;
    }
    
    .comment-body {
        flex-direction: column;
    }
}

