/* General Sidebar & Widgets */
.sidebar {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 1.25rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.widget {
    margin-bottom: 2.5rem;
}

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

.widget-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
    display: block;
    border-bottom: 2px solid var(--border-color);
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--primary);
}

/* Popular/Recent Posts List Style */
.popular-posts-list,
.widget_recent_entries ul {
    list-style: none;
    padding: 0;
}

.popular-posts-list li,
.widget_recent_entries li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    transition: var(--transition);
}

.popular-posts-list li:hover,
.widget_recent_entries li:hover {
    transform: translateX(5px);
}

.popular-thumb {
    flex-shrink: 0;
}

.popular-posts-list img {
    width: 64px !important;
    height: 64px !important;
    aspect-ratio: 1 / 1;
    border-radius: 0.75rem;
    object-fit: cover;
    display: block;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.popular-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.post-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.popular-posts-list a,
.widget_recent_entries a {
    font-weight: 600;
    font-size: 0.9375rem;
    line-height: 1.4;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Category, Archive widgets */
.widget_categories ul,
.widget_archive ul {
    list-style: none;
    padding: 0;
}

.widget_categories li,
.widget_archive li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    font-weight: 500;
}

.widget_categories li:last-child,
.widget_archive li:last-child {
    border-bottom: none;
}

.widget_categories a:hover,
.widget_archive a:hover {
    color: var(--accent);
    padding-left: 5px;
}

/* Search Widget */
.widget_search .search-form {
    display: flex;
    gap: 0.5rem;
}

.widget_search input[type="search"] {
    flex: 1;
    padding: 0.625rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-family: inherit;
}

.widget_search input[type="submit"] {
    background: var(--primary);
    color: var(--secondary);
    border: none;
    padding: 0 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
}
