/* Blog Styles - Дополнительные стили для блога и статей */

/* Общий стиль страницы блога */
.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}
.blog-header {
    padding-top: 40px;
    padding-bottom: 40px;
}

.blog-title {
    text-align: center;
    margin-bottom: 3rem;
    color: #2E7D32;
}
.blog-content,
.blog-category {
    padding: 15px;
}

.blog-subtitle {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 3rem;
    color: #555;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}
.form-row input{
    width: 50%;
    padding: 10px 15px;
}

/* Стили для сетки постов блога */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.blog-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

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

.blog-card-image svg {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

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

.blog-card-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: #2E7D32;
}

.blog-card-excerpt {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.blog-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #777;
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.blog-card-date {
    display: flex;
    align-items: center;
}

.blog-card-date i {
    margin-right: 0.5rem;
}

.blog-card-link {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background-color: #4CAF50;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.blog-card-link:hover {
    background-color: #2E7D32;
}

/* Стили для отдельной статьи */
.article-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.article-header {
    margin-bottom: 2.5rem;
}

.article-title {
    font-size: 2.5rem;
    color: #2E7D32;
    margin-bottom: 1rem;
}

.article-meta {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    color: #777;
    font-size: 0.9rem;
}

.article-meta > * {
    margin-right: 1.5rem;
    display: flex;
    align-items: center;
}

.article-meta i {
    margin-right: 0.5rem;
}

.article-featured-image {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    margin-bottom: 2rem;
    border-radius: 8px;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    padding-top: 80px;
    padding-bottom: 80px;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content h2 {
    font-size: 1.8rem;
    color: #2E7D32;
    margin: 2.5rem 0 1rem;
}

.article-content h3 {
    font-size: 1.5rem;
    color: #388E3C;
    margin: 2rem 0 1rem;
}

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

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

.article-content blockquote {
    border-left: 4px solid #4CAF50;
    padding-left: 1.25rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #555;
}

.article-content img {
    max-width: 100%;
    border-radius: 4px;
    margin: 1.5rem 0;
}

/* Секция "Похожие статьи" */
.related-articles {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.related-articles h3 {
    font-size: 1.75rem;
    color: #2E7D32;
    margin-bottom: 1.5rem;
}

.related-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.related-article-card {
    background-color: #f9f9f9;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.2s ease-in-out;
}

.related-article-card:hover {
    transform: translateY(-3px);
}

.related-article-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.related-article-content {
    padding: 1rem;
}

.related-article-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #2E7D32;
}

.related-article-date {
    font-size: 0.8rem;
    color: #777;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .related-articles-grid {
        grid-template-columns: 1fr;
    }
    
    .article-title {
        font-size: 2rem;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .article-meta > * {
        margin-bottom: 0.5rem;
    }
}

/* Стили для пагинации блога */
.blog-pagination {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.blog-pagination-button {
    padding: 0.75rem 1.25rem;
    margin: 0 0.5rem;
    background-color: #f0f0f0;
    color: #333;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.blog-pagination-button.active {
    background-color: #4CAF50;
    color: white;
}

.blog-pagination-button:hover:not(.active) {
    background-color: #e0e0e0;
}

/* Стили для меток и категорий */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.article-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    background-color: #E8F5E9;
    color: #2E7D32;
    border-radius: 20px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.article-tag:hover {
    background-color: #C8E6C9;
}

/* Стили для блоков кода и технических деталей */
.article-code {
    background-color: #f5f5f5;
    padding: 1.5rem;
    border-radius: 6px;
    margin: 1.5rem 0;
    overflow-x: auto;
    font-family: monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

.article-data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.article-data-table th,
.article-data-table td {
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    text-align: left;
}

.article-data-table th {
    background-color: #f0f0f0;
    font-weight: 600;
}

.article-data-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Стили для поиска по блогу */
.blog-search {
    margin-bottom: 2.5rem;
}

.blog-search-input {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
}

.blog-search-input input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-right: 0;
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
}

.blog-search-input button {
    padding: 0.75rem 1.5rem;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.blog-search-input button:hover {
    background-color: #2E7D32;
}

/* Стили для комментариев */
.article-comments {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.article-comments-title {
    font-size: 1.75rem;
    color: #2E7D32;
    margin-bottom: 1.5rem;
}

.comment-form {
    margin-bottom: 2rem;
}

.comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    min-height: 120px;
    margin-bottom: 1rem;
}

.comment-form button {
    padding: 0.75rem 1.5rem;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.comment-form button:hover {
    background-color: #2E7D32;
}

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

.comment-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.comment-author {
    font-weight: 600;
    color: #2E7D32;
}

.comment-date {
    font-size: 0.85rem;
    color: #777;
}

.comment-content {
    line-height: 1.6;
    color: #555;
}

@media(max-width: 575px){
    .form-row input{
        width: 100%;
        margin-bottom: 10px;
    }
}