/* Blog Styles */

/* Container */
.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Header */
.blog-header {
    text-align: center;
    margin-bottom: 60px;
}

.blog-header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-subtitle {
    font-size: 1.2rem;
    color: #666;
    font-weight: 400;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* News Card */
.news-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.news-card-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-card-image img {
    transform: scale(1.05);
}

.news-card-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-icon {
    font-size: 4rem;
    opacity: 0.3;
}

.news-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.85rem;
    color: #666;
}

.news-card-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-card-meta svg {
    opacity: 0.7;
}

.news-date,
.news-reading-time,
.news-views {
    white-space: nowrap;
}

.news-card-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
}

.news-card-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.news-card-title a:hover {
    color: #667eea;
}

.news-card-excerpt {
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.news-card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: gap 0.2s ease;
}

.news-card-link:hover {
    gap: 12px;
}

/* No News */
.no-news {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 1.2rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination-link {
    padding: 10px 20px;
    background: #fff;
    border: 2px solid #667eea;
    border-radius: 8px;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination-link:hover {
    background: #667eea;
    color: #fff;
}

.pagination-current {
    padding: 10px 20px;
    color: #666;
    font-weight: 500;
}

/* News Detail */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumbs a {
    color: #667eea;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.breadcrumbs a:hover {
    opacity: 0.7;
}

.breadcrumbs .separator {
    color: #ccc;
}

.breadcrumbs .current {
    color: #1a1a1a;
    font-weight: 500;
}

.news-detail {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    margin-bottom: 40px;
}

.news-detail-header {
    margin-bottom: 30px;
}

.news-detail-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
    margin-bottom: 20px;
}

.news-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 0.95rem;
}

.meta-item svg {
    opacity: 0.7;
}

.news-detail-image {
    width: 100%;
    max-height: 500px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
}

.news-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-detail-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 40px;
}

.news-detail-content h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 30px 0 15px;
    color: #1a1a1a;
}

.news-detail-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 25px 0 12px;
    color: #1a1a1a;
}

.news-detail-content p {
    margin-bottom: 15px;
}

.news-detail-content ul,
.news-detail-content ol {
    margin-bottom: 15px;
    padding-left: 30px;
}

.news-detail-content li {
    margin-bottom: 8px;
}

.news-detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.news-detail-content code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.95em;
}

.news-detail-content pre {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

/* Share Buttons */
.news-share {
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.share-label {
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 15px;
}

.share-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: #fff;
    transition: all 0.2s ease;
    text-decoration: none;
}

.share-btn:hover {
    transform: scale(1.1);
}

.share-vk {
    background: #45668e;
}

.share-telegram {
    background: #0088cc;
}

.share-twitter {
    background: #1da1f2;
}

/* Related News */
.related-news {
    margin-top: 60px;
}

.related-news-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 30px;
    text-align: center;
}

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

.related-news-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.related-news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.related-news-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.related-news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-news-card:hover .related-news-image img {
    transform: scale(1.05);
}

.related-news-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.related-news-card-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    flex-grow: 1;
}

.related-news-card-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.related-news-card-title a:hover {
    color: #667eea;
}

.related-news-meta {
    display: flex;
    gap: 8px;
    font-size: 0.85rem;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .blog-header h1 {
        font-size: 2rem;
    }
    
    .blog-subtitle {
        font-size: 1rem;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .news-detail {
        padding: 25px 20px;
        border-radius: 0;
    }
    
    .news-detail-title {
        font-size: 1.8rem;
    }
    
    .news-detail-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .related-news-grid {
        grid-template-columns: 1fr;
    }
    
    .pagination {
        font-size: 0.9rem;
    }
    
    .pagination-link {
        padding: 8px 15px;
    }
}

@media (max-width: 480px) {
    .blog-container {
        padding: 20px 15px;
    }
    
    .blog-header h1 {
        font-size: 1.6rem;
    }
    
    .news-detail-title {
        font-size: 1.5rem;
    }
    
    .breadcrumbs {
        font-size: 0.8rem;
        flex-wrap: wrap;
    }
}

/* EditorJS Content Styles */

/* Checklist */
.news-detail-content ul.checklist {
    list-style: none;
    padding: 0;
}

.news-detail-content .checklist-item {
    display: flex;
    align-items: flex-start;
    padding: 8px 0;
}

.news-detail-content .checklist-item input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 4px;
}

.news-detail-content .checklist-item.checked {
    color: #888;
    text-decoration: line-through;
}

/* Warning Box */
.news-detail-content .warning-box {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 4px;
}

.news-detail-content .warning-title {
    font-weight: 600;
    color: #856404;
    margin-bottom: 8px;
}

.news-detail-content .warning-message {
    color: #856404;
}

/* Quote */
.news-detail-content blockquote {
    border-left: 4px solid #667eea;
    padding-left: 20px;
    margin: 25px 0;
    font-style: italic;
    color: #555;
}

.news-detail-content blockquote.quote-center {
    text-align: center;
    border-left: none;
    border-top: 4px solid #667eea;
    padding-left: 0;
    padding-top: 20px;
}

.news-detail-content blockquote footer {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #888;
    font-style: normal;
}

/* Table */
.news-detail-content table.editorjs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.news-detail-content table.editorjs-table th,
.news-detail-content table.editorjs-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.news-detail-content table.editorjs-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

.news-detail-content table.editorjs-table tr:hover {
    background: #f8f9fa;
}

/* Image Variations */
.news-detail-content figure {
    margin: 30px 0;
}

.news-detail-content figure.with-border img {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.news-detail-content figure.with-background {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.news-detail-content figure.stretched img {
    width: 100%;
}

/* Link Tool */
.news-detail-content .link-tool {
    margin: 25px 0;
}

.news-detail-content .link-tool a {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.news-detail-content .link-tool a:hover {
    background: #e9ecef;
    border-color: #667eea;
}

.news-detail-content .link-tool img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.news-detail-content .link-content {
    flex-grow: 1;
}

.news-detail-content .link-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: #1a1a1a;
}

.news-detail-content .link-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.news-detail-content .link-url {
    font-size: 0.85rem;
    color: #667eea;
}

/* Embed */
.news-detail-content .embed-container {
    margin: 30px 0;
}

.news-detail-content .embed-container iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
}

.news-detail-content .embed-caption {
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    margin-top: 10px;
}

/* Code Block */
.news-detail-content pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 25px 0;
}

.news-detail-content pre code {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Delimiter */
.news-detail-content hr.delimiter {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, #667eea, transparent);
    margin: 40px 0;
}

/* Responsive для EditorJS элементов */
@media (max-width: 768px) {
    .news-detail-content table.editorjs-table {
        font-size: 0.9rem;
    }
    
    .news-detail-content table.editorjs-table th,
    .news-detail-content table.editorjs-table td {
        padding: 10px;
    }
    
    .news-detail-content .link-tool a {
        flex-direction: column;
    }
    
    .news-detail-content .link-tool img {
        width: 100%;
        height: 200px;
    }
}
