/* Общие стили */
.dm-article-grid {
    display: flex;
    flex-wrap: wrap;
    margin: -15px;
}

.dm-article-item {
    flex: 0 0 calc(33.333% - 30px);
    margin: 15px;
    position: relative;
}

.dm-article-link {
    text-decoration: none;
    display: block;
}

.dm-article-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 4/3;
}

.dm-article-image {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    display: block;
}



.dm-article-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
    z-index: 1;
}

.dm-article-info {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    width: 90%;
    z-index: 2;
    transition: opacity 0.3s ease;
}

.dm-article-title {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    color: white;
    transition: opacity 0.3s ease;
}

.dm-article-date {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    transition: opacity 0.3s ease;
}

/* Hover эффекты */
.dm-article-item:hover .dm-article-overlay {
    opacity: 0;
}

.dm-article-item:hover .dm-article-info {
    opacity: 0;
}

/* Адаптивность для десктопа с разным количеством колонок */
[data-columns="1"] .dm-article-item {
    flex: 0 0 calc(100% - 30px);
}

[data-columns="2"] .dm-article-item {
    flex: 0 0 calc(50% - 30px);
}

[data-columns="3"] .dm-article-item {
    flex: 0 0 calc(33.333% - 30px);
}

[data-columns="4"] .dm-article-item {
    flex: 0 0 calc(25% - 30px);
}

/* Стили для архива */
.dm-article-archive {
    padding: 40px 20px;
}

.dm-article-container {
    max-width: 1200px;
    margin: 0 auto;
}

.dm-article-archive-header {
    text-align: center;
    margin: 60px 0px 40px 0px;
}

.dm-article-archive-title {
    font-size: 2rem;
    margin: 0;
}

/* Стили для пагинации */
.dm-article-pagination {
    text-align: center;
    margin-top: 40px;
}

.dm-article-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
}

.dm-article-pagination .page-numbers.current {
    background-color: var(--e-global-color-4de8dbf);
    border-color: var(--e-global-color-4de8dbf);
    color: white;
}

/* Стили для single статьи */
.dm-article-single {
    padding: 40px 20px;
    max-width: 800px;
    margin: 0 auto;
}

.dm-article-single-header {
    text-align: center;
    margin-bottom: 30px;
}

.dm-article-single-title {
    font-size: 2.5rem;
    margin: 0 0 15px 0;
}

.dm-article-single-date {
    color: #666;
    font-size: 0.9rem;
}

.dm-article-single-thumbnail {
    margin-bottom: 30px;
}

.dm-article-single-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.dm-article-single-body {
    line-height: 1.6;
}

.dm-article-single-body img{
	margin: 0px 5px 10px 0px;
}

/* Медиа-запросы для планшетов */
@media (max-width: 768px) {
	
	.dm-article-single-content{
		margin: 40px 0px 60px 0px;	
	}
	
	.dm-article-single-title{
		
	}
    .dm-article-item {
        flex: 0 0 calc(50% - 30px);
    }
    
    [data-columns="3"] .dm-article-item,
    [data-columns="4"] .dm-article-item {
        flex: 0 0 calc(50% - 30px);
    }
	
	.dm-article-grid{
		flex-direction: column;
	}
}

/* Медиа-запросы для мобильных */
@media (max-width: 480px) {
    .dm-article-item {
        flex: 0 0 calc(100% - 30px);
    }
}


/* Стили для навигации между статьями */
.dm-article-navigation {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 50px 0 30px;
    padding: 30px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.dm-article-nav-previous,
.dm-article-nav-next {
    flex: 1;
    width: 50%;
}

.dm-article-nav-previous {
    text-align: left;
}

.dm-article-nav-next {
    text-align: right;
}

.dm-article-nav-link,
.dm-article-nav-disabled {
    display: block;
    text-decoration: none;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.dm-article-nav-link:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    /*box-shadow: 0 5px 15px rgba(0,0,0,0.1);*/
}

.dm-article-nav-label {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dm-article-nav-title {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    margin-bottom: 10px;
}

.dm-article-nav-thumbnail {
    display: inline-block;
    margin-top: 10px;
}

.dm-article-nav-thumbnail img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.dm-article-nav-link:hover .dm-article-nav-thumbnail img {
    transform: scale(1.1);
}

.dm-article-nav-disabled {
    opacity: 0.5;
    cursor: default;
}

.dm-article-nav-disabled .dm-article-nav-title {
    color: #999;
}

/* Стили для кнопки возврата */
.dm-article-back-to-archive {
    text-align: center;
    margin-top: 20px;
}

.dm-article-back-link {
    display: inline-block;
    padding: 10px 20px;
    background: transparent;
    border: 2px solid var(--e-global-color-4de8dbf);
    color: var(--e-global-color-4de8dbf);
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.dm-article-back-link:hover {
    background: var(--e-global-color-4de8dbf);
    color: white;
    transform: translateY(-2px);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .dm-article-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .dm-article-nav-previous,
    .dm-article-nav-next {
        width: 100%;
        text-align: center;
    }
    
    .dm-article-nav-title {
        font-size: 0.95rem;
    }
}