/* Modern Sidebar Styling */

.sidebar {
    position: sticky;
    top: 2rem;
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    /* Remove container styling to let widgets float */
    background: transparent;
    box-shadow: none;
    border: none;
    padding: 0;
    margin-top: 0;
}

.sidebar-widget {
    padding: 1.75rem;
    background: var(--bg-card);
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sidebar-widget:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.widget-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

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

.widget-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--primary);
}

/* Categories Widget */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1rem;
    border-radius: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid transparent;
    transition: all 0.2s ease;
    text-decoration: none;
    color: var(--text-secondary);
}

.category-item:hover {
    background: var(--bg-card);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.category-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.category-name {
    font-weight: 500;
    font-size: 0.95rem;
}

.category-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-count {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 1rem;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.category-item:hover .category-count {
    background: var(--primary);
    color: white;
}

.category-arrow {
    width: 1rem;
    height: 1rem;
    opacity: 0;
    transform: translateX(-5px);
    transition: all 0.2s ease;
}

.category-item:hover .category-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Newsletter Widget */
.subscribe-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.subscribe-form input {
    width: 100%;
    padding: 0.875rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.subscribe-form input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.subscribe-form button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem;
    border-radius: 0.75rem;
    border: none;
    background: var(--gradient-primary);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.subscribe-form button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.subscribe-form button svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Tags Widget */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tag-item:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-1px);
}

.tag-item .tag-count {
    font-size: 0.7rem;
    opacity: 0.7;
}

.tag-item:hover .tag-count {
    opacity: 1;
}

/* Empty States */
.empty-tags, .subscribe-form p {
    color: var(--text-muted) !important;
}

.empty-tags svg {
    color: var(--text-muted) !important;
}

.widget-desc {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9375rem;
}

.empty-state {
    text-align: center;
    padding: 1rem;
}

.widget-icon-large {
    width: 2rem;
    height: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}
