/* Blog Page Styles */
.blog-page .advertisement-widget {
    margin-bottom: 20px;
    text-align: center;
}

/* Blog post image styles */
.blog-page .post-thumbnail {
    height: 200px;
    overflow: hidden;
    border-radius: 8px;
    position: relative;
    display: block;
}

/* Стили для заголовка поста */
.blog-page .post-name {
    margin-top: 1cm !important;
}

.blog-page .post-thumbnail a {
    display: block;
    width: 100%;
    height: 100%;
}

.blog-page .post-thumbnail img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    transition: transform 0.3s ease;
    display: block;
    border: none;
    padding: 0;
    margin: 0;
}

.blog-page .post-thumbnail img:hover {
    transform: scale(1.05);
}

/* Дополнительные стили для blog_post_image */
.blog-page .blog_post_image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
    max-height: none !important;
}

/* Переопределение стилей из venor.css */
.blog-page-section .blog_custom .post-thumbnail img.blog_post_image.img-fluid {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    transform: none !important;
    -webkit-transform: none !important;
}

.blog-page-section .blog_custom .post-thumbnail:hover img.blog_post_image.img-fluid {
    transform: scale(1.05) !important;
    -webkit-transform: scale(1.05) !important;
}

.blog-page .advertisement-widget img {
    border-radius: 8px;
    transition: transform 0.3s ease;
    object-fit: cover;
}

.blog-page .advertisement-widget img:hover {
    transform: scale(1.02);
}

/* Pozitsiya bo'yicha avtomatik o'lchamlar */
.blog-page .blog-bottom img {
    width: 100%;
    max-width: 300px;
    height: 550px;
    object-fit: cover;
}

.blog-page .blog-posts-ad img {
    width: 100%;
    max-width: 728px;
    height: 90px;
    object-fit: cover;
}

@media (max-width: 768px) {
    .blog-page .post-thumbnail {
        height: 150px;
        margin-bottom: 15px;
    }
    
    .blog-page .blog-bottom img {
        max-width: 100%;
        height: 100%;
    }
    
    .blog-page .blog-posts-ad img {
        max-width: 100%;
        height: 60px;
    }
    
    .blog-page .col-md-9 {
        margin-bottom: 20px;
    }
    
    .blog-page .col-md-3 {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .blog-page .post-thumbnail {
        height: 120px;
    }
    
    .blog-page .blog-bottom img {
        max-width: 100%;
        height: 100%;
    }
    
    .blog-page .blog-posts-ad img {
        height: 50px;
    }
}

/* Article Page Styles */
.article-page .advertisement-widget {
    margin-bottom: 20px;
    text-align: center;
}

.article-page .advertisement-widget img {
    border-radius: 8px;
    transition: transform 0.3s ease;
    object-fit: cover;
}

.article-page .advertisement-widget img:hover {
    transform: scale(1.02);
}

/* Pozitsiya bo'yicha avtomatik o'lchamlar */
.article-page .blog-bottom img {
    width: 100%;
    max-width: 300px;
    height: 550px;
    object-fit: cover;
}

.article-page .post-content-ad img {
    width: 100%;
    max-width: 728px;
    height: 90px;
    object-fit: cover;
}

@media (max-width: 768px) {
    .article-page .blog-bottom img {
        max-width: 100%;
        height: 100%;
    }
    
    .article-page .post-content-ad img {
        max-width: 100%;
        height: 60px;
    }
    
    .article-page .col-md-9 {
        margin-bottom: 20px;
    }
    
    .article-page .col-md-3 {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .article-page .blog-bottom img {
        max-width: 100%;
        height: 100%;
    }
    
    .article-page .post-content-ad img {
        height: 50px;
    }
}

/* Blog Pagination Styles */
.blog-page .pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0;
}

.blog-page .pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-page .pagination .page-item {
    list-style: none;
}

.blog-page .pagination .page-link {
    background-color: transparent;
    cursor: pointer;
    outline: 0 !important;
    cursor: pointer;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    position: relative;
    overflow: hidden;
    color: #fff;
    padding: 0px 15px 0px 20px;
    border: 1px solid #fff;
    border-radius: 50px;
    font-size: 14px;
    letter-spacing: -.025em;
    line-height: 43px;
    height: 45px;
    display: inline-block;
    transition: .3s cubic-bezier(.4,0,.2,1);
    -webkit-transition: .3s cubic-bezier(.4,0,.2,1);
    min-width: 45px;
    text-decoration: none;
    text-align: center;
    font-weight: 600;
}

.blog-page .pagination .page-link:before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    -webkit-transform: scaleX(0);
    transform: scaleX(0);
    -webkit-transform-origin: 0 50%;
    transform-origin: 0 50%;
    -webkit-transition-property: transform;
    transition-property: transform;
    -webkit-transition-duration: 0.3s;
    transition-duration: 0.3s;
    -webkit-transition-timing-function: ease-out;
    transition-timing-function: ease-out;
}

.blog-page .pagination .page-link:hover {
    color: #000;
}

.blog-page .pagination .page-link:hover:before {
    -webkit-transform: scaleX(1);
    transform: scaleX(1);
}

.blog-page .pagination .page-item.active .page-link {
    background: #fff;
    color: #000;
    border-color: #fff;
}

.blog-page .pagination .page-item.active .page-link:before {
    -webkit-transform: scaleX(1);
    transform: scaleX(1);
}

.blog-page .pagination .page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
}

.blog-page .pagination .page-item.disabled .page-link:hover {
    color: #fff;
}

.blog-page .pagination .page-item.disabled .page-link:hover:before {
    -webkit-transform: scaleX(0);
    transform: scaleX(0);
}

/* Responsive Pagination */
@media (max-width: 768px) {
    .blog-page .pagination {
        gap: 5px;
        margin: 30px 0;
    }
    
    .blog-page .pagination .page-link {
        padding: 0px 10px;
        min-width: 40px;
        height: 40px;
        line-height: 40px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .blog-page .pagination {
        gap: 3px;
        margin: 20px 0;
    }
    
    .blog-page .pagination .page-link {
        padding: 0px 8px;
        min-width: 35px;
        height: 35px;
        line-height: 35px;
        font-size: 11px;
    }
}
