/**
 * Blog Sidebar Styles
 * 
 * @package Vize_Tema
 */

/* Sidebar Container */
.blog-sidebar {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding-right: 10px;
}

.blog-sidebar::-webkit-scrollbar {
    width: 5px;
}

.blog-sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.blog-sidebar::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 10px;
}

.blog-sidebar::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

/* Widget Base Styles */
.blog-sidebar .widget {
    background: #fff;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-sidebar .widget:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 40px rgba(0, 0, 0, 0.08);
}

.blog-sidebar .widget:last-child {
    margin-bottom: 0;
}

/* Widget Title */
.blog-sidebar .widget-title {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 25px;
    padding-bottom: 15px;
    position: relative;
    border-bottom: 1px solid #f0f0f0;
}

.blog-sidebar .widget-title:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 50px;
    height: 2px;
    background: var(--xb-color-theme);
    transition: width 0.3s ease;
}

.blog-sidebar .widget:hover .widget-title:after {
    width: 70px;
}

/* Search Widget */
.widget__search {
    position: relative;
}

.widget__search input {
    width: 100%;
    height: 50px;
    padding: 0 60px 0 20px;
    border: 1px solid #e5e5e5;
    border-radius: 25px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.widget__search input:focus {
    border-color: var(--xb-color-theme);
    outline: none;
    box-shadow: 0 0 0 3px rgba(236, 39, 49, 0.1);
}

.widget__search button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: var(--xb-color-theme);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.widget__search button:hover {
    background: #d41f2f;
    transform: translateY(-50%) scale(1.1);
}

.widget__search button img {
    filter: brightness(0) invert(1);
    width: 16px;
    height: 16px;
}

/* Recent Posts Widget */
.widget__post-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: transform 0.3s ease;
}

.widget__post-item:hover {
    transform: translateX(5px);
}

.widget__post-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.widget__post-item .post-thumb {
    flex-shrink: 0;
    margin-right: 15px;
    overflow: hidden;
    border-radius: 8px;
}

.widget__post-item .post-thumb img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.widget__post-item:hover .post-thumb img {
    transform: scale(1.1);
}

.widget__post-item .post-content {
    flex: 1;
}

.widget__post-item .post-date {
    display: block;
    font-size: 13px;
    color: #999;
    margin-bottom: 5px;
}

.widget__post-item .post-title {
    font-size: 15px;
    line-height: 1.4;
    margin: 0;
}

.widget__post-item .post-title a {
    color: #1a1a1a;
    transition: color 0.3s ease;
}

.widget__post-item .post-title a:hover {
    color: var(--xb-color-theme);
}

/* Categories Widget */
.widget__category {
    padding: 0;
    margin: 0;
}

.widget__category li {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.widget__category li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.widget__category a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #666;
    font-size: 15px;
    transition: all 0.3s ease;
}

.widget__category a:hover {
    color: var(--xb-color-theme);
    padding-left: 10px;
}

.widget__category i {
    font-size: 12px;
    margin-right: 8px;
    transition: transform 0.3s ease;
}

.widget__category a:hover i {
    transform: translateX(3px);
}

.widget__category .count {
    font-size: 13px;
    color: #999;
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 12px;
}

/* Tags Widget */
.tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-cloud-link {
    display: inline-block;
    padding: 8px 18px;
    background: #f5f5f5;
    border-radius: 20px;
    font-size: 13px;
    color: #666;
    transition: all 0.3s ease;
}

.tag-cloud-link:hover {
    background: var(--xb-color-theme);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(236, 39, 49, 0.3);
}

/* Banner Widget */
.widget-banner {
    position: relative;
    padding: 60px 30px !important;
    text-align: center;
    background-size: cover !important;
    background-position: center !important;
    border-radius: 10px;
    overflow: hidden;
}

.widget-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

.widget-banner-content {
    position: relative;
    z-index: 2;
}

.widget-banner i {
    font-size: 60px;
    color: #fff;
    margin-bottom: 20px;
}

.widget-banner h4 {
    color: #fff;
    font-size: 24px;
    margin-bottom: 20px;
    line-height: 1.3;
}

.widget-banner .thm-btn {
    background: #fff;
    color: var(--xb-color-theme);
}

.widget-banner .thm-btn:hover {
    background: var(--xb-color-theme);
    color: #fff;
}

/* Archive Widget */
.widget__archive {
    padding: 0;
    margin: 0;
}

.widget__archive li {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
    color: #666;
}

.widget__archive li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.widget__archive a {
    color: #666;
    transition: color 0.3s ease;
}

.widget__archive a:hover {
    color: var(--xb-color-theme);
}

/* Responsive Styles */
@media (max-width: 1199px) {
    .blog-sidebar {
        position: relative;
        top: auto;
        max-height: none;
        margin-top: 50px;
    }
}

@media (max-width: 767px) {
    .blog-sidebar .widget {
        padding: 20px;
    }
    
    .blog-sidebar .widget-title {
        font-size: 18px;
        margin-bottom: 20px;
    }
    
    .widget__post-item .post-thumb img {
        width: 60px;
        height: 60px;
    }
    
    .widget-banner {
        padding: 40px 20px !important;
    }
    
    .widget-banner h4 {
        font-size: 20px;
    }
    
    .widget-banner i {
        font-size: 40px;
    }
}