/* ============================================
   ЧТО ЕСЛИ? - СТИЛИ ДЛЯ ПОСТОВ
   ============================================ */

:root {
    --primary: #3a86ff;
    --secondary: #8338ec;
    --dark: #212529;
    --light: #f8f9fa;
    --white: #ffffff;
    --gray: #495057;
    --danger: #dc3545;
}

/* ============ HERO СЕКЦИЯ ============ */
.post-hero {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    padding: 60px 24px;
}

.post-hero-container {
    max-width: 900px;
    margin: 0 auto;
}

.post-category {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.post-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.2;
}

.post-meta {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    opacity: 0.95;
    font-size: 16px;
}

/* ============ КОНТЕНТ ============ */
.post-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 24px;
}

.post-content {
    color: var(--gray);
    font-size: 18px;
    line-height: 1.8;
}

.post-content p {
    margin-bottom: 16px;
}

.post-content h2 {
    font-size: 32px;
    font-weight: 700;
    margin: 48px 0 16px;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 12px;
}

.post-content h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 24px 0 12px;
}

.post-content h4 {
    font-size: 20px;
    font-weight: 600;
    margin: 16px 0 8px;
}

.post-content ul,
.post-content ol {
    margin-left: 24px;
    margin-bottom: 16px;
}

.post-content li {
    margin-bottom: 12px;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
}

.post-content th,
.post-content td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.post-content th {
    background: var(--light);
    font-weight: 700;
}

/* ============ СПЕЦИАЛЬНЫЕ БЛОКИ ============ */

/* Выделяющиеся боксы */
.highlight-box {
    background: linear-gradient(135deg, rgba(58, 134, 255, 0.1), rgba(131, 56, 236, 0.1));
    border-left: 4px solid var(--primary);
    padding: 24px;
    border-radius: 8px;
    margin: 32px 0;
}

.highlight-box h4 {
    color: var(--primary);
    margin-top: 0;
    margin-bottom: 12px;
}

/* Предупреждение */
.warning-box {
    background: rgba(220, 53, 69, 0.1);
    border-left: 4px solid var(--danger);
    padding: 24px;
    border-radius: 8px;
    margin: 32px 0;
}

.warning-box h4 {
    color: var(--danger);
    margin-top: 0;
    margin-bottom: 12px;
}

/* Timeline */
.timeline {
    margin: 16px 0;
}

.timeline-item {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e0e0e0;
}

.timeline-time {
    font-weight: 700;
    color: var(--primary);
    min-width: 100px;
}

/* Выводы */
.conclusion {
    background: var(--white);
    border: 2px solid var(--primary);
    padding: 32px;
    border-radius: 12px;
    margin: 48px 0;
}

.conclusion h3 {
    color: var(--primary);
    margin-top: 0;
}

/* Советы с иконками */
.advice-list {
    background: var(--light);
    padding: 24px;
    border-radius: 8px;
    margin: 24px 0;
}

.advice-item {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.advice-icon {
    font-size: 24px;
    min-width: 30px;
}

/* ============ ОГЛАВЛЕНИЕ ============ */
.toc {
    background: var(--white);
    border-left: 4px solid var(--primary);
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 48px;
}

.toc-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--primary);
}

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

.toc-list li {
    margin-bottom: 8px;
}

.toc-list a {
    color: var(--primary);
    text-decoration: none;
    font-size: 15px;
    transition: all 0.3s;
}

.toc-list a:hover {
    text-decoration: underline;
}

/* ============ ПОХОЖИЕ ПОСТЫ ============ */
.related-posts {
    background: var(--white);
    padding: 48px 24px;
    margin-top: 60px;
    border-top: 2px solid #e0e0e0;
}

.related-container {
    max-width: 900px;
    margin: 0 auto;
}

.related-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 32px;
    text-align: center;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.related-card {
    background: var(--light);
    border-radius: 8px;
    padding: 20px;
    text-decoration: none;
    color: var(--dark);
    transition: all 0.3s;
}

.related-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

.related-tag {
    background: var(--primary);
    color: var(--white);
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    border-radius: 4px;
    margin-bottom: 8px;
}

.related-card h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

/* ============ АДАПТИВНОСТЬ ============ */
@media (max-width: 768px) {
    .post-title {
        font-size: 32px;
    }

    .post-meta {
        flex-direction: column;
        gap: 8px;
    }

    .post-content h2 {
        font-size: 26px;
    }

    .post-content h3 {
        font-size: 20px;
    }

    .timeline-item {
        flex-direction: column;
        gap: 8px;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }
}

/* ============ КЛАССЫ ДЛЯ РЕДАКТОРА ============ */

/* Используйте эти классы в контенте */
.post-content .intro {
    background: var(--white);
    padding: 32px;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    margin-bottom: 48px;
    font-size: 18px;
    line-height: 1.8;
}

.post-content .highlight {
    background: linear-gradient(135deg, rgba(58, 134, 255, 0.1), rgba(131, 56, 236, 0.1));
    padding: 16px;
    border-left: 4px solid var(--primary);
    border-radius: 4px;
}

.post-content .warning {
    background: rgba(220, 53, 69, 0.1);
    padding: 16px;
    border-left: 4px solid var(--danger);
    border-radius: 4px;
}
