/* CSS переменные */
:root {
    --primary-color: #3cb371;
    --secondary-color: #6c757d;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --border-color: #e9ecef;
}

/* Упрощенная шапка статьи с градиентом */
.article-header-simple {
    background: linear-gradient(135deg, #3cb371 0%, #2d8a5a 50%, #1e6b47 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.article-title-simple {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 1rem 0 1.5rem;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.article-meta-simple {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    font-size: 1rem;
    opacity: 0.9;
}

.article-meta-simple .meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.article-header-simple .breadcrumb {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(15px);
    border-radius: 30px;
    padding: 1rem 1.5rem;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    font-weight: 500;
    width: 100%;
    max-width: 100%;
    overflow: visible;
}

.article-header-simple .breadcrumb-item {
    margin: 0.5rem 0.2rem;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    max-width: none;
    flex-shrink: 0;
}

.article-header-simple .breadcrumb-item:first-child {
    margin-left: 0.2rem;
    margin-right: 0.2rem;
}

.article-header-simple .breadcrumb-item:last-child {
    margin-right: 0.2rem;
    margin-left: 0.2rem;
}

.article-header-simple .breadcrumb-item a {
    color: rgba(255,255,255,0.95);
    text-decoration: none;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    transition: all 0.3s ease;
    font-weight: 500;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    display: inline-block;
    max-width: none;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    line-height: 1.3;
}

.article-header-simple .breadcrumb-item a:hover {
    color: white;
    background: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

.article-header-simple .breadcrumb-item.active {
    color: white;
    background: rgba(255,255,255,0.25);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-weight: 600;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    max-width: none;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    line-height: 1.3;
}

.article-header-simple .breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: rgba(255,255,255,0.7);
    font-weight: 700;
    font-size: 1.2rem;
    margin: 0 0.5rem;
    line-height: 1;
    flex-shrink: 0;
}

/* Адаптивность для упрощенной шапки */
@media (max-width: 768px) {
    .article-title-simple {
        font-size: 2rem;
    }
    
    .article-header-simple {
        padding: 2.5rem 0;
    }
    
    .article-meta-simple {
        gap: 1rem;
        justify-content: center;
    }
    
    .article-header-simple .breadcrumb {
        padding: 0.8rem 1rem;
        margin: 0 auto 1.5rem;
        font-size: 0.9rem;
        width: 100%;
        max-width: 100%;
    }
    
    .article-header-simple .breadcrumb-item {
        margin: 0.4rem 0.15rem;
        max-width: 100%;
    }
    
    .article-header-simple .breadcrumb-item a,
    .article-header-simple .breadcrumb-item.active {
        padding: 0.25rem 0.6rem;
        font-size: 0.85rem;
        word-wrap: break-word;
        word-break: break-word;
        hyphens: auto;
        line-height: 1.2;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .article-title-simple {
        font-size: 1.75rem;
    }
    
    .article-header-simple .breadcrumb {
        padding: 0.6rem 0.8rem;
        margin: 0 auto 1rem;
        font-size: 0.8rem;
        border-radius: 25px;
        width: 100%;
        max-width: 100%;
    }
    
    .article-header-simple .breadcrumb-item {
        margin: 0.3rem 0.1rem;
        flex-shrink: 0;
        max-width: 100%;
        width: 100%;
        text-align: center;
    }
    
    .article-header-simple .breadcrumb-item a,
    .article-header-simple .breadcrumb-item.active {
        padding: 0.2rem 0.5rem;
        font-size: 0.8rem;
        border-radius: 12px;
        word-wrap: break-word;
        word-break: break-word;
        hyphens: auto;
        line-height: 1.2;
        text-align: center;
        width: 100%;
        display: block;
    }
    
    .article-header-simple .breadcrumb-item + .breadcrumb-item::before {
        font-size: 1rem;
        margin: 0 0.3rem;
    }
    
    .article-meta-simple {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
}

/* Специальные стили для длинных заголовков на мобильных */
@media (max-width: 576px) {
    .article-header-simple .breadcrumb-item:last-child {
        width: 100%;
        max-width: 100%;
    }
    
    .article-header-simple .breadcrumb-item:last-child a,
    .article-header-simple .breadcrumb-item:last-child.active {
        width: 100%;
        max-width: 100%;
        word-wrap: break-word;
        word-break: break-all;
        hyphens: auto;
        line-height: 1.1;
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
        text-align: center;
        display: block;
        white-space: normal;
        overflow-wrap: break-word;
        overflow: visible;
    }
    
    /* Принудительный перенос для очень длинных слов */
    .article-header-simple .breadcrumb-item:last-child a::before,
    .article-header-simple .breadcrumb-item:last-child.active::before {
        content: '';
        display: block;
        width: 100%;
        height: 0;
    }
    
    /* Экстремально длинные заголовки - принудительное сокращение */
    .article-header-simple .breadcrumb-item:last-child a,
    .article-header-simple .breadcrumb-item:last-child.active {
        font-size: 0.65rem !important;
        line-height: 1.0 !important;
        padding: 0.2rem 0.4rem !important;
        max-height: 4.5em;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 4;
        -webkit-box-orient: vertical;
    }
    
    /* Для очень длинных заголовков - еще меньше шрифт */
    .article-header-simple .breadcrumb-item:last-child a[title*=":"],
    .article-header-simple .breadcrumb-item:last-child.active[title*=":"] {
        font-size: 0.6rem !important;
        line-height: 0.95 !important;
        padding: 0.15rem 0.3rem !important;
    }
}

/* Дополнительные стили для планшетов */
@media (max-width: 768px) and (min-width: 577px) {
    .article-header-simple .breadcrumb-item:last-child a,
    .article-header-simple .breadcrumb-item:last-child.active {
        word-wrap: break-word;
        word-break: break-word;
        hyphens: auto;
        line-height: 1.2;
        text-align: center;
        max-width: 100%;
        font-size: 0.8rem;
        max-height: 3.5em;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
    }
}

/* Принудительное обрезание для экстремально длинных заголовков */
@media (max-width: 576px) {
    .article-header-simple .breadcrumb-item:last-child a,
    .article-header-simple .breadcrumb-item:last-child.active {
        /* Принудительное обрезание */
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 100% !important;
        width: 100% !important;
        display: block !important;
        
        /* Очень маленький шрифт */
        font-size: 0.6rem !important;
        line-height: 1.0 !important;
        padding: 0.15rem 0.3rem !important;
        
        /* Убираем переносы */
        word-wrap: normal !important;
        word-break: normal !important;
        hyphens: none !important;
    }
    
    /* Специально для заголовков с двоеточием (очень длинные) */
    .article-header-simple .breadcrumb-item:last-child a[title*=":"],
    .article-header-simple .breadcrumb-item:last-child.active[title*=":"] {
        font-size: 0.55rem !important;
        line-height: 0.9 !important;
        padding: 0.1rem 0.25rem !important;
    }
}

/* Для планшетов тоже добавляем обрезание */
@media (max-width: 768px) and (min-width: 577px) {
    .article-header-simple .breadcrumb-item:last-child a,
    .article-header-simple .breadcrumb-item:last-child.active {
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 100% !important;
        font-size: 0.75rem !important;
        line-height: 1.1 !important;
    }
}

/* Блог - общие стили */
.blog-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2d8a5a 100%);
    padding: 4rem 0 2rem;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.blog-hero p {
    font-size: 1.3rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

/* Поиск */
.blog-search {
    background: white;
    border-radius: 50px;
    padding: 0.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    max-width: 500px;
    margin: 2rem auto 0;
}

.blog-search .form-control {
    border: none;
    background: transparent;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
}

.blog-search .form-control:focus {
    box-shadow: none;
}

.blog-search .btn {
    border-radius: 50px;
    padding: 0.8rem 1.5rem;
    border: none;
}

/* Карточки статей */
.blog-grid {
    padding: 4rem 0;
}

.blog-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: none;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.blog-card-image {
    height: 220px;
    position: relative;
    overflow: hidden;
}

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

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

.blog-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(60,179,113,0.8), rgba(45,138,90,0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-card:hover .blog-card-overlay {
    opacity: 1;
}

.blog-card-body {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--secondary-color);
}

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

.blog-card-reading-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(60,179,113,0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    color: var(--primary-color);
    font-weight: 500;
}

.blog-card-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.blog-card-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.blog-card-excerpt {
    color: var(--secondary-color);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.blog-card-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--secondary-color);
}

.blog-card-stats span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.blog-read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid var(--primary-color);
    transition: all 0.3s ease;
}

.blog-read-more:hover {
    background: var(--primary-color);
    color: white;
    text-decoration: none;
}

/* Языковые бэджи */
.language-badges {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.language-badge {
    background: linear-gradient(45deg, var(--primary-color), #2d8a5a);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
}

/* Пагинация */
.blog-pagination {
    padding: 3rem 0;
    text-align: center;
}

.blog-pagination .pagination {
    justify-content: center;
    gap: 0.5rem;
}

.blog-pagination .page-link {
    border: none;
    border-radius: 10px;
    padding: 0.8rem 1.2rem;
    color: var(--primary-color);
    background: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.blog-pagination .page-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(60,179,113,0.3);
}

.blog-pagination .active .page-link {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 5px 15px rgba(60,179,113,0.3);
}

/* Страница статьи */
.article-hero {
    height: 60vh;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
}

.article-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.6), rgba(60,179,113,0.3));
    display: flex;
    align-items: center;
}

.article-header {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
}

.article-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    font-size: 1rem;
    opacity: 0.9;
}

.article-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

/* Без hero изображения */
.article-hero-simple {
    background: var(--primary-color);
    padding: 4rem 0;
}

/* Контент статьи */
.article-content {
    background: white;
    border-radius: 20px;
    margin: -100px 0 0;
    position: relative;
    z-index: 10;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    overflow: hidden;
}

.article-content-inner {
    padding: 4rem 3rem;
}

/* Breadcrumbs стили */
.blog-breadcrumb {
    background: transparent;
    padding: 1rem 0;
    margin-bottom: 0;
}

.blog-breadcrumb .breadcrumb {
    background: rgba(255,255,255,0.9);
    border-radius: 30px;
    padding: 0.8rem 1.5rem;
    margin-bottom: 0;
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.blog-breadcrumb .breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.blog-breadcrumb .breadcrumb-item.active {
    color: var(--text-color);
    font-weight: 600;
}

/* Описание статьи */
.article-excerpt {
    background: linear-gradient(45deg, rgba(60,179,113,0.05), rgba(45,138,90,0.05));
    border-left: 4px solid var(--primary-color);
    border-radius: 0 10px 10px 0;
    padding: 2rem;
    margin-bottom: 3rem;
}

.article-excerpt .lead {
    font-size: 1.3rem;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 0;
    font-weight: 400;
}

/* Контент статьи */
.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4,
.article-body h5,
.article-body h6 {
    color: var(--text-color);
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.article-body h2 {
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(60,179,113,0.2);
}

.article-body h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

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

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

.article-body li {
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.article-body blockquote {
    border-left: 4px solid var(--primary-color);
    background: linear-gradient(45deg, rgba(60,179,113,0.03), rgba(45,138,90,0.03));
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    border-radius: 0 10px 10px 0;
    font-style: italic;
    position: relative;
}

.article-body blockquote::before {
    content: '"';
    font-size: 4rem;
    color: rgba(60,179,113,0.3);
    position: absolute;
    top: -10px;
    left: 10px;
    font-family: serif;
}

/* Переключатель языков */
.language-switcher {
    text-align: center;
    margin: 2rem 0;
}

.language-switcher .btn-group .btn {
    border-radius: 20px;
    padding: 0.5rem 1.2rem;
    font-weight: 500;
    margin: 0 0.2rem;
    border: 2px solid var(--primary-color);
    transition: all 0.3s ease;
}

.language-switcher .btn-outline-primary {
    color: var(--primary-color);
    background: transparent;
}

.language-switcher .btn-outline-primary:hover,
.language-switcher .btn-primary {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(60,179,113,0.3);
}

/* Социальные кнопки */
.article-social {
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    padding: 2rem;
    margin: 3rem 0;
    text-align: center;
}

.article-social h5 {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.social-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.social-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
}

.social-btn:hover::before {
    width: 100%;
    height: 100%;
}

.social-btn:hover {
    transform: translateY(-5px) scale(1.1);
    text-decoration: none;
    color: white;
}

.social-btn.facebook { background: linear-gradient(45deg, #3b5998, #4c70ba); }
.social-btn.twitter { background: linear-gradient(45deg, #1da1f2, #0d8bd9); }
.social-btn.linkedin { background: linear-gradient(45deg, #0077b5, #005885); }
.social-btn.telegram { background: linear-gradient(45deg, #0088cc, #006699); }
.social-btn.copy-link { background: linear-gradient(45deg, var(--primary-color), #2d8a5a); }

/* Навигация по статьям */
.article-navigation {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 2rem;
    margin: 3rem 0;
}

.nav-article {
    margin-bottom: 1rem;
}

.nav-label {
    font-size: 0.9rem;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.nav-title {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: block;
    padding: 0.5rem 0;
}

.nav-title:hover {
    color: var(--primary-color);
    text-decoration: none;
    padding-left: 1rem;
}

/* Похожие статьи */
.related-articles {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 4rem 0;
}

.related-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.4s ease;
    height: 100%;
    border: none;
}

.related-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.related-card-image {
    height: 160px;
    overflow: hidden;
    position: relative;
}

.related-card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(60,179,113,0.1), rgba(45,138,90,0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.related-card:hover .related-card-image::after {
    opacity: 1;
}

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

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

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

.related-title {
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 1rem;
}

.related-title a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.related-title a:hover {
    color: var(--primary-color);
}

.related-excerpt {
    color: var(--secondary-color);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 1rem 0;
}

.related-meta {
    font-size: 0.8rem;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Адаптивность */
@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 2.5rem;
    }

    .blog-hero p {
        font-size: 1.1rem;
    }

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

    .blog-card-footer {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .article-title {
        font-size: 2.2rem;
    }

    .article-meta {
        flex-direction: column;
        gap: 1rem;
    }

    .article-content-inner {
        padding: 2rem 1.5rem;
    }

    .social-buttons {
        gap: 0.8rem;
    }

    .social-btn {
        width: 45px;
        height: 45px;
    }

    .nav-article.text-end {
        text-align: left !important;
    }
}

@media (max-width: 576px) {
    .blog-hero {
        padding: 3rem 0 2rem;
    }

    .blog-card-image {
        height: 180px;
    }

    .article-content {
        margin-top: -80px;
        border-radius: 20px 20px 0 0;
    }

    .related-card-image {
        height: 140px;
    }
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-card {
    animation: fadeInUp 0.6s ease-out;
}

.blog-card:nth-child(2) { animation-delay: 0.1s; }
.blog-card:nth-child(3) { animation-delay: 0.2s; }
.blog-card:nth-child(4) { animation-delay: 0.3s; }

/* Состояние загрузки */
.blog-loading {
    text-align: center;
    padding: 3rem;
}

.blog-loading .spinner-border {
    color: var(--primary-color);
}

/* Пустое состояние */
.blog-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--secondary-color);
}

.blog-empty i {
    font-size: 4rem;
    margin-bottom: 2rem;
    opacity: 0.5;
}
















/* Дополнительные стили для улучшения */
.blog-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s ease;
}

.blog-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Улучшенная анимация загрузки */
.blog-card img {
    transition: opacity 0.3s ease;
}

.blog-card img.lazy {
    opacity: 0.5;
}

/* Состояние поиска */
.blog-search input:focus {
    transform: scale(1.02);
    transition: transform 0.2s ease;
}

/* Улучшенные языковые бэджи */
.language-badge {
    position: relative;
    overflow: hidden;
}

.language-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.blog-card:hover .language-badge::before {
    left: 100%;
}

/* Адаптивные улучшения */
@media (max-width: 768px) {
    .blog-search {
        max-width: 100%;
        margin: 1.5rem auto 0;
    }

    .blog-card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .blog-card-stats {
        width: 100%;
        justify-content: space-between;
    }
}

/* Эффект печатной машинки для заголовка */
@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

.blog-hero h1 {
    overflow: hidden;
    white-space: nowrap;
}

/* Пульсация для кнопки поиска */
.blog-search .btn:hover {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}
