

	.popular-posts-wrapper {
	padding: 0 var(--global-content-edge-padding, 15px);
		width: 100%;
		max-width: var(--global-content-width, var(--wp--style--global--wide-size));
        margin: 20px auto;
	}
    .popular-posts-section {
        margin: 30px 0;
    }
    
    .popular-posts-header {
        background-color: #2d3748;
        padding: 10px 15px;
        border-radius: 10px;
		display: flex;
    flex-wrap: wrap;
    align-content: center;
    }
    
    .popular-posts-title {
        color: #ffffff;
        margin: 0;
        font-size: 18px;
        font-weight: 600;
		flex-shrink: 0;
    }
    
    .popular-posts-container {
        position: relative;
		display: flex;
        padding: 10px;
		max-height: 90px;
        border-top: none;
        border-radius: 10px;
        background-color: #ffffff;
        overflow: hidden;
    }
    
    .popular-posts-items {
        display: flex;
        overflow-x: hidden;
        scroll-behavior: smooth;
        padding: 10px 0;
        gap: 15px;
        width: 100%;
        -ms-overflow-style: none;  /* IE и Edge */
        scrollbar-width: none;  /* Firefox */
    }
    
    /* Скрываем скроллбар для Chrome, Safari и Opera */
    .popular-posts-items::-webkit-scrollbar {
        display: none;
    }
    
    .popular-post-item {
        flex: 0 0 auto;
        width: 250px;
        padding: 5px;
        overflow: hidden;
        align-items: center;
        display: flex;
        transition: transform 0.3s ease;
    }
    
    .popular-post-item:hover {
        transform: translateY(-3px);
    }
    
    .popular-post-thumbnail {
        margin: 5px;
        aspect-ratio: 1 / 1;
        height: 100%;
        flex-shrink: 0;
        overflow: hidden;
        border-radius: 5px;
        transition: all 0.3s ease;
    }
    
    .popular-post-thumbnail:hover img {
        transform: scale(1.05);
    }
    
    .popular-post-thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 5px;
        transition: transform 0.3s ease;
    }
    
    .popular-post-content {
        padding: 0;
        margin-left: 10px;
    }
    
    .popular-post-title {
        font-size: 14px;
        margin: 0;
        font-weight: 400;
        line-height: 1.3;
        max-height: 2.6em;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    
    .popular-post-title a {
        color: #333;
        text-decoration: none;
        font-size: 16px;
		font-weight: bold;
		display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        transition: color 0.2s ease;
    }
    
    .popular-post-title a:hover {
        color:  #2d3748;
    }
    
    .popular-posts-nav {
        position: absolute;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
        display: flex;
        gap: 5px;
        height: 100%;
        background: #fff;
        align-content: center;
        flex-wrap: wrap;
        padding: 0 20px;
        z-index: 2;
    }
    
    .popular-posts-nav button {
        width: 40px;
        height: 40px;
        border-radius: 100%;
        background-color: #ffffff;
        border: 1px solid #e0e0e0;
        padding: 0;
        display: flex;
        color: #000;
        align-items: center;
        justify-content: center;
        aspect-ratio: 1 / 1;
        cursor: pointer;
        transition: all 0.3s ease;
        font-size: 18px;
        font-weight: bold;
    }
    
    .popular-posts-nav button:hover {
        background-color: #f5f5f5;
        transform: scale(1.05);
    }
    
    .popular-posts-nav button:disabled {
        cursor: not-allowed;
        opacity: 0.5;
    }
    
    /* Градиент для эффекта затухания по краям */
    .popular-posts-container:before,
    .popular-posts-container:after {
        content: "";
        position: absolute;
        top: 0;
        height: 100%;
        width: 30px;
        z-index: 1;
        pointer-events: none;
    }
    
    
    .popular-posts-container:after {
        right: 60px; /* Учитываем ширину кнопок навигации */
        background: linear-gradient(to left, white, transparent);
    }
    
    /* Стили для референса */
    @media (max-width: 768px) {
        .popular-post-item {
            width: 140px;
        }
        
        .popular-post-thumbnail {
            height: 140px;display: none;
        }
        
        .popular-posts-nav {
            padding: 0 10px;
        }
        
        .popular-posts-nav button {
            width: 30px;
            height: 30px;
        }
        
        .popular-posts-container:after {
            right: 50px;
        }
    }
    