/* Базовые стили для блога Кекса */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Шапка сайта */
.site-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.site-nav h1 a {
    color: white;
    text-decoration: none;
    font-size: 2.5rem;
    font-weight: 700;
}

.site-description {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-top: 0.5rem;
}

/* Основной контент */
.site-content {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Посты */
.post {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.post-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f3f4;
}

.post-header h1 {
    font-size: 2rem;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.post-date {
    color: #718096;
    font-size: 0.9rem;
}

.post-image {
    margin: 1.5rem 0;
    text-align: center;
}

.post-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.post-content {
    line-height: 1.8;
    color: #4a5568;
}

.post-content h2 {
    color: #2d3748;
    margin: 1.5rem 0 1rem 0;
    font-size: 1.5rem;
}

.post-content h3 {
    color: #2d3748;
    margin: 1.2rem 0 0.8rem 0;
    font-size: 1.2rem;
}

.post-content p {
    margin-bottom: 1rem;
}

.post-content ul, .post-content ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

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

.post-content blockquote {
    border-left: 4px solid #667eea;
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: #718096;
    font-style: italic;
}

.post-content code {
    background: #f7fafc;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
}

.post-content pre {
    background: #f7fafc;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.post-content pre code {
    background: none;
    padding: 0;
}

/* Теги */
.post-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.post-tags {
    font-size: 0.9rem;
    color: #718096;
}

.tag {
    background: #e2e8f0;
    color: #4a5568;
    padding: 0.2rem 0.5rem;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-right: 0.5rem;
}

/* Список постов на главной */
.posts-list {
    display: grid;
    gap: 2rem;
}

.post-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

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

.post-card h3 {
    margin-bottom: 0.5rem;
}

.post-card h3 a {
    color: #667eea;
    text-decoration: none;
}

.post-card h3 a:hover {
    text-decoration: underline;
}

.post-card-image {
    margin: 1rem 0;
}

.post-card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

.post-excerpt {
    color: #718096;
    margin: 1rem 0;
    line-height: 1.5;
}

.read-more {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.read-more:hover {
    text-decoration: underline;
}

.no-posts {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 10px;
    color: #718096;
}

/* Футер */
.site-footer {
    text-align: center;
    padding: 2rem;
    background: #2d3748;
    color: white;
    margin-top: 3rem;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .site-nav h1 a {
        font-size: 2rem;
    }
    
    .site-content {
        margin: 1rem auto;
        padding: 0 0.5rem;
    }
    
    .post {
        padding: 1.5rem;
    }
    
    .post-header h1 {
        font-size: 1.5rem;
    }
    
    .posts-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .site-nav h1 a {
        font-size: 1.5rem;
    }
    
    .post {
        padding: 1rem;
    }
}