/* ========================================
   SIDEBAR COMPLETE FIX - NO SCROLL, FULL CONTENT
   ======================================== */

/* XÓA TẤT CẢ CSS SIDEBAR TRONG STYLE.CSS và CHỈ DÙNG FILE NÀY */

/* SIDEBAR CONTAINER - BỎ STICKY VÀ SCROLL HOÀN TOÀN */
.fengshui-sidebar {
    width: 300px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
    
    /* BỎ STICKY - HIỂN THỊ BÌnH THƯỜNG */
    position: static !important;
    top: auto !important;
    max-height: none !important; /* BỎ GIỚI HẠN CHIỀU CAO */
    
    /* BỎ SCROLL */
    overflow-y: visible !important;
    overflow-x: hidden !important;
    
    /* PADDING VÀ MARGIN ĐƠN GIẢN */
    padding: 0 !important;
    margin: 0 !important;
    
    /* BỎ CÁC THUỘC TÍNH SCROLL */
    scroll-padding-bottom: 0 !important;
    scroll-behavior: auto !important;
    overscroll-behavior: auto !important;
    
    /* CHIỀU CAO TỰ ĐỘNG */
    height: auto !important;
    min-height: auto !important;
}

/* ========================================
   SIDEBAR BLOCKS
   ======================================== */

.sidebar-block {
    background: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    overflow: hidden !important;
    margin-bottom: 20px !important; /* KHOẢNG CÁCH GIỮA CÁC BLOCK */
    width: 100% !important;
    position: relative !important;
    z-index: 1 !important;
    min-height: auto !important;
    height: auto !important;
    flex-shrink: 0 !important;
}

.sidebar-block:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-1px) !important;
}

/* BỎ MARGIN CUỐI CHO BLOCK CUỐI */
.sidebar-block:last-child {
    margin-bottom: 0 !important;
}

/* ========================================
   SIDEBAR TITLES - TÍM NHẠT
   ======================================== */

.sidebar-title {
    background: linear-gradient(135deg, #f8f4ff, #f3e8ff) !important;
    padding: 14px 16px !important;
    margin: 0 !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #7c3aed !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border-bottom: 2px solid #7c3aed !important;
    text-align: center !important;
    position: relative !important;
}

.sidebar-title::after {
    content: '' !important;
    position: absolute !important;
    bottom: -2px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 30px !important;
    height: 2px !important;
    background: #a855f7 !important;
    border-radius: 1px !important;
}

/* ========================================
   SIDEBAR CONTENT - BỎ MỌI GIỚI HẠN
   ======================================== */

.sidebar-content {
    padding: 16px !important;
    overflow: visible !important; /* HIỂN THỊ TẤT CẢ */
    height: auto !important;
    max-height: none !important; /* BỎ GIỚI HẠN */
    min-height: auto !important;
    flex-shrink: 0 !important;
}

/* ========================================
   SEARCH WIDGET
   ======================================== */

.sidebar-search .sidebar-content {
    padding: 16px !important;
}

.search-form {
    width: 100% !important;
    position: relative !important;
}

.search-input-wrapper {
    position: relative !important;
    width: 100% !important;
}

.search-field {
    width: 100% !important;
    padding: 10px 40px 10px 14px !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    background: #fff !important;
    transition: border-color 0.2s ease !important;
}

.search-field:focus {
    outline: none !important;
    border-color: #7c3aed !important;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1) !important;
}

.search-submit {
    position: absolute !important;
    right: 6px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: #7c3aed !important;
    border: none !important;
    padding: 6px 8px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-size: 12px !important;
}

.search-submit:hover {
    background: #6d28d9 !important;
}

/* ========================================
   AUTHORS GRID - TÍM NHẠT
   ======================================== */

.authors-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

.author-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 10px !important;
    background: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
    width: 100% !important;
}

.author-item:hover {
    background: #7c3aed !important;
    color: #fff !important;
    border-color: #7c3aed !important;
    transform: translateX(3px) !important;
}

/* ADMIN AUTHOR - TÍM NHẠT */
.author-item.admin {
    background: linear-gradient(135deg, #f8f4ff, #f3e8ff) !important;
    border-color: #a855f7 !important;
}

.author-item.admin:hover {
    background: #a855f7 !important;
    border-color: #a855f7 !important;
    color: #fff !important;
}

/* AVATAR */
.author-avatar {
    width: 60px !important;
    height: 60px !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
    border: 2px solid #e5e7eb !important;
}

.author-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.author-item.admin .author-avatar {
    border-color: #a855f7 !important;
}

/* AUTHOR INFO */
.author-info {
    flex: 1 !important;
    min-width: 0 !important;
}

.author-name {
    font-size: 13px !important;
    font-weight: 600 !important;
    margin-bottom: 3px !important;
    line-height: 1.3 !important;
}

.author-name a {
    color: inherit !important;
    text-decoration: none !important;
}

.author-item:hover .author-name a {
    color: #fff !important;
}

.author-posts-count {
    font-size: 11px !important;
    color: #6b7280 !important;
    font-weight: 500 !important;
}

.author-item:hover .author-posts-count {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* ========================================
   SIDEBAR POST ITEMS - HIỂN THỊ TẤT CẢ
   ======================================== */

.sidebar-post {
    display: flex !important;
    gap: 10px !important;
    padding: 10px 0 !important;
    margin-bottom: 10px !important;
    border-bottom: 1px solid #f3f4f6 !important;
    align-items: flex-start !important;
}

.sidebar-post:last-child {
    border-bottom: none !important;
    margin-bottom: 0 !important;
}

.sidebar-post-thumb {
    width: 70px !important;
    height: 50px !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
}

.sidebar-post-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.3s ease !important;
}

.sidebar-post:hover .sidebar-post-thumb img {
    transform: scale(1.05) !important;
}

.sidebar-post-content {
    flex: 1 !important;
    min-width: 0 !important;
}

.sidebar-post-title {
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    margin-bottom: 6px !important;
    color: #1f2937 !important;
    display: block !important;
    overflow: visible !important;
    word-wrap: break-word !important;
}

.sidebar-post-title a {
    color: inherit !important;
    text-decoration: none !important;
}

.sidebar-post-title a:hover {
    color: #7c3aed !important;
}

.sidebar-post-meta {
    font-size: 10px !important;
    color: #6b7280 !important;
    display: flex !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
}

.sidebar-post-meta span:not(:last-child)::after {
    content: "•" !important;
    margin-left: 6px !important;
    color: #9ca3af !important;
}

/* ========================================
   DMCA WIDGET
   ======================================== */

.dmca-content {
    text-align: center !important;
}

.dmca-badge {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    padding: 16px !important;
    background: linear-gradient(135deg, #f9fafb, #f3f4f6) !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
}

.dmca-text p {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    margin: 0 0 4px 0 !important;
}

.dmca-text small {
    font-size: 10px !important;
    color: #6b7280 !important;
}

/* ========================================
   TAGS GRID
   ======================================== */

.tags-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    justify-content: flex-start !important;
}

.tag-item {
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
    padding: 3px 6px !important;
    background: #f3f4f6 !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    font-size: 10px !important;
    color: #6b7280 !important;
    transition: all 0.2s !important;
    text-decoration: none !important;
}

.tag-item:hover {
    background: #7c3aed !important;
    color: #fff !important;
    border-color: #7c3aed !important;
    transform: scale(1.05) !important;
}

.tag-count {
    background: rgba(0,0,0,0.1) !important;
    padding: 1px 3px !important;
    border-radius: 3px !important;
    font-size: 9px !important;
}

.tag-item:hover .tag-count {
    background: rgba(255,255,255,0.2) !important;
}

/* ========================================
   BỎ TẤT CẢ PSEUDO ELEMENTS VÀ EXTRA SPACE
   ======================================== */

/* BỎ PSEUDO ELEMENT KHÔNG CẦN THIẾT */
.fengshui-sidebar::after {
    display: none !important;
}

/* BỎ EXTRA PADDING/MARGIN CHO WIDGET CUỐI */
.sidebar-block:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* ========================================
   BỎ SCROLLBAR STYLING - KHÔNG CẦN NỮA
   ======================================== */

.fengshui-sidebar::-webkit-scrollbar {
    display: none !important;
}

/* ========================================
   RESPONSIVE - KHÔNG CẦN STICKY
   ======================================== */

@media (max-width: 1024px) {
    .fengshui-sidebar {
        width: 100% !important;
        position: static !important;
        max-height: none !important;
        min-height: auto !important;
        order: 2 !important;
        margin-top: 20px !important;
        margin-bottom: 0 !important;
        padding: 0 !important;
        top: auto !important;
    }
    
    .sidebar-block:last-child {
        margin-bottom: 0 !important;
    }
}

@media (max-width: 768px) {
    .sidebar-content {
        padding: 12px !important;
    }
    
    .author-avatar {
        width: 50px !important;
        height: 50px !important;
    }
    
    .author-name {
        font-size: 12px !important;
    }
    
    .author-posts-count {
        font-size: 10px !important;
    }
    
    .sidebar-post-thumb {
        width: 60px !important;
        height: 45px !important;
    }
    
    .sidebar-post-title {
        font-size: 11px !important;
    }
    
    .sidebar-post-meta {
        font-size: 9px !important;
    }
}

@media (max-width: 480px) {
    .fengshui-sidebar {
        gap: 15px !important;
    }
    
    .sidebar-content {
        padding: 10px !important;
    }
    
    .author-avatar {
        width: 45px !important;
        height: 45px !important;
    }
    
    .author-item {
        gap: 10px !important;
        padding: 8px !important;
    }
    
    .sidebar-post-thumb {
        width: 50px !important;
        height: 40px !important;
    }
    
    .sidebar-post {
        gap: 8px !important;
        padding: 8px 0 !important;
    }
    
    .tag-item {
        font-size: 9px !important;
        padding: 2px 4px !important;
    }
}

/* ========================================
   ĐẢM BẢO OVERRIDE MỌI CSS STICKY KHÁC
   ======================================== */

.widget,
.widget-area,
.secondary,
.sidebar,
#secondary {
    position: static !important;
    top: auto !important;
    max-height: none !important;
    overflow: visible !important;
    height: auto !important;
}

/* BỎ BODY PADDING TOP NẾU CÓ */
body.fengshui-theme {
    padding-top: 0 !important;
}