/* ============================================
   СТИЛИ ДЛЯ MARKDOWN КОНТЕНТА
   ============================================ */

/* Контейнер с Markdown контентом */
.post-content, .post-excerpt {
    line-height: 1.7;
    color: #333;
}

/* Заголовки в Markdown */
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
    margin-top: 1.5em;
    margin-bottom: 0.8em;
    font-weight: 600;
    line-height: 1.3;
    color: #1a1a1a;
}

.post-content h1 { font-size: 2em; }
.post-content h2 { font-size: 1.6em; border-bottom: 1px solid #eee; padding-bottom: 0.3em; }
.post-content h3 { font-size: 1.4em; }
.post-content h4 { font-size: 1.2em; }

/* Параграфы */
.post-content p {
    margin-bottom: 1.2em;
    line-height: 1.7;
}

/* Ссылки */
.post-content a {
    color: #ff9900;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.post-content a:hover {
    border-bottom-color: #ff9900;
}

/* Списки */
.post-content ul,
.post-content ol {
    margin-bottom: 1.2em;
    padding-left: 2em;
}

.post-content li {
    margin-bottom: 0.5em;
    line-height: 1.6;
}

/* Жирный и курсив */
.post-content strong {
    font-weight: 600;
    color: #1a1a1a;
}

.post-content em {
    font-style: italic;
}

/* Цитаты */
.post-content blockquote {
    margin: 1.5em 0;
    padding: 0.8em 1.5em;
    border-left: 4px solid #ff9900;
    background: #f9f9f9;
    color: #555;
    font-style: italic;
}

.post-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Инлайн код */
.post-content code {
    background: #f4f4f4;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 0.9em;
    color: #d73a49;
}

/* Блоки кода */
.post-content pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 1.2em;
    border-radius: 5px;
    overflow-x: auto;
    margin: 1.5em 0;
}

.post-content pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: 0.9em;
    line-height: 1.5;
}

/* Горизонтальная линия */
.post-content hr {
    border: none;
    border-top: 2px solid #eee;
    margin: 2em 0;
}

/* Таблицы (если будешь использовать) */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
}

.post-content table th,
.post-content table td {
    padding: 0.8em;
    border: 1px solid #ddd;
    text-align: left;
}

.post-content table th {
    background: #f8f8f8;
    font-weight: 600;
}

/* ============================================
   ИЗОБРАЖЕНИЯ - УЛУЧШЕННЫЕ СТИЛИ
   ============================================ */

/* Базовые стили для изображений */
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 1.5em 0;
    display: block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

/* Эффект при наведении */
.post-content img:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Центрирование изображений в параграфах */
.post-content p > img {
    margin-left: auto;
    margin-right: auto;
}

/* Изображения в анонсах - скрываем чтобы не ломать вёрстку */
.post-excerpt img {
    display: none;
}

/* Стили для анонсов на главной */
.post-excerpt p {
    margin-bottom: 0.8em;
    font-size: 0.95em;
    color: #666;
}

.post-excerpt p:last-child {
    margin-bottom: 0;
}

/* Убираем лишние отступы у первого и последнего элемента */
.post-content > *:first-child {
    margin-top: 0;
}

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

/* ============================================
   АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ
   ============================================ */

@media (max-width: 768px) {
    .post-content h1 { font-size: 1.6em; }
    .post-content h2 { font-size: 1.4em; }
    .post-content h3 { font-size: 1.2em; }
    .post-content h4 { font-size: 1.1em; }
    
    .post-content pre {
        padding: 0.8em;
        font-size: 0.85em;
    }
    
    .post-content img {
        margin: 1em 0;
    }
    
    .post-content blockquote {
        padding: 0.6em 1em;
        margin: 1em 0;
    }
}