/* Стили для блога и статей */

/* Блог - Герой секция */
.blog-hero {
    position: relative;
    padding: 4rem 0;
    overflow: hidden;
    background-color: var(--light-background);
}

.blog-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.7;
}

.blog-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 2rem;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 0.5rem;
    margin: 0 auto;
    text-align: center;
}

.blog-hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.blog-hero-content p {
    font-size: 1.2rem;
    margin-bottom: 0;
}

/* Блог - Сетка */
.blog-content {
    padding: 4rem 0;
    background-color: white;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.blog-card {
    background-color: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.blog-card-image {
    display: block;
    height: 220px;
    overflow: hidden;
}

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

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

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

.blog-card-content h2 {
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.blog-card-content h2 a {
    color: var(--text-color);
    transition: color 0.3s ease;
}

.blog-card-content h2 a:hover {
    color: var(--primary-color);
}

.blog-meta {
    font-size: 0.9rem;
    color: var(--light-text-color);
    margin-bottom: 1rem;
}

.blog-excerpt {
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

/* Статья - Страница */
.article-main {
    padding: 3rem 0 5rem;
    background-color: white;
}

.article-content {
    max-width: 900px;
    margin: 0 auto;
}

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

.back-to-blog {
    display: inline-flex;
    align-items: center;
    color: var(--light-text-color);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.back-to-blog svg {
    margin-right: 0.5rem;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.article-meta p {
    margin: 0;
    color: var(--light-text-color);
    font-size: 0.9rem;
}

.social-share {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.social-share span {
    font-size: 0.9rem;
    color: var(--light-text-color);
}

.social-share a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: white;
    background-color: var(--light-text-color);
    transition: background-color 0.3s ease;
}

.social-share a:hover {
    background-color: var(--primary-color);
}

.article-image {
    margin-bottom: 2rem;
    border-radius: 0.5rem;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: auto;
    display: block;
}

.article-body {
    font-size: 1.1rem;
    line-height: 1.7;
}

.article-body h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-size: 1.8rem;
    color: var(--text-color);
}

.article-body h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.4rem;
    color: var(--text-color);
}

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

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

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

.article-body blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
}

.article-body img {
    max-width: 100%;
    height: auto;
    margin: 2rem 0;
    border-radius: 0.5rem;
}

.article-body a {
    color: var(--primary-color);
    text-decoration: underline;
}

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

.article-body th,
.article-body td {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
}

.article-body th {
    background-color: var(--light-background);
    font-weight: 600;
    text-align: left;
}

.article-body tr:nth-child(even) {
    background-color: var(--light-background);
}

/* Медиа запросы */
@media (max-width: 992px) {
    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .blog-hero-content {
        padding: 1.5rem;
    }
    
    .blog-hero-content h1 {
        font-size: 2rem;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .article-body {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-card-image {
        height: 180px;
    }
}