/* Стили для компонента com_content */
.rcsi-article {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    font-family: 'Roboto', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Хлебные крошки */
.article-breadcrumbs {
    margin-bottom: 30px;
    font-size: 14px;
    color: #666;
}

.article-breadcrumbs .breadcrumb {
    padding: 0;
    margin: 0;
    background: transparent;
}

.article-breadcrumbs a {
    color: #0056b3;
    text-decoration: none;
}

.article-breadcrumbs a:hover {
    text-decoration: underline;
}

/* Заголовок статьи */
.article-header {
    margin-bottom: 40px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 20px;
}

.article-header h1 {
    color: #264a8a;
    line-height: 1.3;
    margin-bottom: 1.3rem;
    padding-bottom: 15px;
    border-bottom: 3px solid #3498db;
    position: relative;
}

.article-header h1:after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100px;
    height: 3px;
    background: #e74c3c;
}

.article-title {

}

/* Мета-информация */
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    font-size: 0.95rem;
}

.meta-item {
    display: flex;
    align-items: center;
    color: #666;
}

.meta-label {
    font-weight: 600;
    margin-right: 8px;
}

.meta-item.date .meta-label {
    color: #d32f2f;
}

.meta-item.category a {
    color: #0056b3;
    text-decoration: none;
    font-weight: 500;
}

.meta-item.category a:hover {
    text-decoration: underline;
}

.meta-item.source .meta-label,
.meta-item.keywords .meta-label {
    color: #2196F3;
}

/* Изображение превью */
.article-preview-image {
    margin: 20px 0;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    border-radius: 12px;
}

.preview-img {
    max-width: 100%;
    max-height: 400px;
    height: auto;
    width: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* Hero изображение как background */
.article-hero-image {
    width: 100%;
    height: 500px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 12px;
    margin: 30px 0;
    position: relative;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    display: flex;
    align-items: flex-end;
}

/* Подпись к основному изображению */
.image-caption {
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    padding: 20px;
    font-style: italic;
    font-size: 0.95rem;
    width: 100%;
    border-radius: 0 0 12px 12px;
}

/* Основной текст */
.article-content {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 30px;
}

.article-content p {
    margin-bottom: 1.5em;
}

/* Стили для одиночных изображений в тексте */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin: 2em auto;
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-content img:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* Стили для изображений с выравниванием */
.article-content img[style*="float:left"],
.article-content img[style*="float: left"] {
    float: left;
    margin: 1em 1.5em 1em 0;
    max-width: 50%;
}

.article-content img[style*="float:right"],
.article-content img[style*="float: right"] {
    float: right;
    margin: 1em 0 1em 1.5em;
    max-width: 50%;
}

.article-content img[style*="center"],
.article-content img[style*="margin: 0 auto"] {
    display: block;
    margin: 2em auto;
}

/* Слайдер для изображений внутри текста */
.article-images-slider {
    position: relative;
    margin: 2em 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.article-slider-container {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.article-slider-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 100%;
}

.article-slider-slide {
    flex: 0 0 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #f8f9fa;
}

.article-slider-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 20px;
    text-align: center;
    font-style: italic;
}

.article-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.8);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.article-slider-nav:hover {
    background: rgba(255,255,255,1);
    transform: translateY(-50%) scale(1.1);
}

.article-slider-prev {
    left: 20px;
	display:none;
}

.article-slider-next {
    right: 20px;
	display:none;
}

.article-slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.article-slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

.article-slider-dot.active {
    background: rgba(255,255,255,1);
    transform: scale(1.2);
}

/* Скрываем только изображения, которые заменяются слайдером */
.article-content .article-images-slider + img,
.article-content img[data-slider-replaced] {
    display: none !important;
}

/* Стили для обычного контента */
.article-content h2 {
    font-size: 1.6rem;
    margin: 2em 0 1em 0;
    color: #1a1a1a;
    font-weight: 600;
    border-bottom: 2px solid #0056b3;
    padding-bottom: 10px;
}

.article-content h3 {
    font-size: 1.4rem;
    margin: 1.5em 0 1em 0;
    color: #1a1a1a;
    font-weight: 600;
}

.article-content blockquote {
    border-left: 4px solid #0056b3;
    padding-left: 20px;
    margin: 2em 0;
    font-style: italic;
    color: #555;
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 0 8px 8px 0;
}

.article-content ul,
.article-content ol {
    margin: 1.5em 0;
    padding-left: 2em;
}

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

/* Кастомные поля */
.article-custom-fields {
    background: #f8f9fa;
    border-left: 4px solid #0056b3;
    padding: 20px;
    margin: 30px 0;
    border-radius: 0 8px 8px 0;
}

.custom-field {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.custom-field:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.custom-field strong {
    color: #1a1a1a;
    display: inline-block;
    min-width: 150px;
}

.custom-field.field-publication-place {
    border-left: 3px solid #FF9800;
    background: #FFF3E0;
    padding: 10px 15px;
    margin-left: -15px;
    border-radius: 0 5px 5px 0;
}

/* Футер статьи */
.article-footer {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

/* Теги */
.article-tags {
    margin-bottom: 30px;
}

.tags-title {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #333;
    font-weight: 600;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.tag-item {
    background: #e3f2fd;
    border-radius: 20px;
    transition: background-color 0.3s ease;
}

.tag-item:hover {
    background: #bbdefb;
}

.tag-link {
    display: block;
    padding: 8px 16px;
    color: #1976d2;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Социальные кнопки */
.social-sharing {
    margin-top: 30px;
    padding: 20px 0;
}

/* Похожие материалы */
.related-articles {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #e0e0e0;
}

.related-title {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: #1a1a1a;
    font-weight: 600;
}

.related-items {
    display: grid;
    gap: 20px;
}

.related-item {
    display: flex;
    gap: 20px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: box-shadow 0.3s ease;
    align-items: center;
}

.related-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.related-item-image {
    width: 120px;
    height: 80px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 6px;
    flex-shrink: 0;
}

.related-item-image.no-image {
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.8rem;
}

.related-item-content {
    flex: 1;
}

.related-item-title {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
}

.related-item-title a {
    color: #0056b3;
    text-decoration: none;
}

.related-item-title a:hover {
    text-decoration: underline;
}

.related-item-date {
    font-size: 0.9rem;
    color: #666;
}

/* Адаптивность */
@media (max-width: 768px) {
    .rcsi-article {
        padding: 0 15px;
    }
    
    .article-title {
        font-size: 1.8rem;
    }
    
    .article-hero-image {
        height: 300px;
    }
    
    .article-slider-container {
        height: 300px;
    }
    
    .article-preview-image {
        padding: 15px;
        margin: 15px 0;
    }
    
    .preview-img {
        max-height: 300px;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 15px;
    }
    
    .article-content {
        font-size: 1rem;
    }
    
    .article-content img {
        margin: 1.5em auto;
    }
    
    .article-content img[style*="float:left"],
    .article-content img[style*="float: left"],
    .article-content img[style*="float:right"],
    .article-content img[style*="float: right"] {
        float: none;
        margin: 1em;
        max-width: 100%;
    }
    
    .article-slider-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .tags-list {
        gap: 8px;
    }
    
    .tag-link {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .custom-field strong {
        min-width: 120px;
        display: block;
        margin-bottom: 5px;
    }
    
    .related-item {
        flex-direction: column;
        text-align: center;
    }
    
    .related-item-image {
        width: 100%;
        height: 200px;
    }
}

@media (max-width: 480px) {
    .article-title {
        font-size: 1.5rem;
    }
    
    .article-hero-image {
        height: 250px;
    }
    
    .article-slider-container {
        height: 250px;
    }
    
    .article-preview-image {
        padding: 10px;
        margin: 10px 0;
    }
    
    .preview-img {
        max-height: 250px;
    }
    
    .article-content h2 {
        font-size: 1.3rem;
    }
    
    .article-content h3 {
        font-size: 1.1rem;
    }
    
    .article-custom-fields {
        padding: 15px;
    }
    
    .article-content img {
        margin: 1em auto;
    }
}

.article-slider-counter {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 14px;
    z-index: 10;
    pointer-events: none;
}

.thumbs-loading {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

.thumb-error {
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    width: 60px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.article-slider-thumb.loaded img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.article-slider-thumb:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.article-slider-thumb.active {
    border: 2px solid #007cba;
}

/* Стили для доступности */
.article-images-slider {
    position: relative;
}

.article-slider-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.article-slider-slide {
    flex: 0 0 100%;
    min-width: 0;
}

.article-slider-slide[aria-hidden="true"] {
    visibility: hidden;
}


/* Стили для превью-ленты слайдера */
.article-slider-thumbs {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.6);
    padding: 10px 20px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    max-width: calc(100% - 40px);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    box-sizing: border-box;
}

.article-slider-thumbs::-webkit-scrollbar {
    display: none;
}

.article-slider-thumb {
    width: 80px;
    height: 60px;
    border: none;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    opacity: 0.7;
    transition: all 0.3s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-slider-thumb:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.article-slider-thumb.active {
    opacity: 1;
    transform: scale(1.1);
    border: 2px solid #fff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
}

.article-slider-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumb-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    transition: background 0.3s ease;
}

.article-slider-thumb.active .thumb-overlay {
    background: rgba(0, 0, 0, 0.1);
}

.article-slider-thumb:hover .thumb-overlay {
    background: rgba(0, 0, 0, 0.2);
}
/* Контейнер для центрирования контента ленты */
.article-slider-thumbs-container {
    display: flex;
    justify-content: center;
    align-items: center;
	gap:10px;
    width: 100%;
}

/* Адаптивность для превью-ленты */
@media (max-width: 768px) {
    .article-slider-thumbs {
        bottom: 15px;
        padding: 8px 15px;
        gap: 6px;
        max-width: calc(100% - 30px);
    }
    
    .article-slider-thumb {
        width: 70px;
        height: 50px;
    }
    
    .article-slider-thumb.active {
        transform: scale(1.05);
    }
}

@media (max-width: 480px) {
    .article-slider-thumbs {
        bottom: 10px;
        padding: 6px 12px;
        gap: 4px;
        max-width: calc(100% - 20px);
    }
    
    .article-slider-thumb {
        width: 60px;
        height: 45px;
    }
    
    .article-slider-thumb.active {
        transform: scale(1.03);
    }
}

/* Убираем старые точки */
.article-slider-dots {
    display: none !important;
}