/* blog.css - Стили для страницы блога */
/* Hero секция блога */
.blog-hero {
    height: 70vh;
    min-height: 500px;
    position: relative;
    display: flex;
    align-items: center;
}

.blog-stats {
    display: flex;
    gap: 40px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.blog-stats .stat {
    text-align: center;
}

.blog-stats .stat .number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 5px;
}

.blog-stats .stat .label {
    font-size: 0.9rem;
    color: var(--gray);
}

/* Категории блога */
.blog-categories {
    background-color: var(--dark);
    padding: 40px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.categories-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.category-btn {
    padding: 12px 25px;
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--light);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
}

.category-btn.active,
.category-btn:hover {
    background-color: var(--primary);
    transform: translateY(-2px);
}

/* Список статей */
.blog-posts {
    background-color: var(--darker);
    padding: 80px 0;
}

.section-subtitle {
    font-size: 2rem;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
}

.section-subtitle:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary);
}

/* Популярные статьи */
.featured-posts {
    margin-bottom: 60px;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 40px;
}

.featured-post {
    background-color: var(--dark);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.featured-post:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.featured-post .post-image {
    height: 250px;
    overflow: hidden;
}

.featured-post .post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-post:hover .post-image img {
    transform: scale(1.1);
}

.featured-post .post-content {
    padding: 30px;
}

/* Все статьи */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.blog-post {
    background-color: var(--dark);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.blog-post:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.blog-post .post-image {
    height: 200px;
    overflow: hidden;
}

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

.blog-post:hover .post-image img {
    transform: scale(1.1);
}

.blog-post .post-content {
    padding: 25px;
}

/* Общие стили для контента статей */
.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.85rem;
}

.post-category {
    background-color: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-weight: 500;
    font-size: 0.8rem;
}

.post-content time {
    color: var(--gray);
}

.post-content h4 {
    margin-bottom: 15px;
    line-height: 1.4;
}

.post-content h4 a {
    color: var(--light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-content h4 a:hover {
    color: var(--primary);
}

.post-content p {
    color: var(--gray);
    margin-bottom: 20px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.read-time {
    color: var(--gray);
    font-size: 0.85rem;
}

.read-more {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.read-more:after {
    content: '→';
    transition: transform 0.3s ease;
}

.read-more:hover {
    gap: 8px;
}

.read-more:hover:after {
    transform: translateX(3px);
}

/* Пагинация */
.blog-pagination {
    margin-top: 60px;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    gap: 10px;
    list-style: none;
}

.page-item .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border: 2px solid var(--primary);
    color: var(--light);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.page-item.active .page-link {
    background-color: var(--primary);
    color: white;
}

.page-item .page-link:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.page-link.next {
    width: auto;
    padding: 0 20px;
    gap: 8px;
}

/* Подписка на рассылку */
.newsletter {
    background: linear-gradient(135deg, var(--dark), var(--darker));
    padding: 80px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-content h3 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    color: var(--light);
}

.newsletter-content p {
    color: var(--gray);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.newsletter-form {
    max-width: 400px;
    margin: 0 auto;
}

.newsletter-form .form-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 15px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: var(--light);
    font-family: 'Open Sans', sans-serif;
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--primary);
}

.newsletter-form .btn {
    padding: 12px 25px;
    white-space: nowrap;
}

.form-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--gray);
    font-size: 0.85rem;
}

.form-notice i {
    color: var(--primary);
}

/* Адаптивность для блога */
@media (max-width: 992px) {
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .blog-stats {
        gap: 20px;
        justify-content: center;
    }
    
    .blog-stats .stat .number {
        font-size: 2rem;
    }
    
    .categories-filter {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
    }
    
    .category-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .section-subtitle {
        font-size: 1.7rem;
    }
    
    .newsletter-form .form-group {
        flex-direction: column;
    }
    
    .newsletter-content h3 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .featured-post .post-content,
    .blog-post .post-content {
        padding: 20px;
    }
    
    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .post-footer {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .blog-stats {
        flex-direction: column;
        gap: 15px;
    }
}
/* Стили для блога и статей */

/* Компактная hero-секция для статей */
.article-hero-compact {
    position: relative;
    height: 480px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: flex-end; /* Выравниваем контент по низу */
}

.article-hero-bg {
	    height: 70vh;
    min-height: 500px;
    position: relative;
    display: flex;
    align-items: center;

    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: brightness(0.7);
    z-index: 1;
}

.article-hero-compact .container {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end; /* Выравнивание контейнера по низу */
}

.article-hero-compact .hero-content {
    padding: 30px 0;
    color: white;
    text-align: left;
    width: 100%;
    margin-left: 5%; /* Сдвигаем контент немного вправо */
    margin-bottom: 0; /* Убираем отступ снизу, т.к. контейнер уже выровнен по низу */
}

/* Мета-информация статьи */
.article-meta-info {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.article-category {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.article-hero-compact h1 {
    color: white;
    font-size: 24px;
    line-height: 1.3;
    margin: 0 0 8px 0;
    font-weight: 600;
    max-width: 90%; /* Ограничиваем ширину заголовка */
}

.article-excerpt {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    line-height: 1.4;
    margin: 0;
    max-width: 80%; /* Ограничиваем ширину описания */
}

/* Стили для основного контента статьи */
.blog-article {
    padding: 40px 0;
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.7;
    font-size: 16px;
}

.article-content h2 {
    font-size: 1.8rem;
    margin: 2rem 0 1rem;
    color: var(--dark);
}

.article-content h3 {
    font-size: 1.4rem;
    margin: 1.5rem 0 0.8rem;
    color: var(--dark);
}

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

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

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

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

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

/* Адаптивность */
@media (max-width: 768px) {
    .article-hero-compact {
        height: 160px;
    }
    
    .article-hero-compact .hero-content {
        padding: 20px 0;
        margin-left: 0; /* На планшетах убираем сдвиг вправо */
    }
    
    .article-hero-compact h1 {
        font-size: 20px;
        max-width: 100%; /* На планшетах занимаем всю ширину */
    }
    
    .article-excerpt {
        font-size: 14px;
        max-width: 100%; /* На планшетах занимаем всю ширину */
    }
    
    .article-meta-info {
        font-size: 12px;
        gap: 12px;
    }
    
    .blog-article {
        padding: 30px 0;
    }
    
    .article-content {
        font-size: 15px;
    }
    
    .article-content h2 {
        font-size: 1.5rem;
    }
    
    .article-content h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .article-hero-compact {
        height: 140px;
    }
    
    .article-hero-compact .hero-content {
        padding: 15px 0;
    }
    
    .article-hero-compact h1 {
        font-size: 18px;
    }
    
    .article-excerpt {
        display: none;
    }
    
    .article-meta-info {
        margin-bottom: 5px;
        font-size: 11px;
        gap: 8px;
    }
    
    .blog-article {
        padding: 20px 0;
    }
    
    .article-content {
        font-size: 14px;
    }
}

/* Стили для страницы 404 в блоге */
.error-hero {
    min-height: 50vh;
    display: flex;
    align-items: center;
    text-align: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.error-hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.error-hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.error-hero .btn {
    margin: 0 10px;
}

/* Компактная hero-секция для статей */


.article-hero-compact .container {
    position: relative;
    z-index: 3;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
}

.article-hero-compact .hero-content {
    padding: 40px 0 30px;
    color: var(--light);
    text-align: left;
    width: 100%;
    margin-left: 5%;
    margin-bottom: 0;
}

/* Мета-информация статьи */
.article-meta-info {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.article-category {
    background: rgba(0, 204, 102, 0.2);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(0, 204, 102, 0.3);
}

.article-date {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--gray);
}

.article-date::before {
    content: '🕒';
    font-size: 12px;
}

.article-hero-compact h1 {
    color: var(--light);
    font-size: 2.5rem;
    line-height: 1.2;
    margin: 0 0 15px 0;
    font-weight: 700;
    max-width: 90%;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.article-excerpt {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    line-height: 1.5;
    margin: 0;
    max-width: 80%;
    font-weight: 300;
}

/* Стили для основного контента статьи */
.blog-article {
    padding: 60px 0;
    background: var(--darker);
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.7;
    font-size: 16px;
    color: var(--light);
    background: var(--dark);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.article-content h2 {
    font-size: 1.8rem;
    margin: 2rem 0 1rem;
    color: var(--light);
    border-left: 4px solid var(--primary);
    padding-left: 15px;
    position: relative;
}

.article-content h2::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(to bottom, var(--primary), var(--primary-dark));
    border-radius: 2px;
}

.article-content h3 {
    font-size: 1.4rem;
    margin: 1.5rem 0 0.8rem;
    color: var(--light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.article-content h3::before {
    content: '•';
    color: var(--primary);
    font-size: 1.5rem;
}

.article-content p {
    margin-bottom: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    border: 2px solid rgba(0, 204, 102, 0.3);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

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

.article-content li {
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    position: relative;
}

.article-content ul li::before {
    content: '▸';
    color: var(--primary);
    position: absolute;
    left: -15px;
    font-weight: bold;
}

.article-content ol {
    counter-reset: item;
}

.article-content ol li::before {
    content: counter(item) ".";
    counter-increment: item;
    color: var(--primary);
    position: absolute;
    left: -15px;
    font-weight: bold;
}

.article-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 20px 25px;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--gray);
    background: rgba(0, 204, 102, 0.05);
    border-radius: 0 8px 8px 0;
    position: relative;
}

.article-content blockquote::before {
    content: '"';
    font-size: 3rem;
    color: var(--primary);
    position: absolute;
    top: 10px;
    left: 15px;
    opacity: 0.3;
    font-family: serif;
}

.article-content code {
    background: rgba(0, 204, 102, 0.1);
    color: var(--primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    border: 1px solid rgba(0, 204, 102, 0.2);
}

.article-content pre {
    background: var(--darker);
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.article-content pre code {
    background: none;
    border: none;
    padding: 0;
    color: var(--light);
}


/* Дополнительные элементы для улучшения читаемости */
.article-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-btn-article {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--darker);
    border: 2px solid var(--primary);
    color: var(--light);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-btn-article:hover {
    background: var(--primary);
    transform: translateX(-5px);
}

.nav-btn-article.next {
    margin-left: auto;
}

.nav-btn-article.next:hover {
    transform: translateX(5px);
}

/* Адаптивность */
@media (max-width: 768px) {
    .article-hero-compact {
        height: 300px;
    }
    
    .article-hero-compact .hero-content {
        padding: 30px 0 20px;
        margin-left: 0;
    }
    
    .article-hero-compact h1 {
        font-size: 1.8rem;
        max-width: 100%;
    }
    
    .article-excerpt {
        font-size: 1rem;
        max-width: 100%;
    }
    
    .article-meta-info {
        font-size: 12px;
        gap: 12px;
    }
    
    .blog-article {
        padding: 40px 0;
    }
    
    .article-content {
        font-size: 15px;
        padding: 30px 20px;
    }
    
    .article-content h2 {
        font-size: 1.5rem;
    }
    
    .article-content h3 {
        font-size: 1.2rem;
    }
    
    .article-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-btn-article {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .article-hero-compact {
        height: 250px;
    }
    
    .article-hero-compact .hero-content {
        padding: 25px 0 15px;
    }
    
    .article-hero-compact h1 {
        font-size: 1.5rem;
    }
    
    .article-excerpt {
        font-size: 0.9rem;
        display: block;
    }
    
    .article-meta-info {
        margin-bottom: 10px;
        font-size: 11px;
        gap: 8px;
    }
    
    .blog-article {
        padding: 30px 0;
    }
    
    .article-content {
        font-size: 14px;
        padding: 25px 15px;
    }
    
    .breadcrumb {
        padding: 15px 0;
    }
    
    .breadcrumb ol {
        font-size: 12px;
    }
}

/* Стили для страницы 404 в блоге */
.error-hero {
    min-height: 50vh;
    display: flex;
    align-items: center;
    text-align: center;
    background: linear-gradient(135deg, var(--dark) 0%, var(--darker) 100%);
    color: var(--light);
    position: relative;
    overflow: hidden;
}

.error-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 50%, rgba(0, 204, 102, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 20%, rgba(0, 204, 102, 0.05) 0%, transparent 50%);
}

.error-hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--primary);
}

.error-hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: var(--gray);
}

.error-hero .btn {
    margin: 0 10px;
}

/* Интерактивные эффекты */
.article-hero-compact {
    transition: all 0.3s ease;
}

.article-category {
    transition: all 0.3s ease;
}

.article-category:hover {
    background: rgba(0, 204, 102, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 204, 102, 0.2);
}

.article-content a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.article-content a:hover {
    color: var(--primary-dark);
    border-bottom-color: var(--primary);
}

/* Смещение заголовка h1 в hero-секции */
.article-hero-compact .hero-content.article-hero-content {
    width: 100%;
    margin-left: 5%;
    margin-bottom: 0;
}

/* Специфически для заголовка h1 */
.article-hero-compact h1#article-hero-heading {
    margin-top: 80px; /* Смещаем заголовок на 80px вниз */
    margin-bottom: 20px;
    position: relative;
}


/* Увеличиваем высоту секции для компенсации смещения */
.article-hero-compact {
    position: relative;
    height: 550px; /* Увеличиваем высоту для размещения смещенного заголовка */
    overflow: hidden;
    background: var(--darker);
    display: flex;
    align-items: flex-end;
}

/* Адаптивность для смещенного заголовка */
@media (max-width: 768px) {
    .article-hero-compact {
        height: 400px;
    }
    
    .article-hero-compact h1#article-hero-heading {
        margin-top: 60px; /* Меньшее смещение на планшетах */
    }
}

@media (max-width: 480px) {
    .article-hero-compact {
        height: 350px;
    }
    
    .article-hero-compact h1#article-hero-heading {
        margin-top: 50px; /* Меньшее смещение на телефонах */
        font-size: 1.8rem; /* Уменьшаем размер шрифта для лучшего отображения */
    }
    
    .article-hero-compact .hero-content.article-hero-content {
        margin-left: 0;
        padding: 0 15px;
    }
}

/* Дополнительные улучшения для лучшего визуального баланса */
.article-hero-compact .article-meta-info {
    margin-top: 10px; /* Добавляем отступ над мета-информацией */
}

.article-excerpt {
    margin: 15px 0 25px 0; /* Увеличиваем отступы вокруг описания */
    font-size: 1.2rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
}

