/* Стили для детальной страницы новости */

/* Хлебные крошки */
.breadcrumbs {
    background: var(--light-color);
    padding: 15px 0;
    margin-top: 20px;
}

.breadcrumbs ul {
    display: flex;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
    color: #666;
    font-size: 0.9rem;
}

.breadcrumbs li:not(:last-child)::after {
    content: '/';
    margin: 0 10px;
    color: #999;
}

.breadcrumbs a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumbs a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.breadcrumbs .fa-home {
    font-size: 1rem;
}

/* Основной контейнер новости */
.news-detail {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 40px;
    margin-bottom: 60px;
}

/* Мета-информация */
.news-detail .news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    margin-bottom: 30px;
    border-bottom: 1px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 15px;
}

.news-detail .meta-left,
.news-detail .meta-right {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.news-detail .news-category,
.news-detail .news-date,
.news-detail .news-author,
.news-detail .news-views,
.news-detail .news-comments {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 0.9rem;
}

.news-detail .news-category {
    background: #e3f2fd;
    color: #1565c0;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 600;
}

/* Заголовок новости */
.news-detail .news-title {
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 20px;
    line-height: 1.3;
}

.news-detail .news-excerpt {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

/* Главное изображение */
.news-detail .news-hero-image {
    margin: 40px 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.news-detail .news-hero-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

.news-detail .news-hero-image:hover img {
    transform: scale(1.02);
}

.news-detail .image-caption {
    padding: 12px 20px;
    background: #f5f5f5;
    color: #666;
    font-size: 0.9rem;
    text-align: center;
    font-style: italic;
}

/* Основной контент */
.news-detail .news-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
}

.news-detail .news-content h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin: 40px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light-color);
}

.news-detail .news-content h3 {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin: 30px 0 15px;
}

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

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

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

.news-detail .news-content strong {
    color: var(--dark-color);
}

.news-detail .news-content em {
    color: #555;
    font-style: italic;
}

/* Изображения внутри текста */
.news-detail .content-image {
    margin: 30px 0;
    max-width: 500px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.news-detail .content-image.left {
    float: left;
    margin-right: 30px;
    margin-bottom: 20px;
}

.news-detail .content-image.right {
    float: right;
    margin-left: 30px;
    margin-bottom: 20px;
}

.news-detail .content-image img {
    width: 100%;
    height: auto;
    display: block;
}

.news-detail .content-image .image-caption {
    padding: 12px 20px;
    background: #f5f5f5;
    color: #666;
    font-size: 0.9rem;
    text-align: center;
    font-style: italic;
}

/* Сетка особенностей */
.news-detail .features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.news-detail .feature-item {
    background: white;
    border: 1px solid var(--light-color);
    border-radius: var(--border-radius);
    padding: 25px;
    transition: var(--transition);
}

.news-detail .feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-color);
}

.news-detail .feature-icon {
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.news-detail .feature-item h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.news-detail .feature-item p {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
}

/* Цитата */
.news-detail .quote-block {
    display: flex;
    gap: 20px;
    margin: 40px 0;
    padding: 30px;
    background: linear-gradient(135deg, #f5f7fa, #e4e8f0);
    border-radius: var(--border-radius);
    border-left: 5px solid var(--primary-color);
}

.news-detail .quote-icon {
    font-size: 40px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.news-detail .quote-text {
    flex-grow: 1;
}

.news-detail .quote-text p {
    font-size: 1.3rem;
    font-style: italic;
    color: var(--dark-color);
    margin-bottom: 15px;
    line-height: 1.6;
}

.news-detail .quote-author {
    font-weight: 600;
    color: var(--primary-color);
    text-align: right;
}

/* Технические характеристики */
.news-detail .tech-specs {
    background: #f9f9f9;
    border-radius: var(--border-radius);
    padding: 25px;
    margin: 30px 0;
}

.news-detail .spec-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.news-detail .spec-item:last-child {
    border-bottom: none;
}

.news-detail .spec-label {
    font-weight: 600;
    color: var(--dark-color);
}

.news-detail .spec-value {
    color: #666;
    font-family: 'Courier New', monospace;
    background: white;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid #eee;
}

/* Галерея */
.news-detail .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.news-detail .gallery-item {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.news-detail .gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.news-detail .gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.news-detail .gallery-caption {
    padding: 15px;
    background: white;
    text-align: center;
    font-weight: 600;
    color: var(--dark-color);
}

/* Дополнительные материалы */
.news-detail .additional-materials {
    background: #f0f7ff;
    border-radius: var(--border-radius);
    padding: 30px;
    margin: 40px 0;
    border: 1px solid #d1e3ff;
}

.news-detail .additional-materials h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.4rem;
}

.news-detail .materials-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.news-detail .material-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--dark-color);
    transition: var(--transition);
    border: 1px solid transparent;
}

.news-detail .material-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(10px);
    border-color: var(--primary-color);
}

.news-detail .material-item:hover i {
    color: white;
}

.news-detail .material-item i {
    font-size: 24px;
    color: var(--primary-color);
    width: 30px;
}

.news-detail .material-item span {
    flex-grow: 1;
    font-weight: 600;
}

/* Теги */
.news-detail .news-tags {
    margin: 40px 0;
    padding-top: 30px;
    border-top: 1px solid #f0f0f0;
}

.news-detail .news-tags h4 {
    margin-bottom: 15px;
    color: var(--dark-color);
    font-size: 1.2rem;
}

.news-detail .tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.news-detail .tag {
    background: var(--light-color);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.news-detail .tag:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Социальные кнопки */
.news-detail .social-share {
    margin: 40px 0;
    padding: 30px;
    background: #f9f9f9;
    border-radius: var(--border-radius);
}

.news-detail .social-share h4 {
    margin-bottom: 20px;
    color: var(--dark-color);
    font-size: 1.2rem;
}

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

.news-detail .share-btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    font-size: 0.95rem;
}

.news-detail .share-btn.facebook {
    background: #3b5998;
    color: white;
}

.news-detail .share-btn.twitter {
    background: #1da1f2;
    color: white;
}

.news-detail .share-btn.vk {
    background: #4c75a3;
    color: white;
}

.news-detail .share-btn.telegram {
    background: #0088cc;
    color: white;
}

.news-detail .share-btn.copy-link {
    background: var(--light-color);
    color: var(--primary-color);
}

.news-detail .share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.news-detail .share-btn.facebook:hover {
    background: #2d4373;
}

.news-detail .share-btn.twitter:hover {
    background: #0c85d0;
}

.news-detail .share-btn.vk:hover {
    background: #3a5f8a;
}

.news-detail .share-btn.telegram:hover {
    background: #0077b5;
}

.news-detail .share-btn.copy-link:hover {
    background: #d5d8f0;
}

/* Навигация между новостями */
.news-detail .news-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 60px 0;
    padding: 30px;
    background: #f9f9f9;
    border-radius: var(--border-radius);
    gap: 20px;
}

.news-detail .nav-prev,
.news-detail .nav-next,
.news-detail .nav-all {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--dark-color);
    transition: var(--transition);
    flex: 1;
}

.news-detail .nav-prev {
    justify-content: flex-start;
    text-align: left;
}

.news-detail .nav-next {
    justify-content: flex-end;
    text-align: right;
}

.news-detail .nav-all {
    justify-content: center;
    flex: 0 0 auto;
    padding: 10px 25px;
    background: var(--primary-color);
    color: white;
    border-radius: var(--border-radius);
}

.news-detail .nav-all:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.news-detail .nav-content {
    display: flex;
    flex-direction: column;
}

.news-detail .nav-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.news-detail .nav-title {
    font-weight: 600;
    color: var(--primary-color);
    line-height: 1.4;
}

.news-detail .nav-prev:hover .nav-title,
.news-detail .nav-next:hover .nav-title {
    color: var(--secondary-color);
}

.news-detail .nav-prev i,
.news-detail .nav-next i {
    font-size: 20px;
    color: var(--primary-color);
    margin: 0 15px;
}

/* Связанные новости */
.related-news {
    margin: 60px 0;
}

.related-news .section-title {
    text-align: left;
    margin-bottom: 40px;
}

.related-news .section-title::after {
    left: 0;
    transform: none;
}

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

.related-news .related-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

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

.related-news .related-image {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.related-news .related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.related-news .related-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(26, 35, 126, 0.9);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

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

.related-news .related-content h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.related-news .related-content h3 a {
    color: var(--dark-color);
    text-decoration: none;
    transition: var(--transition);
}

.related-news .related-content h3 a:hover {
    color: var(--primary-color);
}

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

.related-news .related-content p {
    color: #666;
    line-height: 1.6;
    flex-grow: 1;
}

/* Комментарии */
.comments-section {
    margin: 60px 0;
}

.comments-section .comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.comments-section .comments-header .section-title {
    margin: 0;
    text-align: left;
}

.comments-section .comments-header .section-title::after {
    display: none;
}

.comments-section .comments-count {
    color: #666;
    font-weight: normal;
    font-size: 1.8rem;
}

.comments-section .add-comment-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    font-size: 16px;
}

.comments-section .add-comment-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* Форма комментария */
.comments-section .comment-form-container {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
    display: none;
}

.comments-section .comment-form-container.active {
    display: block;
}

.comments-section .comment-form-container h3 {
    font-size: 1.4rem;
    margin-bottom: 25px;
    color: var(--primary-color);
}

.comments-section .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.comments-section .form-group {
    margin-bottom: 20px;
}

.comments-section .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-color);
}

.comments-section .form-group input,
.comments-section .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--light-color);
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
    background: white;
}

.comments-section .form-group input:focus,
.comments-section .form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.comments-section .form-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.comments-section .form-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
}

.comments-section .form-checkbox label {
    font-size: 0.9rem;
    color: #666;
    font-weight: normal;
}

.comments-section .submit-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.comments-section .submit-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* Список комментариев */
.comments-section .comments-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 40px;
}

.comments-section .comment {
    display: flex;
    gap: 20px;
    padding: 25px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.comments-section .comment-avatar {
    font-size: 40px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.comments-section .comment-content {
    flex-grow: 1;
}

.comments-section .comment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.comments-section .comment-author h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.comments-section .comment-date {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 0.9rem;
}

.comments-section .comment-badge {
    display: inline-block;
    background: var(--success-color);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 10px;
}

.comments-section .comment-actions {
    display: flex;
    gap: 10px;
}

.comments-section .action-btn {
    background: var(--light-color);
    color: var(--primary-color);
    border: none;
    padding: 6px 12px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.comments-section .action-btn:hover {
    background: #d5d8f0;
}

.comments-section .action-btn.like:hover {
    background: #ffebee;
    color: #f44336;
}

.comments-section .comment-text {
    color: #444;
    line-height: 1.6;
}

.comments-section .comment-text p {
    margin-bottom: 0;
}

/* Ответы на комментарии */
.comments-section .comment-reply {
    margin-top: 20px;
    margin-left: 30px;
    padding-left: 30px;
    border-left: 3px solid var(--light-color);
}

.comments-section .comment-reply .comment {
    padding: 20px;
    background: #f9f9f9;
    box-shadow: none;
}

/* Пагинация комментариев */
.comments-section .comments-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.comments-section .comments-pagination .page-btn {
    width: 40px;
    height: 40px;
    border: 2px solid var(--light-color);
    background: white;
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text-color);
    transition: var(--transition);
}

.comments-section .comments-pagination .page-btn:hover,
.comments-section .comments-pagination .page-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.comments-section .comments-pagination .page-btn.next {
    width: auto;
    padding: 0 20px;
}

/* Кнопка "Наверх" */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(26, 35, 126, 0.3);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(26, 35, 126, 0.4);
}

/* Адаптивность */
@media (max-width: 992px) {
    .news-detail .news-title {
        font-size: 2rem;
    }
    
    .news-detail {
        padding: 30px;
    }
    
    .news-detail .content-image.left,
    .news-detail .content-image.right {
        float: none;
        margin: 30px auto;
        max-width: 100%;
    }
    
    .news-detail .news-navigation {
        flex-direction: column;
        text-align: center;
    }
    
    .news-detail .nav-prev,
    .news-detail .nav-next {
        justify-content: center;
        text-align: center;
    }
    
    .news-detail .nav-all {
        order: -1;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .news-detail .news-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .news-detail .meta-left,
    .news-detail .meta-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .news-detail .features-grid {
        grid-template-columns: 1fr;
    }
    
    .news-detail .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .related-news .related-grid {
        grid-template-columns: 1fr;
    }
    
    .comments-section .form-row {
        grid-template-columns: 1fr;
    }
    
    .news-detail .share-buttons {
        flex-direction: column;
    }
    
    .news-detail .share-btn {
        width: 100%;
        justify-content: center;
    }
    
    .comments-section .comment-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .comments-section .comment-actions {
        align-self: flex-start;
    }
    
    .comments-section .comment-reply {
        margin-left: 15px;
        padding-left: 15px;
    }
}

@media (max-width: 480px) {
    .news-detail {
        padding: 20px;
    }
    
    .news-detail .news-title {
        font-size: 1.7rem;
    }
    
    .news-detail .news-excerpt {
        font-size: 1.1rem;
        padding: 15px;
    }
    
    .comments-section .comment {
        flex-direction: column;
        padding: 20px;
    }
    
    .comments-section .comment-avatar {
        align-self: flex-start;
    }
    
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}