/* ===== Сброс и база ===== */
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.65;
    color: #2c2c2c;
    background: #f5f2eb;
    font-size: 17px;
}
a { color: #a44a3f; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* ===== Контейнер ===== */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ===== Шапка сайта ===== */
.site-header {
    background: #fff;
    border-bottom: 3px double #d4c9b0;
    padding: 30px 0 20px;
    text-align: center;
}
.site-title a {
    font-family: Georgia, serif;
    font-size: 36px;
    font-weight: bold;
    color: #2c2c2c;
    letter-spacing: 1px;
}
.site-title a:hover { text-decoration: none; color: #a44a3f; }
.site-tagline { color: #888; font-style: italic; margin-top: 5px; font-size: 15px; }

.site-nav { margin: 20px 0 15px; }
.site-nav a {
    display: inline-block;
    margin: 0 12px;
    color: #555;
    text-transform: uppercase;
    font-family: Arial, sans-serif;
    font-size: 13px;
    letter-spacing: 1px;
}
.site-nav a:hover { color: #a44a3f; text-decoration: none; }

.site-search {
    display: inline-flex;
    max-width: 300px;
    margin-top: 10px;
}
.site-search input {
    padding: 8px 12px;
    border: 1px solid #d4c9b0;
    border-radius: 3px 0 0 3px;
    font-family: inherit;
    font-size: 14px;
    width: 200px;
}
.site-search button {
    padding: 8px 14px;
    background: #a44a3f;
    color: #fff;
    border: 0;
    border-radius: 0 3px 3px 0;
    cursor: pointer;
}
.site-search button:hover { background: #8a3d34; }

/* ===== Основной layout ===== */
.main-wrap {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 40px;
    margin: 30px auto;
    align-items: start;
}
.main { min-width: 0; }

/* ===== Заголовки ===== */
.page-title {
    font-size: 28px;
    margin: 0 0 25px;
    padding-bottom: 12px;
    border-bottom: 1px solid #d4c9b0;
    color: #2c2c2c;
}
.category-desc { color: #666; font-style: italic; margin-bottom: 20px; }
.results-count { color: #888; margin-bottom: 20px; font-size: 14px; }

/* ===== Карточка поста в списке ===== */
.post-card {
    background: #fff;
    padding: 25px 30px;
    margin-bottom: 25px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid #ece5d4;
}
.post-card .post-image img {
    width: 100%;
    max-height: 350px;
    object-fit: cover;
    margin-bottom: 15px;
    border-radius: 3px;
}
.post-card .post-title {
    font-size: 26px;
    margin: 0 0 8px;
    line-height: 1.3;
}
.post-card .post-title a { color: #2c2c2c; }
.post-card .post-title a:hover { color: #a44a3f; text-decoration: none; }

.post-meta {
    color: #888;
    font-size: 13px;
    font-family: Arial, sans-serif;
    margin-bottom: 15px;
}
.post-meta a { color: #a44a3f; }

.post-excerpt {
    color: #444;
    margin-bottom: 15px;
    line-height: 1.6;
}

.read-more {
    display: inline-block;
    color: #a44a3f;
    font-weight: bold;
    font-family: Arial, sans-serif;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== Полная страница поста ===== */
.post-full {
    background: #fff;
    padding: 40px 45px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid #ece5d4;
}
.post-full .post-title {
    font-size: 34px;
    line-height: 1.2;
    margin: 0 0 12px;
    color: #2c2c2c;
}
.post-full .post-image-full img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 3px;
    margin: 20px 0;
}
.post-content {
    font-size: 18px;
    line-height: 1.75;
    color: #333;
    margin-top: 25px;
}
.post-content p { margin: 0 0 18px; }
.post-content h2 { font-size: 26px; margin: 30px 0 15px; color: #2c2c2c; }
.post-content h3 { font-size: 22px; margin: 25px 0 12px; }
.post-content blockquote {
    border-left: 4px solid #a44a3f;
    padding: 5px 20px;
    color: #555;
    font-style: italic;
    margin: 20px 0;
    background: #faf7f0;
}
.post-content pre {
    background: #2c2c2c;
    color: #f5f2eb;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    font-size: 14px;
}
.post-content code {
    background: #f0ebe0;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 14px;
}
.post-content ul, .post-content ol { padding-left: 25px; }
.post-content img { border-radius: 3px; margin: 15px 0; }

/* ===== Похожие ===== */
.related {
    background: #fff;
    padding: 20px 25px;
    margin-top: 25px;
    border-radius: 4px;
    border: 1px solid #ece5d4;
}
.related h3 { margin-top: 0; font-size: 18px; color: #2c2c2c; }
.related ul { padding-left: 20px; margin: 0; }
.related li { margin: 8px 0; }

/* ===== Комментарии ===== */
.comments {
    background: #fff;
    padding: 30px 35px;
    margin-top: 25px;
    border-radius: 4px;
    border: 1px solid #ece5d4;
}
.comments h3 { margin-top: 0; color: #2c2c2c; }
.comment {
    padding: 15px 0;
    border-bottom: 1px solid #ece5d4;
}
.comment:last-of-type { border-bottom: 0; }
.comment-head { margin-bottom: 8px; }
.comment-head strong { color: #a44a3f; }
.comment-date {
    color: #999;
    font-size: 12px;
    margin-left: 10px;
    font-family: Arial, sans-serif;
}
.comment-body { color: #444; line-height: 1.6; }

/* Форма комментария */
.comment-form {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid #ece5d4;
}
.comment-form h4 { margin: 0 0 15px; font-size: 20px; }
.comment-form .field { margin-bottom: 15px; }
.comment-form label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 14px;
    color: #444;
}
.comment-form input[type=text],
.comment-form input[type=email],
.comment-form input[type=number],
.comment-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d4c9b0;
    border-radius: 3px;
    font-family: inherit;
    font-size: 15px;
    background: #fdfcf7;
}
.comment-form textarea { resize: vertical; min-height: 100px; }
.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: #a44a3f;
    background: #fff;
}
.btn-submit {
    background: #a44a3f;
    color: #fff;
    border: 0;
    padding: 10px 25px;
    border-radius: 3px;
    font-size: 15px;
    cursor: pointer;
    font-family: inherit;
}
.btn-submit:hover { background: #8a3d34; }

/* ===== Flash-сообщения ===== */
.flash {
    padding: 12px 18px;
    margin-bottom: 20px;
    border-radius: 3px;
    font-size: 14px;
}
.flash-success { background: #dff5e3; color: #2a662a; border-left: 4px solid #4caf50; }
.flash-error   { background: #fde3e3; color: #7b1e1e; border-left: 4px solid #d84040; }
.flash-info    { background: #e3f0fd; color: #1e4a7b; border-left: 4px solid #4088d8; }

/* ===== Пагинация ===== */
.pagination {
    margin: 30px 0 20px;
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
}
.pagination a, .pagination span {
    padding: 8px 14px;
    background: #fff;
    color: #555;
    border: 1px solid #d4c9b0;
    border-radius: 3px;
    font-family: Arial, sans-serif;
    font-size: 14px;
}
.pagination a:hover { background: #a44a3f; color: #fff; text-decoration: none; border-color: #a44a3f; }
.pagination .active { background: #a44a3f; color: #fff; border-color: #a44a3f; }

/* ===== Пустое состояние ===== */
.empty-state {
    background: #fff;
    padding: 40px;
    text-align: center;
    color: #888;
    border-radius: 4px;
    border: 1px dashed #d4c9b0;
}

/* ===== Sidebar ===== */
.sidebar { position: sticky; top: 20px; }
.widget {
    background: #fff;
    padding: 20px 22px;
    margin-bottom: 20px;
    border-radius: 4px;
    border: 1px solid #ece5d4;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.widget h3 {
    margin: 0 0 15px;
    font-size: 15px;
    color: #a44a3f;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 8px;
    border-bottom: 1px solid #ece5d4;
    font-family: Arial, sans-serif;
}
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { padding: 8px 0; border-bottom: 1px dotted #ece5d4; }
.widget li:last-child { border-bottom: 0; }
.widget a { color: #444; }
.widget a:hover { color: #a44a3f; }
.widget .count { color: #999; font-size: 12px; margin-left: 5px; }
.widget .meta { color: #999; font-size: 11px; margin-top: 3px; font-family: Arial, sans-serif; }

/* ===== Поисковая форма (страница поиска) ===== */
.search-form {
    display: flex;
    gap: 8px;
    margin-bottom: 25px;
}
.search-form input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #d4c9b0;
    border-radius: 3px;
    font-family: inherit;
    font-size: 16px;
    background: #fdfcf7;
}
.search-form button {
    padding: 10px 25px;
    background: #a44a3f;
    color: #fff;
    border: 0;
    border-radius: 3px;
    cursor: pointer;
    font-size: 15px;
}
.search-form button:hover { background: #8a3d34; }

/* ===== Футер ===== */
.site-footer {
    background: #2c2c2c;
    color: #a8a09a;
    text-align: center;
    padding: 25px 0;
    margin-top: 50px;
    font-size: 14px;
    font-family: Arial, sans-serif;
}
.site-footer a { color: #d4c9b0; }
.site-footer a:hover { color: #fff; }

/* ===== Адаптивность ===== */
@media (max-width: 800px) {
    body { font-size: 16px; }
    .main-wrap { grid-template-columns: 1fr; gap: 25px; }
    .sidebar { position: static; }
    .site-title a { font-size: 28px; }
    .site-nav a { margin: 0 8px; font-size: 12px; }
    .post-card, .post-full, .comments, .related { padding: 20px; }
    .post-full .post-title { font-size: 26px; }
    .post-content { font-size: 16px; }
}