/* Hero секция с градиентом и красивой типографикой */
.news-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
    padding: 120px 0 80px;
    min-height: 400px;
    display: flex;
    align-items: center;
    margin-top: 60px;
}

.news-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.1)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.1)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    z-index: 1;
}

/* Фоновое изображение с блюром */
.news-hero__background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(5px) brightness(0.8);
    transform: scale(1.1);
    z-index: 0;
}

/* Градиентный оверлей для лучшей читаемости */
.news-hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%);
    z-index: 1;
}

.news-hero__container {
    position: relative;
    z-index: 3;
}

.news-hero__title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.2;
    color: white;
    margin-bottom: 30px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
    animation: fadeInUp 0.8s ease-out;
}

.news-hero__subtitle {
    font-size: 1.3rem;
    color: rgba(255,255,255,0.9);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* Основной контент */
.news-content {
    padding: 20px 0;
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
}

.news-content__container {
    max-width: 1460px;
    margin: 0 auto;
}

.news-content__image {
    display: none; /* Скрываем изображение здесь */
}

.news-content__text {
    background: white;
    padding: 20px 40px;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    line-height: 1.8;
    font-size: 1.1rem;
    color: #2d3748;
    animation: fadeInUp 0.8s ease-out 0.6s both;
    max-width: 100%;
    overflow: hidden;
    word-wrap: break-word;
}

.news-content__text h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
    padding-bottom: 15px;
    position: relative;
}

.news-content__text h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin: 40px 0 20px 0;
}

/* Улучшенные стили для списков */
.news-content__text ul,
.news-content__text ol {
    margin: 25px 0;
    padding-left: 30px;
    counter-reset: list-counter;
}

.news-content__text ul {
    list-style: none;
}

.news-content__text ul li {
    position: relative;
    margin-bottom: 15px;
    color: #4a5568;
    line-height: 1.6;
    padding-left: 25px;
}

.news-content__text ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.news-content__text ol {
    counter-reset: list-counter;
}

.news-content__text ol li {
    position: relative;
    margin-bottom: 15px;
    color: #4a5568;
    line-height: 1.6;
    padding-left: 35px;
    counter-increment: list-counter;
}

.news-content__text ol li::before {
    content: counter(list-counter) '.';
    position: absolute;
    left: 0;
    top: 0;
    width: 25px;
    height: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Вложенные списки */
.news-content__text ul ul,
.news-content__text ol ol,
.news-content__text ul ol,
.news-content__text ol ul {
    margin: 15px 0;
    padding-left: 20px;
}

.news-content__text ul ul li::before {
    width: 6px;
    height: 6px;
    background: linear-gradient(135deg, #a0aec0 0%, #718096 100%);
}

.news-content__text ol ol li::before {
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    background: linear-gradient(135deg, #a0aec0 0%, #718096 100%);
}

/* Специальные стили для разных типов списков */
.news-content__text ul.checklist li::before {
    content: '✓';
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-content__text ul.arrow-list li::before {
    content: '→';
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-content__text ul.star-list li::before {
    content: '★';
    background: linear-gradient(135deg, #f6ad55 0%, #ed8936 100%);
    color: white;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-content__text blockquote {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-left: 5px solid #667eea;
    padding: 30px;
    margin: 40px 0;
    border-radius: 0 16px 16px 0;
    font-style: italic;
    color: #2d3748;
    font-size: 1.1rem;
    position: relative;
}

.news-content__text blockquote::before {
    content: '"';
    font-size: 4rem;
    color: #667eea;
    position: absolute;
    top: -10px;
    left: 20px;
    font-family: serif;
    opacity: 0.3;
}

.news-content__text a {
    color: #667eea;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
}

.news-content__text a:hover {
    color: #5a6fd8;
    border-bottom-color: #5a6fd8;
}

/* Навигация */
.news-navigation {
    background: white;
    padding: 40px 0;
    border-top: 1px solid #e2e8f0;
    margin-top: 60px;
}

.news-navigation__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.news-navigation__back {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.news-navigation__back:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

.news-navigation__share {
    display: flex;
    gap: 15px;
}

.news-navigation__share-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;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.news-navigation__share-btn:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    text-decoration: none;
}

.news-navigation__share-btn--vk {
    background: linear-gradient(135deg, #4a76a8 0%, #5a85b8 100%);
}

.news-navigation__share-btn--telegram {
    background: linear-gradient(135deg, #0088cc 0%, #0099dd 100%);
}

.news-navigation__share-btn--twitter {
    background: linear-gradient(135deg, #1da1f2 0%, #2db1ff 100%);
}

/* Похожие новости */
.related-news {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 100px 0;
    position: relative;
}

.related-news::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #dee2e6, transparent);
}

.related-news__container {
    max-width: 1200px;
    margin: 0 auto;
}

.related-news__title {
    text-align: center;
    margin-bottom: 60px;
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a202c;
    position: relative;
}

.related-news__title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

.related-news__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.related-news__card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid #f1f3f4;
}

.related-news__card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.related-news__card-image {
    width: 100%;
    height: 220px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.related-news__card-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0,0,0,0.1), rgba(0,0,0,0));
}

.related-news__card-content {
    padding: 30px;
}

.related-news__card-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 20px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-news__card-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.related-news__card-link:hover {
    color: #5a6fd8;
    text-decoration: none;
    gap: 12px;
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .news-hero {
        padding: 80px 0 60px;
        min-height: 300px;
    }

    .news-hero__title {
        font-size: 2.5rem;
    }

    .news-content {
        padding: 60px 0;
    }

    .news-content__container {
        padding: 0 15px;
    }

    .news-content__text {
        padding: 40px 30px;
    }

    .news-navigation__container {
        flex-direction: column;
        text-align: center;
    }

    .related-news {
        padding: 80px 0;
    }

    .related-news__grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .related-news__title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .news-content__text {
        padding: 30px 20px;
    }

    .news-hero__title {
        font-size: 2rem;
    }

    .news-hero__subtitle {
        font-size: 1.1rem;
    }
}

/* Дополнительные эффекты */
.news-content__text img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    margin: 30px 0;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-content__text img:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}

/* Принудительное переопределение всех стилей изображений для адаптивности */
.news-content__text img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 30px auto !important;
}

/* Переопределяем все inline стили от TinyMCE */
.news-content__text img[style*="width"],
.news-content__text img[style*="height"],
.news-content__text img[width],
.news-content__text img[height] {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
}

/* Специально для изображений с фиксированными размерами */
.news-content__text img[style*="width: 800px"],
.news-content__text img[style*="width: 600px"],
.news-content__text img[style*="width: 500px"],
.news-content__text img[style*="width: 400px"] {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
}

/* Для изображений с float */
.news-content__text img[style*="float: left"],
.news-content__text img[style*="float:right"] {
    float: none !important;
    margin: 30px auto !important;
}

/* Для изображений с position */
.news-content__text img[style*="position: absolute"],
.news-content__text img[style*="position:relative"] {
    position: static !important;
}

/* Дополнительные стили для адаптивных изображений */
.news-content__text .responsive-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 30px auto !important;
    border-radius: 16px !important;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.news-content__text .responsive-image:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2) !important;
}

/* Специальные стили для изображений в iframe (если TinyMCE использует iframe) */
.news-content__text iframe {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-height: 400px;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

/* Стили для таблиц от TinyMCE */
.news-content__text table {
    width: 100% !important;
    max-width: 100% !important;
    border-collapse: collapse;
    margin: 30px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.news-content__text table td,
.news-content__text table th {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    word-wrap: break-word;
    max-width: 200px;
}

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

.news-content__text table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.news-content__text table tr:hover {
    background-color: #e8ecff;
}

/* Адаптивность для таблиц на мобильных */
@media (max-width: 768px) {
    .news-content__text table {
        font-size: 0.9rem;
    }

    .news-content__text table td,
    .news-content__text table th {
        padding: 8px 12px;
    }
}

/* Дополнительные правила для предотвращения переполнения */
.news-content__text * {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.news-content__text div,
.news-content__text p,
.news-content__text span {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

/* Специально для элементов с фиксированной шириной */
.news-content__text [style*="width"] {
    max-width: 100% !important;
    width: 100% !important;
}

.news-content__text code {
    background: #f7fafc;
    padding: 4px 8px;
    border-radius: 6px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    color: #e53e3e;
    border: 1px solid #e2e8f0;
}

.news-content__text pre {
    background: #2d3748;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 25px 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.news-content__text pre code {
    background: none;
    border: none;
    color: inherit;
    padding: 0;
}

/* Дополнительные стили для лучшей поддержки редактора */
.news-content__text strong,
.news-content__text b {
    font-weight: 700;
    color: #1a202c;
}

.news-content__text em,
.news-content__text i {
    font-style: italic;
    color: #4a5568;
}

.news-content__text u {
    text-decoration: underline;
    text-decoration-color: #667eea;
    text-underline-offset: 3px;
}

.news-content__text s,
.news-content__text strike {
    text-decoration: line-through;
    color: #a0aec0;
}

.news-content__text mark {
    background: linear-gradient(135deg, #fef5e7 0%, #fed7aa 100%);
    color: #c05621;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

.news-content__text small {
    font-size: 0.85rem;
    color: #718096;
    opacity: 0.8;
}

.news-content__text sup {
    font-size: 0.7rem;
    vertical-align: super;
    color: #667eea;
    font-weight: 600;
}

.news-content__text sub {
    font-size: 0.7rem;
    vertical-align: sub;
    color: #764ba2;
    font-weight: 600;
}

/* Стили для определений */
.news-content__text dl {
    margin: 25px 0;
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.news-content__text dt {
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.news-content__text dd {
    margin-left: 20px;
    color: #4a5568;
    line-height: 1.6;
}

/* Стили для цитат */
.news-content__text cite {
    display: block;
    text-align: right;
    font-style: italic;
    color: #718096;
    margin-top: 15px;
    font-size: 0.9rem;
}

/* Стили для аббревиатур */
.news-content__text abbr {
    border-bottom: 2px dotted #667eea;
    cursor: help;
    text-decoration: none;
}

/* Стили для выделенного текста */
.news-content__text .highlight {
    background: linear-gradient(135deg, #fef5e7 0%, #fed7aa 100%);
    color: #c05621;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 500;
}

.news-content__text .important {
    background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
    color: #c53030;
    padding: 15px 20px;
    border-radius: 12px;
    border-left: 5px solid #e53e3e;
    margin: 25px 0;
    font-weight: 600;
}

.news-content__text .info {
    background: linear-gradient(135deg, #bee3f8 0%, #90cdf4 100%);
    color: #2b6cb0;
    padding: 15px 20px;
    border-radius: 12px;
    border-left: 5px solid #3182ce;
    margin: 25px 0;
}

.news-content__text .success {
    background: linear-gradient(135deg, #c6f6d5 0%, #9ae6b4 100%);
    color: #22543d;
    padding: 15px 20px;
    border-radius: 12px;
    border-left: 5px solid #38a169;
    margin: 25px 0;
}

.news-content__text .warning {
    background: linear-gradient(135deg, #fef5e7 0%, #fed7aa 100%);
    color: #c05621;
    padding: 15px 20px;
    border-radius: 12px;
    border-left: 5px solid #dd6b20;
    margin: 25px 0;
}

/* Стили для разделителей */
.news-content__text hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, #667eea, transparent);
    margin: 40px 0;
    border-radius: 1px;
}

/* Стили для кнопок в контенте */
.news-content__text .btn {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    margin: 10px 5px;
}

.news-content__text .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

.news-content__text .btn-secondary {
    background: linear-gradient(135deg, #a0aec0 0%, #718096 100%);
    box-shadow: 0 4px 15px rgba(160, 174, 192, 0.3);
}

.news-content__text .btn-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.news-content__text .btn-warning {
    background: linear-gradient(135deg, #f6ad55 0%, #ed8936 100%);
    box-shadow: 0 4px 15px rgba(246, 173, 85, 0.3);
}

.news-content__text .btn-danger {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    box-shadow: 0 4px 15px rgba(245, 101, 101, 0.3);
}

/* Стили для карточек в контенте */
.news-content__text .card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    margin: 25px 0;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
}

.news-content__text .card-header {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    margin: -25px -25px 20px -25px;
    padding: 20px 25px;
    border-radius: 16px 16px 0 0;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    color: #2d3748;
}

/* Стили для алертов */
.news-content__text .alert {
    padding: 20px;
    border-radius: 12px;
    margin: 25px 0;
    border-left: 5px solid;
    position: relative;
}

.news-content__text .alert-info {
    background: linear-gradient(135deg, #bee3f8 0%, #90cdf4 100%);
    color: #2b6cb0;
    border-left-color: #3182ce;
}

.news-content__text .alert-success {
    background: linear-gradient(135deg, #c6f6d5 0%, #9ae6b4 100%);
    color: #22543d;
    border-left-color: #38a169;
}

.news-content__text .alert-warning {
    background: linear-gradient(135deg, #fef5e7 0%, #fed7aa 100%);
    color: #c05621;
    border-left-color: #dd6b20;
}

.news-content__text .alert-danger {
    background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
    color: #c53030;
    border-left-color: #e53e3e;
}

/* Стили для групп элементов */
.news-content__text .group {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 25px;
    margin: 25px 0;
    border: 1px solid #e2e8f0;
}

.news-content__text .group-title {
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 20px;
    font-size: 1.2rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

/* Адаптивность для новых элементов */
@media (max-width: 768px) {
    .news-content__text .card,
    .news-content__text .group,
    .news-content__text .alert {
        padding: 20px;
        margin: 20px 0;
    }
    
    .news-content__text .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .news-content__text dl {
        padding: 20px;
    }
}

/* Дополнительные стили для улучшенных элементов */
.news-content__text .copy-code-btn:hover {
    background: #5a6fd8 !important;
    transform: translateY(-1px);
}

.news-content__text pre.enhanced {
    position: relative;
}

.news-content__text table.enhanced tr {
    transition: background-color 0.2s ease;
}

.news-content__text img.enhanced {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Стили для специальных типов контента */
.news-content__text .content-box {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 25px;
    margin: 25px 0;
    position: relative;
    overflow: hidden;
}

.news-content__text .content-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.news-content__text .content-box-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.news-content__text .content-box-title::before {
    content: '📋';
    font-size: 1.5rem;
}

.news-content__text .content-box.info-box .content-box-title::before {
    content: 'ℹ️';
}

.news-content__text .content-box.warning-box .content-box-title::before {
    content: '⚠️';
}

.news-content__text .content-box.success-box .content-box-title::before {
    content: '✅';
}

.news-content__text .content-box.error-box .content-box-title::before {
    content: '❌';
}

/* Стили для интерактивных элементов */
.news-content__text .interactive-element {
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    background: #f8f9fa;
    border: 2px solid transparent;
}

.news-content__text .interactive-element:hover {
    background: #e8ecff;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

/* Стили для прогресс-баров */
.news-content__text .progress-bar {
    width: 100%;
    height: 20px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin: 15px 0;
    position: relative;
}

.news-content__text .progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 10px;
    transition: width 0.3s ease;
    position: relative;
}

.news-content__text .progress-bar-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Стили для временных шкал */
.news-content__text .timeline {
    position: relative;
    padding-left: 30px;
    margin: 25px 0;
}

.news-content__text .timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #667eea, #764ba2);
}

.news-content__text .timeline-item {
    position: relative;
    margin-bottom: 25px;
    padding-left: 20px;
}

.news-content__text .timeline-item::before {
    content: '';
    position: absolute;
    left: -22px;
    top: 5px;
    width: 12px;
    height: 12px;
    background: #667eea;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 3px #667eea;
}

.news-content__text .timeline-date {
    font-weight: 600;
    color: #667eea;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.news-content__text .timeline-content {
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-left: 4px solid #667eea;
}

/* Стили для оглавления */
.news-content__text .table-of-contents {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    margin: 30px 0;
}

.news-content__text .toc-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.news-content__text .toc-link {
    color: #495057;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: block;
    font-size: 0.95rem;
    line-height: 1.4;
}

.news-content__text .toc-link:hover {
    background: #e8ecff;
    color: #667eea;
    transform: translateX(5px);
    text-decoration: none;
}

.news-content__text .toc-link.active {
    background: #667eea !important;
    color: white !important;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.news-content__text .toc-link.active::before {
    content: '▶';
    margin-right: 8px;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Стили для улучшенных заголовков */
.news-content__text h1.enhanced,
.news-content__text h2.enhanced,
.news-content__text h3.enhanced,
.news-content__text h4.enhanced,
.news-content__text h5.enhanced,
.news-content__text h6.enhanced {
    position: relative;
    scroll-margin-top: 100px;
    transition: all 0.3s ease;
}

.news-content__text h1.toc-active,
.news-content__text h2.toc-active,
.news-content__text h3.toc-active,
.news-content__text h4.toc-active,
.news-content__text h5.toc-active,
.news-content__text h6.toc-active {
    background: linear-gradient(135deg, #fef5e7 0%, #fed7aa 100%);
    padding: 15px 20px;
    border-radius: 12px;
    border-left: 5px solid #f6ad55;
    transform: translateX(10px);
    box-shadow: 0 8px 25px rgba(246, 173, 85, 0.3);
    animation: highlightPulse 0.6s ease-out;
}

@keyframes highlightPulse {
    0% {
        transform: translateX(0) scale(1);
        box-shadow: 0 0 0 0 rgba(246, 173, 85, 0.7);
    }
    50% {
        transform: translateX(5px) scale(1.02);
        box-shadow: 0 0 0 10px rgba(246, 173, 85, 0);
    }
    100% {
        transform: translateX(10px) scale(1);
        box-shadow: 0 8px 25px rgba(246, 173, 85, 0.3);
    }
}

/* Улучшенные стили для плавной прокрутки */
html {
    scroll-behavior: smooth;
}

/* Стили для скроллбара */
.news-content__text::-webkit-scrollbar {
    width: 8px;
}

.news-content__text::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.news-content__text::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

.news-content__text::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a5acd 100%);
}

/* Дополнительные стили для оглавления */
.news-content__text .table-of-contents {
    position: sticky;
    top: 20px;
    z-index: 10;
}

@media (max-width: 768px) {
    .news-content__text .table-of-contents {
        position: static;
    }
}

/* Стили для печати */
@media print {
    .news-content__text .copy-code-btn,
    .news-content__text .copy-link-btn,
    .news-content__text .news-navigation,
    .news-content__text .related-news {
        display: none !important;
    }
    
    .news-content__text {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
    
    .news-content__text img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }
    
    .news-content__text table {
        page-break-inside: avoid;
    }
}
